Revisión | cb1fb37c3bde68d32f62330c08257e2c9b5461a4 (tree) |
---|---|
Tiempo | 2014-06-11 23:40:57 |
Autor | hikarupsp <hikarupsp@user...> |
Commiter | hikarupsp |
modForMac
@@ -1 +0,0 @@ | ||
1 | -%ComSpec% | |
\ No newline at end of file |
@@ -0,0 +1,13 @@ | ||
1 | +# for Mac OSX | |
2 | +CC = cc | |
3 | +SRCS = api.c decode.c driver.c extend.c float.c integer.c osecpu-vm.c other.c pointer.c tek.c | |
4 | +BINNAME = osecpu.bin | |
5 | +DEL = rm | |
6 | +CFLAGS = -x objective-c -Os -m32 -framework Cocoa | |
7 | + | |
8 | +$(BINNAME): $(SRCS) Makefile | |
9 | + $(CC) $(CFLAGS) -o $@ $(SRCS) | |
10 | + | |
11 | +clean: | |
12 | + $(DEL) $(BINNAME) | |
13 | + |
@@ -18,7 +18,7 @@ void apiEnd(OsecpuVm *vm); | ||
18 | 18 | |
19 | 19 | #define BUFFER_SIZE 1024 * 1024 // 1M |
20 | 20 | |
21 | -int OsecpuMain(int argc, const unsigned char **argv) | |
21 | +int OsecpuMain(int argc, const char **argv) | |
22 | 22 | { |
23 | 23 | Defines defs; |
24 | 24 | OsecpuJitc jitc; |
@@ -1,8 +1,6 @@ | ||
1 | 1 | #include "osecpu-vm.h" |
2 | 2 | |
3 | -#include "tek.c" | |
4 | - | |
5 | -// typedef unsigned char UCHAR; | |
3 | +typedef unsigned char UCHAR; | |
6 | 4 | |
7 | 5 | // upx関係. |
8 | 6 |
@@ -4,6 +4,9 @@ void drv_openWin(int x, int y, unsigned char *buf, char *winClosed); | ||
4 | 4 | void drv_flshWin(int sx, int sy, int x0, int y0); |
5 | 5 | void drv_sleep(int msec); |
6 | 6 | |
7 | +int OsecpuMain(int argc, const char **argv); | |
8 | + | |
9 | + | |
7 | 10 | #if (!defined(DRV_OSNUM)) |
8 | 11 | #if (defined(_WIN32)) |
9 | 12 | #define DRV_OSNUM 0x0001 |
@@ -424,14 +427,14 @@ NSApplication* app; | ||
424 | 427 | |
425 | 428 | @interface Main : NSObject<NSWindowDelegate> { |
426 | 429 | int argc; |
427 | - const UCHAR **argv; | |
430 | + const char **argv; | |
428 | 431 | char *winClosed; |
429 | 432 | OSECPUView *_view; |
430 | 433 | } |
431 | 434 | |
432 | 435 | - (void)runApp; |
433 | 436 | - (void)createThread : (int)_argc |
434 | -args : (const UCHAR **)_argv; | |
437 | +args : (const char **)_argv; | |
435 | 438 | - (BOOL)windowShouldClose:(id)sender; |
436 | 439 | - (void)openWin : (UCHAR *)buf |
437 | 440 | sx : (int) sx |
@@ -450,7 +453,7 @@ winClosed : (char *)_winClosed; | ||
450 | 453 | } |
451 | 454 | |
452 | 455 | - (void)createThread : (int)_argc |
453 | - args : (const UCHAR **)_argv | |
456 | + args : (const char **)_argv | |
454 | 457 | { |
455 | 458 | argc = _argc; |
456 | 459 | argv = _argv; |
@@ -491,7 +494,7 @@ winClosed : (char *)_winClosed; | ||
491 | 494 | |
492 | 495 | id objc_main; |
493 | 496 | |
494 | -int main(int argc, const UCHAR **argv) | |
497 | +int main(int argc, const char **argv) | |
495 | 498 | { |
496 | 499 | objc_main = [[Main alloc] init]; |
497 | 500 |
@@ -1 +0,0 @@ | ||
1 | -c:\mingw\bin\gcc.exe -o osecpu.exe -Os osecpu-vm.c other.c integer.c pointer.c float.c extend.c api.c driver.c decode.c -Wl,-s,-lgdi32 | |
\ No newline at end of file |
@@ -195,3 +195,6 @@ int decode_upx (const unsigned char *p, const unsigned char *p1, unsigned char | ||
195 | 195 | int decode_tek5 (const unsigned char *p, const unsigned char *p1, unsigned char *q, unsigned char *q1); |
196 | 196 | int decode_fcode(const unsigned char *p, const unsigned char *p1, unsigned char *q, unsigned char *q1); |
197 | 197 | |
198 | +// api.c | |
199 | +int OsecpuMain(int argc, const char **argv); | |
200 | + |
@@ -45,7 +45,7 @@ int tek_getsize(unsigned char *p) | ||
45 | 45 | |
46 | 46 | #endif |
47 | 47 | |
48 | -int tek_decomp(unsigned char *p, char *q, int size) | |
48 | +int tek_decomp(unsigned char *p, unsigned char *q, int size) | |
49 | 49 | { |
50 | 50 | int err = -1; |
51 | 51 | #if 0 |