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
)
182 return buffer
->ptr
+ idx
;
190 if (pos
>= buffer
->write_idx
)
192 return buffer
->ptr
[pos
];
200 if (buffer
->write_idx
== buffer
->size
)
203 buffer
->ptr
= (char *) realloc (buffer
->ptr
, buffer
->size
);
206 buffer
->ptr
[buffer
->write_idx
++] = ch
;
210 overwrite_string (dst
, src
)
215 dst
->size
= src
->size
;
216 dst
->write_idx
= src
->write_idx
;
221 catbuf (buffer
, buf
, len
)
226 if (buffer
->write_idx
+ len
>= buffer
->size
)
228 while (buffer
->write_idx
+ len
>= buffer
->size
)
230 buffer
->ptr
= (char *) realloc (buffer
->ptr
, buffer
->size
);
232 memcpy (buffer
->ptr
+ buffer
->write_idx
, buf
, len
);
233 buffer
->write_idx
+= len
;
237 cattext (buffer
, string
)
241 catbuf (buffer
, string
, (unsigned int) strlen (string
));
249 catbuf (dst
, src
->ptr
, src
->write_idx
);
253 skip_white_and_stars (src
, idx
)
258 while ((c
= at (src
, idx
)),
259 isspace ((unsigned char) c
)
261 /* Don't skip past end-of-comment or star as first
262 character on its line. */
263 && at (src
, idx
+1) != '/'
264 && at (src
, idx
-1) != '\n'))
270 skip_past_newline_1 (ptr
, idx
)
275 && at (ptr
, idx
) != '\n')
277 if (at (ptr
, idx
) == '\n')
282 /***********************************************************************/
284 string_type stack
[STACK
];
287 unsigned int idx
= 0; /* Pos in input buffer */
288 string_type
*ptr
; /* and the buffer */
289 typedef void (*stinst_type
)();
291 stinst_type sstack
[STACK
];
292 stinst_type
*ssp
= &sstack
[0];
294 long *isp
= &istack
[0];
296 typedef int *word_type
;
301 struct dict_struct
*next
;
308 typedef struct dict_struct dict_type
;
314 fprintf (stderr
, "%s\n", msg
);
322 die ("underflow in string stack");
323 if (tos
>= stack
+ STACK
)
324 die ("overflow in string stack");
331 die ("underflow in integer stack");
332 if (isp
>= istack
+ STACK
)
333 die ("overflow in integer stack");
337 static void exec (dict_type
*);
338 static void call (void);
339 static void remchar (void), strip_trailing_newlines (void), push_number (void);
340 static void push_text (void);
341 static void remove_noncomments (string_type
*, string_type
*);
342 static void print_stack_level (void);
343 static void paramstuff (void), translatecomments (void);
344 static void outputdots (void), courierize (void), bulletize (void);
345 static void do_fancy_stuff (void);
346 static int iscommand (string_type
*, unsigned int);
347 static int copy_past_newline (string_type
*, unsigned int, string_type
*);
348 static void icopy_past_newline (void), kill_bogus_lines (void), indent (void);
349 static void get_stuff_in_command (void), swap (void), other_dup (void);
350 static void drop (void), idrop (void);
351 static void icatstr (void), skip_past_newline (void), internalmode (void);
352 static void maybecatstr (void);
353 static char *nextword (char *, char **);
354 dict_type
*lookup_word (char *);
355 static void perform (void);
356 dict_type
*newentry (char *);
357 unsigned int add_to_definition (dict_type
*, stinst_type
);
358 void add_intrinsic (char *, void (*)());
359 void add_var (char *);
360 void compile (char *);
361 static void bang (void);
362 static void atsign (void);
363 static void hello (void);
364 static void stdout_ (void);
365 static void stderr_ (void);
366 static void print (void);
367 static void read_in (string_type
*, FILE *);
368 static void usage (void);
369 static void chew_exit (void);
384 stinst_type
*oldpc
= pc
;
386 e
= (dict_type
*) (pc
[1]);
400 strip_trailing_newlines ()
402 while ((isspace ((unsigned char) at (tos
, tos
->write_idx
- 1))
403 || at (tos
, tos
->write_idx
- 1) == '\n')
404 && tos
->write_idx
> 0)
426 cattext (tos
, *((char **) pc
));
430 /* This function removes everything not inside comments starting on
431 the first char of the line from the string, also when copying
432 comments, removes blank space and leading *'s.
433 Blank lines are turned into one blank line. */
436 remove_noncomments (src
, dst
)
440 unsigned int idx
= 0;
442 while (at (src
, idx
))
444 /* Now see if we have a comment at the start of the line. */
445 if (at (src
, idx
) == '\n'
446 && at (src
, idx
+ 1) == '/'
447 && at (src
, idx
+ 2) == '*')
451 idx
= skip_white_and_stars (src
, idx
);
453 /* Remove leading dot */
454 if (at (src
, idx
) == '.')
457 /* Copy to the end of the line, or till the end of the
459 while (at (src
, idx
))
461 if (at (src
, idx
) == '\n')
463 /* end of line, echo and scrape of leading blanks */
464 if (at (src
, idx
+ 1) == '\n')
468 idx
= skip_white_and_stars (src
, idx
);
470 else if (at (src
, idx
) == '*' && at (src
, idx
+ 1) == '/')
473 cattext (dst
, "\nENDDD\n");
478 catchar (dst
, at (src
, idx
));
491 fprintf (stderr
, "current string stack depth = %ld, ",
492 (long) (tos
- stack
));
493 fprintf (stderr
, "current integer stack depth = %ld\n",
494 (long) (isp
- istack
));
502 name PARAMS ((stuff));
518 /* Make sure that it's not already param'd or proto'd. */
520 || find (tos
, "PARAMS") || find (tos
, "PROTO") || !find (tos
, "("))
526 /* Find the open paren. */
527 for (openp
= 0; at (tos
, openp
) != '(' && at (tos
, openp
); openp
++)
531 /* Step back to the fname. */
533 while (fname
&& isspace ((unsigned char) at (tos
, fname
)))
536 && !isspace ((unsigned char) at (tos
,fname
))
537 && at (tos
,fname
) != '*')
542 /* Output type, omitting trailing whitespace character(s), if
544 for (len
= fname
; 0 < len
; len
--)
546 if (!isspace ((unsigned char) at (tos
, len
- 1)))
549 for (idx
= 0; idx
< len
; idx
++)
550 catchar (&out
, at (tos
, idx
));
552 cattext (&out
, "\n"); /* Insert a newline between type and fnname */
554 /* Output function name, omitting trailing whitespace
555 character(s), if any. */
556 for (len
= openp
; 0 < len
; len
--)
558 if (!isspace ((unsigned char) at (tos
, len
- 1)))
561 for (idx
= fname
; idx
< len
; idx
++)
562 catchar (&out
, at (tos
, idx
));
564 cattext (&out
, " PARAMS (");
566 for (idx
= openp
; at (tos
, idx
) && at (tos
, idx
) != ';'; idx
++)
567 catchar (&out
, at (tos
, idx
));
569 cattext (&out
, ");\n\n");
571 overwrite_string (tos
, &out
);
577 and *} into comments */
582 unsigned int idx
= 0;
586 while (at (tos
, idx
))
588 if (at (tos
, idx
) == '{' && at (tos
, idx
+ 1) == '*')
590 cattext (&out
, "/*");
593 else if (at (tos
, idx
) == '*' && at (tos
, idx
+ 1) == '}')
595 cattext (&out
, "*/");
600 catchar (&out
, at (tos
, idx
));
605 overwrite_string (tos
, &out
);
610 /* Mod tos so that only lines with leading dots remain */
614 unsigned int idx
= 0;
618 while (at (tos
, idx
))
620 /* Every iteration begins at the start of a line. */
621 if (at (tos
, idx
) == '.')
627 while ((c
= at (tos
, idx
)) && c
!= '\n')
629 if (c
== '{' && at (tos
, idx
+ 1) == '*')
631 cattext (&out
, "/*");
634 else if (c
== '*' && at (tos
, idx
+ 1) == '}')
636 cattext (&out
, "*/");
647 catchar (&out
, '\n');
651 idx
= skip_past_newline_1 (tos
, idx
);
655 overwrite_string (tos
, &out
);
659 /* Find lines starting with . and | and put example around them on tos */
664 unsigned int idx
= 0;
669 while (at (tos
, idx
))
671 if (at (tos
, idx
) == '\n'
672 && (at (tos
, idx
+1 ) == '.'
673 || at (tos
, idx
+ 1) == '|'))
675 cattext (&out
, "\n@example\n");
680 while (at (tos
, idx
) && at (tos
, idx
) != '\n')
684 /* We are inside {} parameters of some command;
685 Just pass through until matching brace. */
686 if (at (tos
, idx
) == '{')
688 else if (at (tos
, idx
) == '}')
691 else if (command
!= 0)
693 if (at (tos
, idx
) == '{')
695 else if (!islower ((unsigned char) at (tos
, idx
)))
698 else if (at (tos
, idx
) == '@'
699 && islower ((unsigned char) at (tos
, idx
+ 1)))
703 else if (at (tos
, idx
) == '{' && at (tos
, idx
+ 1) == '*')
705 cattext (&out
, "/*");
709 else if (at (tos
, idx
) == '*' && at (tos
, idx
+ 1) == '}')
711 cattext (&out
, "*/");
715 else if (at (tos
, idx
) == '{'
716 || at (tos
, idx
) == '}')
721 catchar (&out
, at (tos
, idx
));
724 catchar (&out
, '\n');
726 while (at (tos
, idx
) == '\n'
727 && ((at (tos
, idx
+ 1) == '.')
728 || (at (tos
, idx
+ 1) == '|')))
730 cattext (&out
, "@end example");
734 catchar (&out
, at (tos
, idx
));
739 overwrite_string (tos
, &out
);
743 /* Finds any lines starting with "o ", if there are any, then turns
744 on @itemize @bullet, and @items each of them. Then ends with @end
745 itemize, inplace at TOS*/
750 unsigned int idx
= 0;
755 while (at (tos
, idx
))
757 if (at (tos
, idx
) == '@'
758 && at (tos
, idx
+ 1) == '*')
763 else if (at (tos
, idx
) == '\n'
764 && at (tos
, idx
+ 1) == 'o'
765 && isspace ((unsigned char) at (tos
, idx
+ 2)))
769 cattext (&out
, "\n@itemize @bullet\n");
773 cattext (&out
, "\n@item\n");
778 catchar (&out
, at (tos
, idx
));
779 if (on
&& at (tos
, idx
) == '\n'
780 && at (tos
, idx
+ 1) == '\n'
781 && at (tos
, idx
+ 2) != 'o')
783 cattext (&out
, "@end itemize");
792 cattext (&out
, "@end itemize\n");
800 /* Turn <<foo>> into @code{foo} in place at TOS*/
805 unsigned int idx
= 0;
808 while (at (tos
, idx
))
810 if (at (tos
, idx
) == '<'
811 && at (tos
, idx
+ 1) == '<'
812 && !isspace ((unsigned char) at (tos
, idx
+ 2)))
814 /* This qualifies as a << startup. */
816 cattext (&out
, "@code{");
818 && at (tos
, idx
) != '>' )
820 catchar (&out
, at (tos
, idx
));
829 catchar (&out
, at (tos
, idx
));
839 /* A command is all upper case,and alone on a line. */
846 unsigned int len
= 0;
847 while (at (ptr
, idx
))
849 if (isupper ((unsigned char) at (ptr
, idx
))
850 || at (ptr
, idx
) == ' ' || at (ptr
, idx
) == '_')
855 else if (at (ptr
, idx
) == '\n')
868 copy_past_newline (ptr
, idx
, dst
)
875 while (at (ptr
, idx
) && at (ptr
, idx
) != '\n')
877 if (at (ptr
, idx
) == '\t')
879 /* Expand tabs. Neither makeinfo nor TeX can cope well with
883 while (++column
& 7);
887 catchar (dst
, at (ptr
, idx
));
893 catchar (dst
, at (ptr
, idx
));
900 icopy_past_newline ()
905 idx
= copy_past_newline (ptr
, idx
, tos
);
910 Take the string at the top of the stack, do some prettying. */
923 /* Drop leading nl. */
924 while (at (tos
, idx
) == '\n')
930 /* If the first char is a '.' prepend a newline so that it is
931 recognized properly later. */
932 if (at (tos
, idx
) == '.')
933 catchar (&out
, '\n');
935 /* Find the last char. */
936 while (at (tos
, idx
))
941 /* Find the last non white before the nl. */
944 while (idx
&& isspace ((unsigned char) at (tos
, idx
)))
948 /* Copy buffer upto last char, but blank lines before and after
954 if (at (tos
, c
) == '\n'
955 && at (tos
, c
+ 1) == '\n'
956 && at (tos
, c
+ 2) == '.')
958 /* Ignore two newlines before a dot. */
961 else if (at (tos
, c
) == '.' && sl
)
963 /* remember that this line started with a dot. */
966 else if (at (tos
, c
) == '\n'
967 && at (tos
, c
+ 1) == '\n'
971 /* Ignore two newlines when last line was dot. */
974 catchar (&out
, at (tos
, c
));
975 if (at (tos
, c
) == '\n')
992 catchar (&out
, '\n');
1007 while (at (tos
, idx
))
1009 switch (at (tos
, idx
))
1012 cattext (&out
, "\n");
1014 if (tab
&& at (tos
, idx
))
1016 cattext (&out
, " ");
1023 cattext (&out
, " ");
1025 cattext (&out
, "(");
1030 cattext (&out
, ")");
1036 catchar (&out
, at (tos
, idx
));
1045 delete_string (tos
);
1051 get_stuff_in_command ()
1057 while (at (ptr
, idx
))
1059 if (iscommand (ptr
, idx
))
1061 idx
= copy_past_newline (ptr
, idx
, tos
);
1083 catstr (tos
, tos
- 1);
1092 delete_string (tos
+ 1);
1109 catstr (tos
, tos
+ 1);
1110 delete_string (tos
+ 1);
1115 skip_past_newline ()
1117 idx
= skip_past_newline_1 (ptr
, idx
);
1124 internal_mode
= *(isp
);
1133 if (internal_wanted
== internal_mode
)
1135 catstr (tos
- 1, tos
);
1137 delete_string (tos
);
1144 nextword (string
, word
)
1155 while (isspace ((unsigned char) *string
) || *string
== '-')
1159 while (*string
&& *string
!= '\n')
1174 word_start
= string
;
1181 if (*string
== '\\')
1187 while (*string
!= '"');
1191 while (!isspace ((unsigned char) *string
))
1199 *word
= (char *) malloc (length
+ 1);
1204 for (idx
= 0; idx
< length
; idx
++)
1206 if (src
[idx
] == '\\')
1207 switch (src
[idx
+ 1])
1215 *dst
++ = src
[idx
+ 1];
1239 dict_type
*ptr
= root
;
1242 if (strcmp (ptr
->word
, word
) == 0)
1247 fprintf (stderr
, "Can't find %s\n", word
);
1254 dict_type
*ptr
= root
;
1264 for (i
= 0; i
< ptr
->code_end
- 1; i
++)
1265 if (ptr
->code
[i
] == push_text
1266 && ptr
->code
[i
+ 1])
1268 free ((char *) ptr
->code
[i
+ 1] - 1);
1284 while (at (ptr
, idx
))
1286 /* It's worth looking through the command list. */
1287 if (iscommand (ptr
, idx
))
1292 (void) nextword (addr (ptr
, idx
), &next
);
1294 word
= lookup_word (next
);
1303 fprintf (stderr
, "warning, %s is not recognised\n", next
);
1304 skip_past_newline ();
1309 skip_past_newline ();
1317 dict_type
*new_d
= (dict_type
*) malloc (sizeof (dict_type
));
1321 new_d
->code
= (stinst_type
*) malloc (sizeof (stinst_type
));
1322 new_d
->code_length
= 1;
1323 new_d
->code_end
= 0;
1328 add_to_definition (entry
, word
)
1332 if (entry
->code_end
== entry
->code_length
)
1334 entry
->code_length
+= 2;
1336 (stinst_type
*) realloc ((char *) (entry
->code
),
1337 entry
->code_length
* sizeof (stinst_type
));
1339 entry
->code
[entry
->code_end
] = word
;
1341 return entry
->code_end
++;
1345 add_intrinsic (name
, func
)
1349 dict_type
*new_d
= newentry (strdup (name
));
1350 add_to_definition (new_d
, func
);
1351 add_to_definition (new_d
, 0);
1358 dict_type
*new_d
= newentry (name
);
1359 add_to_definition (new_d
, push_number
);
1360 add_to_definition (new_d
, (stinst_type
) (&(new_d
->var
)));
1361 add_to_definition (new_d
, 0);
1368 /* Add words to the dictionary. */
1371 string
= nextword (string
, &word
);
1372 while (string
&& *string
&& word
[0])
1374 if (strcmp (word
, "var") == 0)
1377 string
= nextword (string
, &word
);
1381 string
= nextword (string
, &word
);
1383 else if (word
[0] == ':')
1387 /* Compile a word and add to dictionary. */
1389 string
= nextword (string
, &word
);
1392 ptr
= newentry (word
);
1393 string
= nextword (string
, &word
);
1401 while (word
[0] != ';')
1406 /* got a string, embed magic push string
1408 add_to_definition (ptr
, push_text
);
1409 add_to_definition (ptr
, (stinst_type
) (word
+ 1));
1421 /* Got a number, embedd the magic push number
1423 add_to_definition (ptr
, push_number
);
1424 add_to_definition (ptr
, (stinst_type
) atol (word
));
1428 add_to_definition (ptr
, call
);
1429 add_to_definition (ptr
, (stinst_type
) lookup_word (word
));
1433 string
= nextword (string
, &word
);
1435 add_to_definition (ptr
, 0);
1437 string
= nextword (string
, &word
);
1441 fprintf (stderr
, "syntax error at %s\n", string
- 1);
1450 *(long *) ((isp
[0])) = isp
[-1];
1459 isp
[0] = *(long *) (isp
[0]);
1492 write_buffer (tos
, stdout
);
1494 write_buffer (tos
, stderr
);
1496 fprintf (stderr
, "print: illegal print destination `%ld'\n", *isp
);
1513 r
= fread (buff
, 1, sizeof (buff
), file
);
1514 catbuf (str
, buff
, r
);
1519 catbuf (str
, buff
, 1);
1525 fprintf (stderr
, "usage: -[d|i|g] <file >file\n");
1529 /* There is no reliable way to declare exit. Sometimes it returns
1530 int, and sometimes it returns void. Sometimes it changes between
1531 OS releases. Trying to get it declared correctly in the hosts file
1532 is a pointless waste of time. */
1549 init_string (&buffer
);
1550 init_string (&pptr
);
1551 init_string (stack
+ 0);
1555 add_intrinsic ("push_text", push_text
);
1556 add_intrinsic ("!", bang
);
1557 add_intrinsic ("@", atsign
);
1558 add_intrinsic ("hello", hello
);
1559 add_intrinsic ("stdout", stdout_
);
1560 add_intrinsic ("stderr", stderr_
);
1561 add_intrinsic ("print", print
);
1562 add_intrinsic ("skip_past_newline", skip_past_newline
);
1563 add_intrinsic ("catstr", icatstr
);
1564 add_intrinsic ("copy_past_newline", icopy_past_newline
);
1565 add_intrinsic ("dup", other_dup
);
1566 add_intrinsic ("drop", drop
);
1567 add_intrinsic ("idrop", idrop
);
1568 add_intrinsic ("remchar", remchar
);
1569 add_intrinsic ("get_stuff_in_command", get_stuff_in_command
);
1570 add_intrinsic ("do_fancy_stuff", do_fancy_stuff
);
1571 add_intrinsic ("bulletize", bulletize
);
1572 add_intrinsic ("courierize", courierize
);
1573 /* If the following line gives an error, exit() is not declared in the
1574 ../hosts/foo.h file for this host. Fix it there, not here! */
1575 /* No, don't fix it anywhere; see comment on chew_exit--Ian Taylor. */
1576 add_intrinsic ("exit", chew_exit
);
1577 add_intrinsic ("swap", swap
);
1578 add_intrinsic ("outputdots", outputdots
);
1579 add_intrinsic ("paramstuff", paramstuff
);
1580 add_intrinsic ("maybecatstr", maybecatstr
);
1581 add_intrinsic ("translatecomments", translatecomments
);
1582 add_intrinsic ("kill_bogus_lines", kill_bogus_lines
);
1583 add_intrinsic ("indent", indent
);
1584 add_intrinsic ("internalmode", internalmode
);
1585 add_intrinsic ("print_stack_level", print_stack_level
);
1586 add_intrinsic ("strip_trailing_newlines", strip_trailing_newlines
);
1588 /* Put a nl at the start. */
1589 catchar (&buffer
, '\n');
1591 read_in (&buffer
, stdin
);
1592 remove_noncomments (&buffer
, ptr
);
1593 for (i
= 1; i
< (unsigned int) ac
; i
++)
1595 if (av
[i
][0] == '-')
1597 if (av
[i
][1] == 'f')
1603 f
= fopen (av
[i
+ 1], "r");
1606 fprintf (stderr
, "Can't open the input file %s\n",
1616 else if (av
[i
][1] == 'i')
1618 internal_wanted
= 1;
1620 else if (av
[i
][1] == 'w')
1628 write_buffer (stack
+ 0, stdout
);
1630 delete_string (&pptr
);
1631 delete_string (&buffer
);
1634 fprintf (stderr
, "finishing with current stack level %ld\n",
1635 (long) (tos
- stack
));
This page took 0.06705 seconds and 4 git commands to generate.