home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v92.tgz / v92.tar / v92 / src / h / proto.h < prev    next >
C/C++ Source or Header  |  1996-03-22  |  4KB  |  171 lines

  1. /*
  2.  * proto.h -- prototypes for library functions.
  3.  */
  4.  
  5. /*
  6.  * The following code is operating-system dependent. [@proto.01].
  7.  *  Prototypes for library functions.
  8.  */
  9.  
  10. #if PORT
  11. Deliberate Syntax Error
  12. #endif                    /* PORT */
  13.  
  14. #if AMIGA
  15. #if LATTICE
  16. #include <dos.h>
  17. #endif                    /* LATTICE */
  18. #include "::h:dproto.h"
  19. #endif                    /* AMIGA */
  20.  
  21. #if ATARI_ST
  22. #include "::h:dproto.h"
  23. #endif                    /* ATARI_ST */
  24.  
  25. #if ARM
  26. #include <stdlib.h>
  27. #include <string.h>
  28.  
  29. /* Our verson of unlink, which will fail if the named file does not exist */
  30. extern int unlink (const char *name);
  31.  
  32. /* Force a cast of the function parameter to qsort() */
  33. #define    qsort(base,n,size,cmp) \
  34.     (qsort)((base),(n),(size),(int (*) (const void *, const void *))(cmp))
  35. #endif                    /* ARM */
  36.  
  37.  
  38. #if MACINTOSH
  39. #if MPW || THINK_C
  40. #include <stdlib.h>
  41. #include <string.h>
  42. char    *strchar    Params((char *s, int i));
  43. char    *ecvt        Params((double value, int count, int *dec, int* sign));
  44. char    *gcvt        Params((double number, int ndigit, char *buf));
  45. #else                    /* MPW || THINK_C */
  46. #include "::h:dproto.h"
  47. #endif                    /* MPW || THINK_C */
  48. #endif                    /* MACINTOSH */
  49.  
  50. #if MSDOS || OS2
  51. #if HIGHC_386
  52. #include <stdlib.h>
  53. #include <string.h>
  54. int    brk        Params((pointer p));
  55. pointer sbrk        Params((msize n));
  56. #endif                    /* HIGHC_386 */
  57. #if INTEL_386
  58. #include <dos.h>
  59. #include <stdlib.h>
  60. #include <string.h>
  61. int    brk        Params((pointer p));
  62. #endif                    /* INTEL_386 */
  63. #if OS2_32
  64. /* C Set/2 has gcvt #defined */
  65. #if CSET2
  66. #ifdef IconGcvt
  67. #undef gcvt            /* gets rid of warning message */
  68. #include <stdlib.h>
  69. #undef gcvt
  70. #define gcvt icon_gcvt
  71. #else                    /* IconGcvt */
  72. #include <stdlib.h>
  73. #endif                    /* IconGcvt */
  74. #else                    /* C Set/2 */
  75. #include <stdlib.h>
  76. #endif                    /* C Set/2 */
  77. #include <string.h>
  78. #endif                    /* OS2_32 */
  79. #if MICROSOFT || TURBO || ZTC_386 || WATCOM || NT || BORLAND_286 || BORLAND_386 || SCCX_MX
  80. #include <dos.h>
  81. #ifdef StandardLib
  82. #include <string.h>
  83. #include <stdlib.h>
  84. #else                    /* StandardLib */
  85. #include "::h:dproto.h"
  86. #endif                    /* StandardLib */
  87. #endif                    /* MICROSOFT || TURBO || ZTC_386 ... */
  88. #endif                    /* MSDOS || OS2 */
  89.  
  90. #if UNIX
  91. #ifdef StandardLib
  92. #include <stdlib.h>
  93. #include <string.h>
  94. /*
  95.  * index() is not part of the standard library.  We use no prototype
  96.  *  because various systems disagree on the details, and they complain.
  97.  */
  98. #ifndef index
  99. char    *index    ();
  100. #endif                    /* index */
  101. #else                    /* StandardLib */
  102. #include "::h:dproto.h"
  103. #endif                    /* StandardLib */
  104. #endif                    /* UNIX */
  105.  
  106. #if VM || MVS
  107. /* ****  TEMPORARY *** */
  108. novalue abort           Params((noargs));
  109. double  atof            Params((char *));
  110. long    atol            Params((char *));
  111. pointer calloc          Params((unsigned,unsigned));
  112. novalue exit            Params((int));
  113. char    *getenv         Params((char *));
  114. pointer malloc          Params((msize));
  115. pointer realloc         Params((pointer, unsigned));
  116. #ifdef StandardC
  117. #include <string.h>
  118. #else                                   /* StandardC */
  119. char    *strchr         Params((char *s, int i));
  120. int     strcmp          Params((char *s1, char *s2));
  121. char    *strcpy         Params((char *s1, char *s2));
  122. char    *strncat        Params((char *s1, char *s2, int n));
  123. int     strncmp         Params((char *s1, char *s2, int n));
  124. char    *strncpy        Params((char *s1, char *s2, int n));
  125. char    *ecvt        Params((double value, int count, int *dec, int* sign));
  126. double    pow        Params((double x, double y));
  127. #ifdef SystemFnc
  128. int    system        Params((char *));
  129. #endif                    /* SystemFnc */
  130. #endif                                  /* StandardC */
  131. #endif                                  /* VM || MVS */
  132.  
  133. #if VMS
  134. #include "::h:dproto.h"
  135. #endif                    /* VMS */
  136.  
  137. /*
  138.  * End of operating-system specific code.
  139.  */
  140.  
  141. #ifdef KeyboardFncs
  142. int    getch        Params((noargs));
  143. int    getche        Params((noargs));
  144. int    kbhit        Params((noargs));
  145. #endif                    /* KeyboardFncs */
  146.  
  147. #ifdef MSWindows
  148. #if BORLAND_286
  149. #define lstrlen longstrlen
  150. #include <ctype.h>
  151. #endif
  152. #endif
  153. #include "::h:mproto.h"
  154.  
  155. #ifdef ConsoleWindow
  156. int Consolefprintf(FILE *file, char *format, ...);
  157. int Consoleprintf(char *format, ...);
  158. int Consoleputc(int c, FILE *file);
  159. int Consolefflush(FILE *file);
  160. #endif                    /* ConsoleWindow */
  161. /*
  162.  * These must be after prototypes to avoid clash with system
  163.  * prototypes.
  164.  */
  165.  
  166. #if IntBits == 16
  167. #define sbrk lsbrk
  168. #define strlen lstrlen
  169. #define qsort lqsort
  170. #endif                    /* IntBits == 16 */
  171.