change `read -d' on a tty when the delimiter is not a newline to set the terminal EOL character instead of putting the terminal into character-at-a-time mode; change some calls to atoi to use strol instead

This commit is contained in:
Chet Ramey
2026-01-30 16:43:46 -05:00
parent b805bbec80
commit 468e98e574
34 changed files with 504 additions and 2161 deletions
+3 -3
View File
@@ -1459,15 +1459,15 @@ conf_standard_path (void)
int
default_columns (void)
{
char *v;
char *v, *e;
int c;
c = -1;
v = get_string_value ("COLUMNS");
if (v && *v)
{
c = atoi (v);
if (c > 0)
c = (int)strtol (v, &e, 10);
if (e != v && *e == '\0' && c > 0)
return c;
}