home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Extra 1997 #5 / AmigaPlus_Extra-CD_5-97.iso / online-tools / mail / pgp_mip / pgpsendmail / source / rcs / system.c,v < prev   
Encoding:
Text File  |  1993-09-24  |  3.1 KB  |  136 lines

  1. head    1.2;
  2. access;
  3. symbols;
  4. locks
  5.     simons:1.2; strict;
  6. comment    @ * @;
  7.  
  8.  
  9. 1.2
  10. date    93.09.24.23.12.19;    author simons;    state Stab;
  11. branches;
  12. next    1.1;
  13.  
  14. 1.1
  15. date    93.09.24.22.47.13;    author simons;    state Exp;
  16. branches;
  17. next    ;
  18.  
  19.  
  20. desc
  21. @This file contains all routines accessing the AmigaOS. This is
  22. the file you should look into when porting PGPSendMail.
  23. @
  24.  
  25.  
  26. 1.2
  27. log
  28. @Added ConfirmEncryption().
  29. @
  30. text
  31. @/*
  32.  *      $Filename: system.c $
  33.  *      $Revision: 1.1 $
  34.  *      $Date: 1993/09/24 22:47:13 $
  35.  *
  36.  *      This file contains all routines accessing the AmigaOS. This is
  37.  *      the file you should look into when porting PGPSendMail.
  38.  *
  39.  *      © Copyright 1993 Peter Simons, Germany
  40.  *        All Rights Reserved
  41.  *
  42.  *      $Id: system.c,v 1.1 1993/09/24 22:47:13 simons Exp simons $
  43.  *
  44.  * ------------------------------ log history ----------------------------
  45.  * $Log: system.c,v $
  46.  * Revision 1.1  1993/09/24  22:47:13  simons
  47.  * Initial revision
  48.  *
  49.  */
  50.  
  51.  
  52. /**************************************************************************
  53.  *                                                                        *
  54.  * Sektion: Macros, Definitions, Includes, Structures                     *
  55.  *                                                                        *
  56.  **************************************************************************/
  57.  
  58. /************************************* Includes ***********/
  59. #include <proto/dos.h>
  60. #include <dos/dos.h>
  61. #include <proto/intuition.h>
  62. #include <intuition/intuition.h>
  63.  
  64. /************************************* Defines ************/
  65.  
  66. /************************************* Prototypes *********/
  67.  
  68. /************************************* global Variables ***/
  69.  
  70.  
  71.         static const char __RCSId[] = "$Id: system.c,v 1.1 1993/09/24 22:47:13 simons Exp simons $";
  72.  
  73.  
  74. /**************************************************************************
  75.  *                                                                        *
  76.  * Sektion: Subroutines                                                   *
  77.  *                                                                        *
  78.  **************************************************************************/
  79.  
  80. int TruncFile(char *filename, int pos)
  81.         /*
  82.          * Function: This routine truncates a file at a given positition.
  83.          * Comment : AmigaDOS v2.04+ is required.
  84.          */
  85. {
  86.         BPTR fh;
  87.  
  88.         if ((fh = Open(filename, MODE_OLDFILE)) == NULL)
  89.                 return 0;
  90.  
  91.         pos = SetFileSize(fh, pos, OFFSET_BEGINNING);
  92.         Close(fh);
  93.         return (pos == -1) ? 0 : 1;
  94. }
  95.  
  96.  
  97. int ConfirmEncryption(void)
  98. {
  99.         struct EasyStruct es = {
  100.                 sizeof(struct EasyStruct),
  101.                 0L,
  102.                 "PGPSendMail",
  103.                 "A public key for all receipients of this mail is\n" \
  104.                         "available. Shall I encrypt it, using PGP?",
  105.                 "yes|no"
  106.         };
  107.  
  108.         return EasyRequestArgs(0L, &es, 0L, 0L);
  109. }
  110. @
  111.  
  112.  
  113. 1.1
  114. log
  115. @Initial revision
  116. @
  117. text
  118. @d3 2
  119. a4 2
  120.  *      $Revision$
  121.  *      $Date$
  122. d12 1
  123. a12 1
  124.  *      $Id$
  125. d15 4
  126. a18 1
  127.  * $Log$
  128. d29 4
  129. d41 1
  130. a41 2
  131.  
  132.         static const char __RCSId[] = "$Id$";
  133. d50 27
  134. d78 2
  135. @
  136.