diff options
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | appl/cmd/disk/mkfs.b | 22 | ||||
| -rw-r--r-- | dis/disk/mkfs.dis | bin | 10447 -> 10488 bytes | |||
| -rw-r--r-- | include/version.h | 2 | ||||
| -rw-r--r-- | libnandfs/NOTICE | 24 |
5 files changed, 35 insertions, 15 deletions
@@ -1,3 +1,5 @@ +20100719 + appl/cmd/disk/mkfs.b change getname/getpath to cope with missing newline [issue 236] 20100715 appl/wm/toolbar.b changed not to create new /chan/snarf if one exists, unless -p (private) option given [toolbar(1)] utils/cc/macbody - add overlooked change to implement __VA_ARGS__ diff --git a/appl/cmd/disk/mkfs.b b/appl/cmd/disk/mkfs.b index 4c05fdf6..961332e8 100644 --- a/appl/cmd/disk/mkfs.b +++ b/appl/cmd/disk/mkfs.b @@ -556,35 +556,35 @@ getfile(old: ref File): (ref File, big) getpath(p: string): string { - for(; (c := p[0]) == ' ' || c == '\t'; p = p[1:]) + for(i := 0; i < len p && (p[i] == ' ' || p[i] == '\t'); i++) ; - for(n := 0; (c = p[n]) != '\n' && c != ' ' && c != '\t'; n++) + for(n := i; n < len p && (c := p[n]) != '\n' && c != ' ' && c != '\t'; n++) ; - return p[0:n]; + return p[i:n]; } getname(p: string): (string, string) { - for(; (c := p[0]) == ' ' || c == '\t'; p = p[1:]) + for(i := 0; i < len p && (p[0] == ' ' || p[0] == '\t'); i++) ; - i := 0; s := ""; quoted := 0; - for(; (c = p[0]) != '\n' && (c != ' ' && c != '\t' || quoted); p = p[1:]){ - if(quoted && c == '\'' && p[1] == '\'') - p = p[1:]; - else if(c == '\''){ + for(; i < len p && (c := p[i]) != '\n' && (c != ' ' && c != '\t' || quoted); i++){ + if(c == '\''){ + if(i+1 >= len p || p[i+1] != '\''){ quoted = !quoted; continue; } - s[i++] = c; + i++; + } + s[len s] = c; } if(len s > 0 && s[0] == '$'){ s = getenv(s[1:]); if(s == nil) error(sys->sprint("can't read environment variable %q", s)); } - return (s, p); + return (s, p[i:]); } getenv(s: string): string diff --git a/dis/disk/mkfs.dis b/dis/disk/mkfs.dis Binary files differindex ea8799f3..d6b14b79 100644 --- a/dis/disk/mkfs.dis +++ b/dis/disk/mkfs.dis diff --git a/include/version.h b/include/version.h index 4d44e0f6..aee735a3 100644 --- a/include/version.h +++ b/include/version.h @@ -1 +1 @@ -#define VERSION "Fourth Edition (20100718)" +#define VERSION "Fourth Edition (20100719)" diff --git a/libnandfs/NOTICE b/libnandfs/NOTICE index d8e20618..a9db7f59 100644 --- a/libnandfs/NOTICE +++ b/libnandfs/NOTICE @@ -1,5 +1,23 @@ -Developed 2002, 2003 by Vita Nuova Holdings Limited. +This copyright NOTICE applies to all files in this directory and +subdirectories, unless another copyright notice appears in a given +file or subdirectory. If you take substantial code from this software to use in +other programs, you must somehow include with it an appropriate +copyright notice that includes the copyright notice and the other +notices below. It is fine (and often tidier) to do that in a separate +file such as NOTICE, LICENCE or COPYING. + Copyright © 2002, 2003 Vita Nuova Holdings Limited. -The source and binary code for libnandfs may be used only as part of Inferno, -unless otherwise agreed with Vita Nuova. +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
