]> diplodocus.org Git - nmh/commitdiff
Specify function parameters in prototypes, mainly void.
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 15 May 2017 13:12:21 +0000 (14:12 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 15 May 2017 13:12:21 +0000 (14:12 +0100)
These prototypes are all in *.[cl] source compared with the *.h of the
earlier commit.  All but one had void added, that one's parameter was a
char pointer.

sbr/check_charset.c
sbr/ctype-checked.c
sbr/icalendar.l
sbr/m_mktemp.c
sbr/oauth.c
sbr/signals.c
sbr/utils.c
uip/mhlsbr.c

index 8802666..545aab4 100644 (file)
@@ -17,7 +17,7 @@ char *norm_charmap(char *);
  * Get the current character set
  */
 char *
-get_charset ()
+get_charset(void)
 {
     return norm_charmap(nl_langinfo (CODESET));
 }
index 65b1cf3..4f2a15d 100644 (file)
@@ -44,6 +44,6 @@ int ctype_identity[257] = {
 
 /* Need to put a symbol in the .c file with NDEBUG so the compilation
  * unit isn't empty. */
-void ctype_checked();
+void ctype_checked(void);
 
 #endif
index c1e2162..11006e7 100644 (file)
@@ -13,7 +13,7 @@
 #include "sbr/icalparse.h"
 
 static char *unfold (char *, size_t *);
-static void destroy_icallex ();
+static void destroy_icallex(void);
 %}
 
 /*
@@ -312,7 +312,7 @@ unfold (char *text, size_t *leng) {
  * with something other than flex.
  */
 static void
-destroy_icallex () {
+destroy_icallex(void) {
 #if defined FLEX_SCANNER  &&  defined YY_FLEX_SUBMINOR_VERSION
     /* Hack:  rely on fact that the the YY_FLEX_SUBMINOR_VERSION
        #define was added to flex (flex.skl v. 2.163) after
index f4d5c3f..338302c 100644 (file)
@@ -319,7 +319,7 @@ m_unlink(const char *pathname) {
  * Remove all registered temporary files.
  */
 void
-remove_registered_files_atexit() {
+remove_registered_files_atexit(void) {
     unregister_for_removal(1);
 }
 
index 741cacb..ccc2ad3 100755 (executable)
@@ -240,7 +240,7 @@ set_err_http(mh_oauth_ctx *ctx, const struct curl_ctx *curl_ctx)
 }
 
 static char *
-make_user_agent()
+make_user_agent(void)
 {
     const char *curl = curl_version_info(CURLVERSION_NOW)->version;
     return concat(user_agent, " libcurl/", curl, NULL);
index 39a01b3..97ac780 100644 (file)
@@ -84,7 +84,7 @@ SIGNAL2 (int sig, SIGNAL_HANDLER func)
  * For use by nmh_init().
  */
 int
-setup_signal_handlers() {
+setup_signal_handlers(void) {
     /*
      * Catch HUP, INT, QUIT, and TERM so that we can clean up tmp
      * files when the user terminates the process early.  And also a
index ef7df4a..08ad0c1 100644 (file)
 #include <fcntl.h>
 
 /* sbr/signals.c */
-extern int setup_signal_handlers();
+extern int setup_signal_handlers(void);
 
 /* sbr/m_mktemp.c */
-extern void remove_registered_files_atexit();
+extern void remove_registered_files_atexit(void);
 
 extern char *mhdocdir;
 
index e2d9760..3967c63 100644 (file)
@@ -302,7 +302,7 @@ static char delim3[] =              /* from forw.c */
     "\n----------------------------------------------------------------------\n\n";
 static char delim4[] = "\n------------------------------\n\n";
 
-static FILE *(*mhl_action) () = (FILE *(*) ()) 0;
+static FILE *(*mhl_action)(char *);
 
 /*
  * prototypes