diff options
author | rsc <devnull@localhost> | 2005-03-18 19:30:22 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-03-18 19:30:22 +0000 |
commit | 7c709434eccd461a3f3c522df6224adf4e50a8da (patch) | |
tree | 07824349dbc0e919ab411b254cca583e5f6feb7d /src/cmd/netfiles/acme.h | |
parent | 72fd2f881907db5e367ffee1fcecb737c44a0090 (diff) | |
download | plan9port-7c709434eccd461a3f3c522df6224adf4e50a8da.tar.gz plan9port-7c709434eccd461a3f3c522df6224adf4e50a8da.tar.bz2 plan9port-7c709434eccd461a3f3c522df6224adf4e50a8da.zip |
new files
Diffstat (limited to 'src/cmd/netfiles/acme.h')
-rw-r--r-- | src/cmd/netfiles/acme.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/src/cmd/netfiles/acme.h b/src/cmd/netfiles/acme.h new file mode 100644 index 00000000..50997e97 --- /dev/null +++ b/src/cmd/netfiles/acme.h @@ -0,0 +1,82 @@ +typedef struct Event Event; +typedef struct Win Win; + +#define EVENTSIZE 256 +struct Event +{ + int c1; + int c2; + int oq0; + int oq1; + int q0; + int q1; + int flag; + int nb; + int nr; + char text[EVENTSIZE*UTFmax+1]; + char arg[EVENTSIZE*UTFmax+1]; + char loc[EVENTSIZE*UTFmax+1]; +}; + +struct Win +{ + int id; + CFid *ctl; + CFid *tag; + CFid *body; + CFid *addr; + CFid *event; + CFid *data; + CFid *xdata; + Channel *c; /* chan(Event) */ + Win *next; + Win *prev; + + /* events */ + int nbuf; + char name[1024]; + char buf[1024]; + char *bufp; + jmp_buf jmp; + Event e2; + Event e3; + Event e4; +}; + +Win *newwin(void); + +int eventfmt(Fmt*); +int pipewinto(Win *w, char *name, int, char *fmt, ...); +int pipetowin(Win *w, char *name, int, char *fmt, ...); +char *sysrun(int errto, char*, ...); +int winaddr(Win *w, char *fmt, ...); +int winctl(Win *w, char *fmt, ...); +int windel(Win *w, int sure); +int winfd(Win *w, char *name, int); +char *winmread(Win *w, char *file); +int winname(Win *w, char *fmt, ...); +int winprint(Win *w, char *name, char *fmt, ...); +int winread(Win *w, char *file, void *a, int n); +int winseek(Win *w, char *file, int n, int off); +int winreadaddr(Win *w, uint*); +int winreadevent(Win *w, Event *e); +int winwrite(Win *w, char *file, void *a, int n); +int winwriteevent(Win *w, Event *e); +int winopenfd(Win *w, char *name, int mode); +void windeleteall(void); +void winfree(Win *w); +void winclosefiles(Win *w); +Channel *wineventchan(Win *w); +char *winindex(void); +void mountacme(void); +char *wingetname(Win *w); + +void *erealloc(void*, uint); +void *emalloc(uint); +char *estrdup(char*); +char *evsmprint(char*, va_list); + +int twait(int); +void twaitinit(void); + +extern Win *windows; |