Commits

Greg Ward  committed b28abab

Style consistency: always put function return types on their own line.

  • Participants
  • Parent commits 7484853

Comments (0)

Files changed (13)

File src/common.c

 
 #include "common.h"
 
-result_t* init_result()
+result_t*
+init_result()
 {
     return (result_t*) calloc(1, sizeof(result_t));
 }
 
-void free_result(result_t* result)
+void
+free_result(result_t* result)
 {
     free(result->revision);
     free(result->branch);
 
 static options_t* _options = NULL;
 
-void set_options(options_t* options)
+void
+set_options(options_t* options)
 {
     _options = options;
 }
 
-int debug_mode()
+int
+debug_mode()
 {
     return _options->debug;
 }
 
-int result_set_revision(result_t* result, const char *revision, int len)
+int
+result_set_revision(result_t* result, const char *revision, int len)
 {
     if (result->revision)
         free(result->revision);
     return !!result->revision;
 }
 
-int result_set_branch(result_t* result, const char *branch)
+int
+result_set_branch(result_t* result, const char *branch)
 {
     if (result->branch)
         free(result->branch);

File src/common.h

              options_t* options,
              int (*probe)(vccontext_t*),
              result_t* (*get_info)(vccontext_t*));
+
 void
 free_context(vccontext_t* context);
 
     return result;
 }
 
-vccontext_t* get_cvs_context(options_t* options)
+vccontext_t*
+get_cvs_context(options_t* options)
 {
     return init_context("cvs", options, cvs_probe, cvs_get_info);
 }
 
 #include "common.h"
 
-vccontext_t* get_cvs_context(options_t* options);
+vccontext_t*
+get_cvs_context(options_t* options);
 
 #endif

File src/fossil.c

     return result;
 }
 
-vccontext_t* get_fossil_context(options_t* options)
+vccontext_t*
+get_fossil_context(options_t* options)
 {
     return init_context("fossil", options, fossil_probe, fossil_get_info);
 }

File src/fossil.h

 
 #include "common.h"
 
-vccontext_t* get_fossil_context(options_t* options);
+vccontext_t*
+get_fossil_context(options_t* options);
 
 #endif
     return result;
 }
 
-vccontext_t* get_git_context(options_t* options)
+vccontext_t*
+get_git_context(options_t* options)
 {
     return init_context("git", options, git_probe, git_get_info);
 }
 
 #include "common.h"
 
-vccontext_t* get_git_context(options_t* options);
+vccontext_t*
+get_git_context(options_t* options);
 
 #endif
     return isdir(".hg");
 }
 
-static int sum_bytes(const unsigned char* data, int size)
+static int
+sum_bytes(const unsigned char* data, int size)
 {
     int i, sum = 0;
     for (i = 0; i < size; ++i) {
     return sum;
 }
 
-static int is_revlog_inlined(FILE *f)
+static int
+is_revlog_inlined(FILE *f)
 {
     const unsigned int REVLOGNGINLINEDATA = 1 << 16;
     int revlog_ver;
 } csinfo_t;
 
 //! get changeset info for the specified nodeid
-static csinfo_t get_csinfo(const char* nodeid)
+static csinfo_t
+get_csinfo(const char* nodeid)
 {
     // only supports RevlogNG. See mercurial/parsers.c for details.
     const char* REVLOG_FILENAME = ".hg/store/00changelog.i";
     return csinfo;
 }
 
-static size_t get_mq_patchname(char* str, const char* nodeid, size_t n)
+static size_t
+get_mq_patchname(char* str, const char* nodeid, size_t n)
 {
     char buf[1024];
     char status_filename[512] = ".hg/patches/status";
     }
 }
 
-static size_t put_nodeid(char* str, const char* nodeid)
+static size_t
+put_nodeid(char* str, const char* nodeid)
 {
     const size_t SHORT_NODEID_LEN = 6;  // size in binary repr
     char buf[512], *p = str;
     return result;
 }
 
-vccontext_t* get_hg_context(options_t* options)
+vccontext_t*
+get_hg_context(options_t* options)
 {
     return init_context("hg", options, hg_probe, hg_get_info);
 }
 
 #include "common.h"
 
-vccontext_t* get_hg_context(options_t* options);
+vccontext_t*
+get_hg_context(options_t* options);
 
 #endif
     return result;
 }
 
-vccontext_t* get_svn_context(options_t* options)
+vccontext_t*
+get_svn_context(options_t* options)
 {
     return init_context("svn", options, svn_probe, svn_get_info);
 }
 
 #include "common.h"
 
-vccontext_t* get_svn_context(options_t* options);
+vccontext_t*
+get_svn_context(options_t* options);
 
 #endif

File src/vcprompt.c

 
 #define DEFAULT_FORMAT "[%n:%b%m%u] "
 
-void parse_args(int argc, char** argv, options_t* options)
+void
+parse_args(int argc, char** argv, options_t* options)
 {
     int opt;
     while ((opt = getopt(argc, argv, "hf:dt:")) != -1) {
     }
 }
 
-void parse_format(options_t* options)
+void
+parse_format(options_t* options)
 {
     size_t i;
 
     }
 }
 
-void print_result(vccontext_t* context, options_t* options, result_t* result)
+void
+print_result(vccontext_t* context, options_t* options, result_t* result)
 {
     size_t i;
     char* format = options->format;
     }
 }
 
-vccontext_t* probe_all(vccontext_t** contexts, int num_contexts)
+vccontext_t*
+probe_all(vccontext_t** contexts, int num_contexts)
 {
     int idx;
     for (idx = 0; idx < num_contexts; idx++) {
 }
 
 /* walk up the directory tree until the probes work or we hit / */
-vccontext_t* probe_parents(vccontext_t** contexts, int num_contexts)
+vccontext_t*
+probe_parents(vccontext_t** contexts, int num_contexts)
 {
     vccontext_t* context;
     struct stat rootdir;
         return old.it_value.tv_sec;
 }
 
-int main(int argc, char** argv)
+int
+main(int argc, char** argv)
 {
     /* Establish a handler for SIGALRM signals.  */
     signal(SIGALRM, exit_on_alarm);