commit 589c7667bec30b9af1a1b7ae9f4e6792709c8f72
parent ec7a7b33e7bde24e9af252602f29ed309656d74e
Author: Joris Vink <joris@coders.se>
Date: Wed, 29 Jun 2016 16:25:52 +0200
Cleanup cli.c a bit.
- Define CXXFLAGS_MAX as CFLAGS_MAX as we use CFLAGS_MAX usually.
- Fix formatting of a few blocks of code.
Diffstat:
src/cli.c | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/src/cli.c b/src/cli.c
@@ -60,10 +60,10 @@
#define LD_FLAGS_MAX 30
#define CFLAGS_MAX 30
-#define CXXFLAGS_MAX 30
+#define CXXFLAGS_MAX CFLAGS_MAX
#define BUILD_NOBUILD 0
-#define BUILD_C 1
+#define BUILD_C 1
#define BUILD_CXX 2
struct buildopt {
@@ -1020,19 +1020,20 @@ cli_compile_source_file(void *arg)
int flags_count;
switch (cf->build) {
- case BUILD_C:
- compiler = compiler_c;
- flags = cflags;
- flags_count = cflags_count;
- break;
- case BUILD_CXX:
- compiler = compiler_cpp;
- flags = cxxflags;
- flags_count = cxxflags_count;
- break;
- default:
- cli_fatal("cli_compile_file: unexpected file type: %d", cf->build);
- break;
+ case BUILD_C:
+ compiler = compiler_c;
+ flags = cflags;
+ flags_count = cflags_count;
+ break;
+ case BUILD_CXX:
+ compiler = compiler_cpp;
+ flags = cxxflags;
+ flags_count = cxxflags_count;
+ break;
+ default:
+ cli_fatal("cli_compile_file: unexpected file type: %d",
+ cf->build);
+ break;
}
idx = 0;