summaryrefslogtreecommitdiff
path: root/src/compilo.c
diff options
context:
space:
mode:
authorPixel <>2001-04-16 15:12:16 +0000
committerPixel <>2001-04-16 15:12:16 +0000
commite09044e963015cf672d0f992264ee1563717602a (patch)
tree1a55d7d5e46401a41ca7bc24e597d90b0b720601 /src/compilo.c
parent3953a2906211a6c0007079dcafe66aa372ab33d1 (diff)
Indentation
Diffstat (limited to 'src/compilo.c')
-rw-r--r--src/compilo.c39
1 files changed, 23 insertions, 16 deletions
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;
}