X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=st.c;h=91eb2cc667a4f0fb8f11395b26ec269f2809898b;hb=2738592de6d1b53e1f5aa896c8fd3bb5a4204749;hp=ee8dc94082e6f14c3d077e5c7f65fae7e4e4186f;hpb=4435e0ee6791136e641d58ce6cf00f8665fe3065;p=st.git diff --git a/st.c b/st.c index ee8dc94..91eb2cc 100644 --- a/st.c +++ b/st.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -180,8 +181,8 @@ typedef unsigned short ushort; typedef struct { char c[UTF_SIZ]; /* character code */ ushort mode; /* attribute flags */ - ulong fg; /* foreground */ - ulong bg; /* background */ + uint32_t fg; /* foreground */ + uint32_t bg; /* background */ } Glyph; typedef Glyph *Line; @@ -379,7 +380,7 @@ static void tsetdirtattr(int); static void tsetmode(bool, bool, int *, int); static void tfulldirt(void); static void techo(char *, int); -static long tdefcolor(int *, int *, int); +static int32_t tdefcolor(int *, int *, int); static void tselcs(void); static void tdeftran(char); static inline bool match(uint, uint); @@ -1666,9 +1667,9 @@ tdeleteline(int n) { tscrollup(term.c.y, n); } -long +int32_t tdefcolor(int *attr, int *npar, int l) { - long idx = -1; + int32_t idx = -1; uint r, g, b; switch (attr[*npar + 1]) { @@ -1717,7 +1718,7 @@ tdefcolor(int *attr, int *npar, int l) { void tsetattr(int *attr, int l) { int i; - long idx; + int32_t idx; for(i = 0; i < l; i++) { switch(attr[i]) {