Text preview for : CGC_7900_C_Programmers_Manual_Mar82.pdf part of chromatics CGC 7900 C Programmers Manual Mar82 . Rare and Ancient Equipment chromatics CGC_7900_C_Programmers_Manual_Mar82.pdf



Back to : CGC_7900_C_Programmers_Ma | Home

C PROGRAMMER'S
MANUAL



CGC 7900 SERIES
COLOR GRAPHICS COMPUTERS
Whitesmiths, Ltd.


C PROGRAMMERS' MANUAL




Release: 2.1


Date: Ma rch 1982
The C language was developed at Bell Laboratories by Dennis Ritchie;
Whitesmiths, Ltd. has endeavored to remain as faithful as possible
to his language specification. The external specifications of the
Idris operating system, and of most of its utilities, are based
heavily on those of UNIX, which was also developed at Bell Labora-
tories by Dennis Ritchie" and Ken Thompson. Whi tesmi ths, Ltd. grate-
fully acknowledges the parentage of many of the concepts we have
commercialized, and we thank Western Electric Co. for waiving patent
licensing fees for use of the UNIX protection mechanism.
The successful implementation of Whi tesmi ths r compilers, operating
systems, and utilities, however, is entirely the work of our pro-
gramming staff and allied consultants.
For the record, UNIX is a trademark of Bell Laboratories; lAS,
PDP-11, RSTS/E, RSX-11M, RT-11, VAX, VMS, and nearly every other
term with an 11 in it all are trademarks of Digital Equipment Cor-
poration; CP/M is a trademark of Digital Research Co.; MC68000 and
VERSAdos are trademarks of Motorola Inc.; ISIS is a trademark of In-
tel Corporation; A-Natural and Idris are trademarks of Whitesmiths,
Ltd. C is not.




Copyright (c) 1978, 1979, 1980, 1981 by Whitesmiths, Ltd.
C PROGRAMMERS' MANUAL




SECTIONS



I. The C Languag-e

II. Portable C Runtime Library

III. C System Interface Library

IV. C Machine Interface Library




SCOPE



This manual describes the C programming language, as implemented by
Whitesmiths, Ltd., and the various library routines that make up the
machine independent C environment. Section I introduces the C
language, and Section II details the numerous functions callable
from C to extend the power of the language. Section III lists the
functions that interface to a given operating system, while Section
IV describes the functions that interface to a given machine archi-
tecture. The distinction between Sections II, _III, and IV, while of
considerable importance to implementors, is probably academic to
most programmers -- all functions in all of these sections are
present as described on all systems supported by Whitesmiths, Ltd.
For documentation of the programming utilities, or information on
each implementation of system or machine dependent features of the C
support software, see the C Interface Manual for the appropriate
maC?hine.
I. The C Language


TABLE OF CONTENTS


Introduction the C compiler
Syntax syntax rules for C
Identifiers naming things in C
Declarations declaring names in C
Initializers giving values to data
Statements the executable code
Expressions computing values in C
Constants compile time arithmetic
Preprocessor lines that begin with'
Style rules for writing good C code
Portability writing portable code
Differences comparative anatomy
Diagnostics compiler complaints




I - i
Introduction I. The C Language Introduction



NAME
Introduction - the C compiler
FUNCTION
The C compiler is a set of three programs that take as input" to the first
of the programs, one or more files of C source code, and produce as out-
put, from the last of the programs, assembler code that will perform the
semantic intent 0 f. the source code. Out put from the file