2 Copyright (C) 1990-2020 Free Software Foundation, Inc.
3 Contributed by steve chamberlain @cygnus
5 This file is part of BFD, the Binary File Descriptor library.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20 MA 02110-1301, USA. */
22 /* Yet another way of extracting documentation from source.
23 No, I haven't finished it yet, but I hope you people like it better
28 Basically, this is a sort of string forth, maybe we should call it
31 You define new words thus:
32 : <newword> <oldwords> ;
36 /* Primitives provided by the program:
38 Two stacks are provided, a string stack and an integer stack.
40 Internal state variables:
41 internal_wanted - indicates whether `-i' was passed
42 internal_mode - user-settable
46 ! - pop top of integer stack for address, pop next for value; store
47 @ - treat value on integer stack as the address of an integer; push
48 that integer on the integer stack after popping the "address"
49 hello - print "hello\n" to stdout
50 stdout - put stdout marker on TOS
51 stderr - put stderr marker on TOS
52 print - print TOS-1 on TOS (eg: "hello\n" stdout print)
55 copy_past_newline - append input, up to and including newline into TOS
59 remchar - delete last character from TOS
61 do_fancy_stuff - translate <<foo>> to @code{foo} in TOS
62 bulletize - if "o" lines found, prepend @itemize @bullet to TOS
63 and @item to each "o" line; append @end itemize
64 courierize - put @example around . and | lines, translate {* *} { }
67 outputdots - strip out lines without leading dots
68 paramstuff - convert full declaration into "PARAMS" form if not already
69 maybecatstr - do catstr if internal_mode == internal_wanted, discard
71 translatecomments - turn {* and *} into comment delimiters
72 kill_bogus_lines - get rid of extra newlines
74 internalmode - pop from integer stack, set `internalmode' to that value
75 print_stack_level - print current stack depth to stderr
76 strip_trailing_newlines - go ahead, guess...
77 [quoted string] - push string onto string stack
78 [word starting with digit] - push atol(str) onto integer stack
80 A command must be all upper-case, and alone on a line.
99 /* Here is a string type ... */
101 typedef struct buffer
104 unsigned long write_idx
;
109 static void init_string_with_size (string_type
*, unsigned int);
110 static void init_string (string_type
*);
111 static int find (string_type
*, char *);
112 static void write_buffer (string_type
*, FILE *);
113 static void delete_string (string_type
*);
114 static char *addr (string_type
*, unsigned int);
115 static char at (string_type
*, unsigned int);
116 static void catchar (string_type
*, int);
117 static void overwrite_string (string_type
*, string_type
*);
118 static void catbuf (string_type
*, char *, unsigned int);
119 static void cattext (string_type
*, char *);
120 static void catstr (string_type
*, string_type
*);
121 static void die (char *);
125 init_string_with_size (buffer
, size
)
129 buffer
->write_idx
= 0;
131 buffer
->ptr
= (char *) malloc (size
);
138 init_string_with_size (buffer
, DEF_SIZE
);
149 for (i
= 0; i
< str
->write_idx
&& *p
; i
++)
151 if (*p
== str
->ptr
[i
])
160 write_buffer (buffer
, f
)
164 if (buffer
->write_idx
!= 0
165 && fwrite (buffer
->ptr
, buffer
->write_idx
, 1, f
) != 1)
166 die ("cannot write output");
170 delete_string (buffer
)
183 return buffer
->ptr
+ idx
;
191 if (pos
>= buffer
->write_idx
)
193 return buffer
->ptr
[pos
];
201 if (buffer
->write_idx
== buffer
->size
)
204 buffer
->ptr
= (char *) realloc (buffer
->ptr
, buffer
->size
);
207 buffer
->ptr
[buffer
->write_idx
++] = ch
;
211 overwrite_string (dst
, src
)
216 dst
->size
= src
->size
;
217 dst
->write_idx
= src
->write_idx
;
222 catbuf (buffer
, buf
, len
)
227 if (buffer
->write_idx
+ len
>= buffer
->size
)
229 while (buffer
->write_idx
+ len
>= buffer
->size
)
231 buffer
->ptr
= (char *) realloc (buffer
->ptr
, buffer
->size
);
233 memcpy (buffer
->ptr
+ buffer
->write_idx
, buf
, len
);
234 buffer
->write_idx
+= len
;
238 cattext (buffer
, string
)
242 catbuf (buffer
, string
, (unsigned int) strlen (string
));
250 catbuf (dst
, src
->ptr
, src
->write_idx
);
254 skip_white_and_stars (src
, idx
)
259 while ((c
= at (src
, idx
)),
260 isspace ((unsigned char) c
)
262 /* Don't skip past end-of-comment or star as first
263 character on its line. */
264 && at (src
, idx
+1) != '/'
265 && at (src
, idx
-1) != '\n'))
271 skip_past_newline_1 (ptr
, idx
)
276 && at (ptr
, idx
) != '\n')
278 if (at (ptr
, idx
) == '\n')
283 /***********************************************************************/
285 string_type stack
[STACK
];
288 unsigned int idx
= 0; /* Pos in input buffer */
289 string_type
*ptr
; /* and the buffer */
290 typedef void (*stinst_type
)();
292 stinst_type sstack
[STACK
];
293 stinst_type
*ssp
= &sstack
[0];
295 long *isp
= &istack
[0];
297 typedef int *word_type
;
302 struct dict_struct
*next
;
309 typedef struct dict_struct dict_type
;
315 fprintf (stderr
, "%s\n", msg
);
323 die ("underflow in string stack");
324 if (tos
>= stack
+ STACK
)
325 die ("overflow in string stack");
332 die ("underflow in integer stack");
333 if (isp
>= istack
+ STACK
)
334 die ("overflow in integer stack");
338 static void exec (dict_type
*);
339 static void call (void);
340 static void remchar (void), strip_trailing_newlines (void), push_number (void);
341 static void push_text (void);
342 static void remove_noncomments (string_type
*, string_type
*);
343 static void print_stack_level (void);
344 static void paramstuff (void), translatecomments (void);
345 static void outputdots (void), courierize (void), bulletize (void);
346 static void do_fancy_stuff (void);
347 static int iscommand (string_type
*, unsigned int);
348 static int copy_past_newline (string_type
*, unsigned int, string_type
*);
349 static void icopy_past_newline (void), kill_bogus_lines (void), indent (void);
350 static void get_stuff_in_command (void), swap (void), other_dup (void);
351 static void drop (void), idrop (void);
352 static void icatstr (void), skip_past_newline (void), internalmode (void);
353 static void maybecatstr (void);
354 static char *nextword (char *, char **);
355 dict_type
*lookup_word (char *);
356 static void perform (void);
357 dict_type
*newentry (char *);
358 unsigned int add_to_definition (dict_type
*, stinst_type
);
359 void add_intrinsic (char *, void (*)());
360 void add_var (char *);
361 void compile (char *);
362 static void bang (void);
363 static void atsign (void);
364 static void hello (void);
365 static void stdout_ (void);
366 static void stderr_ (void);
367 static void print (void);
368 static void read_in (string_type
*, FILE *);
369 static void usage (void);
370 static void chew_exit (void);
385 stinst_type
*oldpc
= pc
;
387 e
= (dict_type
*) (pc
[1]);
401 strip_trailing_newlines ()
403 while ((isspace ((unsigned char) at (tos
, tos
->write_idx
- 1))
404 || at (tos
, tos
->write_idx
- 1) == '\n')
405 && tos
->write_idx
> 0)
427 cattext (tos
, *((char **) pc
));
431 /* This function removes everything not inside comments starting on
432 the first char of the line from the string, also when copying
433 comments, removes blank space and leading *'s.
434 Blank lines are turned into one blank line. */
437 remove_noncomments (src
, dst
)
441 unsigned int idx
= 0;
443 while (at (src
, idx
))
445 /* Now see if we have a comment at the start of the line. */
446 if (at (src
, idx
) == '\n'
447 && at (src
, idx
+ 1) == '/'
448 && at (src
, idx
+ 2) == '*')
452 idx
= skip_white_and_stars (src
, idx
);
454 /* Remove leading dot */
455 if (at (src
, idx
) == '.')
458 /* Copy to the end of the line, or till the end of the
460 while (at (src
, idx
))
462 if (at (src
, idx
) == '\n')
464 /* end of line, echo and scrape of leading blanks */
465 if (at (src
, idx
+ 1) == '\n')
469 idx
= skip_white_and_stars (src
, idx
);
471 else if (at (src
, idx
) == '*' && at (src
, idx
+ 1) == '/')
474 cattext (dst
, "\nENDDD\n");
479 catchar (dst
, at (src
, idx
));
492 fprintf (stderr
, "current string stack depth = %ld, ",
493 (long) (tos
- stack
));
494 fprintf (stderr
, "current integer stack depth = %ld\n",
495 (long) (isp
- istack
));
503 name PARAMS ((stuff));
519 /* Make sure that it's not already param'd or proto'd. */
521 || find (tos
, "PARAMS") || find (tos
, "PROTO") || !find (tos
, "("))
527 /* Find the open paren. */
528 for (openp
= 0; at (tos
, openp
) != '(' && at (tos
, openp
); openp
++)
532 /* Step back to the fname. */
534 while (fname
&& isspace ((unsigned char) at (tos
, fname
)))
537 && !isspace ((unsigned char) at (tos
,fname
))
538 && at (tos
,fname
) != '*')
543 /* Output type, omitting trailing whitespace character(s), if
545 for (len
= fname
; 0 < len
; len
--)
547 if (!isspace ((unsigned char) at (tos
, len
- 1)))
550 for (idx
= 0; idx
< len
; idx
++)
551 catchar (&out
, at (tos
, idx
));
553 cattext (&out
, "\n"); /* Insert a newline between type and fnname */
555 /* Output function name, omitting trailing whitespace
556 character(s), if any. */
557 for (len
= openp
; 0 < len
; len
--)
559 if (!isspace ((unsigned char) at (tos
, len
- 1)))
562 for (idx
= fname
; idx
< len
; idx
++)
563 catchar (&out
, at (tos
, idx
));
565 cattext (&out
, " PARAMS (");
567 for (idx
= openp
; at (tos
, idx
) && at (tos
, idx
) != ';'; idx
++)
568 catchar (&out
, at (tos
, idx
));
570 cattext (&out
, ");\n\n");
572 overwrite_string (tos
, &out
);
578 and *} into comments */
583 unsigned int idx
= 0;
587 while (at (tos
, idx
))
589 if (at (tos
, idx
) == '{' && at (tos
, idx
+ 1) == '*')
591 cattext (&out
, "/*");
594 else if (at (tos
, idx
) == '*' && at (tos
, idx
+ 1) == '}')
596 cattext (&out
, "*/");
601 catchar (&out
, at (tos
, idx
));
606 overwrite_string (tos
, &out
);
611 /* Mod tos so that only lines with leading dots remain */
615 unsigned int idx
= 0;
619 while (at (tos
, idx
))
621 /* Every iteration begins at the start of a line. */
622 if (at (tos
, idx
) == '.')
628 while ((c
= at (tos
, idx
)) && c
!= '\n')
630 if (c
== '{' && at (tos
, idx
+ 1) == '*')
632 cattext (&out
, "/*");
635 else if (c
== '*' && at (tos
, idx
+ 1) == '}')
637 cattext (&out
, "*/");
648 catchar (&out
, '\n');
652 idx
= skip_past_newline_1 (tos
, idx
);
656 overwrite_string (tos
, &out
);
660 /* Find lines starting with . and | and put example around them on tos */
665 unsigned int idx
= 0;
670 while (at (tos
, idx
))
672 if (at (tos
, idx
) == '\n'
673 && (at (tos
, idx
+1 ) == '.'
674 || at (tos
, idx
+ 1) == '|'))
676 cattext (&out
, "\n@example\n");
681 while (at (tos
, idx
) && at (tos
, idx
) != '\n')
685 /* We are inside {} parameters of some command;
686 Just pass through until matching brace. */
687 if (at (tos
, idx
) == '{')
689 else if (at (tos
, idx
) == '}')
692 else if (command
!= 0)
694 if (at (tos
, idx
) == '{')
696 else if (!islower ((unsigned char) at (tos
, idx
)))
699 else if (at (tos
, idx
) == '@'
700 && islower ((unsigned char) at (tos
, idx
+ 1)))
704 else if (at (tos
, idx
) == '{' && at (tos
, idx
+ 1) == '*')
706 cattext (&out
, "/*");
710 else if (at (tos
, idx
) == '*' && at (tos
, idx
+ 1) == '}')
712 cattext (&out
, "*/");
716 else if (at (tos
, idx
) == '{'
717 || at (tos
, idx
) == '}')
722 catchar (&out
, at (tos
, idx
));
725 catchar (&out
, '\n');
727 while (at (tos
, idx
) == '\n'
728 && ((at (tos
, idx
+ 1) == '.')
729 || (at (tos
, idx
+ 1) == '|')))
731 cattext (&out
, "@end example");
735 catchar (&out
, at (tos
, idx
));
740 overwrite_string (tos
, &out
);
744 /* Finds any lines starting with "o ", if there are any, then turns
745 on @itemize @bullet, and @items each of them. Then ends with @end
746 itemize, inplace at TOS*/
751 unsigned int idx
= 0;
756 while (at (tos
, idx
))
758 if (at (tos
, idx
) == '@'
759 && at (tos
, idx
+ 1) == '*')
764 else if (at (tos
, idx
) == '\n'
765 && at (tos
, idx
+ 1) == 'o'
766 && isspace ((unsigned char) at (tos
, idx
+ 2)))
770 cattext (&out
, "\n@itemize @bullet\n");
774 cattext (&out
, "\n@item\n");
779 catchar (&out
, at (tos
, idx
));
780 if (on
&& at (tos
, idx
) == '\n'
781 && at (tos
, idx
+ 1) == '\n'
782 && at (tos
, idx
+ 2) != 'o')
784 cattext (&out
, "@end itemize");
793 cattext (&out
, "@end itemize\n");
801 /* Turn <<foo>> into @code{foo} in place at TOS*/
806 unsigned int idx
= 0;
809 while (at (tos
, idx
))
811 if (at (tos
, idx
) == '<'
812 && at (tos
, idx
+ 1) == '<'
813 && !isspace ((unsigned char) at (tos
, idx
+ 2)))
815 /* This qualifies as a << startup. */
817 cattext (&out
, "@code{");
819 && at (tos
, idx
) != '>' )
821 catchar (&out
, at (tos
, idx
));
830 catchar (&out
, at (tos
, idx
));
840 /* A command is all upper case,and alone on a line. */
847 unsigned int len
= 0;
848 while (at (ptr
, idx
))
850 if (isupper ((unsigned char) at (ptr
, idx
))
851 || at (ptr
, idx
) == ' ' || at (ptr
, idx
) == '_')
856 else if (at (ptr
, idx
) == '\n')
869 copy_past_newline (ptr
, idx
, dst
)
876 while (at (ptr
, idx
) && at (ptr
, idx
) != '\n')
878 if (at (ptr
, idx
) == '\t')
880 /* Expand tabs. Neither makeinfo nor TeX can cope well with
884 while (++column
& 7);
888 catchar (dst
, at (ptr
, idx
));
894 catchar (dst
, at (ptr
, idx
));
901 icopy_past_newline ()
906 idx
= copy_past_newline (ptr
, idx
, tos
);
911 Take the string at the top of the stack, do some prettying. */
924 /* Drop leading nl. */
925 while (at (tos
, idx
) == '\n')
931 /* If the first char is a '.' prepend a newline so that it is
932 recognized properly later. */
933 if (at (tos
, idx
) == '.')
934 catchar (&out
, '\n');
936 /* Find the last char. */
937 while (at (tos
, idx
))
942 /* Find the last non white before the nl. */
945 while (idx
&& isspace ((unsigned char) at (tos
, idx
)))
949 /* Copy buffer upto last char, but blank lines before and after
955 if (at (tos
, c
) == '\n'
956 && at (tos
, c
+ 1) == '\n'
957 && at (tos
, c
+ 2) == '.')
959 /* Ignore two newlines before a dot. */
962 else if (at (tos
, c
) == '.' && sl
)
964 /* remember that this line started with a dot. */
967 else if (at (tos
, c
) == '\n'
968 && at (tos
, c
+ 1) == '\n'
972 /* Ignore two newlines when last line was dot. */
975 catchar (&out
, at (tos
, c
));
976 if (at (tos
, c
) == '\n')
993 catchar (&out
, '\n');
1008 while (at (tos
, idx
))
1010 switch (at (tos
, idx
))
1013 cattext (&out
, "\n");
1015 if (tab
&& at (tos
, idx
))
1017 cattext (&out
, " ");
1024 cattext (&out
, " ");
1026 cattext (&out
, "(");
1031 cattext (&out
, ")");
1037 catchar (&out
, at (tos
, idx
));
1046 delete_string (tos
);
1052 get_stuff_in_command ()
1058 while (at (ptr
, idx
))
1060 if (iscommand (ptr
, idx
))
1062 idx
= copy_past_newline (ptr
, idx
, tos
);
1084 catstr (tos
, tos
- 1);
1093 delete_string (tos
+ 1);
1110 catstr (tos
, tos
+ 1);
1111 delete_string (tos
+ 1);
1116 skip_past_newline ()
1118 idx
= skip_past_newline_1 (ptr
, idx
);
1125 internal_mode
= *(isp
);
1134 if (internal_wanted
== internal_mode
)
1136 catstr (tos
- 1, tos
);
1138 delete_string (tos
);
1145 nextword (string
, word
)
1156 while (isspace ((unsigned char) *string
) || *string
== '-')
1160 while (*string
&& *string
!= '\n')
1175 word_start
= string
;
1182 if (*string
== '\\')
1188 while (*string
!= '"');
1192 while (!isspace ((unsigned char) *string
))
1200 *word
= (char *) malloc (length
+ 1);
1205 for (idx
= 0; idx
< length
; idx
++)
1207 if (src
[idx
] == '\\')
1208 switch (src
[idx
+ 1])
1216 *dst
++ = src
[idx
+ 1];
1240 dict_type
*ptr
= root
;
1243 if (strcmp (ptr
->word
, word
) == 0)
1248 fprintf (stderr
, "Can't find %s\n", word
);
1255 dict_type
*ptr
= root
;
1266 for (i
= 0; i
< ptr
->code_end
- 1; i
++)
1267 if (ptr
->code
[i
] == push_text
1268 && ptr
->code
[i
+ 1])
1270 free ((char *) ptr
->code
[i
+ 1] - 1);
1286 while (at (ptr
, idx
))
1288 /* It's worth looking through the command list. */
1289 if (iscommand (ptr
, idx
))
1294 (void) nextword (addr (ptr
, idx
), &next
);
1296 word
= lookup_word (next
);
1305 fprintf (stderr
, "warning, %s is not recognised\n", next
);
1306 skip_past_newline ();
1311 skip_past_newline ();
1319 dict_type
*new_d
= (dict_type
*) malloc (sizeof (dict_type
));
1323 new_d
->code
= (stinst_type
*) malloc (sizeof (stinst_type
));
1324 new_d
->code_length
= 1;
1325 new_d
->code_end
= 0;
1330 add_to_definition (entry
, word
)
1334 if (entry
->code_end
== entry
->code_length
)
1336 entry
->code_length
+= 2;
1338 (stinst_type
*) realloc ((char *) (entry
->code
),
1339 entry
->code_length
* sizeof (stinst_type
));
1341 entry
->code
[entry
->code_end
] = word
;
1343 return entry
->code_end
++;
1347 add_intrinsic (name
, func
)
1351 dict_type
*new_d
= newentry (strdup (name
));
1352 add_to_definition (new_d
, func
);
1353 add_to_definition (new_d
, 0);
1360 dict_type
*new_d
= newentry (name
);
1361 add_to_definition (new_d
, push_number
);
1362 add_to_definition (new_d
, (stinst_type
) (&(new_d
->var
)));
1363 add_to_definition (new_d
, 0);
1370 /* Add words to the dictionary. */
1373 string
= nextword (string
, &word
);
1374 while (string
&& *string
&& word
[0])
1376 if (strcmp (word
, "var") == 0)
1379 string
= nextword (string
, &word
);
1383 string
= nextword (string
, &word
);
1385 else if (word
[0] == ':')
1389 /* Compile a word and add to dictionary. */
1391 string
= nextword (string
, &word
);
1394 ptr
= newentry (word
);
1395 string
= nextword (string
, &word
);
1403 while (word
[0] != ';')
1408 /* got a string, embed magic push string
1410 add_to_definition (ptr
, push_text
);
1411 add_to_definition (ptr
, (stinst_type
) (word
+ 1));
1423 /* Got a number, embedd the magic push number
1425 add_to_definition (ptr
, push_number
);
1426 add_to_definition (ptr
, (stinst_type
) atol (word
));
1430 add_to_definition (ptr
, call
);
1431 add_to_definition (ptr
, (stinst_type
) lookup_word (word
));
1435 string
= nextword (string
, &word
);
1437 add_to_definition (ptr
, 0);
1439 string
= nextword (string
, &word
);
1443 fprintf (stderr
, "syntax error at %s\n", string
- 1);
1453 *(long *) ((isp
[0])) = isp
[-1];
1462 isp
[0] = *(long *) (isp
[0]);
1495 write_buffer (tos
, stdout
);
1497 write_buffer (tos
, stderr
);
1499 fprintf (stderr
, "print: illegal print destination `%ld'\n", *isp
);
1516 r
= fread (buff
, 1, sizeof (buff
), file
);
1517 catbuf (str
, buff
, r
);
1522 catbuf (str
, buff
, 1);
1528 fprintf (stderr
, "usage: -[d|i|g] <file >file\n");
1532 /* There is no reliable way to declare exit. Sometimes it returns
1533 int, and sometimes it returns void. Sometimes it changes between
1534 OS releases. Trying to get it declared correctly in the hosts file
1535 is a pointless waste of time. */
1552 init_string (&buffer
);
1553 init_string (&pptr
);
1554 init_string (stack
+ 0);
1558 add_intrinsic ("push_text", push_text
);
1559 add_intrinsic ("!", bang
);
1560 add_intrinsic ("@", atsign
);
1561 add_intrinsic ("hello", hello
);
1562 add_intrinsic ("stdout", stdout_
);
1563 add_intrinsic ("stderr", stderr_
);
1564 add_intrinsic ("print", print
);
1565 add_intrinsic ("skip_past_newline", skip_past_newline
);
1566 add_intrinsic ("catstr", icatstr
);
1567 add_intrinsic ("copy_past_newline", icopy_past_newline
);
1568 add_intrinsic ("dup", other_dup
);
1569 add_intrinsic ("drop", drop
);
1570 add_intrinsic ("idrop", idrop
);
1571 add_intrinsic ("remchar", remchar
);
1572 add_intrinsic ("get_stuff_in_command", get_stuff_in_command
);
1573 add_intrinsic ("do_fancy_stuff", do_fancy_stuff
);
1574 add_intrinsic ("bulletize", bulletize
);
1575 add_intrinsic ("courierize", courierize
);
1576 /* If the following line gives an error, exit() is not declared in the
1577 ../hosts/foo.h file for this host. Fix it there, not here! */
1578 /* No, don't fix it anywhere; see comment on chew_exit--Ian Taylor. */
1579 add_intrinsic ("exit", chew_exit
);
1580 add_intrinsic ("swap", swap
);
1581 add_intrinsic ("outputdots", outputdots
);
1582 add_intrinsic ("paramstuff", paramstuff
);
1583 add_intrinsic ("maybecatstr", maybecatstr
);
1584 add_intrinsic ("translatecomments", translatecomments
);
1585 add_intrinsic ("kill_bogus_lines", kill_bogus_lines
);
1586 add_intrinsic ("indent", indent
);
1587 add_intrinsic ("internalmode", internalmode
);
1588 add_intrinsic ("print_stack_level", print_stack_level
);
1589 add_intrinsic ("strip_trailing_newlines", strip_trailing_newlines
);
1591 /* Put a nl at the start. */
1592 catchar (&buffer
, '\n');
1594 read_in (&buffer
, stdin
);
1595 remove_noncomments (&buffer
, ptr
);
1596 for (i
= 1; i
< (unsigned int) ac
; i
++)
1598 if (av
[i
][0] == '-')
1600 if (av
[i
][1] == 'f')
1606 f
= fopen (av
[i
+ 1], "r");
1609 fprintf (stderr
, "Can't open the input file %s\n",
1619 else if (av
[i
][1] == 'i')
1621 internal_wanted
= 1;
1623 else if (av
[i
][1] == 'w')
1631 write_buffer (stack
+ 0, stdout
);
1633 delete_string (&pptr
);
1634 delete_string (&buffer
);
1637 fprintf (stderr
, "finishing with current stack level %ld\n",
1638 (long) (tos
- stack
));
This page took 0.074228 seconds and 4 git commands to generate.