gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/win-plot-refs.c
diff options
context:
space:
mode:
Diffstat (limited to 'win-plot-refs.c')
-rw-r--r--win-plot-refs.c 30
1 files changed, 30 insertions, 0 deletions
diff --git a/win-plot-refs.c b/win-plot-refs.c
index 3dbd4dd9..bd7a642a 100644
--- a/win-plot-refs.c
+++ b/win-plot-refs.c
@@ -60,3 +60,33 @@ window_plot_ref_remove (lua_State *L, int slot_id, int window_index)
lua_pop (L, 2);
}
+
+void
+window_plot_rev_lookup_apply (lua_State *L, int plot_index, lua_CFunction func)
+{
+ INDEX_SET_ABS(L, plot_index);
+
+ lua_getfield (L, LUA_REGISTRYINDEX, window_plot_ref_table_name);
+ lua_pushnil (L);
+
+ while (lua_next (L, -2) != 0)
+ {
+ lua_pushnil (L);
+
+ while (lua_next (L, -2) != 0)
+ {
+ if (lua_rawequal (L, -1, plot_index))
+ {
+ lua_pushcfunction (L, func);
+ lua_pushvalue (L, -5);
+ lua_pushvalue (L, -4);
+ lua_call (L, 2, 0);
+ }
+ lua_pop (L, 1);
+ }
+
+ lua_pop (L, 1);
+ }
+
+ lua_pop (L, 1);
+}
generated by cgit v1.2.3 (git 2.39.1) at 2025年10月02日 01:34:06 +0000

AltStyle によって変換されたページ (->オリジナル) /