Commits

Laurens Rodriguez committed 5ad9399

koslib.c: fixes from Lua 5.2.2

Comments (0)

Files changed (2)

extra/killa/compare.pl

 my $TARGET_LUA_DIR = "../../src/libraries/lua52";
 my $TARGET_KILLA_DIR = "../../src/libraries/killa";
 my $RESULT_DIR = "temp/";
-my $MERGE_PROGRAM = '"C:\Program Files\WinMerge\WinMergeU.exe"';
+my $MERGE_PROGRAM = '"C:\Program Files (x86)\WinMerge\WinMergeU.exe"';
 
 my $END_COMMENTS = "/* -------------------------------------------------------------------------- */";
 
         $line =~ s/killa_uacNumber/l_uacNumber/g;
         $line =~ s/killa_IntPoint/IntPoint/g;
         $line =~ s/killa_mathop/l_mathop/g;
+        $line =~ s/killa_CommonHeader/CommonHeader/g;
+        $line =~ s/killa_ctb/ctb/g;
+        $line =~ s/killa_GCheader/GCheader/g;
+        $line =~ s/killa_Value/Value/g;
+        $line =~ s/killa_numfield/numfield/g;
+        $line =~ s/killa_rttype/rttype/g;
+        $line =~ s/killa_checktag/checktag/g;
+        $line =~ s/killa_ttisboolean/ttisboolean/g;
+        $line =~ s/killa_ttisdeadkey/ttisdeadkey/g;
+        $line =~ s/killa_ttisequal/ttisequal/g;
+        $line =~ s/killa_deadvalue/deadvalue/g;
+        $line =~ s/killa_iscollectable/iscollectable/g;
+        $line =~ s/killa_righttt/righttt/g;
+        $line =~ s/killa_checkliveness/checkliveness/g;
+        $line =~ s/killa_settt_/settt_/g;
+        $line =~ s/killa_val_/val_/g;
+        $line =~ s/killa_setgcovalue/setgcovalue/g;
+        $line =~ s/killa_setdeadvalue/setdeadvalue/g;
+        $line =~ s/killa_checktag/checktag/g;
+        $line =~ s/killa_LocVar/LocVar/g;
+        $line =~ s/killa_TKey/TKey/g;
+        $line =~ s/killa_Node/Node/g;
+        $line =~ s/killa_lmod/lmod/g;
+        $line =~ s/killa_twoto/twoto/g;
+        $line =~ s/killa_sizenode/sizenode/g;
+        $line =~ s/killa_num_/num_/g;
+        $line =~ s/killa_setptvalue/setptvalue/g;
+        $line =~ s/killa_setptvalue2s/setptvalue2s/g;
+        $line =~ s/killa_tag2tt/tag2tt/g;
+        $line =~ s/killa_Upvaldesc/Upvaldesc/g;
+        $line =~ s/killa_OpArgMask/OpArgMask/g;
+        $line =~ s/killa_OpMode/OpMode/g;
+        $line =~ s/killa_OpArgMask/OpArgMask/g;
+        $line =~ s/killa_getarg/getarg/g;
+        $line =~ s/killa_setarg/setarg/g;
 
         $line =~ s/KILLA_REFNULL/LUA_REFNIL/g;
         $line =~ s/KILLA_MAXSTACK/MAXSTACK/g;
         $line =~ s/KILLA_MAX_LMEM/MAX_LMEM/g;
         $line =~ s/KILLA_MINSTRTABSIZE/MINSTRTABSIZE/g;
         $line =~ s/KILLA_HARDMEMTESTS/HARDMEMTESTS/g;
+        $line =~ s/KILLA_BIT_ISCOLLECTABLE/BIT_ISCOLLECTABLE/g;
+        $line =~ s/KILLA_NNMARK/NNMARK/g;
+        $line =~ s/KILLA_NNMASK/NNMASK/g;
+        $line =~ s/KILLA_NULLCONSTANT/NILCONSTANT/g;
+        $line =~ s/KILLA_SIZE_A/SIZE_A/g;
+        $line =~ s/KILLA_SIZE_B/SIZE_B/g;
+        $line =~ s/KILLA_SIZE_C/SIZE_C/g;
+        $line =~ s/KILLA_SIZE_Ax/SIZE_Ax/g;
+        $line =~ s/KILLA_SIZE_Bx/SIZE_Bx/g;
+        $line =~ s/KILLA_SIZE_OP/SIZE_OP/g;
+        $line =~ s/KILLA_POS_OP/POS_OP/g;
+        $line =~ s/KILLA_POS_A/POS_A/g;
+        $line =~ s/KILLA_POS_C/POS_C/g;
+        $line =~ s/KILLA_POS_B/POS_B/g;
+        $line =~ s/KILLA_POS_Bx/POS_Bx/g;
+        $line =~ s/KILLA_POS_Ax/POS_Ax/g;
+        $line =~ s/KILLA_MASK1/MASK1/g;
+        $line =~ s/KILLA_MASK0/MASK0/g;
+        $line =~ s/KILLA_BITRK/BITRK/g;
+        $line =~ s/KILLA_NUM_OPCODES/NUM_OPCODES/g;
+        $line =~ s/KILLA_SET_OPCODE/SET_OPCODE/g;
 
         $line =~ s/OP_LOADNULL/OP_LOADNIL/g;
         $line =~ s/null/nil/g;

src/libraries/killa/koslib.c

 #if !defined(KILLA_USE_POSIX)
 #define KILLA_STRFTIMEOPTIONS     { "aAbBcdHIjmMpSUwWxXyYz%", "" }
 #else
-#define KILLA_STRFTIMEOPTIONS     { "aAbBcCdDeFgGhHIjmMnprRStTuUVwWxXyYzZ%", "", \
-                                "E", "cCxXyY",  \
-                                "O", "deHImMSuUVwWy" }
+#define KILLA_STRFTIMEOPTIONS \
+	{ "aAbBcCdDeFgGhHIjmMnprRStTuUVwWxXyYzZ%", "" \
+	  "", "E", "cCxXyY",  \
+	  "O", "deHImMSuUVwWy" }
 #endif
 
 #endif
 static int os_rename (killa_State *L) {
   const char *fromname = killaL_checkstring(L, 1);
   const char *toname = killaL_checkstring(L, 2);
-  return killaL_fileresult(L, rename(fromname, toname) == 0, fromname);
+  return killaL_fileresult(L, rename(fromname, toname) == 0, NULL);
 }