From e09044e963015cf672d0f992264ee1563717602a Mon Sep 17 00:00:00 2001 From: Pixel <> Date: Mon, 16 Apr 2001 15:12:16 +0000 Subject: Indentation --- src/compilo.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) (limited to 'src/compilo.c') diff --git a/src/compilo.c b/src/compilo.c index 61ea761..d63fb66 100644 --- a/src/compilo.c +++ b/src/compilo.c @@ -9,18 +9,21 @@ #include "hash.h" #include "assembler.h" -typedef void (*sighandler_t)(int); +typedef void (*sighandler_t) (int); -void invite(void) { +void invite(void) +{ fprintf(stderr, _("Assembler v1.0\n\n")); } -void usage(void) { +void usage(void) +{ fprintf(stderr, _("Usage: compilo program.asm objet.out\n")); exit(0); } -void init_all(void) { +void init_all(void) +{ fprintf(stderr, _(" o Initialising the meta engine... ")); if (meta_init()) { @@ -32,40 +35,44 @@ void init_all(void) { if (meta_load("instructions.txt")) { exception(1, _("Meta language loading failed.")); } - + fprintf(stderr, _(" Done!\n o Initialising the assembler core...")); - + if (assembler_init()) { exception(1, _("Assembler core init failed.")); } - + fprintf(stderr, _(" Done!\n")); } -void flush_all(void) { +void flush_all(void) +{ assembler_flush(); meta_flush(); } -void segfaulthand(int i) { +void segfaulthand(int i) +{ exception(1, _("Signal received: segfault")); } -int main(int argc, char ** argv) { +int main(int argc, char **argv) +{ invite(); - + /* signal(SIGSEGV, segfaulthand); */ - - if (argc != 3) usage(); + + if (argc != 3) + usage(); fprintf(stderr, _("\nPerforming initialisation...\n\n")); init_all(); assemble_file(argv[1], argv[2]); - + fprintf(stderr, _("\nPerforming shutdown...\n\n")); flush_all(); - + fprintf(stderr, _("Exitting, bye!\n")); - return 0; + return 0; } -- cgit v1.2.3