string.h is ANSI C include file
[unix-history] / usr / src / usr.bin / f77 / libI77 / format.h
CommitLineData
45c9a0fb 1/*
161423a6
RE
2 * Copyright (c) 1980 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
45c9a0fb 5 *
161423a6
RE
6 * @(#)format.h 5.1 (Berkeley) %G%
7 */
8
9/*
45c9a0fb
DW
10 * format parser definitions
11 */
12
13struct syl
14{
29b60297 15 short op,p1,p2,rpcnt;
45c9a0fb
DW
16};
17
2679f7ac 18/* do NOT change this defines or add new ones without
c6113db1
DL
19 * changing the value of the following define for OP_TYPE_TAB.
20 * change format.h both in the compiler and libI77 simultaneously.
2679f7ac
DL
21 */
22
c6113db1 23
45c9a0fb
DW
24#define RET 1
25#define REVERT 2
26#define GOTO 3
27#define X 4
28#define SLASH 5
29#define STACK 6
30#define I 7
31#define ED 8
32#define NED 9
33#define IM 10
34#define APOS 11
35#define H 12
36#define TL 13
37#define TR 14
38#define T 15
39#define COLON 16
40#define S 17
41#define SP 18
42#define SS 19
43#define P 20
a4a096dd
DW
44#define BNZ 21
45#define B 22
45c9a0fb
DW
46#define F 23
47#define E 24
48#define EE 25
49#define D 26
50#define DE 27 /*** NOT STANDARD FORTRAN ***/
51#define G 28
52#define GE 29
53#define L 30
54#define A 31
55#define AW 32
56#define R 33 /*** NOT STANDARD FORTRAN ***/
57#define DOLAR 34 /*** NOT STANDARD FORTRAN ***/
58#define SU 35 /*** NOT STANDARD FORTRAN ***/
59
2679f7ac
DL
60#define LAST_TERM SU
61
62/* OP_TYPE_TAB is used in dofio.c .
63 Each value corresponds to a value above, and must be
64 ED for editing terms: I,IM,F,E,EE,D,DE,G,GE,L,A,AW
65 NED for nonediting terms which change the I/O stream:
66 X,SLASH,APOS,H,TL,TR,T
67 and just the value of the term for all others.
68
69 E.g. SP is defined above as 17, so the element 17 of
70 OP_TYPE_TAB (counting from zero) is SP since SP does not
71 read or write data;
72 IM is defined as 10 so the element 10 of OP_TYPE_TAB
73 is ED since IM edits data from the i/o list.
74 */
75#define OP_TYPE_TAB {0, RET, REVERT, GOTO, NED, NED, STACK, ED, ED, NED, \
76 ED, NED, NED, NED, NED, NED, COLON, S, SP, SS, P, \
77 BNZ, B, ED, ED, ED, ED, ED, ED, ED, ED, ED, ED, \
78 R, DOLAR, SU }
79
b5becb2e 80#define FMTUNKN -1
45c9a0fb
DW
81#define FMTOK 1
82#define FMTERR 0
83
29b60297
DL
84#define FMT_COMP 0x101 /* indicates pre-compiled formats */
85
86extern struct syl *syl_ptr;
29b60297 87extern short pc;