From 37da2899f40661e3e9631e497da8dc59b971cbd0 Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Fri, 22 Dec 2006 17:07:39 +0000 Subject: 20060303a --- appl/cmd/disk/prep/pedit.m | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 appl/cmd/disk/prep/pedit.m (limited to 'appl/cmd/disk/prep/pedit.m') 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(); +}; -- cgit v1.2.3