From b8dedcf864f3a7481dba26c94fcb9cbe972b7305 Mon Sep 17 00:00:00 2001 From: Fede Camara Halac Date: Sun, 18 Jun 2023 23:17:00 +0200 Subject: [PATCH] fix missing function def --- src/connect.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/connect.c b/src/connect.c index 641825e..3aef862 100644 --- a/src/connect.c +++ b/src/connect.c @@ -23,6 +23,19 @@ typedef struct connect { } t_connect; int setcanvassym_connect(t_connect *x, t_symbol *s); +int glist_getindex(t_glist *x, t_gobj *y); + + /* get the index of a gobj in a glist. If y is zero, return the + total number of objects. */ +int glist_getindex(t_glist *x, t_gobj *y) +{ + t_gobj *y2; + int indx; + + for (y2 = x->gl_list, indx = 0; y2 && y2 != y; y2 = y2->g_next) + indx++; + return (indx); +} int setcanvassym_connect(t_connect *x, t_symbol *s) {