Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ Coherent 3.1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Anchors

C Keywords

C Language

COHERENT System Calls

Commands

Definitions

Device Drivers

Drivers

Environmental Variables

Examples

File Formats

General Functions

General Functions (libc)

Header Files

Introductions

Linker-Defined Symbols

Macros

Mathematics Functions

Mathematics Functions (libm)

Multiple-Precision Mathematics

Overviews

Preprocessing Directives

Preprocessing Operators

STDIO

STDIO Functions

STDIO Macros

String Functions

System Maintenances

Technical Information

Terminal Independent Operations

Terminal-Independent Operations

Time Functions

ctype Macros

ctype Macros (ctype.h)

Manual — Coherent 3.1.0

755 entries

C Keywords

autoNote an automatic variable
breakExit from loop or switch statement
caseIntroduce entry in switch statement
charchar is a C data type. It is the smallest addressable unit of
constQualify an identifier as not modifiable
continueForce next iteration of a loop
defaultDefault label in switch statement
doIntroduce a loop
doubleData type
elseIntroduce a conditional statement
enumDeclare a type and identifiers
externDeclare storage class
floatData type
forControl a loop
gotoUnconditionally jump within a function
ifIntroduce a conditional statement
intData type
longData type
readonlyStorage class
registerStorage class
returnReturn a value and control to calling function
shortData type
sizeofReturn size of a data element
staticDeclare storage class
structData type
switchTest a variable against a table
typedefDefine a new data type
unionMultiply declare a variable
unsignedData type
voidData type
volatileQualify an identifier as frequently changing
whileIntroduce a loop

C Language

argcArgument passed to main()
argvArgument passed to main()
envpArgument passed to main()
main(), mainIntroduce program's main function
pointerA pointer is an object whose value is the address of another ob-

COHERENT System Calls

sbrk(), sbrkIncrease a program's data space
acct(), acctEnable/disable process accounting
alarm(), alarmSet a timer
brk(), brkChange size of data area
chmod(), chmodChange file-protection modes
chroot(), chrootChange process's root directory
execl(), execlExecute a load module
execle(), execleExecute a load module
execlp(), execlpExecute a load module
execv(), execvExecute a load module
execve(), execveExecute a load module
execvp(), execvpExecute a load module
fork(), forkCreate a new process
getegid(), getegidGet effective group identifier
geteuid(), geteuidGet effective user identifier
getgid(), getgidGet real group identifier
getpid(), getpidGet process identifier
getuid(), getuidGet real user identifier
gtty(), gttyDevice-dependent control
ioctl(), ioctlDevice-dependent control
kill(), killKill a system process
link(), linkCreate a link
lock(), lockPrevent process from swapping
mknod(), mknodCreate a special file
mount(), mountMount a file system
msgctl(), msgctlMessage control operations
msgget(), msggetGet message queue
msgrcv(), msgrcvReceive a message
msgsnd(), msgsndSend a message
pause(), pauseWait for signal
pipe(), pipeOpen a pipe
ptrace(), ptraceTrace process execution
semctl(), semctlControl semaphore operations
semget(), semgetGet a set of semaphores
semop(), semopPerform semaphore operations
setgid(), setgidSet group id and user id
setuid(), setuidSet user id
shmctl(), shmctlControl shared-memory operations
shmget(), shmgetGet shared-memory segment
signal(), signalSpecify disposition of a signal
sload(), sloadLoad device driver
stime(), stimeSet the time
suload(), suloadUnload device driver
syncFlush system buffers
times(), timesObtain process execution times
umask(), umaskSet file creation mask
umount(), umountUnmount a file system
utime(), utimeChange file access and modification times
wait(), waitAwait completion of a child process
_exit(), 5FexitTerminate a program
access(), accessCheck if a file can be accessed in a given mode
chdir(), chdirChange working directory
chown(), chownChange ownership of a file
close(), closeClose a file
creat(), creatCreate/truncate a file
dup(), dupDuplicate a file descriptor
dup2(), dup2Duplicate a file descriptor
lseek(), lseekSet read/write position
open(), openOpen a file
read(), readRead from a file
unlink(), unlinkRemove a file
write(), writeWrite to a file

Commands

ccCompiler controller
cppC preprocessor
acSummarize login accounting information
acctonEnable/disable process accounting
as, as.8086i8086 assembler
at, at.cExecute commands at given time
awkPattern-scanning language
badMaintain list of bad blocks
badscanBuild bad block list
bannerPrint large letters
basenameStrip file name
bcInteractive calculator with arbitrary precision
breakExit from shell construct
buildInstall COHERENT onto a hard disk
cPrint multi-column output
calPrint a calendar
calendarReminder service
caseExecute commands conditionally according to pattern
chaseHighly amusing video game
checkCheck file system
chgrpChange the group owner of files
chmod, chmod.cChange the modes of a file
chown, chown.cChange the owner of files
clriClear i-node
colRemove reverse and half-line motions
commPrint common lines
compressCompress a file
continue, continue.cTerminate current iteration of shell construct
convNumeric base converter
cpdirCopy directory hierarchy
cpioArchive utility
crypt, crypt.cEncrypt/decrypt text
ctagsGenerate tags and refs files for elvis editor
dcDesk calculator
dcheckDirectory consistency check
ddFile conversion
deroffRemove text formatting control information
dfMeasure free space on disk
diff3Summarize differences among three files
disableDisable terminal port
dosTransfer files to/from an MS-DOS file system
drvldLoad a loadable driver into memory
duSummarize disk usage
dumpFile system dump
dumpdatePrint dump dates
dumpdirPrint the directory of a dump
elvisClone of UNIX-standard screen editor
enableEnable terminal port
epsonPrint
evalEvaluate arguments
exLine-oriented editor
execExecute command directly
exportAdd shell variables to environment
exprCompute a command line expression
factorFactor a number
falseUnconditional failure
fdformatFormat a floppy disk
findSearch for files satisfying a pattern
fixstackChange stack allocation
fnkeySet/print function keys
forExecute commands for tokens in list
fortunePrint random selected, hopefully humorous, text
fromGenerate list of numbers
fsckCheck and repair file systems interactively
grepPattern search
headPrint the beginning of a file
hpPrepare files for HP LaserJet-compatible printer
hprSend file to Hewlett-Packard LaserJet printer spooler
hpskipAbort/restart current listing on Hewlett-Packard LaserJet
ichecki-node consistency check
if, if.cConditional command execution
installInstall COHERENT update
joinJoin two data bases
kermitRemote system communication and file transfer
kill, kill.cSignal a process
lcCategorize files in a directory
lexLexical analyzer generator
lnCreate a link to a file
loginLog in or change user name
lookFind matching lines in a sorted file
lprSend to line printer spooler
lpskipTerminate/restart current line printer listing
mailComputer mail
man, man.cPrint online manual sections
mesgPermit/deny messages from other users
mkfsMake a new file system
mknod, mknod.cMake a special file or named pipe
mount, mount.cMount a file system
msg, msg.cSend a one-line message to another user
msgsRead messages intended for all COHERENT users
ncheckPrint file names corresponding to i-numbers
newgrpChange to a new group
newusrAdd new user to COHERENT system
nroffText processor
passwd, passwd.cSet/change login password
paxPortable archive interchange
phonePrint numbers and addresses from phone directory
prepProduce a word list
psPrint process status
quotSummarize file-system usage
ranlibCreate index for library
readAssign values to shell variables
rebootReboot the COHERENT system
refDisplay a C function header
restorRestore file system
revReverse text in lines of files
saProcess accounting
scatPrint text files one screenful at a time
sedStream editor
setSet shell option flags and positional parameters
shCommand language interpreter
shiftShift positional parameters
shutdownShut down the COHERENT system
spellFind spelling errors
splitSplit a large file into smaller files
sttySet/print terminal modes
suSubstitute user id, become superuser
sumPrint checksum of a file
sync, sync.cFlush system buffers
tailPrint the end of a file
tarTape archive manager
teeBranch pipe output
testEvaluate conditional expression
time, time.cTime the execution of a command
times, times.cPrint total user and system times
trTranslate characters
trapExecute command on receipt of signal
troffFormat proportionally spaced text
trueUnconditional success
tsortTopological sort
ttyPrint the user's terminal name
ttystatGet
typoDetect possible typographical and spelling errors
umount, umount.cUnmount file system
uncompressUncompress a compressed file
unitsConvert measurements
unmkfsCreate a prototype file system
untilExecute commands repeatedly
ustarTape archive utility
uucicoTransmit data to or from a remote site
uucp, uucp.cReady files for transmission to other systems
uudecodeDecode a binary file sent from a remote system
uuencodeEncode a binary file for transmission to a remote system
uuinstallInstall UUCP
uulogExamine UUCP operations
uumvlogExamine UUCP operations
uunameList uucp names of known systems
uutouchTouch a file to trigger uucico poll
uuxqtExecute commands requested by a remote system
viClone of UNIX-standard screen editor
viewScreen-oriented viewing utility
virecRecover the modified version of a file after a crash
wait, wait.cAwait completion of background process
wallSend a message to all logged in users
whileExecute commands repeatedly
whoPrint who is logged in
write, write.cConduct interactive conversation with another user
yaccParser generator
yesPrint infinitely many responses
zcatConcatenate a compressed file
arThe librarian/archiver
catConcatenate/print files
cdChange directory
cmpCompare bytes of two files
cpCopy a file
datePrint/set the date and time
dbAssembler-level symbolic debugger
diffSummarize differences between two files
echoRepeat/expand an argument
edInteractive line editor
egrepExtended pattern search
exitExit from a noninteractive shell
fileGuess a file's type
helpPrint concise description of command
ldLink relocatable object files
lsList directory's contents
m4Macro processor
makeProgram building discipline
meMicroEMACS screen editor
mkdirCreate a directory
mvRename files or directories
nmPrint a program's symbol table
odPrint an octal dump of a file
prPaginate and print files
pwdPrint the name of the current directory
rmRemove files
rmdirRemove directories
sizePrint size of an object file
sleep, sleep.cStop executing for a specified time
sortSort lines of text
stripStrip debug, relocation, and symbol tables from executable file
touchUpdate modification time of a file
uniqRemove/count repeated lines in a sorted file
wcCount words, lines, and characters in files

Definitions

addressAn address is the location where an item of data is stored in
alignmentAlignment refers to the fact that some microprocessors require
arenaAn arena is the area of memory that is available for a program to
arrayAn array is a concatenation of data elements, all of which are of
bitbit is an abbreviation for ``binary digit''. It is the basic
bit-fields, bitfieldsA bit-field is a member of a structure or union that is defined
bit map, bitmapA bit map is a string of bits in which each bit has a symbolic,
bufferA buffer is a portion of memory set aside to hold data read from
byteA byte is a group of bits that encodes a character or a small-in-
castThe cast operation ``coerces'' a variable from one data type to
cc0cc0 is the COHERENT parser. It parses C programs using the
cc1cc1 is the COHERENT code generator. This phase generates code
cc2cc2 is the optimizer/object generator phase of COHERENT. It op-
cc3cc3 is the output phase of COHERENT. It writes a file of as-
daemonA daemon is a process that is designed to perform a particular
directoryA directory is a table that maps names to files; in other words,
EOF, eofIndicate end of a file
executable file, executablefileAn executable file is one that can be loaded directly by the
fieldA field is an area that is set apart from whatever surrounds it,
FILE, file.aDescriptor for a file stream
fileA file is a mass of bits that has been given a name and is stored
file descriptor, filedescriptorA file descriptor is an integer between 1 and 20 that indexes an
functionA function is the C term for a portion of code that is named, can
GMT, gmtGMT is an abbreviation of Greenwich Mean Time, the time recorded
initializationThe term initialization refers to setting a variable to its
interruptAn interrupt is an interruption of the sequential flow of a
lvalueAn lvalue is an expression that designates a region of storage.
macroA macro is a body of text that is given a name. When the name is
manifest constant, manifestconstaA manifest constant is a numeric constant that is given a name so
modulusModulus is the operation that returns the remainder of a division
NULL, nullNULL is defined in the header file stddef.h. It is the null
nybbleA nybble is four bits, or half of an eight-bit byte. The term is
object format, objectformatAn object format describes the form of compiled program that
operatorAn operator relates one operand to another. For example, the
patternA pattern is any combination of ASCII characters and wildcard
portA port passes data to and receives data from a remote device.
precedencePrecedence refers to the property of each C operator that deter-
processA process is a program in the state of execution.
punIn the context of C, a pun occurs when a programmer uses one data
random access, randomaccessIn the context of computing, random access means that an entity,
ranlibThe ranlib is a ``directory'' that appears at the beginning of
read-only memory, readonlymemoryAs its name suggests, read-only memory, or ROM, is memory that
register variable, registervariabregister is a C storage class. A register declaration tells the
rvalueAn rvalue is the value of an expression. The name comes from the
stackThe stack is the segment of memory that holds function arguments,
standard error, standarderrorThe standard error is the peripheral device or file where
standard input, standardinputThe standard input is the device or file from which data are ac-
standard output, standardoutputThe standard output is the device or file where programs write
stderrstderr is the name of the FILE pointer assigned to the standard
stdinstdin is the name of the FILE pointer that is assigned to the
stdoutstdout is the name of the FILE pointer that is assigned to the
streamThe term stream is a metaphor for any entity that can be named
structureA structure is a set of variables that has been given a name and
wildcardsWildcards are characters that, in some circumstances, can
filterA filter is a program that reads a stream of input, transforms it
i-nodeCOHERENT system file identifier
major number, major.aDevice numbering
minor number, minor.aDevice numbering
pipe, pipe.aA pipe directs the output stream of one program into the input
rootroot is the login name for the superuser.
sticky bit, stickybitThe sticky bit is one of the mode bits associated with a file.
superuserThe superuser is the user who has system-wide permissions. He

Device Drivers

aha154xAdaptec AHA-154x device driver
atDrivers for hard-disk partitions
boot.fhaBoot block for floppy disk
comDevice drivers for asynchronous serial lines
com1Device driver for asynchronous serial line COM1
com2Device driver for asynchronous serial line COM2
com3Device driver for asynchronous serial line COM3
com4Device driver for asynchronous serial line COM4
consoleConsole device driver
ctControlling terminal driver
fdFloppy disk driver
hsDevice driver for polled serial ports
lpLine printer driver
mbootMaster boot block for hard disk
memPhysical memory file
msgMessage device driver
nullThe ``bit bucket''
ramRAM device driver
SCSI, scsiSCSI device drivers
semSemaphore device driver
shmShared memory device driver
tapeMagnetic tape devices
termioGeneral terminal interface

Drivers

bootBoot block for hard-disk partition/nine-sector diskette

Environmental Variables

ASKCC, askccForce prompting for CC names
HOME, homeUser's home directory
LASTERROR, lasterrorProgram that last generated an error
PAGER, pagerSpecify Output Filter
PS1, ps1User's default prompt
PS2, ps2Prompt when user continues command onto additional lines
SHELL, shellName the default shell
TERM, termName the default terminal type
USER, userName user's ID
PATH, pathDirectories that hold executable files
TIMEZONE, timezoneTime zone information

Examples

example, ExampleGive an example of Mark Williams Lexicon format

File Formats

groupGroup file format
passwdPassword file format
ttysActive terminal ports

General Functions

abort(), abortEnd program immediately
abs(), absReturn the absolute value of an integer
atof(), atofConvert ASCII strings to floating point
atoi(), atoiConvert ASCII strings to integers
atol(), atolConvert ASCII strings to long integers
calloc(), callocAllocate dynamic memory
exit(), exitTerminate a program gracefully
free(), freeReturn dynamic memory to free memory pool
frexp(), frexpSeparate fraction and exponent
ldexp(), ldexpCombine fraction and exponent
longjmp(), longjmpReturn from a non-local goto
malloc(), mallocAllocate dynamic memory
modf(), modfSeparate integral part and fraction
qsort(), qsortSort arrays in memory
rand(), randGenerate pseudo-random numbers
realloc(), reallocReallocate dynamic memory
setjmp(), setjmpPerform non-local goto
shellsort(), shellsortSort arrays in memory
tmpnam(), tmpnamGenerate a unique name for a temporary file
candaddr(), candaddrConvert a daddr_t to canonical format
candev(), candevConvert a dev_t to canonical format
canino(), caninoConvert an ino_t to canonical format
canint(), canintConvert an int to canonical format
canlong(), canlongConvert a long to canonical format
canshort(), canshortConvert a short to canonical format
cansize(), cansizeConvert an fsize_t to canonical format
cantime(), cantimeConvert a time_t to canonical format
canvaddr(), canvaddrConvert a vaddr_t to canonical format
crypt(), cryptEncryption using rotor algorithm
endgrent(), endgrentClose group file
endpwent(), endpwentClose password file
getgrent(), getgrentGet group file information
getgrgid(), getgrgidGet group file information, by group name
getgrnam(), getgrnamGet group file information, by group id
getlogin(), getloginGet login name
getopt(), getoptGet option letter from argv
getpass(), getpassGet password with prompting
getpw(), getpwSearch password file
getpwent(), getpwentGet password file information
getpwnam(), getpwnamGet password file information, by name
getpwuid(), getpwuidGet password file information, by id
getwd(), getwdGet current working directory name
l3tol(), l3tolConvert file system block number to long integer
ltol3(), ltol3Convert long integer to file system block number
memok(), memokTest if the arena is corrupted
mtype(), mtypeReturn symbolic machine type
nlist(), nlistSymbol table lookup
setgrent(), setgrentRewind group file
setpwent(), setpwentRewind password file
ttyname(), ttynameIdentify a terminal
ttyslot(), ttyslotReturn a terminal's line number
fstat(), fstatFind file attributes
getenv(), getenvRead environmental variable
isatty(), isattyCheck if a device is a terminal
mktemp(), mktempGenerate a temporary file name
path(), path.aPath name for a file
perror(), perrorSystem call error messages
sleep(), sleepSuspend execution for interval
swab(), swabSwap a pair of bytes
system(), systemPass a command to the shell for execution
tempnam(), tempnamGenerate a unique name for a temporary file

General Functions (libc)

srand(), srandSeed random number generator
notmem(), notmemCheck if memory is allocated
stat(), statFind file attributes

Header Files

assert.hDefine assert()
ctype.hHeader file for data tests
math.hDeclare mathematics functions
setjmp.hDefine setjmp() and longjmp()
stdio.hDeclarations and definitions for I/O
string.h#include <string.h>
access.hCheck accessibility
acct.hFormat for process-accounting file
action.hDescribe parsing action and goto tables
alloc.hDefine the allocator
ar.hFormat for archive files
ascii.hDefine non-printable ASCII characters
buf.hBuffer header
chars.hCharacter definitions
con.hConfigure device drivers
const.hDeclare machine-dependent constants
curses.hDefine functions and macros in curses library
deftty.hDefine default tty settings
dir.hDirectory format
dirent.hDefine dirent
dumptape.hDefine data structures used on dump tapes
ebcdic.hDefine manifest constants for non-printable EBCDIC characters
fblk.hDefine the disk-free block
fcntl.hManifest constants for file-handling functions
fd.hDeclare file-descriptor structure
fdioctl.hControl floppy-disk I/O
fdisk.hFixed-disk constants and structures
filsys.hStructures and constants for super block
fperr.hConstants used with floating-point exception codes
grp.hDeclare group structure
hdioctl.hControl hard-disk I/O
ino.hConstants and structures for disk i-nodes
inode.hConstants and structures for memory-resident i-nodes
io.hConstants and structures used by I/O
ipc.hDefinitions for process communications
l.out.hObject file format
lpioctl.hDefinitions for line-printer I/O control
machine.hMachine-dependent definitions
malloc.hDefinitions for memory-allocation functions
mdata.hDefine machine-specific magic numbers
mnttab.hStructure for mount table
mon.hRead profile output files
mount.hDefine the mount table
mprec.hMultiple-precision arithmetic
msg.hDefinitions for message facility
msig.hMachine-dependent signals
mtab.hCurrently mounted file systems
mtioctl.hMagnetic-tape I/O control
n.out.hDefine n.out file structure
param.hDefine machine-specific parameters
path.hDefine/declare constants and functions used with path
poll.hDefine structures/constants used with polling devices
proc.hDefine structures/constants used with processes
pwd.hDeclare password structure
sched.hDefine constants used with scheduling
seg.hDefinitions used with segmentation
sem.hDefinitions used by semaphore facility
sgtty.hDefinitions used to control terminal I/O
shm.hDefinitions used with shared memory
signal.hDeclare signals
stddef.hHeader for standard definitions
stream.hDefinitions for message facility
termio.hDefinitions used with terminal input and output
timeb.hDeclare timeb structure
timef.hDefinitions for user-level timed functions
timeout.hDefine the timer queue
times.hDefinitions used with times() system call
tty.hDefine flags used with tty processing
types.hDeclare system-specific data types
uproc.hDefinitions used with user processes
utmp.hLogin accounting information
utsname.hDefine utsname structure
v7sgtty.hUNIX Version 7-style terminal I/O
canon.hPortable layout of binary data
errno.hError numbers used by errno()
mtype.hList processor code numbers
stat.hDefinitions and declarations used to obtain file status
time.hGive time-description structure

Introductions

Lexicon, lexiconThe Mark Williams Lexicon is a new approach to documentation of

Linker-Defined Symbols

endextern int end[];
etextextern int etext[];

Macros

_ _DATE_ _, __date__Date of translation
_ _FILE_ _, __file__Source file name
_ _LINE_ _, __line__Current line within a source file
_ _STDC_ _, __stdc__Mark a conforming translator
_ _TIME_ _, __time__Time source file is translated
assert(), assertCheck assertion at run time

Mathematics Functions

acos(), acosCalculate inverse cosine
asin(), asinCalculate inverse sine
atan(), atanCalculate inverse tangent
atan2(), atan2Calculate inverse tangent
cabs(), cabsComplex absolute value function
ceil(), ceilSet numeric ceiling
cos(), cosCalculate cosine
cosh(), coshCalculate hyperbolic cosine
exp(), expCompute exponent
fabs(), fabsCompute absolute value
floor(), floorSet a numeric floor
hypot(), hypotCompute hypotenuse of right triangle
j0(), j0Compute Bessel function
j1(), j1Compute Bessel function
jn(), jnCompute Bessel function
log(), logCompute natural logarithm
log10(), log10Compute common logarithm
pow(), powCompute a power of a number
sinh(), sinhCalculate hyperbolic sine
sqrt(), sqrtCompute square root

Mathematics Functions (libm)

sin(), sinCalculate sine
tan(), tanCalculate tangent
tanh(), tanhCalculate hyperbolic cosine

Multiple-Precision Mathematics

gcd(), gcdSet variable to greatest common divisor
ispos(), isposReturn if variable is positive or negative
itom(), itomCreate a multiple-precision integer
madd(), maddAdd multiple-precision integers
mcmp(), mcmpCompare multiple-precision integers
mcopy(), mcopyCopy a multiple-precision integer
mdiv(), mdivDivide multiple-precision integers
min(), minRead multiple-precision integer from stdin
minit(), minitCondition global or auto multiple-precision integer
mintfr(), mintfrFree a multiple-precision integer
mitom(), mitomReinitialize a multiple-precision integer
mneg(), mnegNegate multiple-precision integer
mout(), moutWrite multiple-precision integer to stdout
msqrt(), msqrtCompute square root of multiple-precision integer
msub(), msubSubtract multiple-precision integers
mtoi(), mtoiConvert multiple-precision integer to integer
mtos(), mtosConvert multiple-precision integer to string
mult(), multMultiply multiple-precision integers
mvfree(), mvfreeFree multiple-precision integer
pow(), powRaise multiple-precision integer to power
rpow(), rpowRaise multiple-precision integer to power
sdiv(), sdivDivide multiple-precision integers
smult(), smultMultiply multiple-precision integers
spow(), spowRaise multiple-precision integer to power
xgcd(), xgcdExtended greatest-common-divisor function
zerop(), zeropIndicate if multi-precision integer is zero

Overviews

C keywords, c_keywordsA keyword is a word that is reserved within C, and must not be
C language, c_languageThe following summarizes how COHERENT implements the C language.
C preprocessor, c_preprocessorPreprocessing encompasses all tasks that logically precede the
ctype#include <ctype.h>
definitionsThe Lexicon contains the following articles that define aspects
general functions, generalfunctioThe library libc includes a number of functions that perform
header files, headerfilesA header file is a file of C code that contains definitions, dec-
librariesA library is an archive file of commonly used functions that have
mathematics library, mathematicslibThe following mathematics routines are available with COHERENT:
STDIO, stdioSTDIO is an abbreviation for standard input and output. It
string functions, stringfunctionThe character string is a common formation in C programs. The
cursesLibrary of screen-handling functions
device drivers, device_driversA device driver is a program that controls the action of one of
file formats, fileformatsThe COHERENT system uses a number of different file formats.
system maintenance, systemmaintenaThe COHERENT system automatically invokes a number of utilities
technical information, technicalinforThe Lexicon includes the following entries that describe techni-
UUCP, uucpUnattended communication with remote systems
COHERENT system calls, coherentsystemThe COHERENT system makes many services available to the C
commandsThe following lists the commands included with COHERENT. The
environmental variables, environmentalvThe environment is a set of information that is read by all
linker-defined symbols, linkerdefinedsThe following symbols are set by the linker ld when it links a
time, time.aCOHERENT includes a number of routines that allow you to set and

Preprocessing Directives

#defineDefine an identifier as a macro
#elifInclude code conditionally
#elseInclude code conditionally
#endifEnd conditional inclusion of code
#ifInclude code conditionally
#ifdefInclude code conditionally
#ifndefInclude code conditionally
#includeRead another file and include it
#lineReset line number
#undefUndefine a macro

Preprocessing Operators

##Token-pasting operator
#String-ize operator

STDIO

fprintf(), fprintfPrint formatted output into file stream
fputc(), fputcWrite character into file stream
fputs(), fputsWrite string into file stream
fscanf(), fscanfFormat input from a file stream
printf(), printfPrint formatted text
putc(), putcWrite character into stream
putchar(), putcharWrite a character onto the standard output
puts(), putsWrite string onto standard output
putw(), putwWrite word into stream
scanf(), scanfAccept and format input
setbuf(), setbufSet alternative stream buffers
sprintf(), sprintfFormat output
sscanf(), sscanfFormat a string
ungetc(), ungetcReturn character to input stream
fputw(), fputwWrite an integer into a stream

STDIO Functions

fclose(), fcloseClose a stream
fflush(), fflushFlush output stream's buffer
fgetc(), fgetcRead character from stream
fgets(), fgetsRead line from stream
fileno(), filenoGet file descriptor
fopen(), fopenOpen a stream for standard I/O
fread(), freadRead data from file stream
freopen(), freopenOpen file stream for standard I/O
fseek(), fseekSeek on file stream
ftell(), ftellReturn current position of file pointer
fwrite(), fwriteWrite into file stream
gets(), getsRead string from standard input
getw(), getwRead word from file stream
rewind(), rewindReset file pointer
pclose(), pcloseClose a pipe
popen(), popenOpen a pipe
fdopen(), fdopenOpen a stream for standard I/O
fgetw(), fgetwRead integer from stream

STDIO Macros

clearerr(), clearerrPresent stream status
feof(), feofDiscover stream status
ferror(), ferrorDiscover stream status
getc(), getcRead character from file stream
getchar(), getcharRead character from standard input

String Functions (index)

index(), indexFind a character in a string
memchr(), memchrSearch a region of memory for a character
memcmp(), memcmpCompare two regions
memcpy(), memcpyCopy one region of memory into another
memmove(), memmoveCopy region of memory into area it overlaps
memset(), memsetFill an area with a character
pnmatch(), pnmatchMatch string pattern
rindex(), rindexFind a character in a string
strcat(), strcatConcatenate strings
strchr(), strchrFind a character in a string
strcmp(), strcmpCompare two strings
strcoll(), strcollCompare two strings, using locale-specific information
strcpy(), strcpyCopy one string into another
strcspn(), strcspnReturn length a string excludes characters in another
strerror(), strerrorTranslate an error number into a string
strlen(), strlenMeasure the length of a string
strncat(), strncatAppend one string onto another
strncmp(), strncmpCompare two strings
strncpy(), strncpyCopy one string into another
strpbrk(), strpbrkFind first occurrence of a character from another string
strrchr(), strrchrSearch for rightmost occurrence of a character in a string
strspn(), strspnReturn length a string includes characters in another
strstr(), strstrFind one string within another
strtok(), strtokBreak a string into tokens
strxfrm(), strxfrmTransform a string

System Maintenances

ATclock, atclockRead or set the AT realtime clock
atrunExecute commands at a preset time
boottimeTime the system was last booted
brcPerform maintenance chores, single-user mode
cronExecute commands periodically
fdiskChange hard disk partitioning
gettyTerminal initialization
hpdHewlett-Packard LaserJet printer spooler daemon
initSystem initialization
logmsgHold COHERENT Login Message
lpdLine printer spooler daemon
rcPerform standard maintenance chores
updateUpdate file systems periodically

Technical Information

ASCII, asciiASCII is an acronym for the American Standard Code for Informa-
byte ordering, byteorderingMachine-dependent ordering of bytes
data formats, dataformatsMark Williams Company has written C compilers for a number of
data types, datatypesThe following table gives the data types that COHERENT recog-
errnoExternal integer for return of error status
memory allocation, memoryallocatiThe following diagram shows how COHERENT allocates memory.
portabilityPortability means that code can be recompiled and run under dif-
storage class, storageclassStorage class refers to the part of a declaration that indicates
structure assignment, structureassigThe C Programming Language, ed. 2 forbids structure assignment,
type checking, typecheckingEvery expression has a type, such as int, char, or double. C is
type promotion, typepromotionIn arithmetic expressions, COHERENT promotes one signed type to
blockA block is a mass of data that is read at one time. Blocks are
environProcess environment
executionProgram execution under COHERENT is governed by the various forms
floppy disks, floppyTo use a floppy disk with COHERENT, you must:
install, install.aBuilding distribution kits for use by install
manManual macro package
miscLibrary of miscellaneous functions
modemcapModem description language
motdFile that holds message of the day
msManuscript macro package
profileSet user's environment
securityBecause COHERENT is a multi-user, multi-tasking operating system
signameArray of names of signals
termcapTerminal description language
calling conventions, callingconventThe following presents the calling conventions for COHERENT.

Terminal Independent Operations

tgetflag(), tgetflagGet termcap Boolean entry

Terminal-Independent Operations

tgetent(), tgetentRead termcap entry
tgetnum(), tgetnumGet termcap numeric feature
tgetstr(), tgetstrGet termcap string entry
tgoto(), tgotoRead/interpret termcap cursor-addressing string
tputs(), tputsRead/decode leading padding information

Time Functions

settz(), settzSet local time zone
asctime(), asctimeConvert time structure to ASCII string
ctime(), ctimeConvert system time to an ASCII string
ftime(), ftimeGet the current time from the operating system
gmtime(), gmtimeConvert system time to calendar structure
localtime(), localtimeConvert system time to calendar structure
time(), timeGet current time

ctype Macros

tolower(), tolowerConvert characters to lower case
toupper(), toupperConvert characters to upper case

ctype Macros (ctype.h)

isalnum(), isalnumCheck if a character is a number or letter
isalpha(), isalphaCheck if a character is a letter
isascii(), isasciiCheck if a character is an ASCII character
iscntrl(), iscntrlCheck if a character is a control character
isdigit(), isdigitCheck if a character is a numeral
islower(), islowerCheck if a character is a lower-case letter
isprint(), isprintCheck if a character is printable
ispunct(), ispunctCheck if a character is a punctuation mark
isspace(), isspaceCheck if a character prints white space
isupper(), isupperCheck if a character is an upper-case letter

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026