[BACK]Return to kdump.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / kdump

Diff for /src/usr.bin/kdump/kdump.c between version 1.101 and 1.102

version 1.101, 2015/04/18 18:28:37 version 1.102, 2015/07/19 02:52:35
Line 164 
Line 164 
 static void sockoptlevelname(int);  static void sockoptlevelname(int);
 static void ktraceopname(int);  static void ktraceopname(int);
   
   static int screenwidth;
   
 int  int
 main(int argc, char *argv[])  main(int argc, char *argv[])
 {  {
Line 175 
Line 177 
   
         def_emul = current = &emulations[0];    /* native */          def_emul = current = &emulations[0];    /* native */
   
           if (screenwidth == 0) {
                   struct winsize ws;
   
                   if (fancy && ioctl(fileno(stderr), TIOCGWINSZ, &ws) != -1 &&
                       ws.ws_col > 8)
                           screenwidth = ws.ws_col;
                   else
                           screenwidth = 80;
           }
   
         while ((ch = getopt(argc, argv, "e:f:dHlm:nRp:Tt:xX")) != -1)          while ((ch = getopt(argc, argv, "e:f:dHlm:nRp:Tt:xX")) != -1)
                 switch (ch) {                  switch (ch) {
                 case 'e':                  case 'e':
Line 1177 
Line 1189 
 showbuf(unsigned char *dp, size_t datalen)  showbuf(unsigned char *dp, size_t datalen)
 {  {
         int i, j;          int i, j;
         static int screenwidth;  
         int col = 0, width, bpl;          int col = 0, width, bpl;
         unsigned char visbuf[5], *cp, c;          unsigned char visbuf[5], *cp, c;
   
         if (screenwidth == 0) {  
                 struct winsize ws;  
   
                 if (fancy && ioctl(fileno(stderr), TIOCGWINSZ, &ws) != -1 &&  
                     ws.ws_col > 8)  
                         screenwidth = ws.ws_col;  
                 else  
                         screenwidth = 80;  
         }  
         if (iohex == 1) {          if (iohex == 1) {
                 putchar('\t');                  putchar('\t');
                 col = 8;                  col = 8;

Legend:
Removed from v.1.101  
changed lines
  Added in v.1.102