diff options
author | Bruno Haible <bruno@clisp.org> | 2003-06-02 11:43:01 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2003-06-02 11:43:01 +0000 |
commit | fcd638a42fbfdf82a97d34a36a5e8b0f58bd0eff (patch) | |
tree | fe0e7857e3d0dfb128f0a9ba3dc637a72ac54fda /doc/gperf.texi | |
parent | eba9cf38227f23a240f6ac9c614a2676e955acda (diff) | |
download | gperf-fcd638a42fbfdf82a97d34a36a5e8b0f58bd0eff.tar.gz |
Support for abbreviated struct declarations.
Diffstat (limited to 'doc/gperf.texi')
-rw-r--r-- | doc/gperf.texi | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/doc/gperf.texi b/doc/gperf.texi index 6d75300..7a92e91 100644 --- a/doc/gperf.texi +++ b/doc/gperf.texi @@ -380,7 +380,7 @@ input: @example @group -struct months @{ char *name; int number; int days; int leap_days; @}; +struct month @{ char *name; int number; int days; int leap_days; @}; %% january, 1, 31, 31 february, 2, 28, 29 @@ -403,6 +403,18 @@ other fields are a pair of consecutive percent signs, @samp{%%}, appearing left justified in the first column, as in the UNIX utility @code{lex}. +If the @code{struct} has already been declared in an include file, it can +be mentioned in an abbreviated form, like this: + +@example +@group +struct month; +%% +january, 1, 31, 31 +... +@end group +@end example + @node Gperf Declarations, C Code Inclusion, User-supplied Struct, Declarations @subsubsection Gperf Declarations @@ -628,9 +640,9 @@ feature: %@{ #include <assert.h> /* This section of code is inserted directly into the output. */ -int return_month_days (struct months *months, int is_leap_year); +int return_month_days (struct month *months, int is_leap_year); %@} -struct months @{ char *name; int number; int days; int leap_days; @}; +struct month @{ char *name; int number; int days; int leap_days; @}; %% january, 1, 31, 31 february, 2, 28, 29 |