summaryrefslogtreecommitdiff
path: root/PE
diff options
context:
space:
mode:
Diffstat (limited to 'PE')
-rw-r--r--PE/Makefile53
-rw-r--r--PE/compil.lex14
-rw-r--r--PE/nmakefile34
3 files changed, 51 insertions, 50 deletions
diff --git a/PE/Makefile b/PE/Makefile
index d12149e..2d404ab 100644
--- a/PE/Makefile
+++ b/PE/Makefile
@@ -1,27 +1,26 @@
-#!/usr/bin/make -f
-
-CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -I../includes -DHAVE_ZLIB `baltisot-config --cflags`
-CXX=g++
-CC=gcc
-LEX=flex -l
-
-LIBS=-lz
-#-lefence
-LDFLAGS=${LIBS} `baltisot-config --libs`
-#`pkg-config --libs glib-2.0`
-
-TARGET = reinsert compil extract extract-various extract-rooms
-
-all: ${TARGET}
-
-reinsert: reinsert.o ../includes/cdutils.h ../includes/yazedc.h ../lib/lib.a Makefile
- ${CXX} ${LDFLAGS} reinsert.o ../lib/lib.a -o reinsert
-
-compil: compil.o
- ${CC} ${LDFLAGS} compil.o -o compil
-
-compil.c: compil.lex
- ${LEX} -ocompil.c compil.lex
-
-clean:
- rm -f *.o ${TARGET} compil.c
+#!/usr/bin/make -f
+
+CPPFLAGS=-Wall -g -O3 -mcpu=i686 -I../includes -DHAVE_ZLIB `baltisot-config --cflags`
+CXX=g++
+CC=gcc
+LEX=flex -l
+
+LIBS=-lz -lefence
+LDFLAGS=${LIBS} `baltisot-config --libs`
+#`pkg-config --libs glib-2.0`
+
+TARGET = reinsert compil extract extract-various extract-rooms
+
+all: ${TARGET}
+
+reinsert: reinsert.o ../includes/cdutils.h ../includes/yazedc.h ../lib/lib.a Makefile
+ ${CXX} ${LDFLAGS} reinsert.o ../lib/lib.a -o reinsert
+
+compil: compil.o
+ ${CC} ${LDFLAGS} compil.o -o compil
+
+compil.c: compil.lex
+ ${LEX} -ocompil.c compil.lex
+
+clean:
+ rm -f *.o ${TARGET} compil.c
diff --git a/PE/compil.lex b/PE/compil.lex
index 91fe11d..76d3dbe 100644
--- a/PE/compil.lex
+++ b/PE/compil.lex
@@ -10,11 +10,7 @@
yputc(d);
}
-"\n<CLOSE>\n" {
- yputc(0xff);
-}
-
-"<UNK "[[:xdigit:]]{2}">" {
+"<UNK "[[:xdigit:]]+">" {
int d = strtoul(yytext + 5, NULL, 16);
yputc(d);
}
@@ -49,6 +45,8 @@
yputc(d);
}
+"\n<CLOSE>\n" yputc(0xff);
+"<CLOSE>\n" { yputc(0xf7); yputc(0xff); }
"<AYA>" yputc(0xfa);
"\n<TCLOSE>\n" yputc(0xf9);
"<PAUSE>\n" yputc(0xf8);
@@ -57,6 +55,10 @@
"<ae>" yputc(0x5c);
"<oe>" yputc(0x5d);
+"<"[^>]*">" {
+ fprintf(stderr, "Commande inconnue ligne %i: %s\n", yylineno, yytext);
+}
+
. {
int i, trouve = 0;
for (i = 0; i <= MAXCHAR; i++) {
@@ -67,7 +69,7 @@
}
if (!trouve) {
- fprintf(stderr, "Caractère inconnu ligne %i: %s\n", yylineno, yytext);
+ fprintf(stderr, "Caractère inconnu ligne %i: %s\n", yylineno, yytext);
}
}
diff --git a/PE/nmakefile b/PE/nmakefile
index ceca938..8c109ca 100644
--- a/PE/nmakefile
+++ b/PE/nmakefile
@@ -1,17 +1,17 @@
-_CCFLAGS = /I ..\includes /I ..\generic\include /I ..\..\zlib
-!IFDEF DEBUG
-_LIBS = "..\MSVC\Baltisot - generic\Debug\Baltisot - generic.lib" "..\MSVC\PSX-Bundle - library\Debug\PSX-Bundle - library.lib" ..\..\zlib\dll32\zlib.lib ..\..\zlib\static32\zlibstat.lib
-!ELSE
-_LIBS = "..\MSVC\Baltisot - generic\Release\Baltisot - generic.lib" "..\MSVC\PSX-Bundle - library\Release\PSX-Bundle - library.lib" ..\..\zlib\dll32\zlib.lib ..\..\zlib\static32\zlibstat.lib
-!ENDIF
-
-!include ..\MSVC\Tools\master.mak
-
-#------------------------------------------------------------------
-
-TARGETS = extract.exe extract-rooms.exe extract-various.exe reinsert.exe compil.c compil.exe compilall.exe
-
-all : $(TARGETS)
-
-clean :
- -del /Q $(TARGETS) *.ilk *.pdb *.obj
+_CCFLAGS = /I ..\includes /I ..\generic\include /I ..\..\zlib
+!IFDEF DEBUG
+_LIBS = "..\MSVC\Baltisot - generic\Debug\Baltisot - generic.lib" "..\MSVC\PSX-Bundle - library\Debug\PSX-Bundle - library.lib" ..\..\zlib\dll32\zlib.lib ..\..\zlib\static32\zlibstat.lib
+!ELSE
+_LIBS = "..\MSVC\Baltisot - generic\Release\Baltisot - generic.lib" "..\MSVC\PSX-Bundle - library\Release\PSX-Bundle - library.lib" ..\..\zlib\dll32\zlib.lib ..\..\zlib\static32\zlibstat.lib
+!ENDIF
+
+!include ..\MSVC\Tools\master.mak
+
+#------------------------------------------------------------------
+
+TARGETS = extract.exe extract-rooms.exe extract-various.exe reinsert.exe compil.c compil.exe compilall.exe
+
+all : $(TARGETS)
+
+clean :
+ -del /Q $(TARGETS) *.ilk *.pdb *.obj