X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=st.h;h=0bd2c4e535e4452a4031cf5b97ac6f79f7424e5a;hb=8b4bfe31ec1075316dbb2e7d21753771ae3e5590;hp=87db5c218ddb83d19a9cd9c7477421e6d5db2b54;hpb=abe6f3b0e4a76ff80315cf6e958549e8295737d6;p=st.git diff --git a/st.h b/st.h index 87db5c2..0bd2c4e 100644 --- a/st.h +++ b/st.h @@ -1,16 +1,19 @@ /* See LICENSE for licence details. */ #define _XOPEN_SOURCE #include +#include #include #include #include #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -52,6 +55,7 @@ static char* colorname[] = { #define ESCSIZ 256 #define ESCARG 16 +#define SERRNO strerror(errno) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) < (b) ? (b) : (a)) #define LEN(a) (sizeof(a) / sizeof(a[0])) @@ -63,9 +67,11 @@ static char* colorname[] = { enum { ATnone=0 , ATreverse=1 , ATunderline=2, ATbold=4 }; /* Attribute */ enum { CSup, CSdown, CSright, CSleft, CShide, CSdraw, CSwrap, CSsave, CSload }; /* Cursor */ enum { CRset=1 , CRupdate=2 }; /* Character state */ -enum { TMwrap=1 , TMinsert=2 }; /* Terminal mode */ +enum { TMwrap=1 , TMinsert=2, TMaltcharset }; /* Terminal mode */ enum { SCupdate, SCredraw }; /* screen draw mode */ +typedef int Color; + typedef struct { char c; /* character code */ char mode; /* attribute flags */ @@ -128,6 +134,7 @@ typedef struct { void die(const char *errstr, ...); void draw(int); void execsh(void); +void sigchld(int); void kpress(XKeyEvent *); void resize(XEvent *); void run(void);