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 5253 - (view) (download) (as text)

1 : monnier 249 /* umask.c
2 :     *
3 : jhr 5253 * COPYRIGHT (c) 2019 The Fellowship of SML/NJ (http://www.smlnj.org)
4 :     * All rights reserved.
5 : monnier 249 */
6 :    
7 :     #include "ml-unixdep.h"
8 :     #include <sys/types.h>
9 :     #include <sys/stat.h>
10 :     #include "ml-objects.h"
11 :     #include "ml-c.h"
12 :     #include "cfun-proto-list.h"
13 :    
14 : jhr 5253 /* _ml_P_FileSys_umask : SysWord.word -> SysWord.word
15 : monnier 249 *
16 :     * Set and get file creation mask
17 :     * Assumes umask never fails.
18 :     */
19 :     ml_val_t _ml_P_FileSys_umask (ml_state_t *msp, ml_val_t arg)
20 :     {
21 :     mode_t omask;
22 :     ml_val_t p;
23 :    
24 :     omask = umask(WORD_MLtoC(arg));
25 :     WORD_ALLOC (msp, p, (Word_t)omask);
26 :    
27 :     return p;
28 :    
29 :     } /* end of _ml_P_FileSys_umask */

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