diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2001-10-10 03:18:22 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2001-10-10 03:18:22 +0000 |
| commit | 7613acc70e37ebabd7743da02da4f4ff0d218d5c (patch) | |
| tree | ea7b08ad73cfb7cd8a5ca8e77a9fb646770804f0 /src/util/profile | |
| parent | ad4d9f8d0f83524931da62aebb592ab53f2218d9 (diff) | |
Don't conditionalize prototypes; delete macros supporting it. (Maybe overdone;
don't worry about restoring them when importing new versions of code.)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13792 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/profile')
| -rw-r--r-- | src/util/profile/ChangeLog | 5 | ||||
| -rw-r--r-- | src/util/profile/prof_int.h | 88 | ||||
| -rw-r--r-- | src/util/profile/profile.hin | 62 | ||||
| -rw-r--r-- | src/util/profile/test_parse.c | 2 |
4 files changed, 74 insertions, 83 deletions
diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index 25a73a841f..8108968f69 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -1,3 +1,8 @@ +2001-10-09 Ken Raeburn <raeburn@mit.edu> + + * prof_int.h, profile.hin, test_parse.c: Make prototypes + unconditional. Don't define PROTOTYPE. + 2001-10-05 Ken Raeburn <raeburn@mit.edu> * profile.hin (KRB5_EXPORTVAR): Don't define. diff --git a/src/util/profile/prof_int.h b/src/util/profile/prof_int.h index 3d24f23c3b..3f120a7fa3 100644 --- a/src/util/profile/prof_int.h +++ b/src/util/profile/prof_int.h @@ -7,12 +7,6 @@ #include "prof_err.h" #include "profile.h" -#if defined(__STDC__) || defined(_WIN32) -#define PROTOTYPE(x) x -#else -#define PROTOTYPE(x) () -#endif - #if defined(_WIN32) #define SIZEOF_INT 4 #define SIZEOF_SHORT 2 @@ -81,120 +75,120 @@ struct _profile_t { /* profile_parse.c */ errcode_t profile_parse_file - PROTOTYPE((FILE *f, struct profile_node **root)); + (FILE *f, struct profile_node **root); errcode_t profile_write_tree_file - PROTOTYPE((struct profile_node *root, FILE *dstfile)); + (struct profile_node *root, FILE *dstfile); /* prof_tree.c */ void profile_free_node - PROTOTYPE((struct profile_node *relation)); + (struct profile_node *relation); errcode_t profile_create_node - PROTOTYPE((const char *name, const char *value, - struct profile_node **ret_node)); + (const char *name, const char *value, + struct profile_node **ret_node); errcode_t profile_verify_node - PROTOTYPE((struct profile_node *node)); + (struct profile_node *node); errcode_t profile_add_node - PROTOTYPE ((struct profile_node *section, + (struct profile_node *section, const char *name, const char *value, - struct profile_node **ret_node)); + struct profile_node **ret_node); errcode_t profile_make_node_final - PROTOTYPE((struct profile_node *node)); + (struct profile_node *node); int profile_is_node_final - PROTOTYPE((struct profile_node *node)); + (struct profile_node *node); const char *profile_get_node_name - PROTOTYPE((struct profile_node *node)); + (struct profile_node *node); const char *profile_get_node_value - PROTOTYPE((struct profile_node *node)); + (struct profile_node *node); errcode_t profile_find_node - PROTOTYPE ((struct profile_node *section, + (struct profile_node *section, const char *name, const char *value, int section_flag, void **state, - struct profile_node **node)); + struct profile_node **node); errcode_t profile_find_node_relation - PROTOTYPE ((struct profile_node *section, + (struct profile_node *section, const char *name, void **state, - char **ret_name, char **value)); + char **ret_name, char **value); errcode_t profile_find_node_subsection - PROTOTYPE ((struct profile_node *section, + (struct profile_node *section, const char *name, void **state, - char **ret_name, struct profile_node **subsection)); + char **ret_name, struct profile_node **subsection); errcode_t profile_get_node_parent - PROTOTYPE ((struct profile_node *section, - struct profile_node **parent)); + (struct profile_node *section, + struct profile_node **parent); errcode_t profile_delete_node_relation - PROTOTYPE ((struct profile_node *section, const char *name)); + (struct profile_node *section, const char *name); errcode_t profile_find_node_name - PROTOTYPE ((struct profile_node *section, void **state, - char **ret_name)); + (struct profile_node *section, void **state, + char **ret_name); errcode_t profile_node_iterator_create - PROTOTYPE((profile_t profile, const char *const *names, - int flags, void **ret_iter)); + (profile_t profile, const char *const *names, + int flags, void **ret_iter); void profile_node_iterator_free - PROTOTYPE((void **iter_p)); + (void **iter_p); errcode_t profile_node_iterator - PROTOTYPE((void **iter_p, struct profile_node **ret_node, - char **ret_name, char **ret_value)); + (void **iter_p, struct profile_node **ret_node, + char **ret_name, char **ret_value); errcode_t profile_remove_node - PROTOTYPE((struct profile_node *node)); + (struct profile_node *node); errcode_t profile_set_relation_value - PROTOTYPE((struct profile_node *node, const char *new_value)); + (struct profile_node *node, const char *new_value); errcode_t profile_rename_node - PROTOTYPE((struct profile_node *node, const char *new_name)); + (struct profile_node *node, const char *new_name); /* prof_file.c */ errcode_t profile_open_file - PROTOTYPE ((const_profile_filespec_t file, prf_file_t *ret_prof)); + (const_profile_filespec_t file, prf_file_t *ret_prof); errcode_t profile_update_file - PROTOTYPE ((prf_file_t profile)); + (prf_file_t profile); errcode_t profile_flush_file - PROTOTYPE ((prf_file_t profile)); + (prf_file_t profile); void profile_free_file - PROTOTYPE ((prf_file_t profile)); + (prf_file_t profile); errcode_t profile_close_file - PROTOTYPE ((prf_file_t profile)); + (prf_file_t profile); /* prof_init.c -- included from profile.h */ errcode_t profile_ser_size - PROTOTYPE ((const char *, profile_t, size_t *)); + (const char *, profile_t, size_t *); errcode_t profile_ser_externalize - PROTOTYPE ((const char *, profile_t, unsigned char **, size_t *)); + (const char *, profile_t, unsigned char **, size_t *); errcode_t profile_ser_internalize - PROTOTYPE ((const char *, profile_t *, unsigned char **, size_t *)); + (const char *, profile_t *, unsigned char **, size_t *); /* prof_get.c */ errcode_t profile_get_value - PROTOTYPE ((profile_t profile, const char **names, - const char **ret_value)); + (profile_t profile, const char **names, + const char **ret_value); /* Others included from profile.h */ /* prof_set.c -- included from profile.h */ diff --git a/src/util/profile/profile.hin b/src/util/profile/profile.hin index 418696141d..2f11524afd 100644 --- a/src/util/profile/profile.hin +++ b/src/util/profile/profile.hin @@ -16,14 +16,6 @@ typedef struct _profile_t *profile_t; -#if !defined(PROTOTYPE) -#if defined(__STDC__) || defined(__cplusplus) || defined(_WIN32) -#define PROTOTYPE(x) x -#else -#define PROTOTYPE(x) () -#endif -#endif - /* * Used by the profile iterator in prof_get.c */ @@ -61,72 +53,72 @@ typedef FSSpec* const_profile_filespec_list_t; #endif long KRB5_CALLCONV profile_init - PROTOTYPE ((const_profile_filespec_t *files, profile_t *ret_profile)); + (const_profile_filespec_t *files, profile_t *ret_profile); long KRB5_CALLCONV profile_init_path - PROTOTYPE ((const_profile_filespec_list_t filelist, profile_t *ret_profile)); + (const_profile_filespec_list_t filelist, profile_t *ret_profile); long KRB5_CALLCONV profile_flush - PROTOTYPE ((profile_t profile)); + (profile_t profile); void KRB5_CALLCONV profile_abandon - PROTOTYPE ((profile_t profile)); + (profile_t profile); void KRB5_CALLCONV profile_release - PROTOTYPE ((profile_t profile)); + (profile_t profile); long KRB5_CALLCONV profile_get_values - PROTOTYPE ((profile_t profile, const char *const *names, char ***ret_values)); + (profile_t profile, const char *const *names, char ***ret_values); void KRB5_CALLCONV profile_free_list - PROTOTYPE ((char **list)); + (char **list); long KRB5_CALLCONV profile_get_string - PROTOTYPE((profile_t profile, const char *name, const char *subname, + (profile_t profile, const char *name, const char *subname, const char *subsubname, const char *def_val, - char **ret_string)); + char **ret_string); long KRB5_CALLCONV profile_get_integer - PROTOTYPE((profile_t profile, const char *name, const char *subname, + (profile_t profile, const char *name, const char *subname, const char *subsubname, int def_val, - int *ret_default)); + int *ret_default); long KRB5_CALLCONV profile_get_boolean - PROTOTYPE((profile_t profile, const char *name, const char *subname, + (profile_t profile, const char *name, const char *subname, const char *subsubname, int def_val, - int *ret_default)); + int *ret_default); long KRB5_CALLCONV profile_get_relation_names - PROTOTYPE((profile_t profile, const char **names, char ***ret_names)); + (profile_t profile, const char **names, char ***ret_names); long KRB5_CALLCONV profile_get_subsection_names - PROTOTYPE((profile_t profile, const char **names, char ***ret_names)); + (profile_t profile, const char **names, char ***ret_names); long KRB5_CALLCONV profile_iterator_create - PROTOTYPE((profile_t profile, const char **names, - int flags, void **ret_iter)); + (profile_t profile, const char **names, + int flags, void **ret_iter); void KRB5_CALLCONV profile_iterator_free - PROTOTYPE((void **iter_p)); + (void **iter_p); long KRB5_CALLCONV profile_iterator - PROTOTYPE((void **iter_p, char **ret_name, char **ret_value)); + (void **iter_p, char **ret_name, char **ret_value); -void KRB5_CALLCONV profile_release_string PROTOTYPE((char *str)); +void KRB5_CALLCONV profile_release_string (char *str); long KRB5_CALLCONV profile_update_relation - PROTOTYPE((profile_t profile, const char **names, - const char *old_value, const char *new_value)); + (profile_t profile, const char **names, + const char *old_value, const char *new_value); long KRB5_CALLCONV profile_clear_relation - PROTOTYPE((profile_t profile, const char **names)); + (profile_t profile, const char **names); long KRB5_CALLCONV profile_rename_section - PROTOTYPE((profile_t profile, const char **names, - const char *new_name)); + (profile_t profile, const char **names, + const char *new_name); long KRB5_CALLCONV profile_add_relation - PROTOTYPE((profile_t profile, const char **names, - const char *new_value)); + (profile_t profile, const char **names, + const char *new_value); #ifdef __cplusplus } diff --git a/src/util/profile/test_parse.c b/src/util/profile/test_parse.c index 4386750581..7aa0eeb620 100644 --- a/src/util/profile/test_parse.c +++ b/src/util/profile/test_parse.c @@ -8,7 +8,7 @@ #include "prof_int.h" -void dump_profile PROTOTYPE((struct profile_node *root, int level)); +void dump_profile (struct profile_node *root, int level); int main(argc, argv) int argc; |
