diff options
author | Bruno Haible <bruno@clisp.org> | 2003-04-30 10:36:10 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2003-04-30 10:36:10 +0000 |
commit | ff0be608102a1ccc42211a9a55554cdb57dcde4c (patch) | |
tree | 99452052f01d78ecad2c9d6981e67bc9a74de5e0 /src | |
parent | 5fbcad1840cbf05be190e073c3c8e97af7b97f53 (diff) | |
download | gperf-ff0be608102a1ccc42211a9a55554cdb57dcde4c.tar.gz |
New declaration "%define initializer-suffix".
Diffstat (limited to 'src')
-rw-r--r-- | src/input.cc | 5 | ||||
-rw-r--r-- | src/options.cc | 10 | ||||
-rw-r--r-- | src/options.h | 4 |
3 files changed, 17 insertions, 2 deletions
diff --git a/src/input.cc b/src/input.cc index 903545d..dc9a2c6 100644 --- a/src/input.cc +++ b/src/input.cc @@ -487,6 +487,11 @@ Input::read_input () else if (is_define_declaration (line, line_end, lineno, + "initializer-suffix", &arg)) + option.set_initializer_suffix (arg); + else + + if (is_define_declaration (line, line_end, lineno, "hash-function-name", &arg)) option.set_hash_name (arg); else diff --git a/src/options.cc b/src/options.cc index 82495e7..88ae9fc 100644 --- a/src/options.cc +++ b/src/options.cc @@ -593,7 +593,7 @@ Options::set_function_name (const char *name) _function_name = name; } -/* Set the keyword key name, if not already set. */ +/* Sets the keyword key name, if not already set. */ void Options::set_slot_name (const char *name) { @@ -601,6 +601,14 @@ Options::set_slot_name (const char *name) _slot_name = name; } +/* Sets the struct initializer suffix, if not already set. */ +void +Options::set_initializer_suffix (const char *initializers) +{ + if (_initializer_suffix == DEFAULT_INITIALIZER_SUFFIX) + _initializer_suffix = initializers; +} + /* Sets the generated class name, if not already set. */ void Options::set_class_name (const char *name) diff --git a/src/options.h b/src/options.h index d153436..2507590 100644 --- a/src/options.h +++ b/src/options.h @@ -171,11 +171,13 @@ public: /* Returns the keyword key name. */ const char * get_slot_name () const; - /* Set the keyword key name, if not already set. */ + /* Sets the keyword key name, if not already set. */ void set_slot_name (const char *name); /* Returns the struct initializer suffix. */ const char * get_initializer_suffix () const; + /* Sets the struct initializer suffix, if not already set. */ + void set_initializer_suffix (const char *initializers); /* Returns the generated class name. */ const char * get_class_name () const; |