home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnuawk.zip / protos.h < prev    next >
C/C++ Source or Header  |  1996-10-20  |  4KB  |  129 lines

  1. /*
  2.  * protos.h -- function prototypes for when the headers don't have them.
  3.  */
  4.  
  5. /* 
  6.  * Copyright (C) 1991 - 96 the Free Software Foundation, Inc.
  7.  * 
  8.  * This file is part of GAWK, the GNU implementation of the
  9.  * AWK Programming Language.
  10.  * 
  11.  * GAWK is free software; you can redistribute it and/or modify
  12.  * it under the terms of the GNU General Public License as published by
  13.  * the Free Software Foundation; either version 2 of the License, or
  14.  * (at your option) any later version.
  15.  * 
  16.  * GAWK is distributed in the hope that it will be useful,
  17.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.  * GNU General Public License for more details.
  20.  * 
  21.  * You should have received a copy of the GNU General Public License
  22.  * along with this program; if not, write to the Free Software
  23.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
  24.  */
  25.  
  26. #ifdef __STDC__
  27. #define aptr_t void *    /* arbitrary pointer type */
  28. #else
  29. #define aptr_t char *
  30. #endif
  31. extern aptr_t malloc P((MALLOC_ARG_T));
  32. extern aptr_t realloc P((aptr_t, MALLOC_ARG_T));
  33. extern aptr_t calloc P((MALLOC_ARG_T, MALLOC_ARG_T));
  34.  
  35. extern void free P((aptr_t));
  36. extern char *getenv P((const char *));
  37.  
  38. #if ! defined(HAVE_STRING_H) && ! defined(HAVE_STRINGS_H)
  39. extern char *strcpy P((char *, const char *));
  40. extern char *strcat P((char *, const char *));
  41. extern char *strncpy P((char *, const char *, size_t));
  42. extern int strcmp P((const char *, const char *));
  43. extern int strncmp P((const char *, const char *, size_t));
  44. extern char *strchr P((const char *, int));
  45. extern char *strrchr P((const char *, int));
  46. extern char *strstr P((const char *s1, const char *s2));
  47. extern size_t strlen P((const char *));
  48. extern long strtol P((const char *, char **, int));
  49.  
  50. extern aptr_t memset P((aptr_t, int, size_t));
  51. extern aptr_t memcpy P((aptr_t, const aptr_t, size_t));
  52. extern aptr_t memmove P((aptr_t, const aptr_t, size_t));
  53. extern aptr_t memchr P((const aptr_t, int, size_t));
  54. extern int memcmp P((const aptr_t, const aptr_t, size_t));
  55. #endif /* ! defined(HAVE_STRING_H) && ! defined(HAVE_STRINGS_H) */
  56.  
  57. #ifndef VMS
  58. extern char *strerror P((int));
  59. #else
  60. extern char *strerror P((int,...));
  61. #endif
  62.  
  63. #if ! defined(_MSC_VER) && ! defined(__GNU_LIBRARY__)
  64. extern size_t strftime P((char *, size_t, const char *, const struct tm *));
  65. #endif
  66. #ifdef __STDC__
  67. extern time_t time P((time_t *));
  68. #else
  69. extern long time();
  70. #endif
  71.  
  72. extern FILE *fdopen P((int, const char *));
  73. extern int fprintf P((FILE *, const char *, ...)); 
  74. #if ! defined(MSDOS) && ! defined(__GNU_LIBRARY__)
  75. #ifdef __STDC__
  76. extern size_t fwrite P((const aptr_t, size_t, size_t, FILE *));
  77. #else
  78. extern int fwrite();
  79. #endif
  80. extern int fputs P((const char *, FILE *));
  81. extern int unlink P((const char *));
  82. #endif
  83. extern int fflush P((FILE *));
  84. extern int fclose P((FILE *));
  85. extern FILE *popen P((const char *, const char *));
  86. extern int pclose P((FILE *));
  87. extern void abort P(());
  88. extern int isatty P((int));
  89. extern void exit P((int));
  90. extern int system P((const char *));
  91. extern int sscanf P((const char *, const char *, ...));
  92. #ifndef toupper
  93. extern int toupper P((int));
  94. #endif
  95. #ifndef tolower
  96. extern int tolower P((int));
  97. #endif
  98.  
  99. extern double pow P((double x, double y));
  100. extern double atof P((const char *));
  101. extern double strtod P((const char *, char **));
  102. extern int fstat P((int, struct stat *));
  103. extern int stat P((const char *, struct stat *));
  104. extern off_t lseek P((int, off_t, int));
  105. extern int fseek P((FILE *, long, int));
  106. extern int close P((int));
  107. extern int creat P((const char *, mode_t));
  108. extern int open P((const char *, int, ...));
  109. extern int pipe P((int *));
  110. extern int dup P((int));
  111. extern int dup2 P((int,int));
  112. extern int fork P(());
  113. extern int execl P((const char *, const char *, ...));
  114. #ifndef __STDC__
  115. extern int read P((int, void *, unsigned int));
  116. #endif
  117. #ifndef HAVE_SYS_WAIT_H
  118. extern int wait P((int *));
  119. #endif
  120. extern void _exit P((int));
  121.  
  122. #ifndef __STDC__
  123. extern long time P((long *));
  124. #endif
  125.  
  126. extern SPRINTF_RET sprintf P((char *, const char *, ...));
  127.  
  128. #undef aptr_t
  129.