dpoke.c
changeset 19 bf780d158f3e
parent 1 3e9290bf7249
equal deleted inserted replaced
18:85165bbd4ebb 19:bf780d158f3e
    71 
    71 
    72         return ret;
    72         return ret;
    73 }
    73 }
    74 
    74 
    75 void display(char *v[], size_t vc);
    75 void display(char *v[], size_t vc);
    76 void setup(void);
    76 void setup(int argc, char **argv);
    77 void cleanup(int exitcode);
    77 void cleanup(int exitcode);
    78 
    78 
    79 extern char* v[];
    79 extern char* v[];
    80 #include "config.h"
    80 #include "config.h"
    81 #ifdef DEBUG
    81 #ifdef DEBUG
   168     }
   168     }
   169     return tp.tv_sec + tp.tv_nsec*1E-9;
   169     return tp.tv_sec + tp.tv_nsec*1E-9;
   170 }
   170 }
   171 
   171 
   172 int main(int argc, char* argv[]) {
   172 int main(int argc, char* argv[]) {
   173     setup();
   173     setup(argc, argv);
   174     struct sigaction act;
   174     struct sigaction act;
   175 
   175 
   176     memset (&act, 0, sizeof(act));
   176     memset (&act, 0, sizeof(act));
   177     act.sa_handler = sigchld_hdl;
   177     act.sa_handler = sigchld_hdl;
   178     if (sigaction(SIGCHLD, &act, 0)) {
   178     if (sigaction(SIGCHLD, &act, 0)) {