diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-12 19:02:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-12 19:02:10 +0400 |
commit | 2f2b15bbb2a30ee312d65c627d54a12445f4b987 (patch) | |
tree | 7d2d442d5351a04887bbe4aac0f039c3f1d416cd /source/blender/blenlib/intern/BLI_args.c | |
parent | 23c0d49a7c6aacde784843b14d5b3eece7fe61df (diff) |
style cleanup: whitespace, bli & makesdna
Diffstat (limited to 'source/blender/blenlib/intern/BLI_args.c')
-rw-r--r-- | source/blender/blenlib/intern/BLI_args.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/blenlib/intern/BLI_args.c b/source/blender/blenlib/intern/BLI_args.c index ed3c6fad1a0..4e194b24c1e 100644 --- a/source/blender/blenlib/intern/BLI_args.c +++ b/source/blender/blenlib/intern/BLI_args.c @@ -49,7 +49,7 @@ typedef struct bArgDoc { const char *short_arg; const char *long_arg; const char *documentation; - int done; + int done; } bArgDoc; typedef struct bAKey { @@ -68,24 +68,24 @@ typedef struct bArgument { struct bArgs { ListBase docs; GHash *items; - int argc; + int argc; const char **argv; - int *passes; + int *passes; }; static unsigned int case_strhash(const void *ptr) { - const char *s= ptr; - unsigned int i= 0; + const char *s = ptr; + unsigned int i = 0; unsigned char c; - while ( (c= tolower(*s++)) ) - i= i*37 + c; + while ( (c = tolower(*s++)) ) + i = i * 37 + c; return i; } -static unsigned int keyhash(const void *ptr) +static unsigned int keyhash(const void *ptr) { const bAKey *k = ptr; return case_strhash(k->arg); // ^ BLI_ghashutil_inthash((void*)k->pass); @@ -102,7 +102,7 @@ static int keycmp(const void *a, const void *b) return strcmp(ka->arg, kb->arg); } else { - return BLI_ghashutil_intcmp((const void*)ka->pass, (const void*)kb->pass); + return BLI_ghashutil_intcmp((const void *)ka->pass, (const void *)kb->pass); } } @@ -182,8 +182,8 @@ static void internalAdd(struct bArgs *ba, const char *arg, int pass, int case_st if (a) { printf("WARNING: conflicting argument\n"); - printf("\ttrying to add '%s' on pass %i, %scase sensitive\n", arg, pass, case_str == 1? "not ": ""); - printf("\tconflict with '%s' on pass %i, %scase sensitive\n\n", a->key->arg, (int)a->key->pass, a->key->case_str == 1? "not ": ""); + printf("\ttrying to add '%s' on pass %i, %scase sensitive\n", arg, pass, case_str == 1 ? "not " : ""); + printf("\tconflict with '%s' on pass %i, %scase sensitive\n\n", a->key->arg, (int)a->key->pass, a->key->case_str == 1 ? "not " : ""); } a = MEM_callocN(sizeof(bArgument), "bArgument"); @@ -259,9 +259,9 @@ void BLI_argsParse(struct bArgs *ba, int pass, BA_ArgCallback default_cb, void * { int i = 0; - for ( i = 1; i < ba->argc; i++) { /* skip argv[0] */ + for (i = 1; i < ba->argc; i++) { /* skip argv[0] */ if (ba->passes[i] == 0) { - /* -1 signal what side of the comparison it is */ + /* -1 signal what side of the comparison it is */ bArgument *a = lookUp(ba, ba->argv[i], pass, -1); BA_ArgCallback func = NULL; void *data = NULL; |