Changeset 054894e


Ignore:
Timestamp:
Mar 3, 2008, 3:00:24 PM (13 years ago)
Author:
Derrick J. Brashear <shadow@dementia.org>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
9815e2e
Parents:
661d2eb
Message:
ensure that even if ioctl(,TIOCGWINSZ,) returns 0s we never
set g->lines (and g->cols) to 0
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    rb24029a r054894e  
    415415  ioctl(STDIN_FILENO, TIOCGWINSZ, &size);
    416416  if (x==0) {
    417     g->lines=size.ws_row;
     417    if (size.ws_row) {
     418      g->lines=size.ws_row;
     419    } else {
     420      g->lines=LINES;
     421    }
    418422  } else {
    419     g->lines=x;
     423      g->lines=x;
    420424  }
    421425
    422426  if (y==0) {
    423     g->cols=size.ws_col;
     427    if (size.ws_col) {
     428      g->cols=size.ws_col;
     429    } else {
     430      g->cols=COLS;
     431    }
    424432  } else {
    425433    g->cols=y;
Note: See TracChangeset for help on using the changeset viewer.