Almost every program in the text includes our
unp.h header, shown in Figure D.1. This header includes all the standard system headers that most network programs need, along with some general system headers. It also defines constants such as
MAXLINE, ANSI C function prototypes for the functions we define in the text (e.g.,
readline), and all the wrapper functions we use. We do not show these prototypes.
Example D.1. Our header
1 /* Our own header. Tabs are set for 4 spaces, not 8 */ 2 #ifndef __unp_h 3 #define __unp_h 4 #include "../config.h" /* configuration options for current OS */ 5 /* "../config.h" is generated by configure */ 6 /* If anything changes in the following list of ...