Christopher Wiley 2f77417cce aidl: Pull main() into dedicated file
This separates the main() entry point from the functionality we're
hoping to test.  While here, redo the header guards to be consistent
accross the codebae.

Bug: 23516947
Change-Id: I61666126bdba0941f14bd0f031caaa30367b864a
Test: Compiles
2015-08-31 10:54:26 -07:00

24 lines
464 B
C++

#include "aidl.h"
#include "options.h"
#include <stdio.h>
int
main(int argc, const char **argv)
{
Options options;
int result = parse_options(argc, argv, &options);
if (result) {
return result;
}
switch (options.task) {
case COMPILE_AIDL:
return compile_aidl(options);
case PREPROCESS_AIDL:
return preprocess_aidl(options);
}
fprintf(stderr, "aidl: internal error\n");
return 1;
}