changeset 39:8bb1d101c166

fix a couple of function prototypes
author ng0@n0.is
date Fri, 25 Oct 2019 10:45:36 +0000
parents e612861479df
children ca7899d47629
files cache.c cache.h cvsps.c cvsps.h util.c util.h
diffstat 6 files changed, 45 insertions(+), 67 deletions(-) [+]
line wrap: on
line diff
--- a/cache.c	Fri Oct 11 18:44:57 2019 +0000
+++ b/cache.c	Fri Oct 25 10:45:36 2019 +0000
@@ -114,7 +114,7 @@
 };
 
 time_t
-read_cache ()
+read_cache (void)
 {
         FILE *fp;
         char buff[BUFSIZ];
--- a/cache.h	Fri Oct 11 18:44:57 2019 +0000
+++ b/cache.h	Fri Oct 25 10:45:36 2019 +0000
@@ -6,8 +6,7 @@
 #ifndef CACHE_H
 #define CACHE_H
 
-extern time_t
-read_cache ();
+extern time_t read_cache (void);
 extern void write_cache (time_t);
 
 #endif /* CACHE_H */
--- a/cvsps.c	Fri Oct 11 18:44:57 2019 +0000
+++ b/cvsps.c	Fri Oct 25 10:45:36 2019 +0000
@@ -114,11 +114,11 @@
 static int
 parse_args (int, char *[]);
 static int
-parse_rc ();
+parse_rc (void);
 static void
-load_from_cvs ();
+load_from_cvs (void);
 static void
-init_paths ();
+init_paths (void);
 static CvsFile *
 parse_file (const char *);
 static CvsFileRevision *
@@ -152,13 +152,13 @@
 static void
 do_cvs_diff (PatchSet *);
 static PatchSet *
-create_patch_set ();
+create_patch_set (void);
 static PatchSetRange *
-create_patch_set_range ();
+create_patch_set_range (void);
 static void
 parse_sym (CvsFile *, char *);
 static void
-resolve_global_symbols ();
+resolve_global_symbols (void);
 static int
 revision_affects_branch (CvsFileRevision *, const char *);
 static int
@@ -174,7 +174,7 @@
 static void
 determine_branch_ancestor (PatchSet *ps, PatchSet *head_ps);
 static void
-handle_collisions ();
+handle_collisions (void);
 static Branch *
 create_branch (const char *name);
 static void
@@ -298,7 +298,7 @@
 }
 
 static void
-load_from_cvs ()
+load_from_cvs (void)
 {
         FILE *cvsfp;
         char buff[BUFSIZ];
@@ -1011,7 +1011,7 @@
 }
 
 static int
-parse_rc ()
+parse_rc (void)
 {
         char rcfile[PATH_MAX];
         FILE *fp;
@@ -1048,7 +1048,7 @@
 }
 
 static void
-init_paths ()
+init_paths (void)
 {
         FILE *fp;
         char *p;
@@ -2249,7 +2249,7 @@
 }
 
 CvsFile *
-create_cvsfile ()
+create_cvsfile (void)
 {
         CvsFile *f = (CvsFile *) calloc (1, sizeof (*f));
         if (! f)
@@ -2275,7 +2275,7 @@
 }
 
 static PatchSet *
-create_patch_set ()
+create_patch_set (void)
 {
         PatchSet *ps = (PatchSet *) calloc (1, sizeof (*ps));
         ;
@@ -2302,7 +2302,7 @@
 }
 
 PatchSetMember *
-create_patch_set_member ()
+create_patch_set_member (void)
 {
         PatchSetMember *psm = (PatchSetMember *) calloc (1, sizeof (*psm));
         psm->pre_rev = NULL;
@@ -2314,7 +2314,7 @@
 }
 
 static PatchSetRange *
-create_patch_set_range ()
+create_patch_set_range (void)
 {
         PatchSetRange *psr = (PatchSetRange *) calloc (1, sizeof (*psr));
         return psr;
@@ -2522,7 +2522,7 @@
  */
 
 static void
-resolve_global_symbols ()
+resolve_global_symbols (void)
 {
         struct hash_entry *he_sym;
         reset_hash_iterator (global_symbols);
@@ -2988,7 +2988,7 @@
 }
 
 static void
-handle_collisions ()
+handle_collisions (void)
 {
         struct list_head *next;
         for (next = collisions.next; next != &collisions; next = next->next)
--- a/cvsps.h	Fri Oct 11 18:44:57 2019 +0000
+++ b/cvsps.h	Fri Oct 25 10:45:36 2019 +0000
@@ -21,27 +21,18 @@
 extern char root_path[];
 extern char repository_path[];
 
-CvsFile *
-create_cvsfile ();
-CvsFileRevision *
-cvs_file_add_revision (CvsFile *, const char *);
-void
-cvs_file_add_symbol (CvsFile *file, const char *rev, const char *tag);
-char *
-cvs_file_add_branch (CvsFile *, const char *, const char *);
-PatchSet *
-get_patch_set (const char *,
-               const char *,
-               const char *,
-               const char *,
-               PatchSetMember *);
-PatchSetMember *
-create_patch_set_member ();
-CvsFileRevision *
-file_get_revision (CvsFile *, const char *);
-void
-patch_set_add_member (PatchSet *ps, PatchSetMember *psm);
-void
-walk_all_patch_sets (void (*action) (PatchSet *));
+CvsFile * create_cvsfile (void);
+CvsFileRevision * cvs_file_add_revision (CvsFile *, const char *);
+void cvs_file_add_symbol (CvsFile *file, const char *rev, const char *tag);
+char * cvs_file_add_branch (CvsFile *, const char *, const char *);
+PatchSet * get_patch_set (const char *,
+			  const char *,
+			  const char *,
+			  const char *,
+			  PatchSetMember *);
+PatchSetMember * create_patch_set_member (void);
+CvsFileRevision * file_get_revision (CvsFile *, const char *);
+void patch_set_add_member (PatchSet *ps, PatchSetMember *psm);
+void walk_all_patch_sets (void (*action) (PatchSet *));
 
 #endif /* CVSPS_H */
--- a/util.c	Fri Oct 11 18:44:57 2019 +0000
+++ b/util.c	Fri Oct 25 10:45:36 2019 +0000
@@ -66,7 +66,7 @@
 }
 
 char *
-get_cvsps_dir ()
+get_cvsps_dir (void)
 {
         struct stat sbuf;
         static char prefix[PATH_MAX];
@@ -249,7 +249,7 @@
 static struct timeval start_time;
 
 void
-timing_start ()
+timing_start (void)
 {
         gettimeofday (&start_time, NULL);
 }
--- a/util.h	Fri Oct 11 18:44:57 2019 +0000
+++ b/util.h	Fri Oct 25 10:45:36 2019 +0000
@@ -12,29 +12,17 @@
 #define PATH_MAX 4096
 #endif
 
-char *
-xstrdup (char const *);
-void
-strzncpy (char *dst, const char *src, int n);
-char *
-readfile (char const *filename, char *buf, size_t size);
-char *
-strrep (char *s, char find, char replace);
-char *
-get_cvsps_dir ();
-char *
-get_string (char const *str);
-void
-convert_date (time_t *, const char *);
-void
-timing_start ();
-void
-timing_stop (const char *);
-int
-my_system (const char *);
-int
-escape_filename (char *, int, const char *);
-void
-strcpy_a (char *dst, const char *src, int n);
+char * xstrdup (char const *);
+void strzncpy (char *dst, const char *src, int n);
+char * readfile (char const *filename, char *buf, size_t size);
+char * strrep (char *s, char find, char replace);
+char * get_cvsps_dir (void);
+char * get_string (char const *str);
+void convert_date (time_t *, const char *);
+void timing_start (void);
+void timing_stop (const char *);
+int my_system (const char *);
+int escape_filename (char *, int, const char *);
+void strcpy_a (char *dst, const char *src, int n);
 
 #endif /* UTIL_H */