zsh-workers
 help / color / mirror / code / Atom feed
* zsh-3.0-pre6 zstrtol broken
@ 1996-08-05 15:53 Risto J Laitinen
  1996-08-12  4:05 ` Zoltan Hidvegi
  0 siblings, 1 reply; 2+ messages in thread
From: Risto J Laitinen @ 1996-08-05 15:53 UTC (permalink / raw)
  To: zsh-workers

>From utils.c:

>   /* Convert string to long.  This function (without the z) *
>    * is contained in the ANSI standard C library, but a lot *
>    * of them seem to be broken.                             */

... and so is zstrtol; it does not skip leading whitespace.

--- Src/utils.c.orig    Sun Aug  4 15:39:19 1996
+++ Src/utils.c Mon Aug  5 14:04:28 1996
@@ -1035,6 +1035,8 @@
 zstrtol(const char *s, char **t, int base)
 {
     long ret = 0;
+
+    while (inblank(*s)) s++;
  
     if (!base)
        if (*s != '0')


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

end of thread, other threads:[~1996-08-12  4:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-08-05 15:53 zsh-3.0-pre6 zstrtol broken Risto J Laitinen
1996-08-12  4:05 ` Zoltan Hidvegi

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).