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/trunk/src/runtime/c-libs/posix-filesys/link.c
ViewVC logotype

Annotation of /sml/trunk/src/runtime/c-libs/posix-filesys/link.c

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : monnier 249 /* link.c
2 :     *
3 :     * COPYRIGHT (c) 1995 by AT&T Bell Laboratories.
4 :     */
5 :    
6 :     #include "ml-unixdep.h"
7 :     #include "ml-base.h"
8 :     #include "ml-values.h"
9 :     #include "ml-objects.h"
10 :     #include "ml-c.h"
11 :     #include "cfun-proto-list.h"
12 :     #include <unistd.h>
13 :    
14 :    
15 :     /* _ml_P_FileSys_link : string * string -> unit
16 :     * existing newname
17 :     *
18 :     * Creates a hard link from newname to existing file.
19 :     */
20 :     ml_val_t _ml_P_FileSys_link (ml_state_t *msp, ml_val_t arg)
21 :     {
22 :     int sts;
23 :     ml_val_t existing = REC_SEL(arg, 0);
24 :     ml_val_t newname = REC_SEL(arg, 1);
25 :    
26 :     sts = link(STR_MLtoC(existing), STR_MLtoC(newname));
27 :    
28 :     CHK_RETURN_UNIT (msp, sts)
29 :    
30 :     } /* end of _ml_P_FileSys_link */

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