summaryrefslogtreecommitdiff
path: root/module/man.m
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-22 20:52:35 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-22 20:52:35 +0000
commit46439007cf417cbd9ac8049bb4122c890097a0fa (patch)
tree6fdb25e5f3a2b6d5657eb23b35774b631d4d97e4 /module/man.m
parent37da2899f40661e3e9631e497da8dc59b971cbd0 (diff)
20060303-partial
Diffstat (limited to 'module/man.m')
-rw-r--r--module/man.m41
1 files changed, 41 insertions, 0 deletions
diff --git a/module/man.m b/module/man.m
new file mode 100644
index 00000000..3da6ad73
--- /dev/null
+++ b/module/man.m
@@ -0,0 +1,41 @@
+Parseman: module {
+ PATH: con "/dis/lib/parseman.dis";
+
+ Metrics: adt {
+ pagew: int;
+ dpi: int;
+ em: int; # size in dots
+ en: int; # size in dots
+ V: int; # font height in dots
+ indent: int;
+ ssindent: int;
+ };
+
+ Text: adt {
+ font: int;
+ attr: int;
+ text: string;
+ heading: int; # heading level
+ link: string;
+ };
+
+ # Text fonts and attributes
+ FONT_ROMAN,
+ FONT_ITALIC,
+ FONT_BOLD: con iota;
+ ATTR_SMALL, ATTR_LAST: con 1 << iota;
+
+ init: fn(): string;
+ parseman: fn[T](fd: ref Sys->FD, metrics: Metrics, ql: int, t: T, setline: chan of list of (int, Text))
+ for{
+ T =>
+ textwidth: fn(t: self T, text: Text): int;
+ };
+};
+
+Man: module {
+ PATH: con "/dis/man.dis";
+
+ loadsections: fn(sections: list of string): string;
+ getfiles: fn(sections: list of string , keys: list of string): list of (int, string, string);
+};