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)  

plain2.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1991,1992,1994 NEC Corporation.
3  */
4 /*
5  * modify by k-chinen@is.aist-nara.ac.jp, 1994
6  */
7 
8 #ifndef lint
9 
10 
11 #endif
12 
13 #include <stdio.h>
14 #include <ctype.h>
15 #define PLAIN2MAIN
16 #include "plain2.h"
17 #include "macro.h"
18 
19 #ifdef HTML
20 #define PLAIN2_USAGE_1 "\
21 usage: plain2 [options] [files ...]\n\n\
22  ---- parser options ---- ---- output options ----(default)\n\
23 -table=dd: table factor [0-100](def=50) -roff: troff output\n\
24 -exam=dd: example factor[0-100](def=50) -ms/-mm: troff macro (mm)\n\
25 -indsec: sections can be indented -tex: tex output\n\
26 -ktable:enable JIS keisen table -tstyle=ss:tex style\n\
27 -ref: figure/picture reference -html: HTML output\n\
28  -htmlonce: HTML (one path) output\n\
29  -here: HTML table/picture ref.\n\
30  -renum: renumbering only\n\
31  -[no]listd:list decoration (on)\n\
32  ---- Others ---- -[no]space:spacing (on)\n\
33 -v: verbose output -[no]pre: preamble block (on)\n\
34 -dLevel: debug level -[no]acursec: section numbers (off)\n\
35  ----- experimental ---- -raw: quote special chars(off)\n\
36 -pt=Size: font size -jis: JIS code output\n\
37  -sjis: Shift-JIS code input/output\n\
38  -f file: output customization\n\n"
39 #define VERSION "plain2 r2.54 1994/04 by A.Uchida NEC Corporation\n\
40 \t(HTML output) by k-chinen@is.aist-nara.ac.jp, NAIST\n\
41 \t(unofficial patch 98/08/13 by N.Nide)"
42 #else
43 #define PLAIN2_USAGE_1 "\
44 usage: plain2 [options] [files ...]\n\
45  ---- parser options ---- ---- output options ----(default)\n\
46 -table=dd: table factor [0-100](def=50) -roff: troff output\n\
47 -exam=dd: example factor[0-100](def=50) -ms/-mm: troff macro (mm)\n\
48 -indsec: sections can be indented -tex: tex output\n\
49 -ktable:enable JIS keisen table -tstyle=ss:tex style\n\
50 -ref: figure/picture reference -renum: renumbering only\n\
51  -[no]listd:list decoration (on)\n\
52  ---- Others ---- -[no]space:spacing (on)\n\
53 -v: verbose output -[no]pre: preamble block (on)\n\
54 -dLevel: debug level -[no]acursec: section numbers (off)\n\
55  ----- experimental ---- -raw: quote special chars(off)\n\
56 -pt=Size: font size -jis: JIS code output\n\
57  -sjis: Shift-JIS code input/output\n\
58  -f file: output customization\n"
59 #define VERSION "plain2 r2.54 1994/04 by A.Uchida NEC Corporation\n\
60 \t(HTML output) by k-chinen@is.aist-nara.ac.jp, NAIST"
61 #endif
62 
63 extern char *getenv();
64 extern char *optarg;
65 extern int optind;
66 extern struct macDefs roffMacros[], roffMsMacros[];
67 extern struct macDefs texMacros[];
68 #ifdef HTML
69 extern struct macDefs htmlMacros[];
70 #endif
71 
72 /*
73  * Default parameters for Parsing
74  */
75 int tableEnabled = 1;
78 int tableFactor = 50;
79 int examFactor = 50;
80 int removePaging = 0;
81 int crossRefer = 0;
82 int inlineHint = 1;
84 int renumber = 0;
85 /*
86  * Output parameters
87  */
89 int rawOutput = 0;
90 int halfCooked = 0;
93 int preamble = 1;
95 int listDecor = 1;
96 int reflectSpace = 1;
97 int texQuote = 0;
98 int fontSize = 10;
99 int fontSpecified = 0;
100 int verbose = 0;
101 #ifdef HTML
102 int htmlOnce = 0;
103 int htmlHere = 0;
104 #endif
105 char *plain2Lib = NULL;
106 char *macroName = NULL;
107 char *texStyle = DEFAULT_STY; /* Nide */
108 struct outDev *put = &roffPut;
109 int useJverb = 0; /* Nide */
110 
112 struct text **texts;
113 struct text *textTop;
120 int anySection = 0;
121 char *fname;
123 #ifdef DEBUG
124 int debug;
125 #endif
126 
127 #ifdef __TURBOC__
128 extern unsigned _stklen = 32768U;
129 #endif
130 
131 int stflag = 1;
132 
133 #ifdef WIN32
134 #include <fcntl.h>
135 #include <io.h>
136 #endif
137 
139 int argc;
140 char **argv;
141 {
142 #ifdef WIN32
143 char *p;
144 #endif
145  int argind;
146  /*
147  * Get options from Environment
148  * or from the file specified by Env. variable
149  *
150  * Parameters are set by ..
151  * 1) Default value
152  * 2) Environment (value itself or file)
153  * 3) Option line of each input files
154  */
155 #ifdef WIN32
156  strcpy(argv[0], "plain2");
158 #endif
159  clearMacro();
161 #ifdef WIN32
162  if(plain2Lib) {
163  for(p=plain2Lib; *p; p++) {
164  if(iskanji1(*p)) {
165  p++; continue;
166  }
167  if(*p == '\\') *p = '/';
168  }
169  }
170 #endif
171  acceptOutOption = 1;
172  envOption();
173  if (getOption(argc, argv)) {
174  (void)fprintf(stderr, PLAIN2_USAGE_1);
175  (void)fprintf(stderr, "%s\n", VERSION);
176  exit (2);
177  }
178  if (put != &texPut) useJverb = 0;
179  if (macroName)
182  tblParseInit();
183 #ifdef PICTURE
184  picParseInit();
185 #endif
186  ftitleInit();
187  MSG1("%s\n", VERSION);
188  argind = optind; /* optind will be used afterward */
189  if (argind >= argc) {
190  fname = "stdin";
191  inFile = stdin;
192  doPlain2();
193  }
194  else while (argind < argc) {
195  if ((inFile = fopen(argv[argind], "r")) == NULL) {
196  (void)fprintf(stderr, "%s cannot open\n",
197  argv[argind]);
198  exit(1);
199  }
200  else {
201  fname = strsave(argv[argind]);
202  }
203  doPlain2();
204  acceptOutOption = 0;
205  argind++;
206  }
207  if (anySection)
209  if (preamble)
211  exit(0);
212 }
213 
214  /* "a4j,12pt" -> "a4,12pt" etc. Return value can be free'ed afterward */
215 char *styleConv(s, nttflag)
216 char *s;
217 int nttflag;
218 {
219  char *buf, *p;
220  int sty_appeared = 0;
221 
222  if(NULL == (p = buf = malloc(strlen(s)*3/2+6+1))){ /* 6 for ",jverb" */
223  fprintf(stderr, "PANIC(malloc in styleConv)\n");
224  exit(2);
225  }
226  while(*s){
227  while(isspace(*s)) *p++ = *s++;
228  if(*s) sty_appeared = 1;
229  if((*s == 'a' || *s == 'b') && (s[1] == '4' || s[1] == '5')){
230  if(nttflag){
231  if(s[2] == 'j' && (!s[3] || s[3] == ',')){
232  strncpy(p, s, 2), p += 2, s += 3;
233  }
234  } else {
235  if(!s[2] || s[2] == ','){
236  strncpy(p, s, 2), p += 2, s += 2;
237  *p++ = 'j';
238  }
239  }
240  }
241  while(*s) if(',' == (*p++ = *s++)) break;
242  }
243  if(useJverb){
244  if(sty_appeared) *p++ = ',';
245  strcpy(p, "jverb"), p += 5;
246  }
247  *p = '\0';
248  return buf;
249 }
250 #define nttSty(s) styleConv(s, 1)
251 #define asciiSty(s) styleConv(s, 0)
252 
253 /*
254  * Do parse & output
255  */
257 {
258  static int firstTime = 1;
259 
262  MSG2("Input %d lines from \"%s\"\n", textLines, fname);
263  if (textLines <= 1)
264  exit(0);
267 
268  if (firstTime) {
269  firstTime = 0;
270 #ifdef HTML
271  if (put == &htmlPut) {
273  /* sorry, nothing is change this "if" */
274  if (halfCooked) {
275  htmlSetTrans(0);
276  }
277  else {
278  htmlSetTrans(1);
279  }
280  }
281  else
282 #endif
283  if (put == &roffPut) {
284  if (roffMacro == MS_MACRO)
287  }
288  else if (put == &texPut) {
290  if (halfCooked) {
291  texSetTrans(0);
292  }
293  else {
294  texSetTrans(1);
295  }
296  }
297  if (preamble) {
298  if (stflag) {
299  char *p = nttSty(texStyle), *q = asciiSty(texStyle);
300 
301  putMacro(M_DOC_BEGIN, (long)fontSize, p, q);
302  free(p), free(q);
303  }
304  else {
305  char *p = asciiSty(texStyle), *q = asciiSty(texStyle);
306 
307  putMacro(M_DOC_BEGIN, (long)fontSize, p, q);
308  free(p), free(q);
309  }
310  }
311  }
312 
314  MSG0("[blank]");
316  if (removePaging) {
317  MSG0("[paging]");
319  }
320  MSG0("[section]");
322  MSG0("[appendix]");
324  MSG0("[quotation]");
326  MSG0("[list]");
328  MSG0("[fig title]");
329  figTitle(textBegin, textLines);
330 #ifdef PICTURE
331  MSG0("[picture]");
334 #endif
335  if (tableEnabled) {
336  MSG0("[table]");
338  }
339  MSG0("[justified]");
341  MSG0("[example]");
343  MSG0("[section]");
345  MSG0("[plaintext]");
350  makeTitledBlock(textBegin, textLines);
352  MSG0("\n");
353  if (renumber)
354  renumDocument();
355  else
356  outputDocument();
357 #ifdef DEBUG
358  {
359  int i;
360  for (i = textBegin; i < textLines; i++)
361  if (texts[i]->printed == 0)
362  fprintf(stderr, "ERROR(Not Printed:%d)%s\n",
363  i, texts[i]->body);
364  }
365 #endif
366  freeAll();
367 }
369 {
370  int l = 1;
371  int i;
372  struct textBlock *tbp;
373  while (l <= textLines) {
374  if (tbp = texts[l]->block) {
375  for (i = l; i < tbp->rend; i++) {
376  free((char *)texts[i]->body);
377  free((char *)texts[i]);
378  }
379  l = tbp->rend;
380  free((char *)tbp);
381  }
382  else
383  l++;
384  }
385  free((char *)texts);
386 }
387 #define OUTPUT_OPTION(opt) {\
388  if (!acceptOutOption) {\
389  illegopt=opt;\
390  goto dontOutOpt;\
391  }\
392  }\
393 
395 int xargc;
396 char **xargv;
397 {
398  int c;
399  char *illegopt;
400  optind = 1;
401  while ((c = getopt(xargc, xargv,
402  "X:j:l:s:vd:f:r:a:c:i:k:h:t:e:p:v:n:m:o:")) != -1)
403  switch (c) {
404  case 'j':
405 #if INTERNAL_CODE == CODE_EUC
406  if (strcmp(optarg, "is") == 0) {
407  OUTPUT_OPTION("-jis");
409  }
410  else
411 #endif
412  /* Add Nide (need jverb,sty to use this option) */
413  if (strcmp(optarg, "verb") == 0) {
414  OUTPUT_OPTION("-jverb");
415  useJverb = 1;
416  }
417  else
418  /* Add Nide end */
419  goto usage;
420  break;
421  case 'l':
422  if (strncmp(optarg, "istd", 4) == 0) {
423  OUTPUT_OPTION("-listd");
424  listDecor = 1;
425  }
426  break;
427  case 's':
428 #if INTERNAL_CODE == CODE_EUC
429  if (strcmp(optarg, "jis") == 0) {
430  OUTPUT_OPTION("-sjis");
433  }
434  else if (strcmp(optarg, "trict") == 0) {
435  stflag = 0;
436  }
437 #endif
438  if (strcmp(optarg, "pace") == 0) {
439  OUTPUT_OPTION("-space");
440  reflectSpace = 1;
441  }
442  else if (strcmp(optarg, "trict") == 0) {
443  stflag = 0;
444  }
445  else goto usage;
446  break;
447  case 'e':
448 #if INTERNAL_CODE == CODE_EUC
449  if (strcmp(optarg, "uc") == 0) {
450  OUTPUT_OPTION("-euc");
452  }
453  else
454 #endif
455  if (strncmp(optarg, "xam=", 4) == 0) {
456  examFactor = atoi(optarg+4);
457  if (examFactor < 0 || examFactor >100){
458  goto usage;
459  }
460  }
461  else goto usage;
462  break;
463  case 'v':
464  OUTPUT_OPTION("-v");
465  verbose = 1;
466  break;
467  case 'p':
468  if (strcmp(optarg, "re") == 0) {
469  OUTPUT_OPTION("-pre");
470  preamble = 1;
471  }
472  else if (strncmp(optarg, "t=", 2) == 0) {
473  if ((fontSize = atoi(optarg + 2)) == 0)
474  goto usage;
475  fontSpecified = 1;
476  }
477  else goto usage;
478  break;
479  case 'm':
480  if (*optarg == 's') {
481  OUTPUT_OPTION("-ms");
483  put = &roffPut;
484  }
485  else if (*optarg == 'm') {
486  OUTPUT_OPTION("-mm");
488  put = &roffPut;
489  }
490  else goto usage;
491  break;
492  case 'r':
493  if (strcmp(optarg, "aw") == 0) {
494  OUTPUT_OPTION("-raw");
495  rawOutput = 1;
496  }
497  else if (strcmp(optarg, "enum") == 0) {
498  OUTPUT_OPTION("-renum");
499  renumber = 1;
500  preamble = 0;
501  }
502  else if (strcmp(optarg, "off") == 0) {
503  OUTPUT_OPTION("-roff");
504  put = &roffPut;
505  }
506  else if (strncmp(optarg, "mpage", 4) == 0)
507  removePaging = 1;
508  else if (strcmp(optarg, "ef") == 0) {
509  crossRefer = 1;
510  }
511  else goto usage;
512  break;
513  case 'f':
514  macroName = optarg;
515  break;
516  case 'a':
517  if (strcmp(optarg, "cursec") == 0) {
518  OUTPUT_OPTION("-acursec");
519  accurateSecnum = 1;
520  }
521  else goto usage;
522  break;
523  case 'i':
524  if (strcmp(optarg, "ndsec") == 0) {
525  indentedSecnum = 1;
526  }
527  else if (strcmp(optarg, "nline") == 0) {
528  inlineHint = 1;
529  }
530  else goto usage;
531  break;
532  case 'k':
533 #ifdef KANJI
534  if (strncmp(optarg, "table", 5) == 0) {
535  jisTableEnabled = 1;
536  }
537  else
538 #endif
539  goto usage;
540  break;
541  case 'h':
542  if (strcmp(optarg, "alfraw") == 0) {
543  OUTPUT_OPTION("-alfraw");
544  halfCooked = 1;
545  }
546 #ifdef HTML
547  else if (strcmp(optarg, "tmlonce") == 0) {
548  OUTPUT_OPTION("-htmlonce");
549  htmlOnce = 1;
550  put = &htmlPut;
551  }
552  else if (strcmp(optarg, "tml") == 0) {
553  OUTPUT_OPTION("-html");
554  htmlOnce = 0;
555  put = &htmlPut;
556  }
557  else if (strcmp(optarg, "ere") == 0) {
558  OUTPUT_OPTION("-here");
559  htmlHere = 1;
560  }
561 #endif
562  else goto usage;
563  break;
564  case 't':
565  if (strncmp(optarg, "able=", 5) == 0) {
566  if ((tableFactor = atoi(optarg+5)) == 0)
567  tableEnabled = 0;
568  if (tableFactor < 0 || tableFactor > 100) {
569  goto usage;
570  }
571  }
572  else if (strcmp(optarg, "exq") == 0) {
573  OUTPUT_OPTION("-texq");
574  texQuote = 1;
575  put = &texPut;
576  }
577  else if (strcmp(optarg, "ex") == 0) {
578  OUTPUT_OPTION("-tex");
579  put = &texPut;
580  }
581  else if (strncmp(optarg, "style=", 6) == 0) {
582  OUTPUT_OPTION("-tstyle");
583  texStyle = strsave(optarg + 6);
584  }
585  else goto usage;
586  break;
587  case 'n':
588  if (strcmp(optarg, "opre") == 0) {
589  OUTPUT_OPTION("-nopre");
590  preamble = 0;
591  }
592  else if (strcmp(optarg, "ospace") == 0) {
593  OUTPUT_OPTION("-nospace");
594  reflectSpace = 0;
595  }
596  else if (strcmp(optarg, "oacursec") == 0) {
597  OUTPUT_OPTION("-noacursec");
598  accurateSecnum = 0;
599  }
600  else if (strcmp(optarg, "olistd") == 0) {
601  OUTPUT_OPTION("-nolistd");
602  listDecor = 0;
603  }
604  else if (strcmp(optarg, "oinline") == 0) {
605  inlineHint = 0;
606  }
607  else goto usage;
608  break;
609 #ifdef DEBUG
610  case 'd':
611  if ((debug = atoi(optarg)) == 0)
612  goto usage;
613  break;
614 #endif
615  case '?':
616  usage:
617  return -1;
618  dontOutOpt:
619  fprintf(stderr,
620  "ERROR: Output option \"%s\" ignored.\n", illegopt);
621  return -1;
622  }
623  return 0;
624 }
625 /*
626  * Build "argc", "argv[]" from string and call getOption
627  */
628 #define MAX_ARGC 32
630 char *s;
631 {
632  static int xargc;
633  static char *xargv[MAX_ARGC];
634  int inStr;
635  inStr = 0;
636  xargc = 1;
637  while(*s) {
638  if (!inStr && !isspace(*s)) {
639  xargv[xargc] = s;
640  xargc++;
641  if (xargc >= MAX_ARGC) {
642  (void)fprintf(stderr, "Too many options\n");
643  return -1;
644  }
645  inStr = 1;
646  }
647  if (isspace(*s)) {
648  *s = '\0';
649  inStr = 0;
650  }
651  s++;
652  }
653  xargv[0] = "";
654  if (getOption(xargc, xargv)
655  || optind < xargc)
656  return -1;
657  return 0;
658 }
659 /*
660  * Get option from Environment variable
661  */
663 {
664  char *plainEnv;
665  char buf[MAX_LINE_LEN];
666  FILE *initf;
667  if ((plainEnv = getenv(PLAIN2_ENV)) == NULL)
668  return;
669 #ifdef WIN32
670  if(plainEnv) {
671  char *p;
672  for(p=plainEnv; *p; p++) {
673  if(iskanji1(*p)) {
674  p++; continue;
675  }
676  if(*p == '\\') *p = '/';
677  }
678  }
679 #endif
680  if ((initf = fopen(plainEnv, "r")) == NULL) {
681  char envOpt[MAX_LINE_LEN];
682  strcpy(envOpt, plainEnv);
683  if (optionLine(envOpt)) {
684  (void)fprintf(stderr,
685  "Illegal option in Environment %s\n",
686  PLAIN2_ENV);
687  (void)fprintf(stderr,"%s\n", plainEnv);
688  exit(1);
689  }
690  }
691  else {
692  int line = 1;
693  while (fgets(buf, MAX_LINE_LEN, initf) != NULL) {
694  line++;
695  if (optionLine(buf)) {
696  (void)fprintf(stderr,
697  "illegal option in file %s at line %d\n",
698  plainEnv, line);
699  (void)fprintf(stderr,"%s\n", buf);
700  exit(1);
701  }
702  }
703  fclose(initf);
704  }
705 }
706 /*
707  * Save & Restore Parameters for Parsing
708  */
709 static int defJapaneseText;
710 static int defTableEnabled;
712 static int defIndentedSecnum ;
713 static int defRawOutput;
714 static int defTableFactor;
715 static int defExamFactor;
716 /*
717  * Parsing paramters
718  * 1) Environment (from Env. variable itself or from the specified file)
719  * 2) Command argument option
720  *
721  * And "option" line of each files
722  */
724 {
732 }
734 {
742 }
743 
q
Definition: afm2pl.c:2287
#define free(a)
Definition: decNumber.cpp:310
char * strsave()
#define CODE_JIS
Definition: virfont.c:102
#define fopen
Definition: xxstdio.h:21
#define fgets
Definition: xxstdio.h:29
char * strncpy()
int strcmp()
Definition: coll.cpp:143
char * strcpy()
static void
Definition: fpif.c:118
#define s
Definition: afcover.h:80
static char usage[]
Definition: giftopnm.c:59
#define c(n)
Definition: gpos-common.c:150
headerFooter(int begin, int end)
Definition: headfoot.c:202
struct fractpoint hint
Definition: hints.c:78
htmlSetTrans(int full)
Definition: htmlout.c:104
struct macDefs htmlMacros[]
Definition: htmlout.c:32
justified(int begin, int end)
Definition: justify.c:82
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p
Definition: afcover.h:72
small capitals from c petite p scientific i
Definition: afcover.h:80
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
void exit()
int getopt(int nargc, char *const nargv[], const char *ostr)
Definition: getopt.c:53
int atoi(const char *)
#define buf
#define debug
Definition: pdfparse.c:41
#define fclose
Definition: debug.h:100
#define fileno
Definition: win32lib.h:72
#define fprintf
Definition: mendex.h:64
boolean iskanji1(int c)
Definition: ptexenc.c:239
#define malloc
Definition: alloca.c:91
int setmode()
int strncmp()
markIfExample(int begin, int end)
Definition: example.c:15
int xargc
Definition: main.c:99
char ** xargv
Definition: main.c:100
cell * list
Definition: list_routines.h:30
#define _O_BINARY
Definition: lfs.c:127
putMacro(int macroNum, unsigned va_alist)
Definition: macro.c:192
macroFile(char *fname)
Definition: macro.c:314
clearMacro()
Definition: macro.c:283
initMacroDefs(struct macDefs *mcp)
Definition: macro.c:289
#define M_SECTION_END
Definition: macro.h:36
#define M_DOC_END
Definition: macro.h:8
#define M_DOC_BEGIN
Definition: macro.h:7
applyOnRegion2(int begin, int end, int phase, int *func)
Definition: miscutil.c:446
applyOnRegion(int begin, int end, int *func)
Definition: miscutil.c:520
applyOnSpaced(int begin, int end, int *func)
Definition: miscutil.c:528
joinBlocks(int begin, int end, int tbType)
Definition: miscutil.c:569
analyzeLines(int begin, int end)
Definition: analyze.c:595
fixListRegion(int begin, int end)
Definition: list.c:252
readAndStoreFile()
Definition: readfile.c:192
freeAll()
Definition: plain2.c:368
struct textBlock * pageBp
Definition: plain2.c:114
int verbose
Definition: plain2.c:100
char * plain2Lib
Definition: plain2.c:105
int jisTableEnabled
Definition: plain2.c:76
int textLines
Definition: plain2.c:115
#define nttSty(s)
Definition: plain2.c:250
#define VERSION
Definition: plain2.c:59
getOption(int xargc, char **xargv)
Definition: plain2.c:394
int reflectSpace
Definition: plain2.c:96
static int defRawOutput
Definition: plain2.c:713
int rightMargin
Definition: plain2.c:117
struct macDefs roffMacros[]
Definition: roffout.c:15
doPlain2()
Definition: plain2.c:256
int roffMacro
Definition: plain2.c:83
restoreParseDefaults()
Definition: plain2.c:733
static int defExamFactor
Definition: plain2.c:715
char * texStyle
Definition: plain2.c:107
int halfCooked
Definition: plain2.c:90
static int defTableFactor
Definition: plain2.c:714
#define PLAIN2_USAGE_1
Definition: plain2.c:43
struct macDefs texMacros[]
Definition: texout.c:28
static int defJapaneseText
Definition: plain2.c:709
int pageWidth
Definition: plain2.c:88
struct text ** texts
Definition: plain2.c:112
main(int argc, char **argv)
Definition: plain2.c:138
optionLine(char *s)
Definition: plain2.c:629
struct text * textTop
Definition: plain2.c:113
int removePaging
Definition: plain2.c:80
struct macDefs roffMsMacros[]
Definition: plain2.c:66
#define asciiSty(s)
Definition: plain2.c:251
int fontSize
Definition: plain2.c:98
saveParseDefaults()
Definition: plain2.c:723
int stflag
Definition: plain2.c:131
int tableFactor
Definition: plain2.c:78
int useJverb
Definition: plain2.c:109
int renumber
Definition: plain2.c:84
char * macroName
Definition: plain2.c:106
FILE * inFile
Definition: plain2.c:111
int anySection
Definition: plain2.c:120
int fontSpecified
Definition: plain2.c:99
int acceptOutOption
Definition: plain2.c:122
int crossRefer
Definition: plain2.c:81
int inlineHint
Definition: plain2.c:82
envOption()
Definition: plain2.c:662
int rawOutput
Definition: plain2.c:89
int texQuote
Definition: plain2.c:97
int listDecor
Definition: plain2.c:95
int indentedSecnum
Definition: plain2.c:77
struct outDev * put
Definition: plain2.c:108
int titleStyle
Definition: plain2.c:119
int preamble
Definition: plain2.c:93
static int defIndentedSecnum
Definition: plain2.c:712
int optind
Definition: getopt.c:39
char * optarg
Definition: getopt.c:42
int japaneseText
Definition: plain2.c:118
static int defJisTableEnabled
Definition: plain2.c:711
#define MAX_ARGC
Definition: plain2.c:628
char * styleConv(char *s, int nttflag)
Definition: plain2.c:215
int tableEnabled
Definition: plain2.c:75
int outputCode
Definition: plain2.c:92
char * fname
Definition: plain2.c:121
int inputCode
Definition: plain2.c:91
static int defTableEnabled
Definition: plain2.c:710
char * getenv()
int accurateSecnum
Definition: plain2.c:94
int examFactor
Definition: plain2.c:79
int textBegin
Definition: plain2.c:116
#define OUTPUT_OPTION(opt)
Definition: plain2.c:387
int markIfTable()
#define TB_EXAMPLE
Definition: plain2.h:101
#define MAX_LINE_LEN
Definition: plain2.h:45
#define TB_PICTURE
Definition: plain2.h:107
#define CODE_EUC
Definition: plain2.h:203
#define MSG1(format, val)
Definition: plain2.h:137
#define DEFAULT_STY
Definition: plain2.h:37
#define MSG2(format, val1, val2)
Definition: plain2.h:139
#define DEF_PAGE_WIDTH
Definition: plain2.h:44
#define TB_CENTER
Definition: plain2.h:109
#define PLAIN2_ENV
Definition: plain2.h:32
#define MM_MACRO
Definition: plain2.h:193
#define MSG0(format)
Definition: plain2.h:135
int markIfPicture()
#define MS_MACRO
Definition: plain2.h:194
#define CODE_SJIS
Definition: plain2.h:205
#define PLAIN2_LIB
Definition: plain2.h:33
plainText(int begin, int end)
Definition: plaintxt.c:84
quotedText(int begin, int end)
Definition: plaintxt.c:16
int spacing
Definition: process_score.c:12
#define isspace(ch)
Definition: utype.h:87
section(int begin, int end, int phase)
Definition: section.c:117
appendix(int begin, int end)
Definition: section.c:196
Definition: bdf.c:133
Definition: macro.h:75
Definition: plain2.h:289
short rend
Definition: plain2.h:117
#define FILE
Definition: t1stdio.h:34
*job_name strlen((char *) job_name) - 4)
tblParseInit()
Definition: table.c:64
texSetTrans(int full)
Definition: texout.c:150
getTitleBlock(int begin, int end)
Definition: title.c:198
struct outDev roffPut
Definition: output.c:68
outputDocument()
Definition: output.c:656
struct outDev texPut
Definition: output.c:81
#define argv
Definition: xmain.c:270
#define argc
Definition: xmain.c:269