home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / splint3s.zip / splint-3.0.1.6 / imports / stdio.lcl < prev    next >
Text File  |  2000-06-12  |  3KB  |  259 lines

  1. /*
  2. ** stdio.lcl
  3. **
  4. ** based on /usr/include/stdio.h on red-cross
  5. */
  6.  
  7. imports <stdlib> ;
  8.  
  9. /*
  10. ** we need to allow casts to and from these types...
  11. ** they should be exposed, but unknown type.
  12. */
  13.  
  14. immutable type FILE;
  15.  
  16. typedef void *va_list;
  17. typedef void *fpos_t;
  18.  
  19. FILE *stdin;
  20. FILE *stdout;
  21. FILE *stderr;
  22.  
  23. constant int EOF ;
  24.  
  25. | int : char | getc (FILE *stream )
  26. {
  27.    ensures true;
  28. }
  29.  
  30. | int : char | getchar (void)
  31. {
  32.    ensures true;
  33. }
  34.  
  35. | int : void | putc (| int : char | c, FILE *stream)
  36. {
  37.    ensures true;
  38. }
  39.  
  40. int putchar (|int : char| c)
  41. {
  42.    ensures true;
  43. }
  44.  
  45. | int : bool | feof (FILE *stream)
  46. {
  47.    ensures true;
  48. }
  49.  
  50. | int : bool | ferror (FILE *stream )
  51. {
  52.    ensures true;
  53. }
  54.  
  55. int fileno (FILE *stream)
  56. {
  57.    ensures true;
  58. }
  59.  
  60. int _filbuf (FILE *p)
  61. {
  62.    ensures true;
  63. }
  64.  
  65. int _flsbuf (unsigned char x, FILE *p)
  66. {
  67.    ensures true;
  68. }
  69.  
  70. void clearerr (FILE *stream)
  71. {
  72.    ensures true;
  73. }
  74.  
  75. | int : void | fclose (FILE *stream )
  76. {
  77.    ensures true;
  78. }
  79.  
  80. FILE * fdopen (int filedes, char *ttype)
  81. {
  82.    ensures true;
  83. }
  84.  
  85. | int : void | fflush (FILE *stream )
  86. {
  87.    ensures true;
  88. }
  89.  
  90. | int : char | fgetc (FILE *stream )
  91. {
  92.    ensures true;
  93. }
  94.  
  95. int fgetpos (FILE *stream, fpos_t *pos )
  96. {
  97.    ensures true;
  98. }
  99.  
  100. char *fgets (char *s, int n, FILE *stream )
  101. {
  102.    ensures true;
  103. }
  104.  
  105.  
  106. FILE *fopen (char *filename, char *ttype )
  107. {
  108.    ensures true;
  109. }
  110.  
  111. printflike
  112. | int : void | fprintf (FILE *stream, char *format, ...)
  113. {
  114.    ensures true;
  115. }
  116.  
  117. printflike
  118. | int : void | sprintf (FILE *stream, char *format, ...)
  119. {
  120.    ensures true;
  121. }
  122.  
  123. | int : void | fputc (| int : char | c, FILE *stream )
  124. {
  125.    ensures true;
  126. }
  127.  
  128. | int : void | fputs( char *s, FILE *stream )
  129. {
  130.    ensures true;
  131. }
  132.  
  133. size_t fread (void *ptr, size_t size,
  134.           size_t nitems, FILE *stream )
  135. {
  136.    ensures true;
  137. }
  138.  
  139. FILE *freopen (char *filename, char *ttype,
  140.            FILE *stream)
  141. {
  142.    ensures true;
  143. }
  144.  
  145. scanflike
  146. int fscanf (FILE *stream, char *format, ... )
  147. {
  148.    ensures true;
  149. }
  150.  
  151. | int : void | fseek (FILE *stream, long offset, int ptrname)
  152. {
  153.    ensures true;
  154. }
  155.  
  156. int fsetpos (FILE *stream, fpos_t *pos)
  157. {
  158.    ensures true;
  159. }
  160.  
  161. long ftell (FILE *stream)
  162. {
  163.    ensures true;
  164. }
  165.  
  166. size_t fwrite (void *ptr, size_t size,
  167.            size_t nitems, FILE *stream)
  168. {
  169.    ensures true;
  170. }
  171.  
  172. char *gets (char *s)
  173. {
  174.    ensures true;
  175. }
  176.  
  177. void perror (char *s)
  178. {
  179.    ensures true;
  180. }
  181.  
  182. FILE  *popen (char *command, char *ttype)
  183. {
  184.    ensures true;
  185. }
  186.  
  187. | int : void | ungetc(char c, FILE *stream)
  188. {
  189.    ensures true;
  190. }
  191.  
  192. printflike
  193. | int : void | printf (char *format, ...)
  194. {
  195.    ensures true;
  196. }
  197.  
  198. | int : void | puts (char *s)
  199. {
  200.    ensures true;
  201. }
  202.  
  203. | int : bool | remove (char *filename)
  204. {
  205.    ensures true;
  206. }
  207.  
  208. | int : bool | rename (char *from, char *to)
  209. {
  210.    ensures true;
  211. }
  212.  
  213. void rewind (FILE *stream)
  214. {
  215.    ensures true;
  216. }
  217.  
  218. scanflike
  219. | int : void | scanf (char *format, ...)
  220. {
  221.    ensures true;
  222. }
  223.  
  224. void setbuf (FILE *stream, char *buf)
  225. {
  226.    ensures true;
  227. }
  228.  
  229. int setvbuf (FILE *stream, char *buf,
  230.          int ttype, size_t size )
  231. {
  232.    ensures true;
  233. }
  234.  
  235. scanflike
  236. | int : void | sscanf (char *s, char *format, ...)
  237. {
  238.    ensures true;
  239. }
  240.  
  241. FILE *tmpfile( void )
  242. {
  243.    ensures true;
  244. }
  245.  
  246. char *tmpnam (char *s)
  247. {
  248.    ensures true;
  249. }
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.