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/disk/prep/pedit.m | |
| parent | 54bc8ff236ac10b3eaa928fd6bcfc0cdb2ba46ae (diff) | |
20060303a
Diffstat (limited to 'appl/cmd/disk/prep/pedit.m')
| -rw-r--r-- | appl/cmd/disk/prep/pedit.m | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/appl/cmd/disk/prep/pedit.m b/appl/cmd/disk/prep/pedit.m new file mode 100644 index 00000000..2b0d142d --- /dev/null +++ b/appl/cmd/disk/prep/pedit.m @@ -0,0 +1,53 @@ +Pedit: module +{ + PATH: con "/dis/disk/pedit.dis"; + + Part: adt { + name: string; + ctlname: string; + start: big; + end: big; + ctlstart: big; + ctlend: big; + changed: int; + tag: int; + }; + + Maxpart: con 32; + + Edit: adt { + disk: ref Disks->Disk; + + ctlpart: array of ref Part; + part: array of ref Part; + + # to do: replace by channels + add: ref fn(e: ref Edit, s: string, a, b: big): string; + del: ref fn(e: ref Edit, p: ref Part): string; + ext: ref fn(e: ref Edit, f: array of string): string; + help: ref fn(e: ref Edit): string; + okname: ref fn(e: ref Edit, s: string): string; + sum: ref fn(e: ref Edit, p: ref Part, a, b: big); + write: ref fn(e: ref Edit): string; + printctl: ref fn(e: ref Edit, x: ref Sys->FD); + + unit: string; + dot: big; + end: big; + + # do not use fields below this line + changed: int; + warned: int; + lastcmd: int; + + mk: fn(unit: string): ref Edit; + getline: fn(e: self ref Edit): string; + runcmd: fn(e: self ref Edit, c: string); + findpart: fn(e: self ref Edit, n: string): ref Part; + addpart: fn(e: self ref Edit, p: ref Part): string; + delpart: fn(e: self ref Edit, p: ref Part): string; + ctldiff: fn(e: self ref Edit, ctlfd: ref Sys->FD): int; + }; + + init: fn(); +}; |
