Download OS-9 C Language User Manual

Transcript
Chapter 5
The C Standard Library
memset()
Fill Memory
Synopsis
#include <strings.h>
memset(s, val, size)
void *s;
int val;
unsigned size;
/* pointer to memory to fill */
/* value with which to fill memory */
/* size of memory to fill with val */
Function
memset() fills the region of memory pointed to by s with the value
specified by val. size specifies the size of the memory region. Each byte of
the region is filled by forcing val to an unsigned char.
mknod()
Create a Directory
Synopsis
#include <modes.h>
mknod(name,perm)
char *name;
short perm;
/* pointer to name of directory */
/* file attributes to set */
Function
mknod() creates a directory file. The pointer name gives the name of the
directory, and perm gives the desired access permissions of the directory.
returns zero if the directory was successfully created. If the
creation failed, –1 is returned and the appropriate error code is placed in
the global variable errno.
mknod()
Caveats
mknod() does not make UNIX-style special files as there is no such thing
on OS-9. This is a historical function and is likely to be removed in a
future release. Use makdir() in all new code.
See Also
makdir(); I$MakDir in
5-142
the OS-9 Technical Manual.