home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 1.ddi / CLIBSRC1.ZIP / _FSOPEN.C next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.3 KB  |  42 lines

  1. /*-----------------------------------------------------------------------*
  2.  * filename - _fsopen.c
  3.  *
  4.  * function(s)
  5.  *        _fsopen       - opens a stream with file sharing (MSC compatible)
  6.  *-----------------------------------------------------------------------*/
  7.  
  8. /*
  9.  *      C/C++ Run Time Library - Version 5.0
  10.  *
  11.  *      Copyright (c) 1991, 1992 by Borland International
  12.  *      All Rights Reserved.
  13.  *
  14.  */
  15.  
  16.  
  17. #include <stdio.h>
  18. #include <_stdio.h>
  19.  
  20. /*---------------------------------------------------------------------*
  21.  
  22. Name            _fsopen -  open a stream with file sharing
  23.  
  24. Usage           FILE *_fsopen(const char *filename, char *type, int shflag);
  25.  
  26. Prototype in    stdio.h
  27.  
  28. Description     Similar to fopen, except that it has a third parameter,
  29.                 which specifies the file sharing mode.  This sharing mode
  30.                 can be one of the constants defined in share.h; see the
  31.                 sopen documention for a complete description.
  32. *---------------------------------------------------------------------*/
  33. FILE * _FARFUNC _fsopen (const char *filename, const char *type, int shflag)
  34. {
  35.         register FILE   *fp;
  36.  
  37.         if ((fp = __getfp()) == NULL)
  38.                 return NULL;
  39.         else
  40.                 return __openfp (fp, filename, type, shflag);
  41. }
  42.