home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / communic / pcmail / main / defs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-05  |  2.4 KB  |  104 lines

  1. /*++
  2. /* NAME
  3. /*      defs 5
  4. /* SUMMARY
  5. /*      program-independent definitions
  6. /* PROJECT
  7. /*      pc-mail
  8. /* PACKAGE
  9. /*      all
  10. /* SYNOPSIS
  11. /*      #include "defs.h"
  12. /* DESCRIPTION
  13. /* .nf
  14.  
  15.  /* this file is for program-independent definitions */
  16.  
  17. extern int errno;
  18. extern char *sys_errlist[];
  19.  
  20. #define hidden static            /* for functions local to a module */
  21. #define public                /* globally visible functions/data */
  22.  
  23.  /*
  24.   * Take care of differences between various flavours of C library function
  25.   * names. Define macros where functions are missing.
  26.   */
  27.  
  28. #if (SIII|SYSV|MSDOS)
  29. #   define index strchr
  30. #   define rindex strrchr
  31. #endif
  32.  
  33. #ifdef    unix
  34. #   define rename(from,to) (link(from,to) || unlink(from))
  35. #endif
  36.  
  37.  /*
  38.   * The delay macro is used during the dial-out sequence, e.g. when we are
  39.   * sending commands to a modem. It is supposed to produce a short delay of a
  40.   * few milliseconds so that the modem can see a small gap between successive
  41.   * characters.
  42.   */
  43.  
  44. #if (unix||MSDOS)
  45. #define delay()    chdir(".")
  46. #else
  47. "put your delay() definition here"
  48. #endif
  49.  
  50.  /*
  51.   * Standard macros.
  52.   */
  53.  
  54. #define    MIN(a,b)    ((a) < (b) ? (a) : (b))
  55. #define    MAX(x,y)    ((x) > (y) ? (x) : (y))
  56. #define CALL(p)        (*(p))
  57.  
  58.  /* library functions with non-default return types */
  59.  
  60. extern char *strtok();
  61. extern char *fgets();
  62. extern char *strcpy();
  63. extern char *strncpy();
  64. extern char *strcat();
  65. extern char *strncat();
  66. extern char *malloc();
  67. extern char *realloc();
  68. extern void free();
  69. extern char *getenv();
  70. extern char *asctime();
  71. extern long time();
  72. extern char *index();
  73. extern char *rindex();
  74. extern char *memcpy();
  75. extern void exit();
  76.  
  77.  /* local utility functions with non-default return types */
  78.  
  79. extern char *myalloc();
  80. extern char *myrealloc();
  81. extern char *strcons();
  82. extern char *split();
  83. extern char **strvec();
  84. extern char *vecstr();
  85.  
  86.  /* maximal length of lines with recipients etcetera */
  87.  
  88. #define    MAXLINE    1024
  89.  
  90. /* SEE ALSO
  91. /*      path(5)         system-dependent path names
  92. /* AUTHOR(S)
  93. /*      W.Z. Venema
  94. /*      Eindhoven University of Technology
  95. /*      Department of Mathematics and Computer Science
  96. /*      Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
  97. /* CREATION DATE
  98. /*      Mon Apr  6 16:58:42 GMT+1:00 1987
  99. /* LAST MODIFICATION
  100. /*    90/01/22 13:01:28
  101. /* VERSION/RELEASE
  102. /*    2.1
  103. /*--*/
  104.