Fixed whitespace

This commit is contained in:
Dale Weiler 2013-06-14 21:36:16 +00:00
parent 3e75750ad6
commit 8afd373e4f
10 changed files with 26 additions and 26 deletions

6
code.c
View file

@ -29,7 +29,7 @@
* or qcint; however, it's incredibly unsafe for two reasons.
* 1) The compilers aliasing optimization can legally make it unstable
* (it's undefined behaviour).
*
*
* 2) The cast itself depends on fresh storage (newly allocated in which
* ever function is using the cast macros), the contents of which are
* transferred in a way that the obligation to release storage is not
@ -172,7 +172,7 @@ static void code_create_header(code_t *code, prog_header *code_header) {
/*
* These are not part of the header but we ensure LE format here to save on duplicated
* code.
*/
*/
util_endianswap(code->statements, vec_size(code->statements), sizeof(prog_section_statement));
util_endianswap(code->defs, vec_size(code->defs), sizeof(prog_section_def));
util_endianswap(code->fields, vec_size(code->fields), sizeof(prog_section_field));
@ -184,7 +184,7 @@ static void code_create_header(code_t *code, prog_header *code_header) {
* Same principle except this one allocates memory and writes the lno(optional) and the dat file
* directly out to allocated memory. Which is actually very useful for the future library support
* we're going to add.
*/
*/
bool code_write_memory(code_t *code, uint8_t **datmem, size_t *sizedat, uint8_t **lnomem, size_t *sizelno) {
prog_header code_header;
uint32_t offset = 0;

View file

@ -28,7 +28,7 @@ char value(char c) {
int security_decode(unsigned char *dest, const unsigned char *src, int srclen) {
unsigned char *p;
if(!*src)
if(!*src)
return 0;
*dest = 0;
@ -42,11 +42,11 @@ int security_decode(unsigned char *dest, const unsigned char *src, int srclen) {
if(!isbase64(src[1])) {
p -= 2;
break;
}
}
else if(!isbase64(src[2])) {
p -= 2;
break;
}
}
else if(!isbase64(src[3])) {
p--;
break;
@ -67,7 +67,7 @@ int security_decode(unsigned char *dest, const unsigned char *src, int srclen) {
* If more platforms are supported add the entries between the start
* tag here, and the end tag below. Nothing else needs to be done
* <tag> (the table needs to match the HTML too)
*/
*/
#define ARCHLINUX_32_REF "%sgmqcc-%c.%c.%c-1-i686.pkg.tar.xz%s"
#define ARCHLINUX_64_REF "%sgmqcc-%c.%c.%c-1-x86_64.pkg.tar.xz%s"
#define DEBIAN_32_REF "%sgmqcc-%c.%c.%c-i686.deb%s"
@ -155,7 +155,7 @@ void escape(url_t *str) {
char hexstr[3];
unsigned int i=0;
unsigned long l=0;
p = str->data;
for(i=0; i < str->len; i++) {
if((p - str->data) >= str->len)
@ -235,7 +235,7 @@ void genhtml() {
/*
* Builds a list of download links with the right version and handles the
* rest of the magic.
*/
*/
void build(const char *directory) {
/* Figure out version number */
char find[3];

16
exec.c
View file

@ -172,7 +172,7 @@ const char* prog_getstring(qc_program *prog, qcint str) {
/* cast for return required for C++ */
if (str < 0 || str >= (qcint)vec_size(prog->strings))
return "<<<invalid string>>>";
return prog->strings + str;
}
@ -760,7 +760,7 @@ static int qc_strcat(qc_program *prog) {
size_t len1, len2;
qcany *str1, *str2;
qcany out;
const char *cstr1;
const char *cstr2;
@ -786,7 +786,7 @@ static int qc_strcmp(qc_program *prog) {
const char *cstr1;
const char *cstr2;
if (prog->argc != 2 && prog->argc != 3) {
fprintf(stderr, "ERROR: invalid number of arguments for strcmp/strncmp: %i, expected 2 or 3\n",
prog->argc);
@ -905,19 +905,19 @@ void escapestring(char* dest, const char* src) {
char c;
while ((c = *(src++))) {
switch(c) {
case '\t':
case '\t':
*(dest++) = '\\', *(dest++) = 't';
break;
case '\n':
case '\n':
*(dest++) = '\\', *(dest++) = 'n';
break;
case '\r':
case '\r':
*(dest++) = '\\', *(dest++) = 'r';
break;
case '\\':
case '\\':
*(dest++) = '\\', *(dest++) = '\\';
break;
case '\"':
case '\"':
*(dest++) = '\\', *(dest++) = '\"';
break;
default:

View file

@ -189,7 +189,7 @@ static char *ftepp_predef_timestamp(lex_file *context) {
/*
* ctime and its fucking annoying newline char, no worries, we're
* professionals here.
*/
*/
find = ctime(&finfo.st_mtime);
value = (char*)mem_a(strlen(find) + 1);
memcpy(&value[1], find, (size = strlen(find)) - 1);

View file

@ -721,7 +721,7 @@ typedef struct {
* code_genstrin -- generates string for code
* code_alloc_field -- allocated a field
* code_push_statement -- keeps statements and linenumbers together
* code_pop_statement -- keeps statements and linenumbers together
* code_pop_statement -- keeps statements and linenumbers together
*/
bool code_write (code_t *, const char *filename, const char *lno);
GMQCC_WARN

2
ir.h
View file

@ -281,7 +281,7 @@ void ir_builder_dump(ir_builder*, int (*oprintf)(const char*, ...));
/*
* This code assumes 32 bit floats while generating binary
* Blub: don't use extern here, it's annoying and shows up in nm
* for some reason :P
* for some reason :P
*/
typedef int static_assert_is_32bit_float [(sizeof(int32_t) == 4)?1:-1];
typedef int static_assert_is_32bit_integer[(sizeof(qcfloat) == 4)?1:-1];

View file

@ -172,7 +172,7 @@ static void lex_token_new(lex_file *lex)
#else
if (lex->tok.value)
vec_shrinkto(lex->tok.value, 0);
lex->tok.constval.t = 0;
lex->tok.ctx.line = lex->sline;
lex->tok.ctx.file = lex->name;
@ -298,7 +298,7 @@ static int lex_try_trigraph(lex_file *lex, int old)
lex->line++;
lex->column = 0;
}
if (c2 != '?') {
lex_ungetch(lex, c2);
return old;
@ -309,7 +309,7 @@ static int lex_try_trigraph(lex_file *lex, int old)
lex->line++;
lex->column = 0;
}
switch (c3) {
case '=': return '#';
case '/': return '\\';

2
pak.c
View file

@ -556,7 +556,7 @@ int main(int argc, char **argv) {
pak_close(pak);
vec_free(files);
stat_info();
return EXIT_SUCCESS;
}

View file

@ -4339,7 +4339,7 @@ static bool parse_function_body(parser_t *parser, ast_value *var)
}
vec_push(func->blocks, block);
parser->function = old;
if (!parser_leaveblock(parser))

2
util.c
View file

@ -321,7 +321,7 @@ int util_asprintf(char **ret, const char *fmt, ...) {
allocated = (char*)mem_a(4096); /* A page must be enough */
strerror_s(allocated, 4096, num);
vec_push(vector, allocated);
return (const char *)allocated;
}