aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/htmlroff/a.h
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-02-21 18:37:05 +0000
committerrsc <devnull@localhost>2006-02-21 18:37:05 +0000
commitc42a1d3d6168df56f966ea1f3ba3ef39ebbff4e4 (patch)
tree400f263e56681842ba1e6e1fdd8be453856474ef /src/cmd/htmlroff/a.h
parent49a1496cbbb871bc623cfd0925566628e246c9ba (diff)
downloadplan9port-c42a1d3d6168df56f966ea1f3ba3ef39ebbff4e4.tar.gz
plan9port-c42a1d3d6168df56f966ea1f3ba3ef39ebbff4e4.tar.bz2
plan9port-c42a1d3d6168df56f966ea1f3ba3ef39ebbff4e4.zip
add
Diffstat (limited to 'src/cmd/htmlroff/a.h')
-rw-r--r--src/cmd/htmlroff/a.h148
1 files changed, 148 insertions, 0 deletions
diff --git a/src/cmd/htmlroff/a.h b/src/cmd/htmlroff/a.h
new file mode 100644
index 00000000..c17da850
--- /dev/null
+++ b/src/cmd/htmlroff/a.h
@@ -0,0 +1,148 @@
+#include <u.h>
+#include <libc.h>
+#include <bio.h>
+#include <ctype.h>
+
+enum
+{
+ Unbsp = 0x00A0,
+ Uprivate = 0xF000,
+ Uempty, /* \& */
+ Uamp, /* raw & */
+ Ult, /* raw < */
+ Ugt, /* raw > */
+ Utick, /* raw ' */
+ Ubtick, /* raw ` */
+ Uminus, /* raw - */
+ Uspace, /* raw space */
+ Upl, /* symbol + */
+ Ueq, /* symbol = */
+ Umi, /* symbol - */
+ Uformatted, /* start diverted output */
+ Uunformatted, /* end diverted output */
+
+ UPI = 720, /* units per inch */
+ UPX = 10, /* units per pixel */
+
+ /* special input modes */
+ CopyMode = 1<<1,
+ ExpandMode = 1<<2,
+ ArgMode = 1<<3,
+ HtmlMode = 1<<4,
+
+ MaxLine = 1024,
+};
+
+Rune* L(char*);
+
+void addesc(Rune, int (*)(void), int);
+void addraw(Rune*, void(*)(Rune*));
+void addreq(Rune*, void(*)(int, Rune**), int);
+void af(Rune*, Rune*);
+void as(Rune*, Rune*);
+void br(void);
+void closehtml(void);
+Rune* copyarg(void);
+void delraw(Rune*);
+void delreq(Rune*);
+void ds(Rune*, Rune*);
+int dv(int);
+int e_nop(void);
+int e_warn(void);
+void* emalloc(uint);
+void* erealloc(void*, uint);
+Rune* erunesmprint(char*, ...);
+Rune* erunestrdup(Rune*);
+char* esmprint(char*, ...);
+char* estrdup(char*);
+int eval(Rune*);
+int evalscale(Rune*, int);
+Rune* getname(void);
+int getnext(void);
+Rune* getds(Rune*);
+Rune* _getnr(Rune*);
+int getnr(Rune*);
+int getnrr(Rune*);
+int getrune(void);
+Rune* getqarg(void);
+Rune* getline(void);
+void hideihtml(void);
+void html(Rune*, Rune*);
+void htmlinit(void);
+void ihtml(Rune*, Rune*);
+void inputnotify(void(*)(void));
+void itrap(void);
+void itrapset(void);
+int linefmt(Fmt*);
+void nr(Rune*, int);
+void _nr(Rune*, Rune*);
+void out(Rune*);
+void (*outcb)(Rune);
+void outhtml(Rune*);
+void outrune(Rune);
+void outtrap(void);
+int popinput(void);
+void printds(int);
+int pushinputfile(Rune*);
+void pushinputstring(Rune*);
+int pushstdin(void);
+int queueinputfile(Rune*);
+int queuestdin(void);
+void r_nop(int, Rune**);
+void r_warn(int, Rune**);
+Rune *readline(int);
+void reitag(void);
+void renraw(Rune*, Rune*);
+void renreq(Rune*, Rune*);
+void run(void);
+void runinput(void);
+int runmacro(int, int, Rune**);
+void runmacro1(Rune*);
+Rune* rune2html(Rune);
+void setlinenumber(Rune*, int);
+void showihtml(void);
+void sp(int);
+void t1init(void);
+void t2init(void);
+void t3init(void);
+void t4init(void);
+void t5init(void);
+void t6init(void);
+void t7init(void);
+void t8init(void);
+void t9init(void);
+void t10init(void);
+void t11init(void);
+void t12init(void);
+void t13init(void);
+void t14init(void);
+void t15init(void);
+void t16init(void);
+void t17init(void);
+void t18init(void);
+void t19init(void);
+void t20init(void);
+Rune troff2rune(Rune*);
+void unfont(void);
+void ungetnext(Rune);
+void ungetrune(Rune);
+void unitag(void);
+void warn(char*, ...);
+
+extern int backslash;
+extern int bol;
+extern Biobuf bout;
+extern int broke;
+extern int dot;
+extern int inputmode;
+extern int inrequest;
+extern int tick;
+extern int utf8;
+extern int verbose;
+extern int linepos;
+
+#define runemalloc(n) (Rune*)emalloc((n)*sizeof(Rune))
+#define runerealloc(r, n) (Rune*)erealloc(r, (n)*sizeof(Rune))
+#define runemove(a, b, n) memmove(a, b, (n)*sizeof(Rune))
+
+#pragma varargck type "L" void