Subversion Repositories wimsdev

Rev

Rev 10 | Rev 8185 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10 Rev 8161
Line 30... Line 30...
30
#include <fcntl.h>
30
#include <fcntl.h>
31
#include <errno.h>
31
#include <errno.h>
32
#include <signal.h>
32
#include <signal.h>
33
#include <time.h>
33
#include <time.h>
34
 
34
 
35
#include "lines.h"
35
#include "../../Lib/libwims.h"
36
 
36
 
37
        /* Maximum of string length. */
-
 
38
#define MAX_LINELEN (40*1024-1)
-
 
39
        /* Maximum of blocks. Limited to sizeof(short). */
37
        /* Maximum of blocks. Limited to sizeof(short). */
40
#define MAX_BLOCKS      8192
38
#define MAX_BLOCKS      8192
41
        /* Maximum of pools. Limited to sizeof(short). */
39
        /* Maximum of pools. Limited to sizeof(short). */
42
#define MAX_POOLS       10240
40
#define MAX_POOLS       10240
43
        /* Maximum of variable names. */
41
        /* Maximum of variable names. */
Line 85... Line 83...
85
    listtype block, lastpool, ind1, ind2, dirty, len;
83
    listtype block, lastpool, ind1, ind2, dirty, len;
86
    char *string;
84
    char *string;
87
    listtype *tag;              /* level tags for recursion */
85
    listtype *tag;              /* level tags for recursion */
88
} poolstruct;
86
} poolstruct;
89
 
87
 
-
 
88
/* from translate.c */
-
 
89
extern struct entry {
-
 
90
    unsigned char *original, *replace;
-
 
91
    int olen,earlier;
-
 
92
} entry[];
-
 
93
 
-
 
94
int search_dic(struct entry *list, int items, size_t item_size, const char *str);
-
 
95
 
-
 
96
extern struct dic {
-
 
97
    char name[MAX_FNAME+1];
-
 
98
    char unknown[256];
-
 
99
    char *buf;
-
 
100
    int unknown_type;
-
 
101
    int start;
-
 
102
    int len;
-
 
103
} dic[MAX_DICS];
-
 
104
enum {
-
 
105
    unk_delete, unk_leave, unk_replace
-
 
106
};
-
 
107
int transdic, macrodic;
-
 
108
int diccnt;
-
 
109
struct dic *prepare_dic(char *fname);
-
 
110
int getdic(char *dicname);
-
 
111
 
-
 
112
/*from symtext.c */
-
 
113
 
-
 
114
extern char styledir[], defbuf[];
-
 
115
char *mkfname(char buf[], char *s,...);
-
 
116
extern int debug;
-
 
117
int nextpool, nexttag;
-
 
118
extern poolstruct poolbuf[MAX_POOLS];
-
 
119
extern block blockbuf[MAX_BLOCKS];
-
 
120
#define OUTSIZE 4096
-
 
121
extern char *outptr, *wptr, outbuf[OUTSIZE];
-
 
122
extern listtype tagbuf[MAX_BLOCKS];
-
 
123
extern int nextblock, nextlist;
-
 
124
extern char wbuf[MAX_LINELEN+1];
-
 
125
extern listtype listbuf[MAX_LISTS];
-
 
126
extern int options;
-
 
127
#define op_nocase    (1<<0)
-
 
128
#define op_deaccent  (1<<1)
-
 
129
#define op_reaccent  (1<<2)
-
 
130
#define op_nopunct   (1<<3)
-
 
131
#define op_nomath    (1<<4)
-
 
132
#define op_noparenth (1<<5)
-
 
133
#define op_nocs      (1<<6)
-
 
134
#define op_noquote   (1<<7)
-
 
135
#define op_matchall  (1<<8)
-
 
136
#define op_alphaonly (1<<9)
-
 
137
#define op_alnumonly (1<<10)
-
 
138
void error(char *msg,...);
-
 
139
void _getdef(char buf[], char *name, char value[]);
-
 
140
/* from match.c */
-
 
141
int mt_string(struct block *blk, char *start, int level);
-
 
142
int mt_permpick(struct block *blk, char *start, int level);
-
 
143
int mt_m(struct block *blk, char *start, int level);
-
 
144
int mt_neg(struct block *blk, char *start, int level);
-
 
145
int mt_dic(struct block *blk, char *start, int level);
-
 
146
int mt_w(struct block *blk, char *start, int level);
-
 
147
int mt_wild(struct block *blk, char *start, int level);
-
 
148
int mt_out(struct block *blk, char *start, int level);
-
 
149
int mt_nomatch(struct block *blk, char *start, int level);
-
 
150
 
-
 
151
/* from suffix.c */
-
 
152
extern int suffixcnt;
-
 
153
void suffix_translate(char *p);
-
 
154
void _translate(char *p, int i);
-
 
155
void suffix_dic(char *sdicname);
-
 
156
 
-
 
157
/* from compile.c */
-
 
158
void strfold(char *p);
-
 
159
extern struct builtin {
-
 
160
    char *name;
-
 
161
    void (*fn) (char *p, struct block *blk, int next);
-
 
162
} builtin[];
-
 
163
void compile(char *p);
-
 
164
 
-
 
165
extern int builtincnt, Mcnt;
-
 
166
extern char Mbuf[MAX_LINELEN+1];
-
 
167
extern char *Mnext;
-
 
168
 
-
 
169
/* from match.c */
-
 
170
int match(char *p);
90
#endif
171
#endif
-
 
172
 
-
 
173
 
91
 
174