NOSTATICFN for src/*
This commit is contained in:
122
src/nhlsel.c
122
src/nhlsel.c
@@ -7,41 +7,41 @@
|
||||
|
||||
|
||||
struct selectionvar *l_selection_check(lua_State *, int);
|
||||
static struct selectionvar *l_selection_push_new(lua_State *);
|
||||
staticfn struct selectionvar *l_selection_push_new(lua_State *);
|
||||
|
||||
/* lua_CFunction prototypes */
|
||||
static int l_selection_new(lua_State *);
|
||||
static int l_selection_clone(lua_State *);
|
||||
static int l_selection_numpoints(lua_State *);
|
||||
static int l_selection_getpoint(lua_State *);
|
||||
static int l_selection_setpoint(lua_State *);
|
||||
static int l_selection_filter_percent(lua_State *);
|
||||
static int l_selection_rndcoord(lua_State *);
|
||||
static int l_selection_room(lua_State *);
|
||||
static int l_selection_getbounds(lua_State *);
|
||||
static boolean params_sel_2coords(lua_State *, struct selectionvar **,
|
||||
staticfn int l_selection_new(lua_State *);
|
||||
staticfn int l_selection_clone(lua_State *);
|
||||
staticfn int l_selection_numpoints(lua_State *);
|
||||
staticfn int l_selection_getpoint(lua_State *);
|
||||
staticfn int l_selection_setpoint(lua_State *);
|
||||
staticfn int l_selection_filter_percent(lua_State *);
|
||||
staticfn int l_selection_rndcoord(lua_State *);
|
||||
staticfn int l_selection_room(lua_State *);
|
||||
staticfn int l_selection_getbounds(lua_State *);
|
||||
staticfn boolean params_sel_2coords(lua_State *, struct selectionvar **,
|
||||
coordxy *, coordxy *, coordxy *, coordxy *);
|
||||
static int l_selection_line(lua_State *);
|
||||
static int l_selection_randline(lua_State *);
|
||||
static int l_selection_rect(lua_State *);
|
||||
static int l_selection_fillrect(lua_State *);
|
||||
static int l_selection_grow(lua_State *);
|
||||
static int l_selection_filter_mapchar(lua_State *);
|
||||
static int l_selection_match(lua_State *);
|
||||
static int l_selection_flood(lua_State *);
|
||||
static int l_selection_circle(lua_State *);
|
||||
static int l_selection_ellipse(lua_State *);
|
||||
static int l_selection_gradient(lua_State *);
|
||||
static int l_selection_iterate(lua_State *);
|
||||
static int l_selection_gc(lua_State *);
|
||||
static int l_selection_not(lua_State *);
|
||||
static int l_selection_and(lua_State *);
|
||||
static int l_selection_or(lua_State *);
|
||||
static int l_selection_xor(lua_State *);
|
||||
staticfn int l_selection_line(lua_State *);
|
||||
staticfn int l_selection_randline(lua_State *);
|
||||
staticfn int l_selection_rect(lua_State *);
|
||||
staticfn int l_selection_fillrect(lua_State *);
|
||||
staticfn int l_selection_grow(lua_State *);
|
||||
staticfn int l_selection_filter_mapchar(lua_State *);
|
||||
staticfn int l_selection_match(lua_State *);
|
||||
staticfn int l_selection_flood(lua_State *);
|
||||
staticfn int l_selection_circle(lua_State *);
|
||||
staticfn int l_selection_ellipse(lua_State *);
|
||||
staticfn int l_selection_gradient(lua_State *);
|
||||
staticfn int l_selection_iterate(lua_State *);
|
||||
staticfn int l_selection_gc(lua_State *);
|
||||
staticfn int l_selection_not(lua_State *);
|
||||
staticfn int l_selection_and(lua_State *);
|
||||
staticfn int l_selection_or(lua_State *);
|
||||
staticfn int l_selection_xor(lua_State *);
|
||||
/* There doesn't seem to be a point in having a l_selection_add since it would
|
||||
* do the same thing as l_selection_or. The addition operator is mapped to
|
||||
* l_selection_or. */
|
||||
static int l_selection_sub(lua_State *);
|
||||
staticfn int l_selection_sub(lua_State *);
|
||||
#if 0
|
||||
/* the following do not appear to currently be
|
||||
used and because they are static, the OSX
|
||||
@@ -49,8 +49,8 @@ static int l_selection_sub(lua_State *);
|
||||
if ifdef'd out the prototype here and the
|
||||
function body below.
|
||||
*/
|
||||
static int l_selection_ipairs(lua_State *);
|
||||
static struct selectionvar *l_selection_to(lua_State *, int);
|
||||
staticfn int l_selection_ipairs(lua_State *);
|
||||
staticfn struct selectionvar *l_selection_to(lua_State *, int);
|
||||
#endif
|
||||
|
||||
struct selectionvar *
|
||||
@@ -65,7 +65,7 @@ l_selection_check(lua_State *L, int index)
|
||||
return sel;
|
||||
}
|
||||
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_gc(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = l_selection_check(L, 1);
|
||||
@@ -76,7 +76,7 @@ l_selection_gc(lua_State *L)
|
||||
}
|
||||
|
||||
#if 0
|
||||
static struct selectionvar *
|
||||
staticfn struct selectionvar *
|
||||
l_selection_to(lua_State *L, int index)
|
||||
{
|
||||
struct selectionvar *sel = (struct selectionvar *) lua_touserdata(L, index);
|
||||
@@ -88,7 +88,7 @@ l_selection_to(lua_State *L, int index)
|
||||
#endif
|
||||
|
||||
/* push a new selection into lua stack, return the selectionvar */
|
||||
static struct selectionvar *
|
||||
staticfn struct selectionvar *
|
||||
l_selection_push_new(lua_State *L)
|
||||
{
|
||||
struct selectionvar *tmp = selection_new();
|
||||
@@ -121,7 +121,7 @@ l_selection_push_copy(lua_State *L, struct selectionvar *tmp)
|
||||
|
||||
|
||||
/* local sel = selection.new(); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_new(lua_State *L)
|
||||
{
|
||||
(void) l_selection_push_new(L);
|
||||
@@ -130,7 +130,7 @@ l_selection_new(lua_State *L)
|
||||
|
||||
/* Replace the topmost selection in the stack with a clone of it. */
|
||||
/* local sel = selection.clone(sel); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_clone(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = l_selection_check(L, 1);
|
||||
@@ -153,7 +153,7 @@ DISABLE_WARNING_UNREACHABLE_CODE
|
||||
/* local sel = sel:set(); */
|
||||
/* local sel = selection.set(sel); */
|
||||
/* TODO: allow setting multiple coordinates at once: set({x,y}, {x,y}, ...); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_setpoint(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = (struct selectionvar *) 0;
|
||||
@@ -197,7 +197,7 @@ l_selection_setpoint(lua_State *L)
|
||||
}
|
||||
|
||||
/* local numpoints = selection.numpoints(sel); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_numpoints(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = l_selection_check(L, 1);
|
||||
@@ -218,7 +218,7 @@ l_selection_numpoints(lua_State *L)
|
||||
}
|
||||
|
||||
/* local value = selection.get(sel, x, y); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_getpoint(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = l_selection_check(L, 1);
|
||||
@@ -253,7 +253,7 @@ RESTORE_WARNING_UNREACHABLE_CODE
|
||||
/* local s = selection.negate(sel); */
|
||||
/* local s = selection.negate(); */
|
||||
/* local s = sel:negate(); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_not(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -274,7 +274,7 @@ l_selection_not(lua_State *L)
|
||||
}
|
||||
|
||||
/* local sel = selection.area(4,5, 40,10) & selection.rect(7,8, 60,14); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_and(lua_State *L)
|
||||
{
|
||||
int x,y;
|
||||
@@ -297,7 +297,7 @@ l_selection_and(lua_State *L)
|
||||
}
|
||||
|
||||
/* local sel = selection.area(4,5, 40,10) | selection.rect(7,8, 60,14); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_or(lua_State *L)
|
||||
{
|
||||
int x,y;
|
||||
@@ -321,7 +321,7 @@ l_selection_or(lua_State *L)
|
||||
}
|
||||
|
||||
/* local sel = selection.area(4,5, 40,10) ~ selection.rect(7,8, 60,14); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_xor(lua_State *L)
|
||||
{
|
||||
int x,y;
|
||||
@@ -348,7 +348,7 @@ l_selection_xor(lua_State *L)
|
||||
|
||||
/* local sel = selection.area(10,10, 20,20) - selection.area(14,14, 17,17)
|
||||
* - i.e. points that are in A but not in B */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_sub(lua_State *L)
|
||||
{
|
||||
int x,y;
|
||||
@@ -376,7 +376,7 @@ l_selection_sub(lua_State *L)
|
||||
}
|
||||
|
||||
/* local s = selection.percentage(sel, 50); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_filter_percent(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -394,7 +394,7 @@ l_selection_filter_percent(lua_State *L)
|
||||
|
||||
/* local pt = selection.rndcoord(sel); */
|
||||
/* local pt = selection.rndcoord(sel, 1); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_rndcoord(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = l_selection_check(L, 1);
|
||||
@@ -419,7 +419,7 @@ l_selection_rndcoord(lua_State *L)
|
||||
}
|
||||
|
||||
/* local s = selection.room(); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_room(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel;
|
||||
@@ -441,7 +441,7 @@ l_selection_room(lua_State *L)
|
||||
}
|
||||
|
||||
/* local rect = sel:bounds(); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_getbounds(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = l_selection_check(L, 1);
|
||||
@@ -463,7 +463,7 @@ l_selection_getbounds(lua_State *L)
|
||||
*/
|
||||
/* function(selection, x1,y1, x2,y2) */
|
||||
/* selection:function(x1,y1, x2,y2) */
|
||||
static boolean
|
||||
staticfn boolean
|
||||
params_sel_2coords(lua_State *L, struct selectionvar **sel,
|
||||
coordxy *x1, coordxy *y1, coordxy *x2, coordxy *y2)
|
||||
{
|
||||
@@ -496,7 +496,7 @@ params_sel_2coords(lua_State *L, struct selectionvar **sel,
|
||||
/* local s = selection.line(sel, x1,y1, x2,y2); */
|
||||
/* local s = selection.line(x1,y1, x2,y2); */
|
||||
/* s:line(x1,y1, x2,y2); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_line(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = NULL;
|
||||
@@ -516,7 +516,7 @@ l_selection_line(lua_State *L)
|
||||
}
|
||||
|
||||
/* local s = selection.rect(sel, x1,y1, x2,y2); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_rect(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = NULL;
|
||||
@@ -544,7 +544,7 @@ l_selection_rect(lua_State *L)
|
||||
/* local s = selection.fillrect(x1,y1, x2,y2); */
|
||||
/* s:fillrect(x1,y1, x2,y2); */
|
||||
/* selection.area(x1,y1, x2,y2); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_fillrect(lua_State *L)
|
||||
{
|
||||
struct selectionvar *sel = NULL;
|
||||
@@ -576,7 +576,7 @@ l_selection_fillrect(lua_State *L)
|
||||
/* local s = selection.randline(x1,y1, x2,y2, roughness); */
|
||||
/* TODO: selection.randline(x1,y1, x2,y2, roughness); */
|
||||
/* TODO: selection.randline({x1,y1}, {x2,y2}, roughness); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_randline(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -616,7 +616,7 @@ l_selection_randline(lua_State *L)
|
||||
|
||||
/* local s = selection.grow(sel); */
|
||||
/* local s = selection.grow(sel, "north"); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_grow(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -637,7 +637,7 @@ l_selection_grow(lua_State *L)
|
||||
|
||||
|
||||
/* local s = selection.filter_mapchar(sel, mapchar, lit); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_filter_mapchar(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -662,7 +662,7 @@ l_selection_filter_mapchar(lua_State *L)
|
||||
}
|
||||
|
||||
/* local s = selection.match([[...]]); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_match(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -702,7 +702,7 @@ l_selection_match(lua_State *L)
|
||||
|
||||
/* local s = selection.floodfill(x,y); */
|
||||
/* local s = selection.floodfill(x,y, diagonals); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_flood(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -738,7 +738,7 @@ l_selection_flood(lua_State *L)
|
||||
/* local s = selection.circle(x, y, radius, filled); */
|
||||
/* local s = selection.circle(sel, x, y, radius); */
|
||||
/* local s = selection.circle(sel, x, y, radius, filled); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_circle(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -786,7 +786,7 @@ l_selection_circle(lua_State *L)
|
||||
/* local s = selection.ellipse(x, y, radius1, radius2, filled); */
|
||||
/* local s = selection.ellipse(sel, x, y, radius1, radius2); */
|
||||
/* local s = selection.ellipse(sel, x, y, radius1, radius2, filled); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_ellipse(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -838,7 +838,7 @@ l_selection_ellipse(lua_State *L)
|
||||
* non-obvious argument order. */
|
||||
/* selection.gradient({ type = "radial", x = 3, y = 5, x2 = 10, y2 = 12,
|
||||
* mindist = 4, maxdist = 10, limited = false }); */
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_gradient(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
@@ -898,7 +898,7 @@ l_selection_gradient(lua_State *L)
|
||||
* The x, y coordinates passed to the function are map- or room-relative
|
||||
* rather than absolute, unless there has been no previous map or room defined.
|
||||
*/
|
||||
static int
|
||||
staticfn int
|
||||
l_selection_iterate(lua_State *L)
|
||||
{
|
||||
int argc = lua_gettop(L);
|
||||
|
||||
Reference in New Issue
Block a user