source: trunk/minix/commands/cawf/proto.h@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 4.2 KB
Line 
1/*
2 * proto.h - function prototype definitions for cawf(1)
3 */
4
5/*
6 * Copyright (c) 1991 Purdue University Research Foundation,
7 * West Lafayette, Indiana 47907. All rights reserved.
8 *
9 * Written by Victor A. Abell <abe@mace.cc.purdue.edu>, Purdue
10 * University Computing Center. Not derived from licensed software;
11 * derived from awf(1) by Henry Spencer of the University of Toronto.
12 *
13 * Permission is granted to anyone to use this software for any
14 * purpose on any computer system, and to alter it and redistribute
15 * it freely, subject to the following restrictions:
16 *
17 * 1. The author is not responsible for any consequences of use of
18 * this software, even if they arise from flaws in it.
19 *
20 * 2. The origin of this software must not be misrepresented, either
21 * by explicit claim or by omission. Credits must appear in the
22 * documentation.
23 *
24 * 3. Altered versions must be plainly marked as such, and must not
25 * be misrepresented as being the original software. Credits must
26 * appear in the documentation.
27 *
28 * 4. This notice may not be removed or altered.
29 */
30
31#include "ansi.h"
32
33#ifdef UNIX
34# ifdef USG
35#include <string.h>
36# else /* not USG */
37#include <strings.h>
38# endif /* USG */
39#else /* not UNIX */
40#include <string.h>
41#endif /* UNIX */
42
43/*
44 * The following conditional rat's nest intends to:
45 *
46 * for MS-DOS #include <stdlib.h> and <malloc.h>. <stdlib.h> exists in
47 * MS-DOS so the STDLIB symbol should be defined and UNIX
48 * shouldn't be.
49 *
50 * for Unix #include <stdlib.h> if the STDLIB symbol is defined. If
51 * STDLIB isn't defined, define a prototype for getenv().
52 * If the UNIX symbol is defined (and it should be) and if
53 * the MALLOCH symbol is defined, #include <malloc.h>; else
54 * define a prototype for malloc() if UNIX is defined and
55 * MALLOCH isn't. (The Unix <stdlib.h> usually defines the
56 * malloc() prototype.)
57 *
58 * for ??? Define a prototype for getenv() and #include <malloc.h>
59 * if neither STDLIB nor UNIX are defined. (What system is
60 * this?)
61 */
62
63#ifdef STDLIB
64#include <stdlib.h>
65# ifndef UNIX
66#include <malloc.h>
67# endif /* UNIX */
68#else /* not STDLIB */
69_PROTOTYPE(char *getenv,(char *name));
70# ifdef UNIX
71# ifdef MALLOCH
72#include <malloc.h>
73# else /* not MALLOCH */
74_PROTOTYPE(char *malloc,(unsigned size));
75# endif /* MALLOCH */
76# else /* not UNIX */
77#include <malloc.h>
78# endif /* UNIX */
79#endif /* STDLIB */
80
81_PROTOTYPE(unsigned char *Asmcode,(unsigned char **s, unsigned char *c));
82_PROTOTYPE(int Asmname,(unsigned char *s, unsigned char *c));
83_PROTOTYPE(void Charput,(int c));
84_PROTOTYPE(int Delmacro,(int mx));
85_PROTOTYPE(int Defdev,());
86_PROTOTYPE(void Delstr,(int sx));
87_PROTOTYPE(void Error,(int t, int l, char *s1, char *s2));
88_PROTOTYPE(void Error3,(int len, char *word, char *sarg, int narg, char *msg));
89_PROTOTYPE(void Expand,(unsigned char *line));
90_PROTOTYPE(void Delnum,(int nx));
91_PROTOTYPE(unsigned char *Field,(int n, unsigned char *p, int c));
92_PROTOTYPE(void Endword,());
93_PROTOTYPE(int Findchar,(unsigned char *nm, int l, unsigned char *s, int e));
94_PROTOTYPE(int Findhy,(unsigned char *s, int l, int e));
95_PROTOTYPE(int Findmacro,(unsigned char *p, int e));
96_PROTOTYPE(int Findnum,(unsigned char *n, int v, int e));
97_PROTOTYPE(int Findparms,(unsigned char *n));
98_PROTOTYPE(int Findscale,(int n, double v, int e));
99_PROTOTYPE(unsigned char *Findstr,(unsigned char *nm, unsigned char *s, int e));
100_PROTOTYPE(int getopt,(int argc, char **argv, char *opts));
101_PROTOTYPE(int LenprtHF,(unsigned char *s, int p, int t));
102_PROTOTYPE(int main,(int argc, char *argv[]));
103_PROTOTYPE(void Macro,(unsigned char *inp));
104_PROTOTYPE(void Nreq,(unsigned char *line, int brk));
105_PROTOTYPE(void Free,(unsigned char **p));
106_PROTOTYPE(unsigned char *Newstr,(unsigned char *s));
107_PROTOTYPE(void Pass2,(unsigned char *line));
108_PROTOTYPE(void Pass3,(int len, unsigned char *word, unsigned char *sarg, int narg));
109_PROTOTYPE(void regerror,(char *s));
110_PROTOTYPE(unsigned char *reg,(int paren, int *flagp));
111_PROTOTYPE(unsigned char *regatom,(int *flagp));
112_PROTOTYPE(unsigned char *regbranch,(int *flagp));
113_PROTOTYPE(regexp *regcomp,(char *exp));
114_PROTOTYPE(void regdump,(regexp *r));
115_PROTOTYPE(int regexec,(regexp *prog, unsigned char *string));
116_PROTOTYPE(void Stringput,(unsigned char *s));
117_PROTOTYPE(int Str2word,(unsigned char *s, int len));
Note: See TracBrowser for help on using the repository browser.