mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-26 01:41:14 +01:00
11387: OCTAL_ZEROES option
This commit is contained in:
parent
18b193f241
commit
195f1c4015
5 changed files with 15 additions and 1 deletions
|
@ -1,4 +1,9 @@
|
|||
2000-05-15 Clint Adams <schizo@debian.org>
|
||||
|
||||
* 11387: Doc/Zsh/options.yo, Src/math.c, Src/options.c,
|
||||
Src/zsh.h: new option OCTAL_ZEROES to enable parsing
|
||||
in 11385, on by default in 'sh' emulation.
|
||||
|
||||
* 11385: Src/math.c: interpret integer constants beginning
|
||||
with '0' as octal to conform to IEEE Std 1003.2-1992
|
||||
(ISO 9945-2:1993).
|
||||
|
|
|
@ -777,6 +777,12 @@ item(tt(NUMERIC_GLOB_SORT))(
|
|||
If numeric filenames are matched by a filename generation pattern,
|
||||
sort the filenames numerically rather than lexicographically.
|
||||
)
|
||||
pindex(OCTAL_ZEROES)
|
||||
cindex(octal, arithmetic expressions)
|
||||
item(tt(OCTAL_ZEROES) <S>)(
|
||||
Interpret any integer constant beginning with a 0 and not
|
||||
as octal, per IEEE Std 1003.2-1992 (ISO 9945-2:1993).
|
||||
)
|
||||
pindex(OVERSTRIKE)
|
||||
cindex(editor, overstrike mode)
|
||||
cindex(overstrike mode, of editor)
|
||||
|
|
|
@ -357,7 +357,8 @@ zzlex(void)
|
|||
yyval.u.l = zstrtol(++ptr, &ptr, lastbase = 16);
|
||||
return NUM;
|
||||
}
|
||||
else if (idigit(*ptr) && (memchr(ptr, '.', strlen(ptr)) == NULL)) {
|
||||
else if (isset(OCTALZEROES) &&
|
||||
(memchr(ptr, '.', strlen(ptr)) == NULL)) {
|
||||
yyval.u.l = zstrtol(ptr, &ptr, lastbase = 8);
|
||||
return NUM;
|
||||
}
|
||||
|
|
|
@ -162,6 +162,7 @@ static struct optname optns[] = {
|
|||
{NULL, "notify", OPT_ZSH, NOTIFY},
|
||||
{NULL, "nullglob", OPT_EMULATE, NULLGLOB},
|
||||
{NULL, "numericglobsort", OPT_EMULATE, NUMERICGLOBSORT},
|
||||
{NULL, "octalzeroes", OPT_EMULATE|OPT_SH, OCTALZEROES},
|
||||
{NULL, "overstrike", 0, OVERSTRIKE},
|
||||
{NULL, "pathdirs", OPT_EMULATE, PATHDIRS},
|
||||
{NULL, "posixbuiltins", OPT_EMULATE|OPT_BOURNE, POSIXBUILTINS},
|
||||
|
|
|
@ -1395,6 +1395,7 @@ enum {
|
|||
NOTIFY,
|
||||
NULLGLOB,
|
||||
NUMERICGLOBSORT,
|
||||
OCTALZEROES,
|
||||
OVERSTRIKE,
|
||||
PATHDIRS,
|
||||
POSIXBUILTINS,
|
||||
|
|
Loading…
Reference in a new issue