home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume3 / pcmail / part07 / defs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-02-03  |  2.1 KB  |  95 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. #include <stdio.h>
  18.  
  19. extern int errno;
  20. extern char *sys_errlist[];
  21.  
  22. #define hidden static    /* for functions local to a module */
  23. #define public        /* for globally visible functions/data */
  24.  
  25. /* /*
  26. * Take care of differences between various flavours of C library
  27. * function names. Define macros where functions are missing.
  28. */
  29.  
  30. #if (SIII|SYSV|MSDOS)
  31. #   define index strchr
  32. #   define rindex strrchr
  33. #endif
  34.  
  35. #ifdef    unix
  36. #   define rename(from,to) (link(from,to) || unlink(from))
  37. #endif
  38.  
  39. /* /*
  40. * The delay macro is used during the dial-out sequence, e.g. when we 
  41. * are sending commands to a modem. It is supposed to produce a short
  42. * delay of a few milliseconds so that the modem can see a small gap
  43. * between successive characters.
  44. */
  45.  
  46. #define delay()    chdir(".")
  47.  
  48. /* /*
  49. * Standard macros. 
  50. */
  51.  
  52. #define    MIN(a,b)    ((a) < (b) ? (a) : (b))
  53. #define    MAX(x,y)    ((x) > (y) ? (x) : (y))
  54. #define CALL(p)        (*(p))
  55.  
  56. /* /* library functions with non-default return types */
  57.  
  58. extern char *strtok();
  59. extern char *fgets();
  60. extern char *strcpy();
  61. extern char *strncpy();
  62. extern char *strcat();
  63. extern char *strncat();
  64. extern char *malloc();
  65. extern void free();
  66. extern char *getenv();
  67. extern char *asctime();
  68. extern long time();
  69. extern char *index();
  70. extern char *rindex();
  71. extern char *memcpy();
  72. extern void exit();
  73.  
  74. /* /* local utility functions with non-default return types */
  75.  
  76. extern char *myalloc();
  77. extern char *strcons();
  78. extern char **strvec();
  79. extern char *vecstr();
  80. /* SEE ALSO
  81. /*      path(5)         system-dependent path names
  82. /* AUTHOR(S)
  83. /*      W.Z. Venema
  84. /*      Eindhoven University of Technology
  85. /*      Department of Mathematics and Computer Science
  86. /*      Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
  87. /* CREATION DATE
  88. /*      Mon Apr  6 16:58:42 GMT+1:00 1987
  89. /* LAST MODIFICATION
  90. /*    Wed Apr  6 00:19:43 MET 1988
  91. /* VERSION/RELEASE
  92. /*    1.4
  93. /*--*/
  94.  
  95.