From bda7b198aeae366fddf9476ef5aa3a760f4c580f Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Sun, 19 Feb 2012 03:11:23 +0000 Subject: reformat code to match Pd style by running 'astyle --style=ansi *.c' svn path=/trunk/externals/log/; revision=15995 --- debug.c | 16 ++++++++-------- error.c | 16 ++++++++-------- fatal.c | 16 ++++++++-------- logpost.c | 9 +++++---- normal.c | 16 ++++++++-------- 5 files changed, 37 insertions(+), 36 deletions(-) diff --git a/debug.c b/debug.c index 51d4048..e423e7a 100644 --- a/debug.c +++ b/debug.c @@ -28,13 +28,13 @@ static t_symbol* args2symbol(int argc, t_atom *argv) static void debug_bang(t_debug *x) { - logpost(x, x->level, "%s%sbang", + logpost(x, x->level, "%s%sbang", x->tag->s_name, (*x->tag->s_name ? ": " : "")); } static void debug_pointer(t_debug *x, t_gpointer *gp) { - logpost(x, x->level, "%s%s(pointer %lx)", + logpost(x, x->level, "%s%s(pointer %lx)", x->tag->s_name, (*x->tag->s_name ? ": " : ""), gp); } @@ -48,7 +48,7 @@ static void debug_anything(t_debug *x, t_symbol *s, int argc, t_atom *argv) { t_symbol* output = args2symbol(argc, argv); logpost(x, (const int)x->level, "%s%s%s %s", - x->tag->s_name, (*x->tag->s_name ? ": " : ""), + x->tag->s_name, (*x->tag->s_name ? ": " : ""), s->s_name, output->s_name); } @@ -65,11 +65,11 @@ static void *debug_new(t_symbol *s, int argc, t_atom *argv) void debug_setup(void) { debug_class = class_new(gensym("debug"), - (t_newmethod)debug_new, - 0, - sizeof(t_debug), - CLASS_DEFAULT, - A_GIMME, 0); + (t_newmethod)debug_new, + 0, + sizeof(t_debug), + CLASS_DEFAULT, + A_GIMME, 0); class_addbang(debug_class, debug_bang); class_addfloat(debug_class, debug_float); class_addpointer(debug_class, debug_pointer); diff --git a/error.c b/error.c index 745c2d8..44e11b6 100644 --- a/error.c +++ b/error.c @@ -28,13 +28,13 @@ static t_symbol* args2symbol(int argc, t_atom *argv) static void error_bang(t_error *x) { - logpost(x, x->level, "%s%sbang", + logpost(x, x->level, "%s%sbang", x->tag->s_name, (*x->tag->s_name ? ": " : "")); } static void error_pointer(t_error *x, t_gpointer *gp) { - logpost(x, x->level, "%s%s(pointer %lx)", + logpost(x, x->level, "%s%s(pointer %lx)", x->tag->s_name, (*x->tag->s_name ? ": " : ""), gp); } @@ -48,7 +48,7 @@ static void error_anything(t_error *x, t_symbol *s, int argc, t_atom *argv) { t_symbol* output = args2symbol(argc, argv); logpost(x, (const int)x->level, "%s%s%s %s", - x->tag->s_name, (*x->tag->s_name ? ": " : ""), + x->tag->s_name, (*x->tag->s_name ? ": " : ""), s->s_name, output->s_name); } @@ -65,11 +65,11 @@ static void *error_new(t_symbol *s, int argc, t_atom *argv) void error_setup(void) { error_class = class_new(gensym("error"), - (t_newmethod)error_new, - 0, - sizeof(t_error), - CLASS_DEFAULT, - A_GIMME, 0); + (t_newmethod)error_new, + 0, + sizeof(t_error), + CLASS_DEFAULT, + A_GIMME, 0); class_addbang(error_class, error_bang); class_addfloat(error_class, error_float); class_addpointer(error_class, error_pointer); diff --git a/fatal.c b/fatal.c index a8b8d0a..ee0ee6c 100644 --- a/fatal.c +++ b/fatal.c @@ -28,13 +28,13 @@ static t_symbol* args2symbol(int argc, t_atom *argv) static void fatal_bang(t_fatal *x) { - logpost(x, x->level, "%s%sbang", + logpost(x, x->level, "%s%sbang", x->tag->s_name, (*x->tag->s_name ? ": " : "")); } static void fatal_pointer(t_fatal *x, t_gpointer *gp) { - logpost(x, x->level, "%s%s(pointer %lx)", + logpost(x, x->level, "%s%s(pointer %lx)", x->tag->s_name, (*x->tag->s_name ? ": " : ""), gp); } @@ -48,7 +48,7 @@ static void fatal_anything(t_fatal *x, t_symbol *s, int argc, t_atom *argv) { t_symbol* output = args2symbol(argc, argv); logpost(x, (const int)x->level, "%s%s%s %s", - x->tag->s_name, (*x->tag->s_name ? ": " : ""), + x->tag->s_name, (*x->tag->s_name ? ": " : ""), s->s_name, output->s_name); } @@ -65,11 +65,11 @@ static void *fatal_new(t_symbol *s, int argc, t_atom *argv) void fatal_setup(void) { fatal_class = class_new(gensym("fatal"), - (t_newmethod)fatal_new, - 0, - sizeof(t_fatal), - CLASS_DEFAULT, - A_GIMME, 0); + (t_newmethod)fatal_new, + 0, + sizeof(t_fatal), + CLASS_DEFAULT, + A_GIMME, 0); class_addbang(fatal_class, fatal_bang); class_addfloat(fatal_class, fatal_float); class_addpointer(fatal_class, fatal_pointer); diff --git a/logpost.c b/logpost.c index a66d5b0..7fec577 100644 --- a/logpost.c +++ b/logpost.c @@ -28,13 +28,13 @@ static t_symbol* args2symbol(int argc, t_atom *argv) static void logpost_bang(t_logpost *x) { - logpost(x, (const int)x->level, "%s%sbang", + logpost(x, (const int)x->level, "%s%sbang", x->tag->s_name, (*x->tag->s_name ? ": " : "")); } static void logpost_pointer(t_logpost *x, t_gpointer *gp) { - logpost(x, (const int)x->level, "%s%s(pointer %lx)", + logpost(x, (const int)x->level, "%s%s(pointer %lx)", x->tag->s_name, (*x->tag->s_name ? ": " : ""), gp); } @@ -48,7 +48,7 @@ static void logpost_anything(t_logpost *x, t_symbol *s, int argc, t_atom *argv) { t_symbol* output = args2symbol(argc, argv); logpost(x, (const int)x->level, "%s%s%s %s", - x->tag->s_name, (*x->tag->s_name ? ": " : ""), + x->tag->s_name, (*x->tag->s_name ? ": " : ""), s->s_name, output->s_name); } @@ -66,7 +66,8 @@ static void *logpost_new(t_symbol *sel, int argc, t_atom *argv) x->level = atom_getfloatarg(0, argc, argv); if (argc > 1) { - argc--; argv++; // lose the level arg + argc--; + argv++; // lose the level arg x->tag = args2symbol(argc, argv); } floatinlet_new(&x->x_obj, &x->level); diff --git a/normal.c b/normal.c index 74dee18..2abf264 100644 --- a/normal.c +++ b/normal.c @@ -28,13 +28,13 @@ static t_symbol* args2symbol(int argc, t_atom *argv) static void normal_bang(t_normal *x) { - logpost(x, x->level, "%s%sbang", + logpost(x, x->level, "%s%sbang", x->tag->s_name, (*x->tag->s_name ? ": " : "")); } static void normal_pointer(t_normal *x, t_gpointer *gp) { - logpost(x, x->level, "%s%s(pointer %lx)", + logpost(x, x->level, "%s%s(pointer %lx)", x->tag->s_name, (*x->tag->s_name ? ": " : ""), gp); } @@ -48,7 +48,7 @@ static void normal_anything(t_normal *x, t_symbol *s, int argc, t_atom *argv) { t_symbol* output = args2symbol(argc, argv); logpost(x, (const int)x->level, "%s%s%s %s", - x->tag->s_name, (*x->tag->s_name ? ": " : ""), + x->tag->s_name, (*x->tag->s_name ? ": " : ""), s->s_name, output->s_name); } @@ -65,11 +65,11 @@ static void *normal_new(t_symbol *s, int argc, t_atom *argv) void normal_setup(void) { normal_class = class_new(gensym("normal"), - (t_newmethod)normal_new, - 0, - sizeof(t_normal), - CLASS_DEFAULT, - A_GIMME, 0); + (t_newmethod)normal_new, + 0, + sizeof(t_normal), + CLASS_DEFAULT, + A_GIMME, 0); class_addbang(normal_class, normal_bang); class_addfloat(normal_class, normal_float); class_addpointer(normal_class, normal_pointer); -- cgit v1.2.1