]> Nishi Git Mirror - dataworks.git/commitdiff
rename files
authornishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Sun, 26 May 2024 11:10:56 +0000 (11:10 +0000)
committernishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Sun, 26 May 2024 11:10:56 +0000 (11:10 +0000)
git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@120 d4a5a174-5a4a-5b4b-b672-37683c10d7d5

Library/Makefile
Library/dw_util.h
Library/exec.c [moved from Library/database_exec.c with 100% similarity]

index 2d87f9935687502885ad8b07f03efc3c688da664..f20e665003be88e22b0f3abc51a78e7673ee2b35 100644 (file)
@@ -3,7 +3,7 @@
 .PHONY: all clean
 .SUFFIXES: .c .o
 
-OBJS = parser.o database.o util.o dataworks.o database_table.o database_exec.o database_db.o
+OBJS = parser.o database.o util.o dataworks.o database_table.o database_db.o exec.o
 
 all: $(LIB_PREFIX)dataworks$(LIB_SUFFIX) $(STATICLIB_PREFIX)dataworks$(STATICLIB_SUFFIX)
 
index 65f27579751d48af53788ab98bb9d650f3573895..b40b24c741e8724a57ffdb4a6b73e61f43bdb4d3 100644 (file)
@@ -75,24 +75,7 @@ bool __dw_unlockfile(FILE* fp);
        }
 
 /* Converts BE to NE */
-#define __dw_native_endian(arg, type, exec) \
-       { \
-               type __original = arg; \
-               signed char* __ptr = (signed char*)&__original; \
-               type __converted; \
-               signed char* __converted_ptr = (signed char*)&__converted; \
-               int __i; \
-               int __endian_check = 1; \
-               char __endian = (1 == *(volatile char*)&__endian_check) ? 'L' : 'B'; \
-               for(__i = 0; __i < sizeof(type); __i++) { \
-                       if(__endian == 'L') { \
-                               __converted_ptr[sizeof(type) - __i - 1] = __ptr[__i]; \
-                       } else { \
-                               __converted_ptr[__i] = __ptr[__i]; \
-                       } \
-               } \
-               exec; \
-       }
+#define __dw_native_endian __dw_big_endian
 
 #ifdef __cplusplus
 }
similarity index 100%
rename from Library/database_exec.c
rename to Library/exec.c