diff options
Diffstat (limited to 'src/linker.c')
-rw-r--r-- | src/linker.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/linker.c b/src/linker.c index 727f76f..17e2ffb 100644 --- a/src/linker.c +++ b/src/linker.c @@ -10,61 +10,61 @@ typedef void (*sighandler_t) (int); void invite(void) { - fprintf(stderr, _("Linker v1.0\n\n")); + fprintf(stderr, _("Linker v1.0\n\n")); } void usage(void) { - fprintf(stderr, _("Usage: linker obj1 [obj2 [obj3 [...]]] binary\n")); - exit(0); + fprintf(stderr, _("Usage: linker obj1 [obj2 [obj3 [...]]] binary\n")); + exit(0); } void init_all(int n) { - fprintf(stderr, _(" o Initialising the linker... ")); + fprintf(stderr, _(" o Initialising the linker... ")); - init(n); - fprintf(stderr, _(" Done!\n")); + init(n); + fprintf(stderr, _(" Done!\n")); } void flush_all(void) { - flush(); + flush(); } void segfaulthand(int i) { - exception(1, _("Signal received: segfault")); + exception(1, _("Signal received: segfault")); } int main(int argc, char **argv) { - int i; + int i; - invite(); + invite(); - signal(SIGSEGV, segfaulthand); + signal(SIGSEGV, segfaulthand); - if (argc < 3) - usage(); + if (argc < 3) + usage(); - fprintf(stderr, _("\nPerforming initialisation...\n\n")); - init_all(argc - 2); + fprintf(stderr, _("\nPerforming initialisation...\n\n")); + init_all(argc - 2); - fprintf(stderr, _("Linking files...\n")); + fprintf(stderr, _("Linking files...\n")); - for (i = 1; i < argc - 1; i++) { - addfile(argv[i]); - } + for (i = 1; i < argc - 1; i++) { + addfile(argv[i]); + } - fprintf(stderr, _("Generating output file...\n")); - dumpfile(argv[i]); + fprintf(stderr, _("Generating output file...\n")); + dumpfile(argv[i]); - fprintf(stderr, _("\nPerforming shutdown...\n\n")); - flush_all(); + fprintf(stderr, _("\nPerforming shutdown...\n\n")); + flush_all(); - signal(SIGSEGV, NULL); + signal(SIGSEGV, NULL); - fprintf(stderr, _("Exitting, bye!\n")); - return 0; + fprintf(stderr, _("Exitting, bye!\n")); + return 0; } |