Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/branches/num64/runtime/c-libs/posix-filesys/umask.c
ViewVC logotype

Annotation of /sml/branches/num64/runtime/c-libs/posix-filesys/umask.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5104 - (view) (download) (as text)

1 : monnier 249 /* umask.c
2 :     *
3 :     * COPYRIGHT (c) 1995 by AT&T Bell Laboratories.
4 :     */
5 :    
6 :     #include "ml-unixdep.h"
7 :     #include <sys/types.h>
8 :     #include <sys/stat.h>
9 :     #include "ml-objects.h"
10 :     #include "ml-c.h"
11 :     #include "cfun-proto-list.h"
12 :    
13 :     /* _ml_P_FileSys_umask : word -> word
14 :     *
15 :     * Set and get file creation mask
16 :     * Assumes umask never fails.
17 :     */
18 :     ml_val_t _ml_P_FileSys_umask (ml_state_t *msp, ml_val_t arg)
19 :     {
20 :     mode_t omask;
21 :     ml_val_t p;
22 :    
23 :     omask = umask(WORD_MLtoC(arg));
24 :     WORD_ALLOC (msp, p, (Word_t)omask);
25 :    
26 :     return p;
27 :    
28 :     } /* end of _ml_P_FileSys_umask */

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0