diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
| commit | 37da2899f40661e3e9631e497da8dc59b971cbd0 (patch) | |
| tree | cbc6d4680e347d906f5fa7fca73214418741df72 /appl/cmd/manufacture.b | |
| parent | 54bc8ff236ac10b3eaa928fd6bcfc0cdb2ba46ae (diff) | |
20060303a
Diffstat (limited to 'appl/cmd/manufacture.b')
| -rw-r--r-- | appl/cmd/manufacture.b | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/appl/cmd/manufacture.b b/appl/cmd/manufacture.b new file mode 100644 index 00000000..7be96de3 --- /dev/null +++ b/appl/cmd/manufacture.b @@ -0,0 +1,42 @@ +implement Manufacture; + +include "sys.m"; +FD, Dir: import Sys; +sys: Sys; + +include "draw.m"; +draw: Draw; +Context, Display, Font, Screen, Image, Point, Rect: import draw; + +Manufacture: module +{ + init: fn(ctxt: ref Context, argv: list of string); +}; + +stderr: ref FD; + +init(nil: ref Context, argv: list of string) +{ + s: string; + argv0: string; + + argv0 = hd argv; + argv = tl argv; + sys = load Sys Sys->PATH; + + stderr = sys->fildes(2); + + fd := sys->create("/nvfs/ID", sys->OWRITE, 8r666); + if(fd == nil){ + sys->fprint(stderr, "manufacture: can't create /nvfs/ID: %r\n"); + return; + } + + while(argv != nil) { + s = hd argv; + sys->fprint(fd, "%s", s); + argv = tl argv; + if(argv != nil) + sys->fprint(fd, " "); + } +} |
