home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / alde_c / misc / lib / dlibssrc / chmod.c < prev    next >
Encoding:
C/C++ Source or Header  |  1987-07-17  |  385 b   |  19 lines

  1. #include <osbind.h>
  2. #include <stdio.h>
  3.  
  4. int chmod(filename, pmode)
  5. char *filename;
  6. int pmode;
  7. /*
  8.  *    Change the mode attribute of <filename> to <pmode>.  Values for
  9.  *    <pmode> are the same as for the creat() function.  Returns 0 for
  10.  *    success, or a negative error code.
  11.  */
  12. {
  13.     register int rv;
  14.  
  15.     if((rv = Fattrib(filename, 1, pmode)) < 0)
  16.         return(rv);
  17.     return(0);
  18. }
  19.