[pisa-src] r1331 - trunk/pisacd/cdmain.c

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Tue, 27 Oct 2009 15:55:45 +0100

Author: tjansen
Date: Tue Oct 27 15:55:45 2009
New Revision: 1331

Log:
Cometics: Moved the main() function to the end of the file. Saved 3 forward
declarations.

Modified:
   trunk/pisacd/cdmain.c

Modified: trunk/pisacd/cdmain.c
==============================================================================
--- trunk/pisacd/cdmain.c       Tue Oct 27 15:52:13 2009        (r1330)
+++ trunk/pisacd/cdmain.c       Tue Oct 27 15:55:45 2009        (r1331)
@@ -58,10 +58,6 @@
 /**
  * Prototype declarations of functions.
  */
-static void cd_init(int argc, char *argv[]);
-static void cd_deinit(void);
-static inline void cd_do_main(void);
-
 static void cd_get_cmdargs(int argc, char **argv);
 static void cd_print_usage(char **argv);
 static void cd_print_version(void);
@@ -69,26 +65,6 @@
 static void cd_quit(int quitcode);
 
 /**
- * The main function of this client daemon.
- *
- * @param argc   number of command arguments
- * @param argv   pointer to the array of command arguments
- */
-int main(int argc, char *argv[])
-{
-       /* Initialize basic settings */
-       cd_init(argc, argv);
-
-       /* get into the main loop */
-       cd_do_main();
-
-       /* exit, cleaning up existing data */
-       cd_deinit();
-
-       exit(EXIT_SUCCESS);
-}
-
-/**
  * A connection is removed permanently from the list. Clean up all associated
  * state.
  *
@@ -486,3 +462,23 @@
 
 #endif /* CONFIG_PISA_PERFORMANCE */
 
+/**
+ * The main function of this client daemon.
+ *
+ * @param argc   number of command arguments
+ * @param argv   pointer to the array of command arguments
+ */
+int main(int argc, char *argv[])
+{
+       /* Initialize basic settings */
+       cd_init(argc, argv);
+
+       /* get into the main loop */
+       cd_do_main();
+
+       /* exit, cleaning up existing data */
+       cd_deinit();
+
+       exit(EXIT_SUCCESS);
+}
+

Other related posts: