Lines Matching refs:i

23   int i;  in foreachi()  local
26 for (i=1; i <= n; i++) { in foreachi()
28 lua_pushinteger(L, i); /* 1st argument */ in foreachi()
29 lua_rawgeti(L, 1, i); /* 2nd argument */ in foreachi()
99 int i; in tinsert() local
102 for (i = e; i > pos; i--) { /* move up elements */ in tinsert()
103 lua_rawgeti(L, 1, i-1); in tinsert()
104 lua_rawseti(L, 1, i); /* t[i] = t[i-1] */ in tinsert()
135 static void addfield (lua_State *L, luaL_Buffer *b, int i) { in addfield() argument
136 lua_rawgeti(L, 1, i); in addfield()
139 LUA_QL("concat"), luaL_typename(L, -1), i); in addfield()
147 int i, last; in tconcat() local
150 i = luaL_optint(L, 3, 1); in tconcat()
153 for (; i < last; i++) { in tconcat()
154 addfield(L, &b, i); in tconcat()
157 if (i == last) /* add last value (if interval was not empty) */ in tconcat()
158 addfield(L, &b, i); in tconcat()
173 static void set2 (lua_State *L, int i, int j) { in set2() argument
174 lua_rawseti(L, 1, i); in set2()
195 int i, j; in auxsort() local
204 i = (l+u)/2; in auxsort()
205 lua_rawgeti(L, 1, i); in auxsort()
208 set2(L, i, l); in auxsort()
213 set2(L, i, u); in auxsort()
218 lua_rawgeti(L, 1, i); /* Pivot */ in auxsort()
221 set2(L, i, u-1); in auxsort()
223 i = l; j = u-1; in auxsort()
226 while (lua_rawgeti(L, 1, ++i), sort_comp(L, -1, -2)) { in auxsort()
227 if (i>u) luaL_error(L, "invalid order function for sorting"); in auxsort()
235 if (j<i) { in auxsort()
239 set2(L, i, j); in auxsort()
242 lua_rawgeti(L, 1, i); in auxsort()
243 set2(L, u-1, i); /* swap pivot (a[u-1]) with a[i] */ in auxsort()
246 if (i-l < u-i) { in auxsort()
247 j=l; i=i-1; l=i+2; in auxsort()
250 j=i+1; i=u; u=j-2; in auxsort()
252 auxsort(L, j, i); /* call recursively the smaller one */ in auxsort()