diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2008-04-22 18:21:12 -0700 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2008-04-22 18:21:12 -0700 |
commit | 362814368e4d62e8be6a298806450d67c2c08a8c (patch) | |
tree | 9a272bb45a4c966e0f11f2b2ab78f6c0a5f03c78 /lib | |
parent | 3dbea5895f385b138ab85873b36d4150a73cf2f4 (diff) |
Add push macros to mirror pop functions
Since push is the opposite of pop, macros have been added to alias the
various add functions.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/initd.h | 1 | ||||
-rw-r--r-- | lib/str.h | 1 | ||||
-rw-r--r-- | lib/types.h | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/lib/initd.h b/lib/initd.h index 63945a1..df4c2e1 100644 --- a/lib/initd.h +++ b/lib/initd.h @@ -33,6 +33,7 @@ extern void initd_add_desc(initd_t *ip, const char *ext); extern initd_list_t *initd_list_new(void); extern void initd_list_free(initd_list_t *ilp); extern void initd_list_add(initd_list_t *ilp, initd_t *ip); +#define initd_list_push initd_list_add extern void initd_list_pop(initd_list_t *ilp); extern initd_list_t *initd_list_from_dir(const char *dir); extern void initd_list_set_actives(initd_list_t *ilp, const char *dir); @@ -15,6 +15,7 @@ typedef struct strarg { extern strarg_t *strarg_new(void); extern void strarg_free(strarg_t *sp); extern void strarg_add(strarg_t *sp, const char *s); +#define strarg_push strarg_add extern void strarg_pop(strarg_t *sp); extern bool strarg_exists(const strarg_t *sp, const char *s); extern unsigned int strarg_get_num(const strarg_t *sp); diff --git a/lib/types.h b/lib/types.h index 5ce609f..8743912 100644 --- a/lib/types.h +++ b/lib/types.h @@ -28,6 +28,7 @@ typedef strarg_t prov_t; #define prov_new strarg_new #define prov_free strarg_free #define prov_add strarg_add +#define prov_push strarg_push #define prov_pop strarg_pop #define prov_get_num strarg_get_num #define prov_get_prov strarg_get_str @@ -40,6 +41,7 @@ typedef strarg_t dep_t; #define dep_new strarg_new #define dep_free strarg_free #define dep_add strarg_add +#define dep_push strarg_push #define dep_pop strarg_pop #define dep_get_num strarg_get_num #define dep_get_dep strarg_get_str |