• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisióncb1fb37c3bde68d32f62330c08257e2c9b5461a4 (tree)
Tiempo2014-06-11 23:40:57
Autorhikarupsp <hikarupsp@user...>
Commiterhikarupsp

Log Message

modForMac

Cambiar Resumen

Diferencia incremental

--- a/vm/!cons.bat
+++ /dev/null
@@ -1 +0,0 @@
1-%ComSpec%
\ No newline at end of file
--- /dev/null
+++ b/vm/Makefile
@@ -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+
--- a/vm/api.c
+++ b/vm/api.c
@@ -18,7 +18,7 @@ void apiEnd(OsecpuVm *vm);
1818
1919 #define BUFFER_SIZE 1024 * 1024 // 1M
2020
21-int OsecpuMain(int argc, const unsigned char **argv)
21+int OsecpuMain(int argc, const char **argv)
2222 {
2323 Defines defs;
2424 OsecpuJitc jitc;
--- a/vm/decode.c
+++ b/vm/decode.c
@@ -1,8 +1,6 @@
11 #include "osecpu-vm.h"
22
3-#include "tek.c"
4-
5-// typedef unsigned char UCHAR;
3+typedef unsigned char UCHAR;
64
75 // upx関係.
86
--- a/vm/driver.c
+++ b/vm/driver.c
@@ -4,6 +4,9 @@ void drv_openWin(int x, int y, unsigned char *buf, char *winClosed);
44 void drv_flshWin(int sx, int sy, int x0, int y0);
55 void drv_sleep(int msec);
66
7+int OsecpuMain(int argc, const char **argv);
8+
9+
710 #if (!defined(DRV_OSNUM))
811 #if (defined(_WIN32))
912 #define DRV_OSNUM 0x0001
@@ -424,14 +427,14 @@ NSApplication* app;
424427
425428 @interface Main : NSObject<NSWindowDelegate> {
426429 int argc;
427- const UCHAR **argv;
430+ const char **argv;
428431 char *winClosed;
429432 OSECPUView *_view;
430433 }
431434
432435 - (void)runApp;
433436 - (void)createThread : (int)_argc
434-args : (const UCHAR **)_argv;
437+args : (const char **)_argv;
435438 - (BOOL)windowShouldClose:(id)sender;
436439 - (void)openWin : (UCHAR *)buf
437440 sx : (int) sx
@@ -450,7 +453,7 @@ winClosed : (char *)_winClosed;
450453 }
451454
452455 - (void)createThread : (int)_argc
453- args : (const UCHAR **)_argv
456+ args : (const char **)_argv
454457 {
455458 argc = _argc;
456459 argv = _argv;
@@ -491,7 +494,7 @@ winClosed : (char *)_winClosed;
491494
492495 id objc_main;
493496
494-int main(int argc, const UCHAR **argv)
497+int main(int argc, const char **argv)
495498 {
496499 objc_main = [[Main alloc] init];
497500
--- a/vm/make_vm.bat
+++ /dev/null
@@ -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
--- a/vm/osecpu-vm.h
+++ b/vm/osecpu-vm.h
@@ -195,3 +195,6 @@ int decode_upx (const unsigned char *p, const unsigned char *p1, unsigned char
195195 int decode_tek5 (const unsigned char *p, const unsigned char *p1, unsigned char *q, unsigned char *q1);
196196 int decode_fcode(const unsigned char *p, const unsigned char *p1, unsigned char *q, unsigned char *q1);
197197
198+// api.c
199+int OsecpuMain(int argc, const char **argv);
200+
Binary files /dev/null and b/vm/osecpu.bin differ
--- a/vm/tek.c
+++ b/vm/tek.c
@@ -45,7 +45,7 @@ int tek_getsize(unsigned char *p)
4545
4646 #endif
4747
48-int tek_decomp(unsigned char *p, char *q, int size)
48+int tek_decomp(unsigned char *p, unsigned char *q, int size)
4949 {
5050 int err = -1;
5151 #if 0