home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c221 / 5.ddi / MWHC.005 / X2 < prev    next >
Encoding:
Text File  |  1992-12-09  |  2.2 KB  |  57 lines

  1. /*********************************************************************
  2. (C) Copyright 1989-1992  Franklin L. DeRemer,     Thomas J. Pennello,
  3.              MetaWare Incorporated;  Santa Cruz, CA 95060.
  4. This program is the unpublished property and trade secret of the above
  5. three.    It is to be utilized solely under license from MetaWare and it
  6. is to be maintained on a confidential basis for internal  company  use
  7. only.  The  security  and  protection  of  the program is paramount to
  8. maintenance of the trade secret status.  It is to  be  protected  from
  9. disclosure  to    unauthorized parties, both within the Licensee company
  10. and outside, in a manner not less stringent than that utilized for Li-
  11. censee's own proprietary  internal  information.   No  copies  of  the
  12. Source or Object Code are to leave the premises of Licensee's business
  13. except    in  strict accordance with the license agreement signed by Li-
  14. censee with MetaWare.
  15. *********************************************************************/ 
  16.  
  17. #include <stdio.h>
  18.  
  19. /* Here initialize the _iob structure and specify its size.
  20.  * This allows any programmer to increase the number of iob entries
  21.  * (up to a maximum of 255, since _fd in the _iob is a 1-byte entry.
  22.  */
  23.  
  24. /* Decide on your own limit here, 
  25.  * and then optionally change FOPEN_MAX in stdio.h.
  26.  */
  27.  
  28. #define IOB_LIMIT FOPEN_MAX
  29.  
  30. _iobuf _iob[IOB_LIMIT] = {
  31.    {0,0,0,_READING|_UNINITIALIZED,0/*stdin */,},     /* 0 */
  32.    {0,0,0,_WRITING|_UNINITIALIZED,1/*stdout*/,},    /* 1 */
  33.    {0,0,0,_WRITING|_UNINITIALIZED,2/*stderr*/,},    /* 2 */
  34.    /* These are not necessary for DOS, but for other OMF systems in which
  35.     * the linker/loader does not set unitialized data to 0,
  36.     * these lines are necessary to initialize _flag and _cnt.
  37.     */
  38. #define Z {0,0,0,0,},   /* _flag and _cnt are set to zero */
  39.    Z Z Z Z Z Z Z     /* 3..9 */
  40.    Z Z Z Z Z Z Z Z Z Z     /* 10..19 */
  41.    Z Z Z Z Z         /* 20..24 */
  42.    };
  43. #undef Z
  44.  
  45. unsigned _bufsiz[IOB_LIMIT] = {
  46. #define Z 0,    
  47.    Z Z Z Z Z Z Z Z Z Z  /* 0..9 */
  48.    Z Z Z Z Z Z Z Z Z Z  /* 10..19 */
  49.    Z Z Z Z Z            /* 20..24 */
  50.    };
  51. #undef Z
  52.     
  53. /* pragma off(public_var_warnings); */
  54. int _fopen_max = sizeof(_iob)/sizeof(_iob[0]); 
  55.  
  56. void * _temp_file_chain = 0;    /* For tmpnam, tmpfile. */
  57.