Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: octal in arithmetic expressions
- X-seq: zsh-workers 11385
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: octal in arithmetic expressions
- Date: Mon, 15 May 2000 13:51:09 -0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-173.html
This should make zsh conform to POSIX in this regard.
Index: Src/math.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/math.c,v
retrieving revision 1.2
diff -u -r1.2 math.c
--- Src/math.c 2000/04/30 17:58:35 1.2
+++ Src/math.c 2000/05/15 17:44:51
@@ -357,6 +357,10 @@
yyval.u.l = zstrtol(++ptr, &ptr, lastbase = 16);
return NUM;
}
+ else if (idigit(*ptr) && (memchr(ptr, '.', strlen(ptr)) == NULL)) {
+ yyval.u.l = zstrtol(ptr, &ptr, lastbase = 8);
+ return NUM;
+ }
/* Fall through! */
default:
if (idigit(*--ptr) || *ptr == '.') {
Messages sorted by:
Reverse Date,
Date,
Thread,
Author