diff docs/ccguide/unlink.refentry @ 579:dc9fb26efbad

All function prototypes are added.
author roug
date Fri, 01 Nov 2002 10:02:34 +0000
parents fcb97f0ba24b
children
line wrap: on
line diff
--- a/docs/ccguide/unlink.refentry	Fri Nov 01 10:02:34 2002 +0000
+++ b/docs/ccguide/unlink.refentry	Fri Nov 01 10:02:34 2002 +0000
@@ -1,3 +1,24 @@
+<!--
+   Too much inspiration from UNIX version 7 manuals, as you can see:
+    DESCRIPTION
+       Unlink removes the entry for the file pointed to by name from
+       its directory.  If this entry was  the last  link to the file,
+       the contents of the file are freed and the file is destroyed.
+       If, however, the file  was  open  in  any  process,  the actual
+       destruction  is  delayed  until  it  is closed, even though the
+       directory entry has disappeared.
+
+    SEE ALSO
+       rm(1), link(2)
+
+    DIAGNOSTICS
+       Zero is normally returned; -1 indicates that the file does not exist,
+       that  its  directory  cannot be written, or that the file contains pure
+       procedure text that is currently  in  use.   Write  permission  is  not
+       required  on the file itself.  It is also illegal to unlink a directory
+       (except for the super-user).
+
+-->
 <refentry id="unlink">
 <refnamediv>
 <refname>Unlink</refname>
@@ -8,7 +29,7 @@
 <funcsynopsis>
 <funcprototype>
   <funcdef><function>unlink</function></funcdef>
-  <paramdef>type <parameter>arg1</parameter></paramdef>
+  <paramdef>char *<parameter>fname</parameter></paramdef>
 </funcprototype>
 </funcsynopsis>
 
@@ -22,7 +43,12 @@
 
 <refsect1><title>Description</title>
 <para>
-Placeholder
+Unlink deletes the directory entry whose name is pointed to by
+"fname". If the entry was the last link to the file, the file
+itself is deleted and the disc space occupied made available
+for re-use. If, however the file is open, in any active task,
+the deletion of the actual file is delayed until the file is
+closed.
 </para>
 </refsect1>
 
@@ -37,8 +63,7 @@
 <refsect1><title>See Also</title>
 <para>
 OS-9 command "kill"
-<!-- The original manual referenced link() here, but no such system call exists.
-     Too much inspiration from UNIX manuals :-) -->
+<!-- The original manual referenced link() here, but no such system call exists. -->
 </para>
 </refsect1>
 </refentry>