summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/assembler.c8
-rw-r--r--po/ProjetArchi.pot113
-rw-r--r--src/compilo.c2
3 files changed, 64 insertions, 59 deletions
diff --git a/lib/assembler.c b/lib/assembler.c
index 6c5d3a8..0055680 100644
--- a/lib/assembler.c
+++ b/lib/assembler.c
@@ -70,6 +70,7 @@ int s_text = 0, s_data = 0, s_bss = 0;
static void debug_print_expression(expression_t * e)
{
+ if (!e) return;
switch (e->e_subtype) {
case E_OPERATION:
switch (e->op) {
@@ -1478,8 +1479,10 @@ void asm_eol(void)
fprintf(stderr, "Fin de ligne sur:\n");
debug_print_expression(e_line);
fprintf(stderr, "-----\n");
-
+
e_current = e_line;
+ if (!(e_current)) break;
+
/* Est-ce que le premier mot est un label terminant par ':' ? */
if (e_current->e_subtype == E_LABEL) {
if (e_current->symbol[strlen(e_current->symbol) - 1] == ':') {
@@ -1572,6 +1575,7 @@ void asm_eol(void)
}
break;
case E_INSTRUCT:
+ if (!e_current) break;
if (segment != SEG_TEXT) {
exception(1, _("You can only have an instruction into a .text segment"));
}
@@ -1747,7 +1751,7 @@ void assemble_file(char * iname, char * oname) {
exception(1, _("Error writing output file"));
}
popcontext();
- if (!process_file(iname)) {
+ if (process_file(iname)) {
exception(1, _("Error reading file"));
}
pushcontext(_("Writing output file"));
diff --git a/po/ProjetArchi.pot b/po/ProjetArchi.pot
index 6e503c2..5baf0cc 100644
--- a/po/ProjetArchi.pot
+++ b/po/ProjetArchi.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-04-15 17:20+0200\n"
+"POT-Creation-Date: 2001-04-15 17:49+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -14,218 +14,218 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
-#: lib/assembler.c:167
+#: lib/assembler.c:168
msgid "You have to be into the .text or the .data segment to define a value."
msgstr ""
-#: lib/assembler.c:190
+#: lib/assembler.c:191
msgid "Label already defined"
msgstr ""
-#: lib/assembler.c:253
+#: lib/assembler.c:254
msgid "You can't have the startpoint elsewhere than the .text segment"
msgstr ""
-#: lib/assembler.c:394
+#: lib/assembler.c:395
msgid "Not a valid . directive"
msgstr ""
-#: lib/assembler.c:423
+#: lib/assembler.c:424
msgid "Not a valid # directive"
msgstr ""
#. Cas des directives .
-#: lib/assembler.c:431
+#: lib/assembler.c:432
msgid "Error: extra parameters to a . directive."
msgstr ""
-#: lib/assembler.c:540
+#: lib/assembler.c:541
msgid "Too much arguments to #undef"
msgstr ""
-#: lib/assembler.c:544
+#: lib/assembler.c:545
msgid "Defined symbol not found."
msgstr ""
-#: lib/assembler.c:550
+#: lib/assembler.c:551
msgid "Too much arguments to #include"
msgstr ""
-#: lib/assembler.c:552
+#: lib/assembler.c:553
#, c-format
msgid "Including file at line %i"
msgstr ""
-#: lib/assembler.c:555
+#: lib/assembler.c:556
msgid "Error reading include file"
msgstr ""
-#: lib/assembler.c:607 lib/assembler.c:613
+#: lib/assembler.c:608 lib/assembler.c:614
msgid "Zero divide."
msgstr ""
-#: lib/assembler.c:626 lib/assembler.c:633
+#: lib/assembler.c:627 lib/assembler.c:634
msgid "Error: unable to compute the immediate value"
msgstr ""
-#: lib/assembler.c:642
+#: lib/assembler.c:643
msgid "Function unknow"
msgstr ""
-#: lib/assembler.c:649
+#: lib/assembler.c:650
msgid "Addresses addition not allowed"
msgstr ""
-#: lib/assembler.c:653
+#: lib/assembler.c:654
msgid "You can only use the decal operator on labels"
msgstr ""
-#: lib/assembler.c:658 lib/assembler.c:661 lib/assembler.c:692
+#: lib/assembler.c:659 lib/assembler.c:662 lib/assembler.c:693
msgid "Address operation invalid"
msgstr ""
-#: lib/assembler.c:664 lib/assembler.c:696
+#: lib/assembler.c:665 lib/assembler.c:697
msgid "Addresses operations not allowed"
msgstr ""
-#: lib/assembler.c:667 lib/assembler.c:789 lib/assembler.c:826
-#: lib/assembler.c:900
+#: lib/assembler.c:668 lib/assembler.c:790 lib/assembler.c:827
+#: lib/assembler.c:901
msgid "Expression too complex or invalid"
msgstr ""
-#: lib/assembler.c:700 lib/assembler.c:713 lib/assembler.c:766
-#: lib/assembler.c:778 lib/assembler.c:815
+#: lib/assembler.c:701 lib/assembler.c:714 lib/assembler.c:767
+#: lib/assembler.c:779 lib/assembler.c:816
msgid "Address type not supported"
msgstr ""
-#: lib/assembler.c:782
+#: lib/assembler.c:783
msgid "Address addition not supported"
msgstr ""
-#: lib/assembler.c:819 lib/assembler.c:871
+#: lib/assembler.c:820 lib/assembler.c:872
msgid "Expression invalid"
msgstr ""
#. Bon si l'on est ici, c'est pas bon signe non plus...
-#: lib/assembler.c:944
+#: lib/assembler.c:945
msgid "Expression too complex"
msgstr ""
-#: lib/assembler.c:1007
+#: lib/assembler.c:1008
msgid "Something wrong, nested operator called..."
msgstr ""
-#: lib/assembler.c:1078
+#: lib/assembler.c:1079
msgid "Something wrong, lparenthesis operator called..."
msgstr ""
-#: lib/assembler.c:1081
+#: lib/assembler.c:1082
msgid "Something wrong, should never got here..."
msgstr ""
-#: lib/assembler.c:1248
+#: lib/assembler.c:1249
msgid "Unknow predefined string into the meta language"
msgstr ""
-#: lib/assembler.c:1305
+#: lib/assembler.c:1306
msgid "Pattern not matching..."
msgstr ""
-#: lib/assembler.c:1316 lib/assembler.c:1348 lib/assembler.c:1602
-#: lib/assembler.c:1620
+#: lib/assembler.c:1317 lib/assembler.c:1349 lib/assembler.c:1606
+#: lib/assembler.c:1624
msgid "Unknow constant type in the meta language"
msgstr ""
-#: lib/assembler.c:1328 lib/assembler.c:1372 lib/assembler.c:1402
+#: lib/assembler.c:1329 lib/assembler.c:1373 lib/assembler.c:1403
msgid ""
"Error in the metalanguage (pattern should be here if not a constant type)"
msgstr ""
-#: lib/assembler.c:1360 lib/assembler.c:1388 lib/assembler.c:1396
-#: lib/assembler.c:1643
+#: lib/assembler.c:1361 lib/assembler.c:1389 lib/assembler.c:1397
+#: lib/assembler.c:1647
msgid "Logical error in meta language"
msgstr ""
-#: lib/assembler.c:1431
+#: lib/assembler.c:1432
msgid "Unknow field in metalanguage"
msgstr ""
-#: lib/assembler.c:1442
+#: lib/assembler.c:1443
msgid "Can't evaluate directly expression"
msgstr ""
-#: lib/assembler.c:1448
+#: lib/assembler.c:1449
msgid "Value too large for field"
msgstr ""
-#: lib/assembler.c:1500 lib/assembler.c:1669
+#: lib/assembler.c:1503 lib/assembler.c:1673
msgid "Unknow instruction"
msgstr ""
-#: lib/assembler.c:1525
+#: lib/assembler.c:1528
msgid "Unknow constant"
msgstr ""
-#: lib/assembler.c:1534
+#: lib/assembler.c:1537
msgid "Bad constant for an immediate value"
msgstr ""
-#: lib/assembler.c:1551
+#: lib/assembler.c:1554
msgid "Bad constant for a string"
msgstr ""
-#: lib/assembler.c:1568
+#: lib/assembler.c:1571
msgid "Bad array size"
msgstr ""
-#: lib/assembler.c:1576
+#: lib/assembler.c:1580
msgid "You can only have an instruction into a .text segment"
msgstr ""
-#: lib/assembler.c:1579
+#: lib/assembler.c:1583
msgid "Unmatched instruction"
msgstr ""
-#: lib/assembler.c:1635
+#: lib/assembler.c:1639
msgid "Syntax error in meta language"
msgstr ""
-#: lib/assembler.c:1708
+#: lib/assembler.c:1712
msgid "Loading file"
msgstr ""
-#: lib/assembler.c:1709 lib/meta.c:516
+#: lib/assembler.c:1713 lib/meta.c:516
#, c-format
msgid "Opening file '%s'"
msgstr ""
-#: lib/assembler.c:1717 lib/meta.c:524
+#: lib/assembler.c:1721 lib/meta.c:524
msgid "Reading file"
msgstr ""
-#: lib/assembler.c:1719 lib/meta.c:526
+#: lib/assembler.c:1723 lib/meta.c:526
#, c-format
msgid "Reading line %i"
msgstr ""
-#: lib/assembler.c:1728
+#: lib/assembler.c:1732
#, c-format
msgid "Summering line %s"
msgstr ""
-#: lib/assembler.c:1744
+#: lib/assembler.c:1748
msgid "Opening output file"
msgstr ""
-#: lib/assembler.c:1747
+#: lib/assembler.c:1751
msgid "Error writing output file"
msgstr ""
-#: lib/assembler.c:1751
+#: lib/assembler.c:1755
msgid "Error reading file"
msgstr ""
-#: lib/assembler.c:1753
+#: lib/assembler.c:1757
msgid "Writing output file"
msgstr ""
@@ -391,6 +391,7 @@ msgstr ""
msgid "Signal received: segfault"
msgstr ""
+#. signal(SIGSEGV, segfaulthand);
#: src/compilo.c:54
msgid ""
"\n"
diff --git a/src/compilo.c b/src/compilo.c
index 278f339..883bd81 100644
--- a/src/compilo.c
+++ b/src/compilo.c
@@ -49,7 +49,7 @@ void segfaulthand(int i) {
int main(void) {
invite();
- signal(SIGSEGV, segfaulthand);
+/* signal(SIGSEGV, segfaulthand); */
fprintf(stderr, _("\nPerforming initialisation...\n\n"));
init_all();