* add p cc
[mascara-docs.git] / compilers / pcc / pcc-libs-1.0.0 / libI77 / fmt.h
blobd5da3f1c858185764c370e4efcafbad96eec1609
1 /* $Id: fmt.h,v 1.4 2008/05/04 10:38:33 ragge Exp $ */
2 /*
3 * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
9 * Redistributions of source code and documentation must retain the above
10 * copyright notice, this list of conditions and the following disclaimer.
11 * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditionsand the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed or owned by Caldera
17 * International, Inc.
18 * Neither the name of Caldera International, Inc. nor the names of other
19 * contributors may be used to endorse or promote products derived from
20 * this software without specific prior written permission.
22 * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
23 * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE
27 * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT,
31 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
32 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
35 struct syl
36 { int op,p1,p2,p3;
38 #define RET 1
39 #define REVERT 2
40 #define GOTO 3
41 #define X 4
42 #define SLASH 5
43 #define STACK 6
44 #define I 7
45 #define ED 8
46 #define NED 9
47 #define IM 10
48 #define APOS 11
49 #define H 12
50 #define TL 13
51 #define TR 14
52 #define T 15
53 #define COLON 16
54 #define S 17
55 #define SP 18
56 #define SS 19
57 #define P 20
58 #define BN 21
59 #define BZ 22
60 #define F 23
61 #define E 24
62 #define EE 25
63 #define D 26
64 #define G 27
65 #define GE 28
66 #define L 29
67 #define A 30
68 #define AW 31
69 extern struct syl syl[];
70 extern int pc,parenlvl,revloc;
71 int (*doed)(struct syl *p, void *ptr, ftnlen len);
72 int (*doned)(struct syl *p, char *ptr);
73 int (*dorevert)(void),(*donewrec)(void),(*doend)(void);
74 extern flag cblank,cplus,workdone;
75 extern char *fmtbuf;
76 extern int scale;
77 typedef union
78 { float pf;
79 double pd;
80 } ufloat;
81 typedef union
82 { short is;
83 char ic;
84 long il;
85 } unint;
86 #define GET(x) if((x=(*getn)())<0) return(x)
87 #define VAL(x) (x!='\n'?x:' ')
88 #define PUT(x) (*putn)(x)
89 extern int cursor;
91 /* prototypes */
92 int wrt_E(ufloat *, int, int, int, ftnlen);
93 int wrt_F(ufloat *p, int w,int d, ftnlen len);