date and time created 84/08/18 17:35:34 by mckusick
[unix-history] / usr / src / sys / vax / inline / inline.h
CommitLineData
4c6269e7
KM
1/* Copyright (c) 1984 Regents of the University of California */
2
3/* @(#)inline.h 1.1 (Berkeley) %G% */
4
5/*
6 * COMMENTCHAR is the character delimiting comments in the assembler.
7 * LABELCHAR is the character that separates labels from instructions.
8 */
9#define COMMENTCHAR '#'
10#define LABELCHAR ':'
11
12/*
13 * Expansion parameters:
14 * QUEUESIZE is the number of instructions to be considered for
15 * integration of argument pushes and pops
16 * MAXLINELEN is the longest expected input line
17 * MAXARGS is the maximum number of arguments in an assembly instruction
18 */
19#define QUEUESIZE 16
20#define MAXLINELEN 128
21#define MAXARGS 10
22
23/*
24 * The following global variables are used to manipulate the queue of
25 * recently seen instructions.
26 * line - The queue of instructions.
27 * bufhead - Pointer to next availble queue slot. It is not
28 * considered part of te instruction stream until
29 * bufhead is advanced.
30 * buftail - Pointer to last instruction in queue.
31 * Note that bufhead == buftail implies that the queue is empty.
32 */
33int bufhead, buftail;
34char line[QUEUESIZE][MAXLINELEN];
35
36#define SUCC(qindex) ((qindex) + 1 == QUEUESIZE ? 0 : (qindex) + 1)
37#define PRED(qindex) ((qindex) - 1 < 0 ? QUEUESIZE - 1 : (qindex) - 1)
38
39/*
40 * The hash table should be twice as big as the number of patterns.
41 * It must be a power of two.
42 */
43#define HSHSIZ 128
44
45struct pats {
46 char *name;
47 char *replace;
48 struct pats *next;
49 int size;
50};
51struct pats *hashhdr[HSHSIZ];
52extern struct pats language_ptab[], libc_ptab[], machine_ptab[];
53struct pats **hash();
54char *newline(), *copyline(), *doreplaceon();