1 #pragma once
2 
3 typedef enum {
4         /* These tokens are found in ".hp" files */
5 
6 	EOF_TOK,
7 	INTEGER_TOK,
8 	FLOAT_TOK,
9 	IDENTIFIER_TOK,
10 	STRING_TOK,
11 	BEGIN_SAMPLE_TOK,
12 	END_SAMPLE_TOK,
13 	JOB_TOK,
14 	DATE_TOK,
15 	SAMPLE_UNIT_TOK,
16 	VALUE_UNIT_TOK,
17 	MARK_TOK,
18 
19 	/* These extra ones are found only in ".aux" files */
20 
21 	X_RANGE_TOK,
22 	Y_RANGE_TOK,
23 	ORDER_TOK,
24 	SHADE_TOK
25 } token;
26 
27 struct datapoint {
28     int bucket;
29     floatish value;
30 };
31 
32 struct chunk {
33     struct chunk *next;
34     short  nd;                          /* 0 .. N_CHUNK - 1 */
35     struct datapoint *d;
36 };
37 
38 
39 struct entry {
40     struct entry *next;
41     struct chunk *chk;
42     char   *name;
43 };
44 
45 extern char *theident;
46 extern int theinteger;
47 extern floatish thefloatish;
48 extern int ch;
49 extern token thetok;
50 extern int linenum;
51 extern int endfile;
52 
53 char *TokenToString PROTO((token));
54 
55 extern struct entry** identtable;
56 
57 extern floatish *samplemap;
58 extern floatish *markmap;
59 
60 void GetHpFile PROTO((FILE *));
61 void StoreSample PROTO((struct entry *, intish, floatish));
62 struct entry *MakeEntry PROTO((char *));
63 
64 token GetNumber PROTO((FILE *));
65 void  GetIdent  PROTO((FILE *));
66 boolish IsIdChar PROTO((int)); /* int is a "char" from getc */
67 
68 extern char *jobstring;
69 extern char *datestring;
70 
71 extern char *sampleunitstring;
72 extern char *valueunitstring;
73