# HG changeset patch
# User roug
# Date 1037396991 0
# Node ID c0da1728ed5b79b2a281bd479116e7386ab2c1ba
# Parent 0fda6c7fe48ec5c97b68aa8dfad667b912c8da3b
All refentries finished.
diff -r 0fda6c7fe48e -r c0da1728ed5b docs/ccguide/access.refentry
--- a/docs/ccguide/access.refentry Thu Nov 14 03:55:12 2002 +0000
+++ b/docs/ccguide/access.refentry Fri Nov 15 21:49:51 2002 +0000
@@ -8,7 +8,7 @@
access
- char *name
+ char *fnameint perm
@@ -17,7 +17,20 @@
Description
-Placeholder
+Access returns 0 if the access modes specified in "perm" are
+correct for the user to access "fname". -1 is returned if the
+file cannot be accessed.
+
+
+The value for "perm" may be any legal OS-9 mode as used for
+"open()" or "creat()", it may be zero, which tests whether the
+file exists, or the path to it may be searched.
+
+
+Caveats
+
+NOTE that the "perm" value is not compatible with other
+systems.
Diagnostics
diff -r 0fda6c7fe48e -r c0da1728ed5b docs/ccguide/chain.refentry
--- a/docs/ccguide/chain.refentry Thu Nov 14 03:55:12 2002 +0000
+++ b/docs/ccguide/chain.refentry Fri Nov 15 21:49:51 2002 +0000
@@ -27,7 +27,25 @@
Description
-Placeholder
+The action of F$CHAIN is described fully in the OS-9
+documentation. Chain implements the service request as
+described with one important exception: chain will NEVER return
+to the caller. If there is an error, the process will abort
+and return to its parent process. It might be wise, therefore,
+for the programs to check the existence and access permissions
+of the module before calling chain. Permissions may be checked
+by using "modlink()" or "modload()" followed by an "munlink()".
+
+
+"Modname" should point to the name of the desired module.
+"Paramsize is the length of the parameter string (which should
+normally be terminated with a "\n"), and "paramptr" points to
+the parameter string. "Type" is the module type as found in
+the module header (normally 1: program), and "lang" should
+match the language nibble in the module header (C programs
+have 1 for 6809 machine code here). "Datasize" may be zero, or
+it may contain the number of 256 byte pages to give to the new
+process as initial allocation of data memory.
diff -r 0fda6c7fe48e -r c0da1728ed5b docs/ccguide/chmod.refentry
--- a/docs/ccguide/chmod.refentry Thu Nov 14 03:55:12 2002 +0000
+++ b/docs/ccguide/chmod.refentry Fri Nov 15 21:49:51 2002 +0000
@@ -20,9 +20,30 @@
Description
-Placeholder
+Chmod changes the permission bits associated with a file.
+"Fname" must be a pointer to a file name, and "perm" should
+contain the desired bit pattern,
+
+
+The allowable bit patterns are defined in the include file as follows:
+
+
+/* permissions */
+#define S_IREAD 0x01 /* owner read */
+#define S_IWRITE 0x02 /* owner write */
+#define S_IEXEC 0x04 /* owner execute */
+#define S_IOREAD 0x08 /* public read */
+#define S_IOWRITE 0x10 /* public write */
+#define S_IOEXEC 0x20 /* public execute */
+#define S_ISHARE 0x40 /* sharable */
+#define S_IFDIR 0x80 /* directory */
+
+
+Only the owner or the super user may change the permissions of
+a file.
+
Diagnostics
A successful call returns 0. A -1 is returned if the
@@ -31,4 +52,10 @@
+See Also
+
+OS-9 command "attr"
+
+
+
diff -r 0fda6c7fe48e -r c0da1728ed5b docs/ccguide/chown.refentry
--- a/docs/ccguide/chown.refentry Thu Nov 14 03:55:12 2002 +0000
+++ b/docs/ccguide/chown.refentry Fri Nov 15 21:49:51 2002 +0000
@@ -17,7 +17,8 @@
Description
-Placeholder
+This call is available only to the super user. "Fname" is a
+pointer to a file name, and "ownerid" is the new user-id.
Diagnostics
diff -r 0fda6c7fe48e -r c0da1728ed5b docs/ccguide/crc.refentry
--- a/docs/ccguide/crc.refentry Thu Nov 14 03:55:12 2002 +0000
+++ b/docs/ccguide/crc.refentry Fri Nov 15 21:49:51 2002 +0000
@@ -24,7 +24,13 @@
Description
-Placeholder
+This call accumulates a crc into a three byte array at "accum"
+for "count" bytes starting at "start". All three bytes of
+"accum" should be initialized to 0xff before the first call to
+"crc()". However, repeated calls can be subsequently made to
+cover an entire module. If the result is to be used as an OS-9
+module crc, it should have its bytes complemented before
+insertion at the end of the module.
diff -r 0fda6c7fe48e -r c0da1728ed5b docs/ccguide/creat.refentry
--- a/docs/ccguide/creat.refentry Thu Nov 14 03:55:12 2002 +0000
+++ b/docs/ccguide/creat.refentry Fri Nov 15 21:49:51 2002 +0000
@@ -26,7 +26,37 @@
Description
-Placeholder
+Creat returns a path number to a new file available for
+writing, giving it the permissions specified in "perm" and
+making the task user the owner. If, however, "fname" is the
+name of an existing file, the file is truncated to zero length,
+and the ownership and permissions remain unchanged. NOTE,
+that unlike the OS-9 assembler service request, creat does
+not return an error if the file already exists. "Access()"
+should be used to establish the existence of a file if it is
+important that a file should not be overwritten.
+
+
+It is unnecessary to specify writing permissions in "perm" in
+order to write to the file in the current task.
+
+
+The permissions allowed are defined in the include file as
+follows:
+
+
+#define S_IPRM 0xff /* mask for permission bits */
+#define S_IREAD 0x01 /* owner read */
+#define S_IWRITE 0x02 /* owner write */
+#define S_IEXEC 0x04 /* owner execute */
+#define S_IOREAD 0x08 /* public read */
+#define S_IOWRITE 0x10 /* public write */
+#define S_IOEXEC 0x20 /* public execute */
+#define S_ISHARE 0x40 /* sharable */
+
+
+Directories may not be created with this call; use "mknod()"
+instead.
diff -r 0fda6c7fe48e -r c0da1728ed5b docs/ccguide/exit.refentry
--- a/docs/ccguide/exit.refentry Thu Nov 14 03:55:12 2002 +0000
+++ b/docs/ccguide/exit.refentry Fri Nov 15 21:49:51 2002 +0000
@@ -28,7 +28,18 @@
Description
-Placeholder
+Exit is the normal means of terminating a task. Exit does any
+cleaning up operations required before terminating, such as
+flushing out any file buffers (see Standard i/o), but _exit
+does not.
+
+
+A task finishing normally, that is returning from "main()",
+is equivalent to a call - "exit(0)".
+
+
+The status passed to exit is available to the parent task if it
+is executing a "wait".
diff -r 0fda6c7fe48e -r c0da1728ed5b docs/ccguide/fclose.refentry
--- a/docs/ccguide/fclose.refentry Thu Nov 14 03:55:12 2002 +0000
+++ b/docs/ccguide/fclose.refentry Fri Nov 15 21:49:51 2002 +0000
@@ -27,9 +27,36 @@
Description
-Placeholder
+Fflush causes a buffer associated with the file pointer "fp"
+to be cleared by writing out to the file; of course, only if
+the file was opened for write or update. It is not normally
+ncesasary to call fflush, but it can be useful when, for
+example, normal output is to "stdout", and it is wished to
+send something to "stderr" which is unbuffered. If fflush
+were not used and "stdout" referred to the terminal, the
+"stderr" message will appear before large chunks of the
+"stdout" message even though the latter was written first.
+
+
+Fclose call fflush to clear out the buffer associated with
+"fp", closes the file, and frees the buffer for use by another
+fopen call.
+
+
+The exit() system call and normal termination of a program
+causes fclose to be called for each open file.
+
+See Also
+
+System call
+close(),
+fopen(),
+setbuf().
+
+
+
Diagnostics
EOF is returned if "fp" does not refer to an output file or
diff -r 0fda6c7fe48e -r c0da1728ed5b docs/ccguide/feof.refentry
--- a/docs/ccguide/feof.refentry Thu Nov 14 03:55:12 2002 +0000
+++ b/docs/ccguide/feof.refentry Fri Nov 15 21:49:51 2002 +0000
@@ -37,7 +37,28 @@
Description
-Placeholder
+Feof returns non-zero if the file associated with "fp" has
+reached its end. Zero is returned on error.
+
+
+Ferror returns non-zero if an error condition occurs on access
+to the file "fp"; zero is returned otherwise. The error
+condition persists, preventing further access to the file by
+other Standard Library functions, until the file is closed,
+or it is cleared by clearerr.
+
+
+Clearerr resets the error condition on the file "fp". This
+does NOT "fix" the file or prevent the error from occurring
+again; it merely allows Standard Library functions at least to
+try.
+
+
+
+Caveats
+
+These functions are actually macros that are defined in
+"<stdio.h>" so their names cannot be redeclared.