From e97111ee9c743dbb05f0aeca799594b5c451c66f Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 30 Jan 2012 03:38:27 +0000 Subject: post version message using verbose(0) svn path=/trunk/externals/hcs/; revision=15916 --- ce_path.c | 8 ++++---- classpath.c | 18 ++++++------------ folder_list.c | 4 ++-- group.c | 12 +++--------- helppath.c | 8 ++++---- passwd.c | 14 ++++---------- split_path.c | 10 ++-------- stat.c | 14 +++----------- 8 files changed, 28 insertions(+), 60 deletions(-) diff --git a/ce_path.c b/ce_path.c index 54b0c6b..da69123 100644 --- a/ce_path.c +++ b/ce_path.c @@ -104,8 +104,8 @@ void ce_path_setup(void) class_addmethod(ce_path_class, (t_method) ce_path_rewind, gensym("rewind"), 0); - post("[ce_path] %s", version); - post("\tcompiled on "__DATE__" at "__TIME__ " "); - post("\tcompiled against Pd version %d.%d.%d", PD_MAJOR_VERSION, - PD_MINOR_VERSION, PD_BUGFIX_VERSION); + verbose(0, "[ce_path] %s", version); + verbose(0, "\tcompiled on "__DATE__" at "__TIME__ " "); + verbose(0, "\tcompiled against Pd version %d.%d.%d", PD_MAJOR_VERSION, + PD_MINOR_VERSION, PD_BUGFIX_VERSION); } diff --git a/classpath.c b/classpath.c index d118c49..aa0cfb3 100644 --- a/classpath.c +++ b/classpath.c @@ -40,8 +40,6 @@ static char *version = "$Revision: 1.3 $"; -t_int classpath_instance_count; - #define DEBUG(x) //#define DEBUG(x) x @@ -103,16 +101,6 @@ static void *classpath_new() DEBUG(post("classpath_new");); t_classpath *x = (t_classpath *)pd_new(classpath_class); - if(!classpath_instance_count) - { - post("[classpath] %s",version); - post("\twritten by Hans-Christoph Steiner "); - post("\tcompiled on "__DATE__" at "__TIME__ " "); - post("\tcompiled against Pd version %d.%d.%d", PD_MAJOR_VERSION, - PD_MINOR_VERSION, PD_BUGFIX_VERSION); - } - classpath_instance_count++; - x->x_data_outlet = outlet_new(&x->x_obj, &s_symbol); x->x_status_outlet = outlet_new(&x->x_obj, 0); @@ -144,5 +132,11 @@ void classpath_setup(void) gensym("rewind"), 0); class_addmethod(classpath_class,(t_method) classpath_add,gensym("add"), A_DEFSYMBOL, 0); + + verbose(0, "[classpath] %s",version); + verbose(0, "\twritten by Hans-Christoph Steiner "); + verbose(0, "\tcompiled on "__DATE__" at "__TIME__ " "); + verbose(0, "\tcompiled against Pd version %d.%d.%d", PD_MAJOR_VERSION, + PD_MINOR_VERSION, PD_BUGFIX_VERSION); } diff --git a/folder_list.c b/folder_list.c index 6e5b682..b0f2f97 100644 --- a/folder_list.c +++ b/folder_list.c @@ -192,7 +192,7 @@ static void folder_list_set(t_folder_list* x, t_symbol *s) patternBuffer = getbytes(FILENAME_MAX); strcpy(patternBuffer,"%USERPROFILE%"); strncat(patternBuffer, s->s_name + 1, FILENAME_MAX - 1); - post("set: %s", patternBuffer); + verbose(-1, "set: %s", patternBuffer); } else { @@ -238,7 +238,7 @@ static void *folder_list_new(t_symbol *s) strncpy(buffer,currentdir->s_name,MAXPDSTRING); strncat(buffer,"/*",MAXPDSTRING); x->x_pattern = gensym(buffer); - post("setting pattern to default: %s",x->x_pattern->s_name); + logpost(x, 3, "setting pattern to default: %s",x->x_pattern->s_name); } return (x); diff --git a/group.c b/group.c index f4de2d8..79283cb 100644 --- a/group.c +++ b/group.c @@ -42,8 +42,6 @@ static char *version = "$Revision: 1.3 $"; -t_int group_instance_count; - #define DEBUG(x) //#define DEBUG(x) x @@ -213,13 +211,6 @@ static void *group_new(t_symbol *s, int argc, t_atom *argv) t_group *x = (t_group *)pd_new(group_class); - if(!group_instance_count) - { - post("[group] %s",version); - post("\twritten by Hans-Christoph Steiner "); - post("\tcompiled on "__DATE__" at "__TIME__ " "); - } - group_instance_count++; floatinlet_new(&x->x_obj, &x->x_gid); x->x_data_outlet = outlet_new(&x->x_obj, 0); @@ -260,6 +251,9 @@ void group_setup(void) gensym("set"), A_GIMME, 0); + verbose(0, "[group] %s",version); + verbose(0, "\twritten by Hans-Christoph Steiner "); + verbose(0, "\tcompiled on "__DATE__" at "__TIME__ " "); } #endif /* NOT _WIN32 */ diff --git a/helppath.c b/helppath.c index 1fb05c2..23ab630 100644 --- a/helppath.c +++ b/helppath.c @@ -128,9 +128,9 @@ void helppath_setup(void) class_addmethod(helppath_class,(t_method) helppath_add,gensym("add"), A_DEFSYMBOL, 0); - post("[helppath] %s", version); - post("\tcompiled on "__DATE__" at "__TIME__ " "); - post("\tcompiled against Pd version %d.%d.%d", PD_MAJOR_VERSION, - PD_MINOR_VERSION, PD_BUGFIX_VERSION); + verbose(0, "[helppath] %s", version); + verbose(0, "\tcompiled on "__DATE__" at "__TIME__ " "); + verbose(0, "\tcompiled against Pd version %d.%d.%d", PD_MAJOR_VERSION, + PD_MINOR_VERSION, PD_BUGFIX_VERSION); } diff --git a/passwd.c b/passwd.c index 7f574ca..48acb27 100644 --- a/passwd.c +++ b/passwd.c @@ -41,8 +41,6 @@ static char *version = "$Revision: 1.3 $"; -t_int passwd_instance_count; - #define DEBUG(x) //#define DEBUG(x) x @@ -162,14 +160,6 @@ static void *passwd_new(t_symbol *s, int argc, t_atom *argv) t_passwd *x = (t_passwd *)pd_new(passwd_class); - if(!passwd_instance_count) - { - post("[passwd] %s",version); - post("\twritten by Hans-Christoph Steiner "); - post("\tcompiled on "__DATE__" at "__TIME__ " "); - } - passwd_instance_count++; - floatinlet_new(&x->x_obj, &x->x_uid); x->x_data_outlet = outlet_new(&x->x_obj, 0); x->x_status_outlet = outlet_new(&x->x_obj, 0); @@ -209,6 +199,10 @@ void passwd_setup(void) gensym("set"), A_GIMME, 0); + + verbose(0, "[passwd] %s",version); + verbose(0, "\twritten by Hans-Christoph Steiner "); + verbose(0, "\tcompiled on "__DATE__" at "__TIME__ " "); } #endif /* NOT _WIN32 */ diff --git a/split_path.c b/split_path.c index 2ee125b..1f5b960 100644 --- a/split_path.c +++ b/split_path.c @@ -13,8 +13,6 @@ static char *version = "$Revision: 1.1 $"; -t_int split_path_instance_count; - /* ------------------------ split_path ----------------------------- */ static t_class *split_path_class; @@ -60,12 +58,6 @@ static void *split_path_new() t_split_path *x = (t_split_path *)pd_new(split_path_class); x->x_path_outlet = (t_outlet *)outlet_new(&x->x_obj, &s_symbol); x->x_filename_outlet = (t_outlet *)outlet_new(&x->x_obj, &s_symbol); - if(!split_path_instance_count) - { - post("[split_path] %s",version); - post("\twritten by Hans-Christoph Steiner "); - } - split_path_instance_count++; return (x); } @@ -74,6 +66,8 @@ void split_path_setup(void) split_path_class = class_new(gensym("split_path"), (t_newmethod)split_path_new, 0, sizeof(t_split_path), 0,0); class_addsymbol(split_path_class,split_path_symbol); + verbose(0, "[split_path] %s",version); + verbose(0, "\twritten by Hans-Christoph Steiner "); } diff --git a/stat.c b/stat.c index 8648637..811de38 100644 --- a/stat.c +++ b/stat.c @@ -40,8 +40,6 @@ static char *version = "$Revision: 1.5 $"; -t_int stat_instance_count; - #define DEBUG(x) //#define DEBUG(x) x @@ -264,15 +262,6 @@ static void *stat_new(t_symbol *s) t_stat *x = (t_stat *)pd_new(stat_class); - if(!stat_instance_count) - { - post("[stat] %s",version); - post("\twritten by Hans-Christoph Steiner "); - post("\tcompiled on "__DATE__" at "__TIME__ " "); - } - stat_instance_count++; - - symbolinlet_new(&x->x_obj, &x->x_filename); x->x_data_outlet = outlet_new(&x->x_obj, 0); x->x_status_outlet = outlet_new(&x->x_obj, 0); @@ -308,5 +297,8 @@ void stat_setup(void) /* add inlet message methods */ class_addmethod(stat_class,(t_method) stat_set,gensym("set"), A_DEFSYM, 0); + verbose(0, "[stat] %s",version); + verbose(0, "\twritten by Hans-Christoph Steiner "); + verbose(0, "\tcompiled on "__DATE__" at "__TIME__ " "); } -- cgit v1.2.1