X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=util.c;h=4317e937b15c54894fed7e82fa655248ee952f11;hp=7cf781212d9a822241b1348c645a54d489a44643;hb=05966ee00986535f426c5d2229397eab4b15412e;hpb=a5e1f40b85faff802b8471c25ba9eb6f51e98ed5 diff --git a/util.c b/util.c index 7cf7812..4317e93 100644 --- a/util.c +++ b/util.c @@ -33,7 +33,7 @@ struct memblock_t { const char *file; unsigned int line; unsigned int byte; -}; +}; void *util_memory_a(unsigned int byte, unsigned int line, const char *file) { struct memblock_t *info = malloc(sizeof(struct memblock_t) + byte); @@ -127,10 +127,10 @@ char *util_strchp(const char *s, const char *e) { if (!s || !e) return NULL; - const char *c = s; + const char *c = s; while (c != e) c++; - + return util_strdup(s); } @@ -158,7 +158,7 @@ char *util_strsws(const char *skip) { size_t size = 0; if (!skip) return NULL; - + while (*skip == ' ' || *skip == '\t') skip++,size++; return util_strdup(skip-size); @@ -324,7 +324,7 @@ static const uint16_t util_crc16_table[] = { 0x8FD9, 0x9FF8, 0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0 }; - + /* * Implements a CRC function for X worth bits using (uint[X]_t) * as type. and util_crc[X]_table.