summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorWill Estes <wlestes@users.sourceforge.net>2008-05-14 19:24:06 +0000
committerWill Estes <wlestes@users.sourceforge.net>2008-05-14 19:24:06 +0000
commit0cdf13241587dca249aad22d0e38948ab194bd5f (patch)
treed1301d8c4de0d0e393985d8b6c60f0bfea5e0d79 /doc
parentb275bd574aba78ef0693c35abe63caad08775c4c (diff)
use ansi syntax in simple examples; resolves patch #1909844; patch submitted by Tom Browder, tbrowder2@users.sourceforge.net
Diffstat (limited to 'doc')
-rw-r--r--doc/flex.texi7
1 files changed, 3 insertions, 4 deletions
diff --git a/doc/flex.texi b/doc/flex.texi
index a03e357..16203d6 100644
--- a/doc/flex.texi
+++ b/doc/flex.texi
@@ -354,7 +354,8 @@ Here's another simple example:
. ++num_chars;
%%
- main()
+
+ int main()
{
yylex();
printf( "# of lines = %d, # of chars = %d\n",
@@ -416,9 +417,7 @@ A somewhat more complicated example:
%%
- main( argc, argv )
- int argc;
- char **argv;
+ int main( int argc, char **argv )
{
++argv, --argc; /* skip over program name */
if ( argc > 0 )