diff options
author | N.N. <krzyszcz@users.sourceforge.net> | 2003-05-23 12:29:55 +0000 |
---|---|---|
committer | N.N. <krzyszcz@users.sourceforge.net> | 2003-05-23 12:29:55 +0000 |
commit | faada59567f8cb252f4a909116595ce309ff5828 (patch) | |
tree | 5874954c6f2d5392d921208e49a45ef266beeb7f /shared/unstable/fragile.c |
This commit was generated by cvs2svn to compensate for changes in r647,svn2git-root
which included commits to RCS files with non-trunk default branches.
svn path=/trunk/externals/miXed/; revision=648
Diffstat (limited to 'shared/unstable/fragile.c')
-rw-r--r-- | shared/unstable/fragile.c | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/shared/unstable/fragile.c b/shared/unstable/fragile.c new file mode 100644 index 0000000..3267721 --- /dev/null +++ b/shared/unstable/fragile.c @@ -0,0 +1,67 @@ +/* Copyright (c) 1997-2003 Miller Puckette, krzYszcz, and others. + * For information on usage and redistribution, and for a DISCLAIMER OF ALL + * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ + +#include <string.h> +#include "m_pd.h" +#include "unstable/pd_imp.h" +#include "unstable/fragile.h" + +int fragile_class_count(void) +{ + return (pd_objectmaker->c_nmethod); +} + +void fragile_class_printnames(char *msg, int firstndx, int lastndx) +{ + t_methodentry *mp = pd_objectmaker->c_methods; + int ndx, len = strlen(msg); + startpost(msg); + for (ndx = firstndx, mp += ndx; ndx <= lastndx; ndx++, mp++) + { + t_symbol *s = mp->me_name; + if (s && s->s_name[0] != '_') + { + int l = 1 + strlen(s->s_name); + if ((len += l) > 66) + { + endpost(); + startpost(" "); + len = 3 + l; + } + poststring(s->s_name); + } + } + endpost(); +} + +/* This structure is local to g_array.c. We need it, + because there is no other way to get into array's graph. */ +struct _garray +{ + t_gobj x_gobj; + t_glist *x_glist; + /* ... */ +}; + +t_glist *fragile_garray_glist(void *arr) +{ + return (((struct _garray *)arr)->x_glist); +} + +/* This is local to m_obj.c. + LATER export write access to o_connections field ('grab' class). + LATER encapsulate 'traverseoutlet' routines (not in the stable API yet). */ +struct _outlet +{ + t_object *o_owner; + struct _outlet *o_next; + t_outconnect *o_connections; + t_symbol *o_sym; +}; + +/* obj_starttraverseoutlet() replacement */ +t_outconnect *fragile_outlet_connections(t_outlet *o) +{ + return (o ? o->o_connections : 0); +} |