Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/miscutils/ttysize.c

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

revision 983 by niro, Fri Apr 24 18:33:46 2009 UTC revision 984 by niro, Sun May 30 11:32:42 2010 UTC
# Line 12  Line 12 
12  #include "libbb.h"  #include "libbb.h"
13    
14  int ttysize_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;  int ttysize_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
15  int ttysize_main(int argc, char **argv)  int ttysize_main(int argc UNUSED_PARAM, char **argv)
16  {  {
17   unsigned w, h;   unsigned w, h;
18   struct winsize wsz;   struct winsize wsz;
# Line 24  int ttysize_main(int argc, char **argv) Line 24  int ttysize_main(int argc, char **argv)
24   h = wsz.ws_row;   h = wsz.ws_row;
25   }   }
26    
27   if (argc == 1) {   if (!argv[1]) {
28   printf("%u %u", w, h);   printf("%u %u", w, h);
29   } else {   } else {
30   const char *fmt, *arg;   const char *fmt, *arg;

Legend:
Removed from v.983  
changed lines
  Added in v.984