zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <schizo@debian.org>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: octal in arithmetic expressions
Date: Mon, 15 May 2000 13:51:09 -0400	[thread overview]
Message-ID: <20000515135109.A31551@scowler.net> (raw)

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


             reply	other threads:[~2000-05-15 17:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-15 17:51 Clint Adams [this message]
2000-05-15 18:20 ` Peter Stephenson
2000-05-15 18:44   ` Clint Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000515135109.A31551@scowler.net \
    --to=schizo@debian.org \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).