[BACK]Return to setupterm.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libterminfo

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libterminfo/setupterm.c between version 1.7 and 1.8

version 1.7, 2017/03/23 00:55:39 version 1.8, 2017/05/04 09:42:23
Line 127  ti_setupterm(TERMINAL **nterm, const cha
Line 127  ti_setupterm(TERMINAL **nterm, const cha
         if (ioctl(fildes, TIOCGWINSZ, &win) != -1 &&          if (ioctl(fildes, TIOCGWINSZ, &win) != -1 &&
             win.ws_row != 0 && win.ws_col != 0)              win.ws_row != 0 && win.ws_col != 0)
         {          {
                 t_lines(*nterm) = win.ws_row;                  t_lines(*nterm) = (short)win.ws_row;
                 t_columns(*nterm) = win.ws_col;                  t_columns(*nterm) = (short)win.ws_col;
         }          }
   
         /* POSIX 1003.2 requires that the environment override. */          /* POSIX 1003.2 requires that the environment override. */
Line 136  ti_setupterm(TERMINAL **nterm, const cha
Line 136  ti_setupterm(TERMINAL **nterm, const cha
                 char *p;                  char *p;
   
                 if ((p = getenv("LINES")) != NULL)                  if ((p = getenv("LINES")) != NULL)
                         t_lines(*nterm) = (int)strtol(p, NULL, 0);                          t_lines(*nterm) = (short)strtol(p, NULL, 0);
                 if ((p = getenv("COLUMNS")) != NULL)                  if ((p = getenv("COLUMNS")) != NULL)
                         t_columns(*nterm) = (int)strtol(p, NULL, 0);                          t_columns(*nterm) = (short)strtol(p, NULL, 0);
         }          }
   
         /* POSIX requires 1 for success */          /* POSIX requires 1 for success */

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

CVSweb <webmaster@jp.NetBSD.org>