all repos — st @ 289c52b7aa9b0e826bbea6f956755b3199b3ccac

st (suckless terminal) config

CSIEscape, STREscape: use size_t for buffer length
Hiltjo Posthuma hiltjo@codemadness.org
commit

289c52b7aa9b0e826bbea6f956755b3199b3ccac

parent

7ceb3d1f72eabfa678e5cfae176c57630ad98c43

1 files changed, 4 insertions(+), 4 deletions(-)

jump to
M st.cst.c

@@ -135,7 +135,7 @@ /* CSI Escape sequence structs */

/* ESC '[' [[ [<priv>] <arg> [;]] <mode> [<mode>]] */ typedef struct { char buf[ESC_BUF_SIZ]; /* raw string */ - int len; /* raw string length */ + size_t len; /* raw string length */ char priv; int arg[ESC_ARG_SIZ]; int narg; /* nb of args */

@@ -147,7 +147,7 @@ /* ESC type [[ [<priv>] <arg> [;]] <mode>] ESC '\' */

typedef struct { char type; /* ESC type ... */ char buf[STR_BUF_SIZ]; /* raw string */ - int len; /* raw string length */ + size_t len; /* raw string length */ char *args[STR_ARG_SIZ]; int narg; /* nb of args */ } STREscape;

@@ -1803,7 +1803,7 @@

void csidump(void) { - int i; + size_t i; uint c; fprintf(stderr, "ESC[");

@@ -1921,7 +1921,7 @@

void strdump(void) { - int i; + size_t i; uint c; fprintf(stderr, "ESC%c", strescseq.type);