aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-10-11 23:15:45 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-10-11 23:15:45 +0300
commit24a87761b4398c48d554ae44861b33a98c4c39e4 (patch)
treee2c719f29aa2f48afde056c1b1a508738d312520
parent17372c73a7605c1a2815c7389259cab3b8443f3f (diff)
downloadcflow-24a87761b4398c48d554ae44861b33a98c4c39e4.tar.gz
cflow-24a87761b4398c48d554ae44861b33a98c4c39e4.tar.bz2
Final cleanup before the release.release-1_4
* NEWS: Update. * README: Update. * doc/cflow.texi: Update. * src/main.c (symbol_override): pass allocated argument to install. * src/parser.c (yyparse): Return 0.
-rw-r--r--NEWS2
-rw-r--r--README16
-rw-r--r--doc/cflow.texi184
-rw-r--r--src/main.c2
-rw-r--r--src/parser.c4
5 files changed, 115 insertions, 93 deletions
diff --git a/NEWS b/NEWS
index 3e334c2..4bfa96b 100644
--- a/NEWS
+++ b/NEWS
@@ -7,3 +7,3 @@ Please send cflow bug reports to <bug-cflow@gnu.org>.
-Version 1.4 (Git)
+Version 1.4, 2011-10-11
diff --git a/README b/README
index 12adbe7..e4b89ca 100644
--- a/README
+++ b/README
@@ -1,3 +1,3 @@
GNU cflow README
-Copyright (C) 2005, 2010 Sergey Poznyakoff
+Copyright (C) 2005, 2010, 2011 Sergey Poznyakoff
See the end of file for copying conditions.
@@ -12,6 +12,4 @@ utility. See section `Documentation' below.
-Please read *all* sections of this `README' file before starting
-configuration. Also make sure you read `INSTALL' if you are not
-familiar with them already. Refer to file `ABOUT-NLS' for information
-regarding internationalization.
+For the generic configuration options, see the file `INSTALL'.
+Refer to file `ABOUT-NLS' for information regarding internationalization.
@@ -56,2 +54,8 @@ After running `./configure' and `make', run `make install'.
+* Configuration File
+
+The file src/cflow.rc provides a working configuration file for use
+with gcc. See the documentation, sections 6.1 "Syntactic classes" and
+6.3 "GCC Initialization", for more information.
+
* Documentation
@@ -72,3 +76,3 @@ Send bug reports and suggestions to <bug-cflow@gnu.org>.
-Copyright (C) 2005, Sergey Poznyakoff
+Copyright (C) 2005, 2010, 2011 Sergey Poznyakoff
diff --git a/doc/cflow.texi b/doc/cflow.texi
index 82bd028..dfb1fdf 100644
--- a/doc/cflow.texi
+++ b/doc/cflow.texi
@@ -1,3 +1,2 @@
\input texinfo @c -*-texinfo-*-
-@smallbook
@c %**start of header
@@ -146,5 +145,5 @@ dependencies. Here is the program:
-@smallexample
+@example
@verbatiminclude whoami.c
-@end smallexample
+@end example
@@ -153,3 +152,3 @@ dependencies. Here is the program:
@cindex GNU Output Format, an example
-@smallexample
+@example
@group
@@ -165,3 +164,3 @@ main() <int main (int argc,char **argv) at whoami.c:26>:
@end group
-@end smallexample
+@end example
@@ -178,5 +177,5 @@ line
-@smallexample
+@example
main() <int main (int argc,char **argv) at whoami.c:25>:
-@end smallexample
+@end example
@@ -188,4 +187,4 @@ colon indicates that @code{main} invokes other functions.
The lines following this one show which functions are called by
-@code{main}. Each such line is indented by fixed amount of white space
-(by default four spaces) for each nesting level.
+@code{main}. Each such line is indented by a fixed amount of white space
+(by default, four spaces) for each nesting level.
@@ -203,5 +202,5 @@ above graph look if you had used both @option{--omit-} options:
-@smallexample
+@example
main() <int () at whoami.c:25>:
-@end smallexample
+@end example
@@ -219,5 +218,5 @@ command line option. Thus, running
-@smallexample
+@example
cflow --main who_am_i whoami.c
-@end smallexample
+@end example
@@ -226,3 +225,3 @@ on the above file will produce following graph:
-@smallexample
+@example
@group
@@ -235,3 +234,3 @@ who_am_i() <int who_am_i (void) at whoami.c:8>:
@end group
-@end smallexample
+@end example
@@ -250,3 +249,3 @@ option. For example, using a sample @file{whoami.c}:
@cindex reverse tree, example
-@smallexample
+@example
@group
@@ -273,3 +272,3 @@ who_am_i() <int who_am_i (void) at whoami.c:8>:
@end group
-@end smallexample
+@end example
@@ -286,3 +285,3 @@ and @code{main}. First of them is, in turn, also called directly by
the subgraph starting with @code{who_am_i} function is repeated several
-times. This is @dfn{verbose} output. To make it brief, use
+times. This is a @dfn{verbose} output. To make it brief, use
@option{--brief} (@option{-b}) command line option. For example:
@@ -290,3 +289,3 @@ times. This is @dfn{verbose} output. To make it brief, use
@cindex brief output, an example of
-@smallexample
+@example
@group
@@ -308,3 +307,3 @@ who_am_i() <int who_am_i (void) at whoami.c:8>: [see 2]
@end group
-@end smallexample
+@end example
@@ -319,3 +318,3 @@ expanded subgraph can be found.
@anchor{--number}
- If the output graph is large it can be tedious to find out the
+ If the output graph is large, it can be tedious to find out the
required line number (unless you use @dfn{Emacs cflow-mode},
@@ -327,3 +326,3 @@ this option, the above output will look like:
-@smallexample
+@example
$ @kbd{cflow --number --brief --reverse whoami.c}
@@ -345,3 +344,3 @@ $ @kbd{cflow --number --brief --reverse whoami.c}
@end group
-@end smallexample
+@end example
@@ -380,3 +379,3 @@ file will look as follows:
-@smallexample
+@example
$ @kbd{cflow --format=posix whoami.c}
@@ -390,3 +389,3 @@ $ @kbd{cflow --format=posix whoami.c}
8 printf: <>
-@end smallexample
+@end example
@@ -423,3 +422,3 @@ description of @option{--level-indent} option}:
-@smallexample
+@example
@group
@@ -429,3 +428,3 @@ description of @option{--level-indent} option}:
@end group
-@end smallexample
+@end example
@@ -434,3 +433,3 @@ the three tools:
-@smallexample
+@example
@group
@@ -443,3 +442,3 @@ cflow --format=posix --omit-arguments \
@end group
-@end smallexample
+@end example
@@ -461,5 +460,5 @@ nesting level:
-@smallexample
+@example
@verbatiminclude d.c
-@end smallexample
+@end example
@@ -468,3 +467,3 @@ nesting level:
@anchor{sample flowchart}
-@smallexample
+@example
$ @kbd{cflow --number d.c}
@@ -491,3 +490,3 @@ $ @kbd{cflow --number d.c}
19 closedir()
-@end smallexample
+@end example
@@ -507,3 +506,3 @@ Continuing our example:
-@smallexample
+@example
$ @kbd{cflow --number -i _ d.c}
@@ -531,3 +530,3 @@ $ @kbd{cflow --number -i _ d.c}
20 closedir()
-@end smallexample
+@end example
@@ -557,3 +556,3 @@ this function and its callees from the resulting graph:
-@smallexample
+@example
$ @kbd{cflow --number -i ^s d.c}
@@ -576,3 +575,3 @@ $ @kbd{cflow --number -i ^s d.c}
15 closedir()
-@end smallexample
+@end example
@@ -592,3 +591,3 @@ use option @option{-i x}. For example:
@anchor{x flowchart}
-@smallexample
+@example
$ @kbd{cflow --number -i x d.c}
@@ -622,3 +621,3 @@ $ @kbd{cflow --number -i x d.c}
26 closedir()
-@end smallexample
+@end example
@@ -640,5 +639,5 @@ variable. But then the input:
-@smallexample
+@example
DIR *dir;
-@end smallexample
+@end example
@@ -663,5 +662,5 @@ strings separated by a colon:
-@smallexample
+@example
--symbol @var{sym}:@var{class}
-@end smallexample
+@end example
@@ -674,5 +673,5 @@ definition. Thus, to fix the above output, run:
-@smallexample
+@example
$ @kbd{cflow --number -i x --symbol DIR:type d.c}
-@end smallexample
+@end example
@@ -687,5 +686,5 @@ parameter wrapper:
-@smallexample
+@example
void res_npquery __P((const res_state, const u_char *, int, FILE *));
-@end smallexample
+@end example
@@ -694,5 +693,5 @@ declare @code{__P} as a wrapper, for example:
-@smallexample
+@example
cflow --symbol __P:wrapper *.c
-@end smallexample
+@end example
@@ -700,5 +699,5 @@ cflow --symbol __P:wrapper *.c
@option{--symbol} option was that @command{cflow} was unable to
-determine what the given symbol was either because it did not
+determine what the given symbol was, either because it did not
see the type definition, as it was in case with @samp{DIR}, or
-the macro definition was not expanded. Both cases are better
+because the macro definition was not expanded. Both cases are better
solved by using @dfn{preprocess mode}, described in the next
@@ -728,3 +727,3 @@ A keyword, like @samp{if}, @samp{when} etc.
@item modifier
-Type modifier, i.e. a symbol appearing after data type to modify its
+Type modifier, i.e. the symbol appearing after a data type to modify its
meaning, like @samp{*}.
@@ -736,2 +735,3 @@ modifiers).
+@cindex __extension__
You would usually declare a @command{gcc} keyword @samp{__extension__}
@@ -750,2 +750,3 @@ A C data type, like @samp{int}, @samp{char}, etc.
@item wrapper
+@cindex __attribute__
That has two meanings. First, it can be used to declare parameter
@@ -776,2 +777,3 @@ the equivalent of @var{oldsym}.
+@cindex __restrict
Symbol aliasing can be regarded as defining the symbol class by
@@ -786,2 +788,13 @@ such as @samp{__restrict}:
@section GCC Initialization
+@cindex gcc
+@cindex __inline
+@cindex __inline__
+@cindex __const__
+@cindex __const
+@cindex __restrict
+@cindex __extension__
+@cindex __attribute__
+@cindex __asm__
+@cindex __nonnull
+@cindex __wur
The following is a recommended set of @command{cflow} initialization
@@ -820,3 +833,3 @@ preprocessing, run the utility with @option{--cpp}
@cindex @option{--preprocess} option, an example
-@smallexample
+@example
$ @kbd{cflow --cpp -n d.c}
@@ -842,3 +855,3 @@ $ @kbd{cflow --cpp -n d.c}
18 closedir()
-@end smallexample
+@end example
@@ -875,5 +888,5 @@ the default:
-@smallexample
+@example
cflow --level-indent 2 d.c
-@end smallexample
+@end example
@@ -921,3 +934,3 @@ aligned.
-@smallexample
+@example
@group
@@ -925,3 +938,3 @@ aligned.
@end group
-@end smallexample
+@end example
@@ -953,3 +966,3 @@ used at the beginning of the string.
-@smallexample
+@example
@group
@@ -960,3 +973,3 @@ used at the beginning of the string.
@end group
-@end smallexample
+@end example
@@ -973,3 +986,3 @@ example of flow graph produced with this option. The source file
@anchor{ascii tree}
-@smallexample
+@example
@group
@@ -1003,3 +1016,3 @@ $ @kbd{cflow --tree --brief --cpp wc.c}
@end group
-@end smallexample
+@end example
@@ -1017,6 +1030,6 @@ source location where it appears. If this location is where the symbol
is defined, it is additionally marked with an asterisk and followed by
-the definition. For example, here is a fragment of cross-reference
+the definition. For example, here is a fragment of a cross-reference
output for @file{d.c} program:
-@smallexample
+@example
printdir * d.c:42 void printdir (int level,char *name)
@@ -1024,3 +1037,3 @@ printdir d.c:74
printdir d.c:102
-@end smallexample
+@end example
@@ -1082,3 +1095,3 @@ following configuration file:
-@smallexample
+@example
@group
@@ -1086,5 +1099,10 @@ following configuration file:
-DHAVE_CONFIG_H
--DSQUARE\\\(x\\\)=x*x
+-D__extension__\\\(c\\\)=
@end group
-@end smallexample
+@end example
+
+@cindex __extension__()
+ By the way, the above example shows a way of coping
+with the @samp{__extension__()} construct used by @command{gcc}, i.e. by
+defining it to an empty string.
@@ -1094,3 +1112,3 @@ line option. For example, you might specify @option{--brief} in your
configuration file, but then occasionally need to obtain verbose
-graph. To cancel effect of any GNU @command{cflow} option that does
+graph. To cancel the effect of any GNU @command{cflow} option that does
not take arguments, prepend @samp{no-} to the corresponding long
@@ -1123,3 +1141,3 @@ for which you want to generate a flow chart, add the following statements:
-@smallexample
+@example
@group
@@ -1133,3 +1151,3 @@ for which you want to generate a flow chart, add the following statements:
@end group
-@end smallexample
+@end example
@@ -1146,5 +1164,5 @@ with a single command, for example:
-@smallexample
+@example
flowcharts: @var{prog1}.cflow @var{prog2}.cflow ...
-@end smallexample
+@end example
@end itemize
@@ -1154,3 +1172,3 @@ flowcharts: @var{prog1}.cflow @var{prog2}.cflow ...
-@smallexample
+@example
@group
@@ -1167,3 +1185,3 @@ cflow.cflow: $(cflow_CFLOW_INPUT) cflow.rc Makefile
@end group
-@end smallexample
+@end example
@@ -1213,3 +1231,3 @@ declarations}. This might speed up the processing in some cases.
@itemx --define=@var{name}[=@var{defn}]
- Predefine @var{name} as a macro. Implies @option{-cpp}
+ Predefine @var{name} as a macro. Implies @option{--cpp}
(@pxref{Preprocessing}).
@@ -1226,3 +1244,3 @@ the 5th nesting level.
@item --debug[=@var{number}]
- Set debugging level. Default @var{number} is 1. Use this option
+ Set debugging level. The default @var{number} is 1. Use this option
if you are developing and/or debugging @command{cflow}.
@@ -1297,3 +1315,3 @@ For more information, @xref{Symbols}.
@item -m @var{name}
-@item --main=@var{name}
+@itemx --main=@var{name}
Assume main function to be called @var{name}. @xref{start symbol}.
@@ -1369,3 +1387,3 @@ use this option.
@anchor{symbol types}
- In first form, registers symbol @var{sym} in the syntactic class
+ In the first form, registers symbol @var{sym} in the syntactic class
@var{class}. Valid class names are: @samp{keyword} (or @samp{kw}),
@@ -1448,3 +1466,3 @@ at startup, add the following lines to your @file{.emacs} or
-@smalllisp
+@lisp
@group
@@ -1454,3 +1472,3 @@ at startup, add the following lines to your @file{.emacs} or
@end group
-@end smalllisp
+@end lisp
@@ -1521,5 +1539,5 @@ graph (@pxref{ascii tree}).
-@smallexample
+@example
@verbatiminclude wc.c
-@end smallexample
+@end example
diff --git a/src/main.c b/src/main.c
index e81c537..6c51033 100644
--- a/src/main.c
+++ b/src/main.c
@@ -272,3 +272,3 @@ symbol_override(const char *str)
if (!alias) {
- alias = install(ptr+2, INSTALL_OVERWRITE);
+ alias = install(xstrdup(ptr+2), INSTALL_OVERWRITE);
alias->type = SymToken;
diff --git a/src/parser.c b/src/parser.c
index b933860..176d9f2 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -269,3 +269,3 @@ save_token(TOKSTK *tokptr)
-static Stackpos start_pos; /* Start position in stack for saving tokens *///FIXME: REMOVE
+static Stackpos start_pos; /* Start position in stack for saving tokens */
static int save_end; /* Stack position up to which the tokens are saved */
@@ -389,3 +389,3 @@ yyparse()
}
- /*NOTREACHED*/
+ return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.