On Wed, Jun 18, 2025 at 03:59:52 +0000, shynur . wrote: > Martin: > > In variables.c at line 6243 we have > > eof_encountered_limit = (*temp && all_digits (temp)) ? atoi (temp) : 10;
This use of atoi is unique to the IGNOREEOF variable and does not occur in most other places in bash. hobbit:/usr/local/src/bash/bash-5.3-rc2$ grep atoi *.c eval.c: tmout_len = atoi (value_cell (tmout_var)); execute_cmd.c: tabsize = (t && *t) ? atoi (t) : 8; general.c: c = atoi (v); variables.c: eof_encountered_limit = (*temp && all_digits (temp)) ? atoi (temp) : 10; variables.c: s = atoi (tt); variables.c: sh_opterr = (tt && *tt) ? atoi (tt) : 1; variables.c: s = (tt && *tt) ? atoi (tt) : 0; Looks like it might also be used in the TMOUT variable, and a couple other spots that I would have to dig deeply to figure out. > Thank you very much! > I checked `man printf`, and it says "widths are handled" and doesn’t accept > the '%l' format specifier. > So it does seem like the default is equivalent to C’s '%ull' rather than C’s > '%u' (unsigned int). printf is not IGNOREEOF. > So, what’s the correct way to get INT_MAX? > I’m not planning to use it in IGNOREEOF (I’ve already set `IGNOREEOF=127` in > my `.bash_login`, which big enough), I’m just curious… See, this is the X-Y part of the X-Y question. Anyway, as I've already said, bash (2.05b or greater) uses 64-bit integer variables in arithmetic contexts, on almost all platforms. That's the answer you seem to want, although who knows what other weird bugs you may encounter when you try using it in every context other than the one you actually want to use it for. If you tell us what you're actually trying to *do*, you might get an answer that fits your needs.