summaryrefslogtreecommitdiffabout
path: root/include
authorSergey Poznyakoff <gray@gnu.org.ua>2016-01-22 10:58:16 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2016-07-04 12:43:12 (GMT)
commit1705e5d927dba731c135e1192bfdee421829786a (patch) (side-by-side diff)
tree4f51b9209198208cfbe2f3b6fc7b68561ba73bde /include
parent8e541ddaffcab6eaa36faf86304b51a0bc6a92a1 (diff)
downloadgrecs-1705e5d927dba731c135e1192bfdee421829786a.tar.gz
grecs-1705e5d927dba731c135e1192bfdee421829786a.tar.bz2
Unify some typedefs.
Use _ptr_t suffix for typedefs that define pointers.
Diffstat (limited to 'include') (more/less context) (ignore whitespace changes)
-rw-r--r--include/grecs/list.h31
-rw-r--r--include/grecs/node.h2
-rw-r--r--include/grecs/symtab.h21
-rw-r--r--include/grecs/value.h2
4 files changed, 28 insertions, 28 deletions
diff --git a/include/grecs/list.h b/include/grecs/list.h
index efccd56..a5840db 100644
--- a/include/grecs/list.h
+++ b/include/grecs/list.h
@@ -19,4 +19,4 @@
-typedef struct grecs_list_entry *grecs_list_entry_t;
-typedef struct grecs_list *grecs_list_t;
+typedef struct grecs_list_entry *grecs_list_entry_ptr_t;
+typedef struct grecs_list *grecs_list_ptr_t;
@@ -34,14 +34,15 @@ struct grecs_list {
-grecs_list_t grecs_list_create(void);
-size_t grecs_list_size(grecs_list_t);
-void grecs_list_append(grecs_list_t, void *);
-void grecs_list_push(grecs_list_t, void *);
-void *grecs_list_pop(grecs_list_t);
-void *grecs_list_locate(grecs_list_t, void *);
-void *grecs_list_index(grecs_list_t, size_t);
-void *grecs_list_remove_tail(grecs_list_t);
-void grecs_list_remove_entry(grecs_list_t, grecs_list_entry_t);
-void grecs_list_clear(grecs_list_t);
-void grecs_list_free(grecs_list_t);
-void grecs_list_add(grecs_list_t, grecs_list_t);
+grecs_list_ptr_t grecs_list_create(void);
+size_t grecs_list_size(grecs_list_ptr_t);
+void grecs_list_append(grecs_list_ptr_t, void *);
+void grecs_list_push(grecs_list_ptr_t, void *);
+void *grecs_list_pop(grecs_list_ptr_t);
+void *grecs_list_locate(grecs_list_ptr_t, void *);
+void *grecs_list_index(grecs_list_ptr_t, size_t);
+void *grecs_list_remove_tail(grecs_list_ptr_t);
+void grecs_list_remove_entry(grecs_list_ptr_t, grecs_list_entry_ptr_t);
+void grecs_list_clear(grecs_list_ptr_t);
+void grecs_list_free(grecs_list_ptr_t);
+void grecs_list_add(grecs_list_ptr_t, grecs_list_ptr_t);
+int grecs_list_compare(grecs_list_ptr_t, grecs_list_ptr_t);
@@ -52,4 +53,2 @@ struct grecs_list *grecs_value_list_create(void);
-
-
#endif
diff --git a/include/grecs/node.h b/include/grecs/node.h
index 5bbe9dc..2d879ad 100644
--- a/include/grecs/node.h
+++ b/include/grecs/node.h
@@ -40,3 +40,3 @@ typedef struct grecs_node {
grecs_value_t *value;
- grecs_symtab_t texttab;
+ grecs_symtab_ptr_t texttab;
} v;
diff --git a/include/grecs/symtab.h b/include/grecs/symtab.h
index a4a7106..3008b17 100644
--- a/include/grecs/symtab.h
+++ b/include/grecs/symtab.h
@@ -19,3 +19,4 @@
-typedef struct grecs_symtab *grecs_symtab_t;
+typedef struct grecs_symtab *grecs_symtab_ptr_t;
+typedef struct grecs_syment *grecs_syment_ptr_t;
@@ -29,6 +30,6 @@ const char *grecs_symtab_strerror(int rc);
-void *grecs_symtab_lookup_or_install(grecs_symtab_t st,
+void *grecs_symtab_lookup_or_install(grecs_symtab_ptr_t st,
void *key, int *install);
-void grecs_symtab_clear(grecs_symtab_t st);
-grecs_symtab_t grecs_symtab_create(size_t elsize,
+void grecs_symtab_clear(grecs_symtab_ptr_t st);
+grecs_symtab_ptr_t grecs_symtab_create(size_t elsize,
unsigned (*hash_fun)(void *, unsigned long),
@@ -38,11 +39,11 @@ grecs_symtab_t grecs_symtab_create(size_t elsize,
void (*free_fun)(void *));
-grecs_symtab_t grecs_symtab_create_default(size_t elsize);
+grecs_symtab_ptr_t grecs_symtab_create_default(size_t elsize);
-void grecs_symtab_free(grecs_symtab_t pst);
-int grecs_symtab_remove(grecs_symtab_t st, void *elt);
-int grecs_symtab_replace(grecs_symtab_t st, void *ent, void **old_ent);
-int grecs_symtab_enumerate(grecs_symtab_t st,
+void grecs_symtab_free(grecs_symtab_ptr_t pst);
+int grecs_symtab_remove(grecs_symtab_ptr_t st, void *elt);
+int grecs_symtab_replace(grecs_symtab_ptr_t st, void *ent, void **old_ent);
+int grecs_symtab_enumerate(grecs_symtab_ptr_t st,
grecs_symtab_enumerator_t fun, void *data);
-size_t grecs_symtab_count_entries(grecs_symtab_t st);
+size_t grecs_symtab_count_entries(grecs_symtab_ptr_t st);
diff --git a/include/grecs/value.h b/include/grecs/value.h
index 73f979c..8cd2800 100644
--- a/include/grecs/value.h
+++ b/include/grecs/value.h
@@ -30,3 +30,3 @@ typedef struct grecs_value {
union {
- grecs_list_t list;
+ grecs_list_ptr_t list;
char *string;

Return to:

Send suggestions and report system problems to the System administrator.