/* * $Filename: system.c $ * $Revision: 1.7 $ * $Date: 1994/03/13 18:40:51 $ * * Copyright (C) 1993 by Peter Simons * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: system.c 1.7 1994/03/13 18:40:51 simons Exp simons $ * */ /************************************************************************** * * * Sektion: Macros, Definitions, Includes, Structures * * * **************************************************************************/ /************************************* Includes ***********/ #include #include #include #include "pgpsendmail.h" #include "protos.h" /************************************* Defines ************/ /************************************* Prototypes *********/ /************************************* global Variables ***/ static const char __RCSId[] = "$Id: system.c 1.7 1994/03/13 18:40:51 simons Exp simons $"; /************************************************************************** * * * Sektion: Subroutines * * * **************************************************************************/ /* * PORT NOTE: The AmigaOS supports easy requesters which are wonderful for our * purpose. Other platforms might have a similar feature. */ int ConfirmEncryption(void) { struct EasyStruct es = { sizeof(struct EasyStruct), 0L, PRGNAME, "A public key for all receipients of this mail is\n" \ "available. Shall I encrypt it, using PGP?", "encrypt|do not encrypt" }; return EasyRequestArgs(0L, &es, 0L, 0L); } /* * PORT NOTE: On the Amiga, a routine get the original, unparsed commandline is available. * Other platforms might need to re-build it using the argc and argv parameter. */ char *GetOriginalCmdLine(int argc, char **argv) { char *ptr; if (ptr = GetArgStr()) { ptr[strlen(ptr)-1] = '\0'; return ptr; } else return ""; }