Major codebase cleanup and overhaul.
+ editor removes per-buffer fields. + switching from internal use of 'int' to 'size_t'. + deleting old code + double checking relevancy of comments. A lot has changed in 5 years, even more so in the past week. + fixing a few vestigal memory errors from the overhaul. + fixing search behavior
This commit is contained in:
16
term.c
16
term.c
@@ -71,16 +71,16 @@ setup_terminal(void)
|
||||
|
||||
|
||||
int
|
||||
get_winsz(int *rows, int *cols)
|
||||
get_winsz(size_t *rows, size_t *cols)
|
||||
{
|
||||
struct winsize ws;
|
||||
struct winsize ws;
|
||||
|
||||
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) == -1 || ws.ws_col == 0) {
|
||||
return -1;
|
||||
}
|
||||
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) == -1 || ws.ws_col == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
*cols = ws.ws_col;
|
||||
*rows = ws.ws_row;
|
||||
*cols = (size_t)ws.ws_col;
|
||||
*rows = (size_t)ws.ws_row;
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user