History

20100719-2257

forsyth committed 16 years ago

Commit 5c8f9fd1 parent 4bd9ce15 files · +34 −14Browse files

Unified · Split

5 files
  1. CHANGES +2 −0
  2. appl/cmd/disk/mkfs.b +11 −11
  3. dis/disk/mkfs.dis +0 −0
  4. include/version.h +1 −1
  5. libnandfs/NOTICE +21 −3
CHANGES+2−0
@@ -1,3 +1,5 @@
120100719
2 appl/cmd/disk/mkfs.b change getname/getpath to cope with missing newline [issue 236]
120100715320100715
2 appl/wm/toolbar.b changed not to create new /chan/snarf if one exists, unless -p (private) option given [toolbar(1)]4 appl/wm/toolbar.b changed not to create new /chan/snarf if one exists, unless -p (private) option given [toolbar(1)]
3 utils/cc/macbody - add overlooked change to implement __VA_ARGS__5 utils/cc/macbody - add overlooked change to implement __VA_ARGS__
appl/cmd/disk/mkfs.b+11−11
@@ -556,35 +556,35 @@ getfile(old: ref File): (ref File, big) · 555 unmodified lines
556 556
557getpath(p: string): string557getpath(p: string): string
558{558{
559 for(; (c := p[0]) == ' ' || c == '\t'; p = p[1:])559 for(i := 0; i < len p && (p[i] == ' ' || p[i] == '\t'); i++)
560 ;560 ;
561 for(n := 0; (c = p[n]) != '\n' && c != ' ' && c != '\t'; n++)561 for(n := i; n < len p && (c := p[n]) != '\n' && c != ' ' && c != '\t'; n++)
562 ;562 ;
563 return p[0:n];563 return p[i:n];
564}564}
565 565
566getname(p: string): (string, string)566getname(p: string): (string, string)
567{567{
568 for(; (c := p[0]) == ' ' || c == '\t'; p = p[1:])568 for(i := 0; i < len p && (p[0] == ' ' || p[0] == '\t'); i++)
569 ;569 ;
570 i := 0;
571 s := "";570 s := "";
572 quoted := 0;571 quoted := 0;
573 for(; (c = p[0]) != '\n' && (c != ' ' && c != '\t' || quoted); p = p[1:]){572 for(; i < len p && (c := p[i]) != '\n' && (c != ' ' && c != '\t' || quoted); i++){
574 if(quoted && c == '\'' && p[1] == '\'')573 if(c == '\''){
575 p = p[1:];574 if(i+1 >= len p || p[i+1] != '\''){
576 else if(c == '\''){
577 quoted = !quoted;575 quoted = !quoted;
578 continue;576 continue;
579 }577 }
580 s[i++] = c;578 i++;
579 }
580 s[len s] = c;
581 }581 }
582 if(len s > 0 && s[0] == '$'){582 if(len s > 0 && s[0] == '$'){
583 s = getenv(s[1:]);583 s = getenv(s[1:]);
584 if(s == nil)584 if(s == nil)
585 error(sys->sprint("can't read environment variable %q", s));585 error(sys->sprint("can't read environment variable %q", s));
586 }586 }
587 return (s, p);587 return (s, p[i:]);
588}588}
589 589
590getenv(s: string): string590getenv(s: string): string
dis/disk/mkfs.dis+0−0

Binary file not shown.

include/version.h+1−1
@@ -1 +1 @@
1#define VERSION "Fourth Edition (20100718)"1#define VERSION "Fourth Edition (20100719)"
libnandfs/NOTICE+21−3
@@ -1,5 +1,23 @@
1Developed 2002, 2003 by Vita Nuova Holdings Limited.1This copyright NOTICE applies to all files in this directory and
2subdirectories, unless another copyright notice appears in a given
3file or subdirectory. If you take substantial code from this software to use in
4other programs, you must somehow include with it an appropriate
5copyright notice that includes the copyright notice and the other
6notices below. It is fine (and often tidier) to do that in a separate
7file such as NOTICE, LICENCE or COPYING.
8
2Copyright © 2002, 2003 Vita Nuova Holdings Limited.9Copyright © 2002, 2003 Vita Nuova Holdings Limited.
3 10
4The source and binary code for libnandfs may be used only as part of Inferno,11This program is free software; you can redistribute it and/or modify
5unless otherwise agreed with Vita Nuova.12it under the terms of the GNU General Public License as published by
13the Free Software Foundation; either version 2 of the License, or
14(at your option) any later version.
15
16This program is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19GNU General Public License for more details.
20
21You should have received a copy of the GNU General Public License
22along with this program; if not, write to the Free Software
23Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.