summaryrefslogtreecommitdiff
authorPekka Paalanen <ppaalanen@gmail.com>2012-08-22 06:46:37 (GMT)
committer Pekka Paalanen <ppaalanen@gmail.com>2012-08-22 07:12:37 (GMT)
commit9c1ffea5a9e4557a89a0643a9d9496a967a5e120 (patch) (side-by-side diff)
treea6535cfb869d093ed90e11eae6f39cbfbdba5bd9
parent6510ea15b2538443fc26329b0e2c58bcef43d986 (diff)
downloadandrogenizer-9c1ffea5a9e4557a89a0643a9d9496a967a5e120.tar.gz
androgenizer-9c1ffea5a9e4557a89a0643a9d9496a967a5e120.tar.bz2
options: fix indentation from the previous commit
Purely whitespace changes.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--options.c200
1 files changed, 100 insertions, 100 deletions
diff --git a/options.c b/options.c
index b57427c..ef84730 100644
--- a/options.c
+++ b/options.c
@@ -538,107 +538,107 @@ struct project *options_parse(int argc, char **args)
continue;
}
- if (skip) {
- skip = 0;
- continue;
- }
+ if (skip) {
+ skip = 0;
+ continue;
+ }
- switch (mode) {
- case MODE_UNDEFINED:
- die("Androgenizer arguments must start with a valid -: switch, like -:PROJECT.");
- break;
- case MODE_PROJECT:
- p = new_project(arg, SCRIPT_SUBDIRECTORY, bt);
- break;
- case MODE_SUBDIR:
- if (!p)
- die("-:PROJECT must come before -:SUBDIR");
- add_subdir(p, arg);
- break;
- case MODE_SHARED:
- case MODE_STATIC:
- case MODE_EXECUTABLE:
- case MODE_HOST_SHARED:
- case MODE_HOST_STATIC:
- case MODE_HOST_EXECUTABLE:
- if (!p)
- die("-:PROJECT must come before a module type");
- if (m)
- add_module(p, m);
- m = new_module(arg, module_type_from_mode(mode));
- break;
- case MODE_SOURCES:
- if (!m)
- die("a module type must be declared before adding -:SOURCES");
- add_source(m, arg, NULL);
- break;
- case MODE_LDFLAGS:
- if (!m)
- die("a module type must be declared before adding -:LDFLAGS");
- skip = add_ldflag(m, arg, p->btype);
- break;
- case MODE_CFLAGS:
- if (!p || !m)
- die("a module type must be declared before adding -:CFLAGS");
- add_cflag(p, m, arg);
- break;
- case MODE_CPPFLAGS:
- if (!p || !m)
- die("a module type must be declared before adding -:CPPFLAGS");
- add_cppflag(p, m, arg);
- break;
- case MODE_CXXFLAGS:
- if (!p || !m)
- die("a module type must be declared before adding -:CXXFLAGS");
- add_cxxflag(p, m, arg);
- break;
- case MODE_TAGS:
- if (!m)
- die("a module type must be declared before setting -:TAGS");
- add_tag(m, arg);
- break;
- case MODE_HEADER_TARGET:
- if (!m)
- die("a module type must be declared before setting a -:HEADER_TARGET");
- if (m->header_target)
- free(m->header_target);
- m->header_target = arg;
- break;
- case MODE_HEADERS:
- if (!m)
- die("a module type must be declared before adding -:HEADERS");
- add_header(m, arg);
- break;
- case MODE_PASSTHROUGH:
- if (!m)
- die("a module type must be declared before a -:PASSTHROUGH");
- add_passthrough(m, arg);
- break;
- case MODE_REL_TOP:
- if (!p)
- die("a -:PROJECT must be declared before -:REL_TOP");
- set_rel_top(p, arg);
- free(arg);
- break;
- case MODE_ABS_TOP:
- if (!p)
- die("a -:PROJECT must be declared before -:ABS_TOP");
- set_abs_top(p, arg);
- free(arg);
- break;
- case MODE_LIBFILTER_STATIC:
- if (!m)
- die("a module type must be declared before adding libfilters");
- add_libfilter(m, arg, LIBRARY_STATIC);
- break;
- case MODE_LIBFILTER_WHOLE:
- if (!m)
- die("a module type must be declared before adding libfilters");
- add_libfilter(m, arg, LIBRARY_WHOLE_STATIC);
- break;
- case MODE_END:
- break;
- }
+ switch (mode) {
+ case MODE_UNDEFINED:
+ die("Androgenizer arguments must start with a valid -: switch, like -:PROJECT.");
+ break;
+ case MODE_PROJECT:
+ p = new_project(arg, SCRIPT_SUBDIRECTORY, bt);
+ break;
+ case MODE_SUBDIR:
+ if (!p)
+ die("-:PROJECT must come before -:SUBDIR");
+ add_subdir(p, arg);
+ break;
+ case MODE_SHARED:
+ case MODE_STATIC:
+ case MODE_EXECUTABLE:
+ case MODE_HOST_SHARED:
+ case MODE_HOST_STATIC:
+ case MODE_HOST_EXECUTABLE:
+ if (!p)
+ die("-:PROJECT must come before a module type");
+ if (m)
+ add_module(p, m);
+ m = new_module(arg, module_type_from_mode(mode));
+ break;
+ case MODE_SOURCES:
+ if (!m)
+ die("a module type must be declared before adding -:SOURCES");
+ add_source(m, arg, NULL);
+ break;
+ case MODE_LDFLAGS:
+ if (!m)
+ die("a module type must be declared before adding -:LDFLAGS");
+ skip = add_ldflag(m, arg, p->btype);
+ break;
+ case MODE_CFLAGS:
+ if (!p || !m)
+ die("a module type must be declared before adding -:CFLAGS");
+ add_cflag(p, m, arg);
+ break;
+ case MODE_CPPFLAGS:
+ if (!p || !m)
+ die("a module type must be declared before adding -:CPPFLAGS");
+ add_cppflag(p, m, arg);
+ break;
+ case MODE_CXXFLAGS:
+ if (!p || !m)
+ die("a module type must be declared before adding -:CXXFLAGS");
+ add_cxxflag(p, m, arg);
+ break;
+ case MODE_TAGS:
+ if (!m)
+ die("a module type must be declared before setting -:TAGS");
+ add_tag(m, arg);
+ break;
+ case MODE_HEADER_TARGET:
+ if (!m)
+ die("a module type must be declared before setting a -:HEADER_TARGET");
+ if (m->header_target)
+ free(m->header_target);
+ m->header_target = arg;
+ break;
+ case MODE_HEADERS:
+ if (!m)
+ die("a module type must be declared before adding -:HEADERS");
+ add_header(m, arg);
+ break;
+ case MODE_PASSTHROUGH:
+ if (!m)
+ die("a module type must be declared before a -:PASSTHROUGH");
+ add_passthrough(m, arg);
+ break;
+ case MODE_REL_TOP:
+ if (!p)
+ die("a -:PROJECT must be declared before -:REL_TOP");
+ set_rel_top(p, arg);
+ free(arg);
+ break;
+ case MODE_ABS_TOP:
+ if (!p)
+ die("a -:PROJECT must be declared before -:ABS_TOP");
+ set_abs_top(p, arg);
+ free(arg);
+ break;
+ case MODE_LIBFILTER_STATIC:
+ if (!m)
+ die("a module type must be declared before adding libfilters");
+ add_libfilter(m, arg, LIBRARY_STATIC);
+ break;
+ case MODE_LIBFILTER_WHOLE:
+ if (!m)
+ die("a module type must be declared before adding libfilters");
+ add_libfilter(m, arg, LIBRARY_WHOLE_STATIC);
+ break;
+ case MODE_END:
+ break;
+ }
}
if (p && m)
add_module(p, m);