home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume2 / basic / part2 / newbs / bsdefs.c next >
Encoding:
C/C++ Source or Header  |  1986-11-30  |  1.1 KB  |  37 lines

  1. /* bsdefs.c -- Actual definitions of all the variables.
  2.  *
  3.  * bsdefs.h only has the "extern's" of the things declared in here.
  4.  */
  5.  
  6. #include "bsdefs.h"
  7.  
  8.  
  9. /* Initial stuff for line number table.
  10.  *
  11.  * The line number table is a singly-linked list.  The head is "firstline",
  12.  * and the tail is "lastline".  The proper way to check for the end of the
  13.  * list is to compare it to LASTLINE.  Lastline points to itself in case
  14.  * I forget and code something differently (it also neatly ties up the end
  15.  * of the list).
  16.  */
  17.  
  18. #define LASTLINE    (struct line *)(&lastline)
  19.  
  20. struct line lastline = { &lastline,0077777,"",_nulline };
  21. struct line firstline = { &lastline,0,"",_nulline };
  22. struct line *curline = LASTLINE;
  23.  
  24.  
  25. /* Initial stuff for data statements.
  26.  *
  27.  * "dlist[]" holds pointers to lines that have data on them.  It is initialized
  28.  * in M_FIXUP.  "dlp" used to allocate entries from dlist[], it points to the
  29.  * first free entry.  "dlindx" points within the current data line to the next
  30.  * data item.
  31.  * "dtype" indicates the data type for the last data item.
  32.  */
  33.  
  34. struct line *dlist[DLSIZ];
  35. int dlp = 0,dlindx = 0, dtype = 0;
  36.  
  37.