summaryrefslogtreecommitdiffstats
path: root/src/lua.c
diff options
context:
space:
mode:
authormongo <andmarti@gmail.com>2017-03-15 16:22:11 -0300
committermongo <andmarti@gmail.com>2017-03-15 16:22:11 -0300
commitd7a882e57d52aa8ad21f466a628370693a7b6796 (patch)
tree4450bb5addc878b35232cc7115f89075cbd97e56 /src/lua.c
parent5ce55ad55e6198227567eefa34ea9c0e77c79d7d (diff)
Swap r and c variables in some functions
Diffstat (limited to 'src/lua.c')
-rw-r--r--src/lua.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lua.c b/src/lua.c
index c1319e1..d706caf 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -51,8 +51,8 @@ static int l_getnum (lua_State *L) {
int r,c;
struct ent **pp;
struct ent *p;
- c = lua_tointeger(L, 1); /* get argument */
- r = lua_tointeger(L, 2);
+ r = lua_tointeger(L, 1); /* get argument */
+ c = lua_tointeger(L, 2);
// sc_debug("getnum !!");
pp = ATBL(tbl,r,c);
@@ -69,8 +69,8 @@ static int l_setnum (lua_State *L) {
double val;
//struct ent ** pp;
struct ent *p;
- c = lua_tointeger(L, 1); /* get argument */
- r = lua_tointeger(L, 2);
+ r = lua_tointeger(L, 1); /* get argument */
+ c = lua_tointeger(L, 2);
val=lua_tonumber(L,3);
sc_debug("getnum !!");
@@ -89,8 +89,8 @@ static int l_setstr (lua_State *L) {
char * val;
//struct ent ** pp;
struct ent *p;
- c = lua_tointeger(L, 1); /* get argument */
- r = lua_tointeger(L, 2);
+ r = lua_tointeger(L, 1); /* get argument */
+ c = lua_tointeger(L, 2);
val=(char *) lua_tostring(L,3);
//sc_debug("setstr !!");
@@ -106,8 +106,8 @@ static int l_setform (lua_State *L) {
//struct ent ** pp;
//struct ent * p;
char buf[256];
- c = lua_tointeger(L, 1); /* get argument */
- r = lua_tointeger(L, 2);
+ r = lua_tointeger(L, 1); /* get argument */
+ c = lua_tointeger(L, 2);
val = (char *) lua_tostring(L,3);
//sc_debug("setstr !!");
@@ -133,8 +133,8 @@ static int l_colrow2a(lua_State *L) {
int c, r;
char buf[16];
- c = lua_tointeger(L, 1); /* get argument */
- r = lua_tointeger(L, 2);
+ r = lua_tointeger(L, 1); /* get argument */
+ c = lua_tointeger(L, 2);
sprintf(buf,"%s%d", coltoa(c),r);
lua_pushstring(L,buf);
return 1;