[pisa-src] r1185 - trunk/tools/msleep.c

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Thu, 15 Oct 2009 17:32:49 +0200

Author: biurrun
Date: Thu Oct 15 17:32:48 2009
New Revision: 1185

Log:
cosmetics: Reorder functions to avoid ugly forward declarations.

Modified:
   trunk/tools/msleep.c

Modified: trunk/tools/msleep.c
==============================================================================
--- trunk/tools/msleep.c        Thu Oct 15 17:32:20 2009        (r1184)
+++ trunk/tools/msleep.c        Thu Oct 15 17:32:48 2009        (r1185)
@@ -19,21 +19,6 @@
 #define DEFAULT_MSECS  100000
 #define USEC_TO_MSEC   1000
 
-unsigned int get_msecs_from_args(const int argc, char *argv[]);
-
-
-int main(int argc, char *argv[])
-{
-       unsigned int msecs = 0;
-
-       msecs = get_msecs_from_args(argc, argv);
-
-       if (usleep(msecs))
-               printf("failed to msleep\n");
-
-       exit(0);
-}
-
 unsigned int get_msecs_from_args(const int argc, char *argv[])
 {
        int c = 0;
@@ -64,3 +49,15 @@
 
        return msecs;
 }
+
+int main(int argc, char *argv[])
+{
+       unsigned int msecs = 0;
+
+       msecs = get_msecs_from_args(argc, argv);
+
+       if (usleep(msecs))
+               printf("failed to msleep\n");
+
+       exit(0);
+}

Other related posts:

  • » [pisa-src] r1185 - trunk/tools/msleep.c - Diego Biurrun