home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c496 / 1.img / STARTUP.WPK / IOB.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-20  |  1.7 KB  |  47 lines

  1. /*
  2.  *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  3.  *%      Copyright (C) 1985,1986 by WATCOM Systems Inc. All rights %
  4.  *%      reserved. No part of this software may be reproduced        %
  5.  *%      in any form or by any means - graphic, electronic or        %
  6.  *%      mechanical, including photocopying, recording, taping     %
  7.  *%      or information storage and retrieval systems - except     %
  8.  *%      with the written permission of WATCOM Systems Inc.        %
  9.  *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  10.  
  11.   Modified:    By:        Reason:
  12.   ---------    ---        -------
  13.   29-May-86    A.C.C.Wai    Initial implementation
  14.   14-jul-87    F.W.Crigger    removed _IONBF flags from stdin, stdout
  15.   20-aug-87    F.W.Crigger    Added stdaux, stdprn, _iomode array
  16. ------------------------------------------------------------Version 6.0-----
  17.   08-may-88    F.W.Crigger    moved _iomode array to separate file
  18.   06-sep-89    F.W.Crigger    _iob renamed to __iob for ANSI
  19.   16-oct-90    J.B.Schueler    don't need __tmpfnext for QNX
  20.                 don't need stdaux, stdprn for QNX
  21.    2-Dec-90    B.J. Stecher    added __OpenFiles variable for QNX
  22. */
  23.  
  24. #include <stdio.h>
  25. #include <stdlib.h>
  26. #include <fcntl.h>
  27.  
  28. #ifndef __QNX__
  29. int __near _fmode = O_TEXT;    /* default file translation mode */
  30. #endif
  31.  
  32. FILE __near __iob[_NFILES] = {
  33.     { NULL, 0, NULL, _READ  ,        0, 0, 0, 0 }  /* stdin */
  34.    ,{ NULL, 0, NULL, _WRITE ,        1, 0, 0, 0 }  /* stdout */
  35.    ,{ NULL, 0, NULL, _WRITE ,        2, 0, 0, 0 }  /* stderr */
  36. #ifndef __QNX__
  37.    ,{ NULL, 0, NULL, _READ|_WRITE , 3, 0, 0, 0 }  /* stdaux */
  38.    ,{ NULL, 0, NULL, _WRITE ,        4, 0, 0, 0 }  /* stdprn */
  39. #endif
  40. };
  41.  
  42. #ifndef __QNX__
  43. char    __tmpfnext    = 'a';
  44. #else
  45. FILE    *__OpenFiles;
  46. #endif
  47.