zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: octal in arithmetic expressions
@ 2000-05-15 17:51 Clint Adams
  2000-05-15 18:20 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Clint Adams @ 2000-05-15 17:51 UTC (permalink / raw)
  To: zsh-workers

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 == '.') {


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-05-15 18:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-15 17:51 PATCH: octal in arithmetic expressions Clint Adams
2000-05-15 18:20 ` Peter Stephenson
2000-05-15 18:44   ` Clint Adams

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).