w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

vlna.c
Go to the documentation of this file.
1 #define BANNER "This is program vlna, version 1.5, (c) 1995, 2002, 2009, 2010 Petr Olsak\n" \
2 
3 #define OK 0
4 #define WARNING 1
5 #define IO_ERR 2
6 #define BAD_OPTIONS 3
7 #define BAD_PROGRAM 4
8 #define MAXLEN 120
9 #define ONE 1
10 #define ANY 2
11 #define ONE_NOT -1
12 #define ANY_NOT -2 \
13 
14 #define MAXPATT 200
15 #define MAXBUFF 500
16 #define BUFI 300
17 #define FOUND -1
18 #define NOFOUND -2
19 #define TEXTMODE 0
20 #define MATHMODE 1
21 #define DISPLAYMODE 2
22 #define VERBMODE 3
23 /*1:*/
24 #line 19 "./vlna.w"
25 
26 /*3:*/
27 #line 39 "./vlna.w"
28 
29 #include <stdio.h>
30 #include <string.h>
31 #include <stdlib.h>
32 
33 /*:3*/
34 #line 20 "./vlna.w"
35 
36 /*4:*/
37 #line 56 "./vlna.w"
38 
39 char*prog_name;
40 int status;
41 
42 /*:4*//*7:*/
43 #line 136 "./vlna.w"
44 
45 int isfilter= 0,silent= 0,rmbackup= 0,nomath= 0,noverb= 0,web= 0,latex= 0;
46 char charsetdefault[]= "KkSsVvZzOoUuAI";
48 
49 /*:7*//*8:*/
50 #line 146 "./vlna.w"
51 
52 unsigned char tiestr[MAXLEN];
54 
55 /*:8*//*17:*/
56 #line 327 "./vlna.w"
57 
58 typedef struct PATITEM{
59 char*str;
60 int flag;
61 struct PATITEM*next;
63 typedef struct PATTERN{
66 struct PATTERN*next;
68 
69 /*:17*//*18:*/
70 #line 379 "./vlna.w"
71 
76 char c;
77 char buff[MAXBUFF];
78 int ind;
79 
80 /*:18*//*19:*/
81 #line 398 "./vlna.w"
82 
83 char buffnz[8];
84 int inz;
85 
86 /*:19*//*23:*/
87 #line 463 "./vlna.w"
88 
89 char strings[512];
90 int i;
91 
92 /*:23*//*28:*/
93 #line 548 "./vlna.w"
94 
95 char*filename;
97 int mode;
98 
99 /*:28*//*36:*/
100 #line 686 "./vlna.w"
101 
102 char tblanks[]= " ~\t";
103 char blanks[]= " \t";
104 char blankscr[]= " \t\n";
105 char tblankscr[]= " ~\t\n";
106 char nochar[]= "%~\n";
107 char cr[]= "\n";
108 char prefixes[]= "[({~";
109 char dolar[]= "$";
110 char backslash[]= "\\";
111 char openbrace[]= "{";
112 char letters[]= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
114 
115 /*:36*/
116 #line 21 "./vlna.w"
117 
118 /*6:*/
119 #line 112 "./vlna.w"
120 
121 static void printusage(void)
122 {
123 fprintf(stderr,
124 "usage: vlna [opt] [filenames]\n"
125 " opt -f : filter mode: file1 file2 ... file1->file2\n"
126 " file1 ... file1->stdout\n"
127 " ... stdin->stdout\n"
128 " nofilter: file1 [file2 file3 ...] all are in/out\n"
129 " -s : silent: no messages to stderr\n"
130 " -r : rmbackup: if nofilter, removes temporary files\n"
131 " -v charset : set of lettres to add tie, default: KkSsVvZzOoUuAI\n"
132 " -x code : code for tie symbol, default: 7E, example -x C2A0\n"
133 " -m : nomath: ignores math modes\n"
134 " -n : noverb: ignores verbatim modes\n"
135 " -l : LaTeX mode\n"
136 " -w : web mode\n");
137 }
138 
139 /*:6*//*10:*/
140 #line 174 "./vlna.w"
141 
142 static unsigned char hexnum(char c){
143 if(c>='0'&&c<='9')return c-'0';
144 if(c>='A'&&c<='F')return c-'A'+10;
145 if(c>='a'&&c<='f')return c-'a'+10;
147 }
148 static void settiestr(char*s){
149 int i,j;
150 i= strlen(s);
151 if((i> 2*MAXLEN)||i%2==1)printusage(),exit(BAD_OPTIONS);
152 tiestrlen= i/2;
153 j= 0;
154 for(i= 0;i<tiestrlen;i++){
155 tiestr[i]= hexnum(s[j++])<<4;
156 tiestr[i]+= hexnum(s[j++]);
157 }
158 }
159 
160 /*:10*//*12:*/
161 #line 204 "./vlna.w"
162 
163 static void ioerr(char*f)
164 {
165 fprintf(stderr,"%s: cannot open file %s\n",prog_name,f);
166 }
167 
168 /*:12*//*20:*/
169 #line 406 "./vlna.w"
170 
171 static void*myalloc(int size)
172 {
173 void*p;
174 p= malloc(size);
175 if(p==NULL)
176 {
177 fprintf(stderr,"%s, no memory, malloc failed\n",prog_name);
179 }
180 return p;
181 }
182 
183 /*:20*//*21:*/
184 #line 423 "./vlna.w"
185 
186 static PATTERN*setpattern(void(*proc)(void))
187 {
188 PATTERN*pp;
189 pp= myalloc(sizeof(PATTERN));
190 pp->proc= proc;
191 pp->next= NULL;
192 pp->patt= NULL;
193 if(lastpt!=NULL)lastpt->next= pp;
194 lastpt= pp;
195 lastpi= NULL;
196 return pp;
197 }
198 
199 /*:21*//*22:*/
200 #line 441 "./vlna.w"
201 
202 static void setpi(char*str,int flag)
203 {
204 PATITEM*p;
205 p= myalloc(sizeof(PATITEM));
206 p->str= str;p->flag= flag;
207 p->next= NULL;
208 if(lastpi==NULL)lastpt->patt= p;
209 else lastpi->next= p;
210 lastpi= p;
211 }
212 
213 /*:22*//*25:*/
214 #line 474 "./vlna.w"
215 
216 static PATTERN*normalpattern(void(*proc)(void),const char*str)
217 {
218 PATTERN*pp;
219 int j= 0;
220 pp= setpattern(proc);
221 while(str[j]){
222 if(str[j]=='.'){
223 j++;
224 if(str[j]!='.'){
226 continue;
227 }
228 }
229 setpi(&strings[(unsigned char)str[j]*2],ONE);
230 j++;
231 }
232 return pp;
233 }
234 
235 /*:25*//*26:*/
236 #line 510 "./vlna.w"
237 
238 static int match(PATITEM*p)
239 {
240 int m;
241 if(strchr(p->str,c)!=NULL)m= 1;
242 else m= -1;
243 switch(m*p->flag){
244 case ANY:return 0;
245 case ONE:if(p->next==NULL)return FOUND;
246 return 1;
247 case ONE_NOT:return NOFOUND;
248 case ANY_NOT:/*27:*/
249 #line 528 "./vlna.w"
250 
251 switch(m= match(p->next)){
252 case NOFOUND:return NOFOUND;
253 case FOUND:return FOUND;
254 default:return 1+m;
255 }
256 
257 /*:27*/
258 #line 521 "./vlna.w"
259 ;
260 }
261 return 0;
262 }
263 
264 /*:26*//*39:*/
265 #line 727 "./vlna.w"
266 
267 static void vlnkain(void)
268 {
269 int i;
270 char p,z;
271 ind--;
272 p= buff[ind--];
273 z= buff[ind];
274 while(!buff[ind]||(strchr(blanks,buff[ind])!=NULL))ind--;
275 if(!buff[++ind]&&tiestr[0])ind++;
276 for(i= 0;i<tiestrlen;i++)buff[ind++]= tiestr[i];
277 i= tiestrlen;
278 if(!tiestr[0])i--;
279 if(!z&&(i%2))buff[ind++]= 0;
280 buff[ind++]= p;
281 numchanges++;
282 }
283 
284 /*:39*//*41:*/
285 #line 771 "./vlna.w"
286 
287 static void vlnkacr(void)
288 {
289 char p,z;
290 int i,j;
291 ind--;
292 p= buff[ind--];
293 z= buff[ind];
294 while(!buff[ind]||(strchr(blankscr,buff[ind])!=NULL))ind--;
295 i= ind;
296 while(i>=0&&(strchr(blankscr,buff[i])==NULL))i--;
297 j= i;
298 while(i>=0&&(!buff[ind]||(strchr(blanks,buff[i])!=NULL)))i--;
299 if(i>=0&&buff[i]=='\n')j= -1;
300 if(j>=0)buff[j]= '\n';
301 else numline--;
302 if(!buff[++ind]&&tiestr[0])ind++;
303 for(i= 0;i<tiestrlen;i++)buff[ind++]= tiestr[i];
304 i= tiestrlen;
305 if(!tiestr[0])i--;
306 if(!z&&(i%2))buff[ind++]= 0;
307 buff[ind++]= p;
308 numchanges++;
309 }
310 
311 /*:41*//*44:*/
312 #line 841 "./vlna.w"
313 
314 static void tielock(void)
315 {
316 c= 1;
317 }
318 
319 /*:44*//*45:*/
320 #line 850 "./vlna.w"
321 
322 static void printwarning(void)
323 {
324 if(!silent)
325 fprintf(stderr,
326 "~!~ warning: text/math/verb mode mismatch, file: %s, line: %ld\n",
327 filename,numline-(c=='\n'?1:0));
328 status= WARNING;
329 }
330 
331 /*:45*//*47:*/
332 #line 875 "./vlna.w"
333 
334 static void mathin(void)
335 {
337 mode= MATHMODE;
339 }
340 static void mathout(void)
341 {
343 mode= TEXTMODE;
345 }
346 
347 /*:47*//*48:*/
348 #line 893 "./vlna.w"
349 
350 static void onedollar(void)
351 {
352 if(buffnz[inz-3]=='\\'||(buffnz[inz-3]=='$'&&buffnz[inz-4]!='\\'))return;
354 else{
355 if(mode==TEXTMODE)mathin();
356 else mathout();
357 }
358 }
359 
360 /*:48*//*50:*/
361 #line 912 "./vlna.w"
362 
363 static void checkmode(void)
364 {
365 if(mode!=TEXTMODE){
366 printwarning();
367 mode= TEXTMODE;
369 }
370 }
371 
372 /*:50*//*52:*/
373 #line 938 "./vlna.w"
374 
375 static void displayin(void)
376 {
379 }
380 static void displayout(void)
381 {
384 }
385 static void twodollars(void)
386 {
387 if(buffnz[inz-3]=='\\')return;
389 else displayin();
390 }
391 
392 /*:52*//*54:*/
393 #line 987 "./vlna.w"
394 
397 char verbchar[2];
398 static void verbinchar(void)
399 {
400 prevmode= mode;
401 verbchar[0]= c;
402 c= 1;
405 listpatt->next= NULL;
406 mode= VERBMODE;
407 }
408 
409 /*:54*//*55:*/
410 #line 1008 "./vlna.w"
411 
412 static void verbin(void)
413 {
414 int i;
415 i= 0;
416 prevmode= mode;
417 switch(c){
418 case't':i= 1;break;
419 case'm':i= 2;break;
420 case'<':;
421 case'd':i= 3;
422 if(buffnz[inz-3]=='@')return;
423 break;
424 }
427 if(c!='<'&&c!='d')listpatt->next= NULL;
428 mode= VERBMODE;
429 }
430 
431 /*:55*//*56:*/
432 #line 1028 "./vlna.w"
433 
434 static void verbout(void)
435 {
436 if(mode!=VERBMODE)return;
437 if(web&&buffnz[inz-2]=='@'&&buffnz[inz-3]=='@')return;
438 mode= prevmode;
440 switch(mode){
442 case MATHMODE:normallist= listpatt= mathlist;break;
444 }
445 }
446 
447 /*:56*//*58:*/
448 #line 1050 "./vlna.w"
449 
450 static void tieoff(void)
451 {
453 }
454 static void tieon(void)
455 {
457 }
458 
459 /*:58*/
460 #line 22 "./vlna.w"
461 
462 /*29:*/
463 #line 557 "./vlna.w"
464 
465 static void tie(FILE*input,FILE*output)
466 {
467 int ap;
468 register int k,m,n;
469 int ic;
470 PATTERN*pp;
471 PATITEM*pi;
472 
473 /*30:*/
474 #line 593 "./vlna.w"
475 
476 for(k= 0;k<MAXPATT;k++)lapi[k]= NULL;
477 c= '\n';
478 buff[0]= 1;mode= ap= 0;ind= 1;
479 for(inz= 0;inz<4;inz++)buffnz[inz]= 0;
480 inz= 4;
481 numline= 1;numchanges= 0;
482 mode= TEXTMODE;
483 
484 /*:30*//*38:*/
485 #line 716 "./vlna.w"
486 
488 
489 /*:38*/
490 #line 566 "./vlna.w"
491 ;
492 
493 while(!feof(input)){
494 if(ap==0&&ind> BUFI&&c!='\\')/*31:*/
495 #line 611 "./vlna.w"
496 
497 {
498 fwrite(&buff[1],ind-1,1,output);
499 ind= 1;
500 }
501 
502 /*:31*/
503 #line 569 "./vlna.w"
504 ;
505 /*33:*/
506 #line 640 "./vlna.w"
507 
508 pp= listpatt;
509 if(c)while(pp!=NULL){
510 switch(m= match(pp->patt)){
511 case FOUND:(*pp->proc)();
512 case NOFOUND:break;
513 default:/*34:*/
514 #line 655 "./vlna.w"
515 
516 pi= pp->patt;
517 while(m--)pi= pi->next;
518 n= ap;k= 0;
519 while(n){
520 if(lapi[k]==pi)break;
521 if(lapi[k++]!=NULL)n--;
522 }
523 if(!n){
524 k= 0;
525 while(lapi[k]!=NULL)k++;
526 if(k>=MAXPATT){
527 fprintf(stderr,"I cannot allocate pp, is anything wrong?\n");
529 }
530 lapt[k]= pp;lapi[k]= pi;ap++;
531 }
532 
533 /*:34*/
534 #line 646 "./vlna.w"
535 ;
536 }
537 pp= pp->next;
538 }
539 
540 /*:33*/
541 #line 570 "./vlna.w"
542 ;
543 if(ind>=MAXBUFF){
544 fprintf(stderr,"Operating buffer overflow, is anything wrong?\n");
546 }
547 if((ic= getc(input))==EOF)
548 break;
549 buff[ind++]= c= ic;
550 if(c==0)continue;
551 if(inz>=8){
552 for(inz= 0;inz<4;inz++)buffnz[inz]= buffnz[inz+4];
553 inz= 4;
554 }
555 buffnz[inz++]= c;
556 if(c=='\n')numline++,listpatt= normallist;
557 if(c=='%'&&mode!=VERBMODE&&buffnz[inz-2]!='\\')listpatt= commentlist;
558 /*32:*/
559 #line 623 "./vlna.w"
560 
561 n= ap;k= 0;
562 while(n){
563 while(lapi[k]==NULL)k++;
564 switch(m= match(lapi[k])){
565 case FOUND:(*lapt[k]->proc)();
566 case NOFOUND:lapi[k]= NULL;
567 ap--;break;
568 default:while(m--)lapi[k]= lapi[k]->next;
569 }
570 k++;n--;
571 }
572 
573 /*:32*/
574 #line 586 "./vlna.w"
575 ;
576 }
577 /*31:*/
578 #line 611 "./vlna.w"
579 
580 {
581 fwrite(&buff[1],ind-1,1,output);
582 ind= 1;
583 }
584 
585 /*:31*/
586 #line 588 "./vlna.w"
587 ;
588 if(!web)checkmode();
589 if(!silent)/*35:*/
590 #line 674 "./vlna.w"
591 
592 fprintf(stderr,"~~~ file: %s\t lines: %ld, changes: %ld\n",
594 
595 /*:35*/
596 #line 590 "./vlna.w"
597 ;
598 }
599 
600 /*:29*/
601 #line 23 "./vlna.w"
602 
603 /*5:*/
604 #line 61 "./vlna.w"
605 
606 int main(int argc,char**argv)
607 {
608 /*11:*/
609 #line 197 "./vlna.w"
610 
612 char backup[MAXLEN];
613 int j;
614 
615 /*:11*/
616 #line 64 "./vlna.w"
617 ;
618 prog_name= argv[0];status= OK;
619 /*9:*/
620 #line 150 "./vlna.w"
621 
622 tiestr[0]= '~';
623 tiestrlen= 1;
624 while(argc> 1&&argv[1][0]=='-'){
625 if(argv[1][2]!=0)printusage(),exit(BAD_OPTIONS);
626 switch(argv[1][1]){
627 case'f':isfilter= 1;break;
628 case's':silent= 1;break;
629 case'r':rmbackup= 1;break;
630 case'v':if(argc<2)printusage(),exit(BAD_OPTIONS);
631 argv++;argc--;charset= argv[1];break;
632 case'x':if(argc<2)printusage(),exit(BAD_OPTIONS);
633 argv++;argc--;settiestr(argv[1]);break;
634 case'm':nomath= 1;break;
635 case'n':noverb= 1;break;
636 case'l':latex= 1;break;
637 case'w':web= 1;break;
638 default:printusage(),exit(BAD_OPTIONS);
639 
640 }
641 argc--;argv++;
642 }
643 
644 /*:9*/
645 #line 66 "./vlna.w"
646 ;
647 if(!silent)fprintf(stderr,BANNER);
648 /*24:*/
649 #line 468 "./vlna.w"
650 
651 for(i= 0;i<256;i++){
652 strings[2*i]= (char)i;strings[2*i+1]= 0;
653 }
654 
655 /*:24*//*37:*/
656 #line 706 "./vlna.w"
657 
660 setpi(tblanks,ANY);
662 setpi(charset,ONE);
663 setpi(blanks,ONE);
664 setpi(blanks,ANY);
666 
667 /*:37*//*40:*/
668 #line 747 "./vlna.w"
669 
672 setpi(tblanks,ANY);
674 setpi(charset,ONE);
675 setpi(blanks,ANY);
676 setpi(cr,ONE);
677 setpi(blanks,ANY);
679 
680 /*:40*//*42:*/
681 #line 797 "./vlna.w"
682 
686 setpi(letters,ONE);
687 setpi(letters,ANY);
690 setpi(charset,ONE);
691 setpi(blanks,ONE);
692 setpi(blanks,ANY);
694 
698 setpi(letters,ONE);
699 setpi(letters,ANY);
702 setpi(charset,ONE);
703 setpi(blanks,ANY);
704 setpi(cr,ONE);
705 setpi(blanks,ANY);
707 
708 
709 
710 /*:42*//*43:*/
711 #line 830 "./vlna.w"
712 
713 normalpattern(tielock,"\\TeX");
715 normalpattern(tielock,"\\LaTeX");
717 
718 /*:43*//*46:*/
719 #line 864 "./vlna.w"
720 
721 if(!nomath){
723 setpi(dolar,ONE);
725 if(latex){
726 normalpattern(mathin,"\\begin.{math}");
727 normalpattern(mathout,"\\end.{math}");
728 }
729 }
730 
731 /*:46*//*49:*/
732 #line 906 "./vlna.w"
733 
735 setpi(cr,ONE);
736 setpi(blanks,ANY);
737 setpi(cr,ONE);
738 
739 /*:49*//*51:*/
740 #line 927 "./vlna.w"
741 
742 if(!nomath){
744 if(latex){
745 normalpattern(displayin,"\\begin.{displaymath");
746 normalpattern(displayin,"\\begin.{equation");
747 normalpattern(displayout,"\\end.{displaymath");
748 normalpattern(displayout,"\\end.{equation");
749 }
750 }
751 
752 /*:51*//*53:*/
753 #line 959 "./vlna.w"
754 
755 if(!noverb){
759 normalpattern(verbin,"\\begtt");
760 if(latex)normalpattern(verbin,"\\begin.{verbatim");
761 }
762 if(web){
763 normalpattern(verbin,"@<");
764 normalpattern(verbin,"@d");
765 }
766 if(!noverb){
769 verboutlist[1]= normalpattern(verbout,"\\endtt");
770 if(latex)verboutlist[2]= normalpattern(verbout,"\\end{verbatim");
771 }
772 if(web){
774 normalpattern(verbout,"@*");
775 normalpattern(verbout,"@>|");
776 }
777 
778 
779 /*:53*//*57:*/
780 #line 1045 "./vlna.w"
781 
782 lastpt= 0;
784 normalpattern(tieon,"%.~.+");
785 
786 /*:57*/
787 #line 68 "./vlna.w"
788 ;
789 /*13:*/
790 #line 211 "./vlna.w"
791 
792 if(isfilter)/*14:*/
793 #line 223 "./vlna.w"
794 
795 {
797 infile= stdin;outfile= stdout;
798 if(argc>=2)infile= fopen(argv[1],"r");
799 if(infile==NULL)ioerr(argv[1]),exit(IO_ERR);
800 if(argc==3)outfile= fopen(argv[2],"wb");
801 if(outfile==NULL)ioerr(argv[2]),exit(IO_ERR);
802 if(argc>=2)filename= argv[1];
803 else filename= NULL;
806 if(infile!=stdin)fclose(infile);
807 }
808 
809 /*:14*/
810 #line 212 "./vlna.w"
811 
812 else/*15:*/
813 #line 246 "./vlna.w"
814 
815 {
817 while(argc> 1){
818 argc--;argv++;
819 /*16:*/
820 #line 277 "./vlna.w"
821 
822 infile= NULL;
823 j= strlen(argv[0])-1;
824 if(j>=MAXLEN||argv[0][j]=='~'){
825 if(!silent)fprintf(stderr,"%s: the conflict of file name %s\n",
826 prog_name,argv[0]);
827 }
828 else{
829 strcpy(backup,argv[0]);
830 backup[j]= '~';
831 remove(backup);
832 j= rename(argv[0],backup);
833 if(j==0)infile= fopen(backup,"r");
834 }
835 
836 /*:16*/
837 #line 251 "./vlna.w"
838 ;
839 if(infile==NULL){
840 ioerr(argv[0]);continue;
841 }
842 outfile= fopen(argv[0],"wb");
843 if(outfile==NULL){
844 ioerr(argv[0]);
845 rename(backup,argv[0]);
846 status= WARNING;
847 continue;
848 }
849 filename= argv[0];
852 if(rmbackup)remove(backup);
853 }
854 }
855 
856 /*:15*/
857 #line 213 "./vlna.w"
858 
859 
860 /*:13*/
861 #line 69 "./vlna.w"
862 ;
863 return status;
864 }
865 
866 /*:5*/
867 #line 24 "./vlna.w"
868 
869 
870 /*:1*/
#define n
Definition: t4ht.c:1290
#define ap
int z
Definition: dviconv.c:26
#define fopen
Definition: xxstdio.h:21
char * strcpy()
long int flag
Definition: f2c.h:53
static void
Definition: fpif.c:118
mpz_t * f
Definition: gen-fib.c:34
mpz_t pp
Definition: gen-psqr.c:108
#define s
Definition: afcover.h:80
#define strchr
Definition: gsftopk.c:59
static FILE * infile
Definition: rdjpgcom.c:61
static FILE * outfile
Definition: wrjpgcom.c:80
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p
Definition: afcover.h:72
void exit()
#define EOF
Definition: afmparse.c:59
#define fclose
Definition: debug.h:100
#define getc
Definition: line.c:39
#define fprintf
Definition: mendex.h:64
Code related to b fwrite(a, sizeof(char), b, stdout) @d C_printf(c
#define malloc
Definition: alloca.c:91
int remove()
static double const pi
Definition: clipper.cpp:53
struct _proc * proc
Definition: obx.h:95
int k
Definition: otp-parser.c:70
logical rename
Definition: pmxab.c:724
static int size
Definition: ppmlabel.c:24
charset
Definition: charset.h:51
#define flag
Definition: round_prec.c:45
#define str(s)
Definition: sh6.c:399
Definition: vlna.c:58
struct PATITEM * next
Definition: vlna.c:61
int flag
Definition: vlna.c:60
char * str
Definition: vlna.c:59
Definition: vlna.c:63
struct PATTERN * next
Definition: vlna.c:66
PATITEM * patt
Definition: vlna.c:64
void(* proc)(void)
Definition: vlna.c:65
Definition: obx.h:103
Definition: execute.c:108
Definition: output.h:18
#define FILE
Definition: t1stdio.h:34
#define feof(f)
Definition: t1stdio.h:109
int j
Definition: t4ht.c:1589
*job_name strlen((char *) job_name) - 4)
m
Definition: tex4ht.c:3990
PATITEM * lastpi
Definition: vlna.c:75
static void tieoff(void)
Definition: vlna.c:450
unsigned char tiestr[120]
Definition: vlna.c:52
#define NOFOUND
Definition: vlna.c:18
#define MATHMODE
Definition: vlna.c:20
PATTERN * lastpt
Definition: vlna.c:74
#define MAXBUFF
Definition: vlna.c:15
static PATTERN * normalpattern(void(*proc)(void), const char *str)
Definition: vlna.c:216
char charsetdefault[]
Definition: vlna.c:46
static void verbin(void)
Definition: vlna.c:412
#define TEXTMODE
Definition: vlna.c:19
char backslash[]
Definition: vlna.c:110
char buffnz[8]
Definition: vlna.c:83
static PATTERN * setpattern(void(*proc)(void))
Definition: vlna.c:186
PATTERN * parcheck
Definition: vlna.c:113
int mode
Definition: vlna.c:97
PATTERN * pt
Definition: vlna.c:74
#define ONE
Definition: vlna.c:9
static void printwarning(void)
Definition: vlna.c:322
char blankscr[]
Definition: vlna.c:104
int rmbackup
Definition: vlna.c:45
char blanks[]
Definition: vlna.c:103
#define IO_ERR
Definition: vlna.c:5
static unsigned char hexnum(char c)
Definition: vlna.c:142
char dolar[]
Definition: vlna.c:109
char prefixes[]
Definition: vlna.c:108
static void mathin(void)
Definition: vlna.c:334
static void vlnkacr(void)
Definition: vlna.c:287
int main(int argc, char **argv)
Definition: vlna.c:606
char strings[512]
Definition: vlna.c:89
static void ioerr(char *f)
Definition: vlna.c:163
#define BAD_OPTIONS
Definition: vlna.c:6
PATTERN * normallist
Definition: vlna.c:74
#define BANNER
Definition: vlna.c:1
int ind
Definition: vlna.c:78
int silent
Definition: vlna.c:45
static void vlnkain(void)
Definition: vlna.c:267
char * prog_name
Definition: vlna.c:39
PATTERN * verblist
Definition: vlna.c:113
#define WARNING
Definition: vlna.c:4
PATTERN * commentlist
Definition: vlna.c:74
int latex
Definition: vlna.c:45
int status
Definition: vlna.c:40
static void tielock(void)
Definition: vlna.c:314
static int match(PATITEM *p)
Definition: vlna.c:238
#define ANY
Definition: vlna.c:10
char nochar[]
Definition: vlna.c:106
#define BUFI
Definition: vlna.c:16
static void checkmode(void)
Definition: vlna.c:363
static void * myalloc(int size)
Definition: vlna.c:171
#define DISPLAYMODE
Definition: vlna.c:21
#define ANY_NOT
Definition: vlna.c:12
static void tie(FILE *input, FILE *output)
Definition: vlna.c:465
struct PATITEM PATITEM
#define FOUND
Definition: vlna.c:17
int web
Definition: vlna.c:45
char verbchar[2]
Definition: vlna.c:397
PATTERN * verboutlist[4]
Definition: vlna.c:396
int nomath
Definition: vlna.c:45
static void displayout(void)
Definition: vlna.c:380
int prevmode
Definition: vlna.c:395
long int numchanges
Definition: vlna.c:96
char tblanks[]
Definition: vlna.c:102
static void displayin(void)
Definition: vlna.c:375
static void verbinchar(void)
Definition: vlna.c:398
char tblankscr[]
Definition: vlna.c:105
int inz
Definition: vlna.c:84
#define ONE_NOT
Definition: vlna.c:11
static void onedollar(void)
Definition: vlna.c:350
PATTERN * prevlist
Definition: vlna.c:396
PATTERN * mathlist
Definition: vlna.c:113
#define OK
Definition: vlna.c:3
PATTERN * lapt[200]
Definition: vlna.c:73
static void printusage(void)
Definition: vlna.c:121
char openbrace[]
Definition: vlna.c:111
int i
Definition: vlna.c:90
char buff[500]
Definition: vlna.c:77
static void tieon(void)
Definition: vlna.c:454
char letters[]
Definition: vlna.c:112
static void verbout(void)
Definition: vlna.c:434
static void twodollars(void)
Definition: vlna.c:385
#define VERBMODE
Definition: vlna.c:22
long int numline
Definition: vlna.c:96
static void mathout(void)
Definition: vlna.c:340
char c
Definition: vlna.c:76
static void settiestr(char *s)
Definition: vlna.c:148
static void setpi(char *str, int flag)
Definition: vlna.c:202
PATITEM * lapi[200]
Definition: vlna.c:72
#define MAXPATT
Definition: vlna.c:14
#define MAXLEN
Definition: vlna.c:8
struct PATTERN PATTERN
char * filename
Definition: vlna.c:95
PATTERN * vlnkalist
Definition: vlna.c:113
int noverb
Definition: vlna.c:45
PATTERN * listpatt
Definition: vlna.c:74
#define BAD_PROGRAM
Definition: vlna.c:7
char cr[]
Definition: vlna.c:107
int isfilter
Definition: vlna.c:45
int tiestrlen
Definition: vlna.c:53
#define argv
Definition: xmain.c:270
#define argc
Definition: xmain.c:269