diff options
author | Adrian Thurston <thurston@complang.org> | 2015-05-15 16:49:19 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-05-15 16:49:19 -0400 |
commit | 2b69ada078f1d82298e80e76cdefdfbf8b930f93 (patch) | |
tree | 8b7735daa7037cd72ddb8f399babca1d34db7976 /src/struct.h | |
parent | c98d2e9b47091c12deb747e111f7f1cd05a1f937 (diff) | |
download | colm-2b69ada078f1d82298e80e76cdefdfbf8b930f93.tar.gz |
more application of C naming conventions
Diffstat (limited to 'src/struct.h')
-rw-r--r-- | src/struct.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/struct.h b/src/struct.h index a4296b19..1ffb9af7 100644 --- a/src/struct.h +++ b/src/struct.h @@ -6,7 +6,7 @@ extern "C" { #endif typedef void (*colm_destructor_t)( struct colm_program *prg, - Tree **sp, struct colm_struct *s ); + tree_t **sp, struct colm_struct *s ); struct colm_struct { @@ -33,8 +33,8 @@ typedef struct colm_parser struct pda_run *pdaRun; struct colm_stream *input; - Tree *result; -} Parser; + tree_t *result; +} parser_t; /* Must overlay colm_inbuilt. */ @@ -47,14 +47,14 @@ typedef struct colm_stream void *buffer[8]; struct stream_impl *impl; -} Stream; +} stream_t; #define COLM_LIST_EL_SIZE 2 typedef struct colm_list_el { struct colm_list_el *list_next; struct colm_list_el *list_prev; -} ListEl; +} list_el_t; /* Must overlay colm_inbuilt. */ typedef struct colm_list @@ -65,20 +65,20 @@ typedef struct colm_list void *buffer[8]; - ListEl *head, *tail; + list_el_t *head, *tail; long listLen; struct generic_info *genericInfo; -} List; +} list_t; typedef struct colm_map_el { - Tree *key; + tree_t *key; struct colm_map_el *left, *right, *parent; long height; struct colm_map_el *next, *prev; -} MapEl; +} map_el_t; #define COLM_MAP_EL_SIZE ( sizeof(colm_map_el) / sizeof(void*) ) @@ -93,7 +93,7 @@ typedef struct colm_map struct colm_map_el *head, *tail, *root; long treeSize; struct generic_info *genericInfo; -} Map; +} map_t; struct colm_struct *colm_struct_new_size( struct colm_program *prg, int size ); struct colm_struct *colm_struct_new( struct colm_program *prg, int id ); @@ -120,28 +120,28 @@ struct colm_struct *colm_struct_inbuilt( struct colm_program *prg, int size, colm_struct_container( el, prg->rtd->genericInfo[genId].elOffset ) #define colm_struct_to_list_el( prg, obj, genId ) \ - colm_struct_get_addr( obj, ListEl*, prg->rtd->genericInfo[genId].elOffset ) + colm_struct_get_addr( obj, list_el_t*, prg->rtd->genericInfo[genId].elOffset ) #define colm_struct_to_map_el( prg, obj, genId ) \ - colm_struct_get_addr( obj, MapEl*, prg->rtd->genericInfo[genId].elOffset ) + colm_struct_get_addr( obj, map_el_t*, prg->rtd->genericInfo[genId].elOffset ) -Parser *colm_parser_new( struct colm_program *prg, struct generic_info *gi ); -Stream *colm_stream_new( struct colm_program *prg ); -Stream *colm_stream_new_struct( struct colm_program *prg ); +parser_t *colm_parser_new( struct colm_program *prg, struct generic_info *gi ); +stream_t *colm_stream_new( struct colm_program *prg ); +stream_t *colm_stream_new_struct( struct colm_program *prg ); -List *colm_list_new( struct colm_program *prg ); -struct colm_struct *colm_list_get( struct colm_program *prg, List *list, +list_t *colm_list_new( struct colm_program *prg ); +struct colm_struct *colm_list_get( struct colm_program *prg, list_t *list, word_t genId, word_t field ); struct colm_struct *colm_list_el_get( struct colm_program *prg, - ListEl *listEl, word_t genId, word_t field ); -ListEl *colm_list_detach_head( List *list ); -ListEl *colm_list_detach_tail( List *list ); -long colm_list_length( List *list ); + list_el_t *listEl, word_t genId, word_t field ); +list_el_t *colm_list_detach_head( list_t *list ); +list_el_t *colm_list_detach_tail( list_t *list ); +long colm_list_length( list_t *list ); -Map *colm_map_new( struct colm_program *prg ); +map_t *colm_map_new( struct colm_program *prg ); struct colm_struct *colm_map_el_get( struct colm_program *prg, - MapEl *mapEl, word_t genId, word_t field ); -struct colm_struct *colm_map_get( struct colm_program *prg, Map *map, + map_el_t *mapEl, word_t genId, word_t field ); +struct colm_struct *colm_map_get( struct colm_program *prg, map_t *map, word_t genId, word_t field ); struct colm_struct *colm_construct_generic( struct colm_program *prg, long genericId ); |