/[machmon]/machmon/linux/source/machmon.c
ViewVC logotype

Diff of /machmon/linux/source/machmon.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by clorets, Mon Jul 8 16:19:55 2002 UTC revision 1.4 by pbastos, Mon Jul 8 18:30:10 2002 UTC
# Line 39  Line 39 
39  #include <sys/cdefs.h>  #include <sys/cdefs.h>
40  #include <sys/types.h>  #include <sys/types.h>
41  #include <sys/param.h>  #include <sys/param.h>
42    #include <sys/time.h>
43    
44  #include <err.h>  #include <err.h>
45  #include <errno.h>  #include <errno.h>
# Line 60  static int     timer_setup(int); Line 61  static int     timer_setup(int);
61  static void     getkey(int);  static void     getkey(int);
62  static void     rezscr(volatile sig_atomic_t sigval);  static void     rezscr(volatile sig_atomic_t sigval);
63  static void     sync_run(volatile sig_atomic_t sigval);  static void     sync_run(volatile sig_atomic_t sigval);
64    static void     internal_loop(void);
65    
66  #ifdef OPENBSD  void    usage(void);
67    void    quit(volatile sig_atomic_t sigval);
 __dead void     internal_loop(void);  
 __dead void     usage(void);  
 __dead void     quit(volatile sig_atomic_t sigval);  
   
 #endif  
   
 #ifdef FREEBSD  
   
 void            internal_loop(void);  
 void            usage(void);  
 void            quit(volatile sig_atomic_t sigval);  
   
 #endif  
68    
69  /*  /*
70   * Here we set flags to their default values: run time flags filled, internal   * Here we set flags to their default values: run time flags filled, internal
# Line 97  int MAIN_WINDOW; Line 86  int MAIN_WINDOW;
86  int REAL_WINDOW;  int REAL_WINDOW;
87  int synctime = 10;  int synctime = 10;
88    
 #ifdef OPENBSD  
 __dead void  
 #else  
89  void  void
 #endif  
90  quit(volatile sig_atomic_t sigval)  quit(volatile sig_atomic_t sigval)
91  {  {
92          (void) touchwin(stdscr);          (void) touchwin(stdscr);
# Line 219  xatoi(const char *buf, int *outnum) Line 204  xatoi(const char *buf, int *outnum)
204          return (0);          return (0);
205  }  }
206    
 #ifdef OPENBSD  
 __dead void  
 #else  
207  void  void
 #endif  
208  usage(void)  usage(void)
209  {  {
210          (void) fprintf(stderr, "Usage:\n%s [-dh] [-c] file [-t] time\n",          (void) fprintf(stderr, "Usage:\n%s [-dh] [-c] file [-t] time\n",
# Line 307  main(int argc, char **argv) Line 288  main(int argc, char **argv)
288          internal_loop();          internal_loop();
289          /* NOTREACHED */          /* NOTREACHED */
290    
 #ifdef FREEBSD  
291          return (0); /* eheh */          return (0); /* eheh */
 #endif  
   
292  }  }
293    
294  #ifdef OPENBSD  #ifdef OPENBSD
# Line 332  internal_loop(void) Line 310  internal_loop(void)
310                  tv->tv_sec = 0;                  tv->tv_sec = 0;
311                  tv->tv_usec = 25000;                  tv->tv_usec = 25000;
312    
313                  if (select(1, fdkey, NULL, NULL, tv) > 0) {                  if (select(1, fdkey, NULL, NULL, tv) > 0)
314                          int ch;                          getkey(wgetch(twin));
                         if ((ch = wgetch(twin)) != NULL)  
                                 getkey(ch);  
                 }  
315    
316                  free(tv);                  free(tv);
317                  free(fdkey);                  free(fdkey);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26