mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 21:19:24 +00:00
Align all member declarations.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2002-10-16 Bruno Haible <bruno@clisp.org>
|
||||||
|
|
||||||
|
* src/*.h: Align all member names at column 24.
|
||||||
|
|
||||||
2002-10-15 Bruno Haible <bruno@clisp.org>
|
2002-10-15 Bruno Haible <bruno@clisp.org>
|
||||||
|
|
||||||
* src/input.h: New file.
|
* src/input.h: New file.
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ private:
|
|||||||
int _max_hash_value; /* Maximum possible hash value. */
|
int _max_hash_value; /* Maximum possible hash value. */
|
||||||
int _fewest_collisions; /* Records fewest # of collisions for asso value. */
|
int _fewest_collisions; /* Records fewest # of collisions for asso value. */
|
||||||
int _num_done; /* Number of keywords processed without a collision. */
|
int _num_done; /* Number of keywords processed without a collision. */
|
||||||
Bool_Array *_collision_detector;
|
Bool_Array * _collision_detector;
|
||||||
|
|
||||||
void change (KeywordExt *prior, KeywordExt *curr);
|
void change (KeywordExt *prior, KeywordExt *curr);
|
||||||
int affects_prev (char c, KeywordExt *curr);
|
int affects_prev (char c, KeywordExt *curr);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
|
|||||||
class Hash_Table
|
class Hash_Table
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
KeywordExt **_table; /* Vector of pointers to linked lists of keywords. */
|
KeywordExt ** _table; /* Vector of pointers to linked lists of keywords. */
|
||||||
int _size; /* Size of the vector. */
|
int _size; /* Size of the vector. */
|
||||||
int _collisions; /* Find out how well our double hashing is working! */
|
int _collisions; /* Find out how well our double hashing is working! */
|
||||||
int _ignore_length;
|
int _ignore_length;
|
||||||
@@ -37,7 +37,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
Hash_Table (KeywordExt **t, int s, int ignore_len);
|
Hash_Table (KeywordExt **t, int s, int ignore_len);
|
||||||
~Hash_Table ();
|
~Hash_Table ();
|
||||||
KeywordExt *insert (KeywordExt *item);
|
KeywordExt * insert (KeywordExt *item);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
16
src/input.h
16
src/input.h
@@ -37,16 +37,16 @@ private:
|
|||||||
static int strcspn (const char *s, const char *reject);
|
static int strcspn (const char *s, const char *reject);
|
||||||
#endif
|
#endif
|
||||||
void set_output_types ();
|
void set_output_types ();
|
||||||
const char *get_array_type ();
|
const char * get_array_type ();
|
||||||
const char *save_include_src ();
|
const char * save_include_src ();
|
||||||
const char *get_special_input (char delimiter);
|
const char * get_special_input (char delimiter);
|
||||||
public:
|
public:
|
||||||
const char *_array_type; /* Pointer to the type for word list. */
|
const char * _array_type; /* Pointer to the type for word list. */
|
||||||
const char *_return_type; /* Pointer to return type for lookup function. */
|
const char * _return_type; /* Pointer to return type for lookup function. */
|
||||||
const char *_struct_tag; /* Shorthand for user-defined struct tag type. */
|
const char * _struct_tag; /* Shorthand for user-defined struct tag type. */
|
||||||
const char *_include_src; /* C source code to be included verbatim. */
|
const char * _include_src; /* C source code to be included verbatim. */
|
||||||
int _additional_code; /* True if any additional C code is included. */
|
int _additional_code; /* True if any additional C code is included. */
|
||||||
KeywordExt_List *_head; /* Points to the head of the linked list. */
|
KeywordExt_List * _head; /* Points to the head of the linked list. */
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -36,10 +36,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
|
|||||||
class Key_List : public Vectors
|
class Key_List : public Vectors
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
const char *_array_type; /* Pointer to the type for word list. */
|
const char * _array_type; /* Pointer to the type for word list. */
|
||||||
const char *_return_type; /* Pointer to return type for lookup function. */
|
const char * _return_type; /* Pointer to return type for lookup function. */
|
||||||
const char *_struct_tag; /* Shorthand for user-defined struct tag type. */
|
const char * _struct_tag; /* Shorthand for user-defined struct tag type. */
|
||||||
const char *_include_src; /* C source code to be included verbatim. */
|
const char * _include_src; /* C source code to be included verbatim. */
|
||||||
int _max_key_len; /* Maximum length of the longest keyword. */
|
int _max_key_len; /* Maximum length of the longest keyword. */
|
||||||
int _min_key_len; /* Minimum length of the shortest keyword. */
|
int _min_key_len; /* Minimum length of the shortest keyword. */
|
||||||
private:
|
private:
|
||||||
@@ -58,11 +58,11 @@ private:
|
|||||||
static int already_determined (KeywordExt *ptr);
|
static int already_determined (KeywordExt *ptr);
|
||||||
static void set_determined (KeywordExt *ptr);
|
static void set_determined (KeywordExt *ptr);
|
||||||
void dump ();
|
void dump ();
|
||||||
KeywordExt_List *merge (KeywordExt_List *list1, KeywordExt_List *list2);
|
KeywordExt_List * merge (KeywordExt_List *list1, KeywordExt_List *list2);
|
||||||
KeywordExt_List *merge_sort (KeywordExt_List *head);
|
KeywordExt_List * merge_sort (KeywordExt_List *head);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
KeywordExt_List *_head; /* Points to the head of the linked list. */
|
KeywordExt_List * _head; /* Points to the head of the linked list. */
|
||||||
int _total_duplicates; /* Total number of duplicate hash values. */
|
int _total_duplicates; /* Total number of duplicate hash values. */
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public:
|
|||||||
KeywordExt_List (const char *allchars, int allchars_length, const char *rest);
|
KeywordExt_List (const char *allchars, int allchars_length, const char *rest);
|
||||||
|
|
||||||
/* Access to first element of list. */
|
/* Access to first element of list. */
|
||||||
KeywordExt* first () { return this; }
|
KeywordExt * first () { return this; }
|
||||||
/* Access to next element of list. */
|
/* Access to next element of list. */
|
||||||
KeywordExt_List *& rest () { return _cdr; }
|
KeywordExt_List *& rest () { return _cdr; }
|
||||||
|
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ private:
|
|||||||
int _argument_count;
|
int _argument_count;
|
||||||
|
|
||||||
/* Stores a pointer to command-line argument vector. */
|
/* Stores a pointer to command-line argument vector. */
|
||||||
char **_argument_vector;
|
char ** _argument_vector;
|
||||||
|
|
||||||
/* Holds the boolean options. */
|
/* Holds the boolean options. */
|
||||||
int _option_word;
|
int _option_word;
|
||||||
@@ -253,25 +253,25 @@ private:
|
|||||||
int _size_multiple;
|
int _size_multiple;
|
||||||
|
|
||||||
/* Names used for generated lookup function. */
|
/* Names used for generated lookup function. */
|
||||||
const char *_function_name;
|
const char * _function_name;
|
||||||
|
|
||||||
/* Name used for keyword key. */
|
/* Name used for keyword key. */
|
||||||
const char *_key_name;
|
const char * _key_name;
|
||||||
|
|
||||||
/* Suffix for empty struct initializers. */
|
/* Suffix for empty struct initializers. */
|
||||||
const char *_initializer_suffix;
|
const char * _initializer_suffix;
|
||||||
|
|
||||||
/* Name used for generated C++ class. */
|
/* Name used for generated C++ class. */
|
||||||
const char *_class_name;
|
const char * _class_name;
|
||||||
|
|
||||||
/* Name used for generated hash function. */
|
/* Name used for generated hash function. */
|
||||||
const char *_hash_name;
|
const char * _hash_name;
|
||||||
|
|
||||||
/* Name used for hash table array. */
|
/* Name used for hash table array. */
|
||||||
const char *_wordlist_name;
|
const char * _wordlist_name;
|
||||||
|
|
||||||
/* Separates keywords from other attributes. */
|
/* Separates keywords from other attributes. */
|
||||||
const char *_delimiters;
|
const char * _delimiters;
|
||||||
|
|
||||||
/* Contains user-specified key choices. */
|
/* Contains user-specified key choices. */
|
||||||
Positions _key_positions;
|
Positions _key_positions;
|
||||||
|
|||||||
10
src/output.h
10
src/output.h
@@ -49,18 +49,18 @@ private:
|
|||||||
void output_lookup_function ();
|
void output_lookup_function ();
|
||||||
|
|
||||||
/* Linked list of keywords. */
|
/* Linked list of keywords. */
|
||||||
KeywordExt_List *_head;
|
KeywordExt_List * _head;
|
||||||
|
|
||||||
/* Pointer to the type for word list. */
|
/* Pointer to the type for word list. */
|
||||||
const char *_array_type;
|
const char * _array_type;
|
||||||
/* Pointer to return type for lookup function. */
|
/* Pointer to return type for lookup function. */
|
||||||
const char *_return_type;
|
const char * _return_type;
|
||||||
/* Shorthand for user-defined struct tag type. */
|
/* Shorthand for user-defined struct tag type. */
|
||||||
const char *_struct_tag;
|
const char * _struct_tag;
|
||||||
/* True if any additional C code is included. */
|
/* True if any additional C code is included. */
|
||||||
int _additional_code;
|
int _additional_code;
|
||||||
/* C source code to be included verbatim. */
|
/* C source code to be included verbatim. */
|
||||||
const char *_include_src;
|
const char * _include_src;
|
||||||
/* Total number of keys, counting duplicates. */
|
/* Total number of keys, counting duplicates. */
|
||||||
int _total_keys;
|
int _total_keys;
|
||||||
/* Total number of duplicate hash values. */
|
/* Total number of duplicate hash values. */
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public:
|
|||||||
and ignoring lines starting with '#'. Returns NULL on error or EOF.
|
and ignoring lines starting with '#'. Returns NULL on error or EOF.
|
||||||
The storage for the string is dynamically allocated and must be freed
|
The storage for the string is dynamically allocated and must be freed
|
||||||
through delete[]. */
|
through delete[]. */
|
||||||
char *read_next_line ();
|
char * read_next_line ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FILE * const _fp; /* FILE pointer to the input stream. */
|
FILE * const _fp; /* FILE pointer to the input stream. */
|
||||||
|
|||||||
Reference in New Issue
Block a user