?login_element?

Subversion Repositories NedoOS

Rev

Rev 1154 | Blame | Compare with Previous | Last modification | View Log | Download

  1. /* stdio.h      for BDS C v1.6  2/85 */
  2.  
  3. #define BDSC
  4.  
  5. #define NULL 0          /* null pointer */
  6. #define EOF -1          /* Physical EOF returned by low level I/O functions */
  7. #define ERROR -1        /* General "on error" return value */
  8. #define OK 0            /* General purpose "no error" return value */
  9. #define JBUFSIZE 6      /* Length of setjump/longjump buffer    */
  10. #define CPMEOF 0x1a     /* CP/M End-of-text-file marker (sometimes!)  */
  11. #define SECSIZ 128      /* Sector size for CP/M read/write calls */
  12. #define TRUE 1          /* logical true constant */
  13. #define FALSE 0         /* logical false constant */
  14. #define MAXLINE 150     /* For compatibility */
  15. #define VOID            /* for functions that don't return anything */
  16.  
  17. #define NSECTS 8        /* Number of sectors to buffer up in ram */
  18.  
  19. struct _buf {
  20.         int _fd;
  21.         int _nleft;
  22.         char *_nextp;
  23.         char _buff[NSECTS * SECSIZ];
  24.         char _flags;
  25. };
  26.  
  27. #define FILE struct _buf        /* Poor man's "typedef" */
  28.  
  29. #define _READ 1         /* only one of these two may be active at a time */
  30. #define _WRITE 2
  31.  
  32. #define _EOF 4          /* EOF has occurred on input */
  33. #define _TEXT 8         /* convert ^Z to EOF on input, write ^Z on output */
  34. #define _ERR 16         /* error occurred writing data out to a file */
  35.  
  36. #define stdin 0
  37. #define stdout 1
  38. #define stdlst 2
  39. #define stdrdr 3
  40. #define stdpun 3
  41. #define stderr 4
  42.  
  43. #define getc fgetc
  44. #define putc fputc
  45.  
  46. struct _header  {               /* Alloc/Free object structure */
  47.         struct _header *_ptr;
  48.         unsigned _size;
  49.  };
  50.  
  51. struct _header  _base;          /* declare this external data to  */
  52. struct _header *_allocp;        /* be used by alloc() and free()  */
  53.  
  54.