5.12 Included Files

It will be noted that whereas the file “malloc.c” contains no request to include other files, requests to include four separate files are included at the beginning of “prf.c”.

(The observant reader will note that these files are presumed to reside one level higher in the file hierarchy than “prf.c” itself.)

The statement on line 2304 is to be understood as if it were replaced by the entire contents of the file “param.h”. This then supplies definitions for the identifiers “SW”, “KL” and “integ” which occur in “putchar”.

We noted earlier that declarations for “KL”, “SW” and “integ” occurred on lines 0165, 0166 and 0175 respectively, but this would have been meaningless, if the file “param.h” had not been “included” in “prf.c”.

The files “buf.h” and “conf.h” have been included to provide declarations for “d_major”, “d_minor”, “b_dev” and “b_blkno”, which are used in “prdev” and “deverror”.

The reason for the inclusion of the fourth file, “seg.h”, is a little harder to find. In fact it is not necessary as the code stands, and the author owes his readers an apology. In editing the source code, it seemed like a good idea to move the declaration for “integ” from “seg.h” to “param.h”. Q.E.D.

Note that the variable “panicstr” (2328) is also global but since it is not referenced outside “prf.c”, its declaration has not been placed in any “.h” file.