diff options
| author | rsc <devnull@localhost> | 2004-03-21 04:27:09 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2004-03-21 04:27:09 +0000 |
| commit | ba9ffa53c4825e115078ed098205d75aa7a77eb0 (patch) | |
| tree | 71eb317adfc49db799835be8e8174a9a2de7f7cc /src/cmd/9term/9term.h | |
| parent | eacbfb241a03515c451bd59a79e905eedcfd7243 (diff) | |
| download | plan9port-ba9ffa53c4825e115078ed098205d75aa7a77eb0.tar.gz plan9port-ba9ffa53c4825e115078ed098205d75aa7a77eb0.zip | |
Change 9term to look like rio windows, not acme windows.
Diffstat (limited to 'src/cmd/9term/9term.h')
| -rw-r--r-- | src/cmd/9term/9term.h | 109 |
1 files changed, 2 insertions, 107 deletions
diff --git a/src/cmd/9term/9term.h b/src/cmd/9term/9term.h index 705648aa..4e8d61f3 100644 --- a/src/cmd/9term/9term.h +++ b/src/cmd/9term/9term.h @@ -14,111 +14,6 @@ #include <pty.h> #endif -#define fatal sysfatal +extern int getchildwd(int, char*, int); +extern int getpts(int[], char*); -typedef struct Text Text; -typedef struct Readbuf Readbuf; - -enum -{ - /* these are chosen to use malloc()'s properties well */ - HiWater = 640000, /* max size of history */ - LoWater = 330000, /* min size of history after max'ed */ -}; - -/* various geometric paramters */ -enum -{ - Scrollwid = 12, /* width of scroll bar */ - Scrollgap = 4, /* gap right of scroll bar */ - Maxtab = 4, -}; - -enum -{ - Cut, - Paste, - Snarf, - Send, - Scroll, - Plumb, -}; - - -#define SCROLLKEY Kdown -#define ESC 0x1B -#define CUT 0x18 /* ctrl-x */ -#define COPY 0x03 /* crtl-c */ -#define PASTE 0x16 /* crtl-v */ -#define BACKSCROLLKEY Kup - -#define READBUFSIZE 8192 - -struct Text -{ - Frame *f; /* frame ofr terminal */ - Mouse m; - uint nr; /* num of runes in term */ - Rune *r; /* runes for term */ - uint nraw; /* num of runes in raw buffer */ - Rune *raw; /* raw buffer */ - uint org; /* first rune on the screen */ - uint q0; /* start of selection region */ - uint q1; /* end of selection region */ - uint qh; /* unix point */ - int npart; /* partial runes read from console */ - char part[UTFmax]; - int nsnarf; /* snarf buffer */ - Rune *snarf; -}; - -struct Readbuf -{ - short n; /* # bytes in buf */ - uchar data[READBUFSIZE]; /* data bytes */ -}; - -void mouse(void); -void domenu2(int); -void loop(void); -void geom(void); -void fill(void); -void tcheck(void); -void updatesel(void); -void doreshape(void); -void rcstart(int fd[2], int, char**); -void runewrite(Rune*, int); -void consread(void); -void conswrite(char*, int); -int bswidth(Rune c); -void cut(void); -void paste(Rune*, int, int); -void snarfupdate(void); -void snarf(void); -void show(uint); -void key(Rune); -void setorigin(uint org, int exact); -uint line2q(uint); -uint backnl(uint, uint); -int cansee(uint); -uint backnl(uint, uint); -void addraw(Rune*, int); -void mselect(void); -void doubleclick(uint *q0, uint *q1); -int clickmatch(int cl, int cr, int dir, uint *q); -Rune *strrune(Rune *s, Rune c); -int consready(void); -Rectangle scrpos(Rectangle r, ulong p0, ulong p1, ulong tot); -void scrdraw(void); -void scroll(int); -void hostproc(void *arg); -void hoststart(void); -int getchildwd(int, char*, int); -void plumbstart(void); -void plumb(uint, uint); -void plumbclick(uint*, uint*); -int getpts(int fd[], char *slave); - -#define runemalloc(n) malloc((n)*sizeof(Rune)) -#define runerealloc(a, n) realloc(a, (n)*sizeof(Rune)) -#define runemove(a, b, n) memmove(a, b, (n)*sizeof(Rune)) |
