home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / PGP / pgpv26ui.lha / PGPAmiga / contrib / PGPSendMail / source / system.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-13  |  3.1 KB  |  95 lines

  1. /*
  2.  *      $Filename: system.c $
  3.  *      $Revision: 1.7 $
  4.  *      $Date: 1994/03/13 18:40:51 $
  5.  *
  6.  *      Copyright (C) 1993 by Peter Simons <simons@peti.GUN.de>
  7.  *
  8.  *      This program is free software; you can redistribute it and/or
  9.  *      modify it under the terms of the GNU General Public License as
  10.  *      published by the Free Software Foundation; either version 2 of
  11.  *      the License, or (at your option) any later version.
  12.  *
  13.  *      This program is distributed in the hope that it will be useful,
  14.  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  *      General Public License for more details.
  17.  *
  18.  *      You should have received a copy of the GNU General Public License
  19.  *      along with this program; if not, write to the Free Software
  20.  *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  *
  22.  *      $Id: system.c 1.7 1994/03/13 18:40:51 simons Exp simons $
  23.  *
  24.  */
  25.  
  26.  
  27. /**************************************************************************
  28.  *                                                                        *
  29.  * Sektion: Macros, Definitions, Includes, Structures                     *
  30.  *                                                                        *
  31.  **************************************************************************/
  32.  
  33. /************************************* Includes ***********/
  34. #include <string.h>
  35.  
  36. #include <proto/intuition.h>
  37. #include <intuition/intuition.h>
  38.  
  39. #include "pgpsendmail.h"
  40. #include "protos.h"
  41.  
  42. /************************************* Defines ************/
  43.  
  44. /************************************* Prototypes *********/
  45.  
  46. /************************************* global Variables ***/
  47. static const char __RCSId[] = "$Id: system.c 1.7 1994/03/13 18:40:51 simons Exp simons $";
  48.  
  49.  
  50. /**************************************************************************
  51.  *                                                                        *
  52.  * Sektion: Subroutines                                                   *
  53.  *                                                                        *
  54.  **************************************************************************/
  55.  
  56.  
  57.  /*
  58.   * PORT NOTE: The AmigaOS supports easy requesters which are wonderful for our
  59.   * purpose. Other platforms might have a similar feature.
  60.   */
  61.  
  62. int ConfirmEncryption(void)
  63. {
  64.         struct EasyStruct es = {
  65.                 sizeof(struct EasyStruct),
  66.                 0L,
  67.                 PRGNAME,
  68.                 "A public key for all receipients of this mail is\n" \
  69.                         "available. Shall I encrypt it, using PGP?",
  70.                 "encrypt|do not encrypt"
  71.         };
  72.  
  73.         return EasyRequestArgs(0L, &es, 0L, 0L);
  74. }
  75.  
  76.  
  77.  
  78.  /*
  79.   * PORT NOTE: On the Amiga, a routine get the original, unparsed commandline is available.
  80.   * Other platforms might need to re-build it using the argc and argv parameter.
  81.   */
  82.  
  83. char *GetOriginalCmdLine(int argc, char **argv)
  84. {
  85.         char *ptr;
  86.  
  87.         if (ptr = GetArgStr()) {
  88.                 ptr[strlen(ptr)-1] = '\0';
  89.                 return ptr;
  90.         }
  91.         else
  92.                 return "";
  93. }
  94.  
  95.