diff options
author | Bryan Jurish <mukau@users.sourceforge.net> | 2009-01-17 12:54:30 +0000 |
---|---|---|
committer | Bryan Jurish <mukau@users.sourceforge.net> | 2009-01-17 12:54:30 +0000 |
commit | ff1fe535ca2dcb796b95c93dd896b85d6b521854 (patch) | |
tree | d88c455e1f2aa88ceaf791dd96f7b22871091d7d /src | |
parent | 26ecf2950dabe24c91a22b43e340345619aac306 (diff) |
+ changed default output of [any2string] to (unsigned char)
- fixes sourceforge bug #2501709, reported by Roman Haefeli
svn path=/trunk/externals/moocow/pdstring/; revision=10562
Diffstat (limited to 'src')
-rw-r--r-- | src/any2string.c | 12 | ||||
-rw-r--r-- | src/pdstring.c | 9 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/any2string.c b/src/any2string.c index 9d688f7..2c27ba8 100644 --- a/src/any2string.c +++ b/src/any2string.c @@ -1,10 +1,10 @@ /* -*- Mode: C -*- */ /*=============================================================================*\ - * File: any2string_dynamic.c + * File: any2string.c * Author: Bryan Jurish <moocow@ling.uni-potsdam.de> * Description: convert pd messages to strings (dynamic allocation) * - * Copyright (c) 2004 - 2008 Bryan Jurish. + * Copyright (c) 2004 - 2009 Bryan Jurish. * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file "COPYING", in this distribution. @@ -85,7 +85,7 @@ static char *any2string_banner = "any2string: pdstring version " PACKAGE_VERSION static void any2string_anything(t_any2string *x, t_symbol *sel, int argc, t_atom *argv) { t_atom *ap; - char *s, *s_max; + unsigned char *s, *s_max; int len; A2SDEBUG(post("-------any2string_anything(%p,...)---------", x)); @@ -130,8 +130,8 @@ static void any2string_anything(t_any2string *x, t_symbol *sel, int argc, t_atom /*-- atom buffer: binbuf text --*/ A2SDEBUG(post("any2string[%p]: atom buffer: for {...}", x)); ap = x->x_argv; - s_max = x->x_text+len; - for (s=x->x_text; s < s_max; s++, ap++) { + s_max = ((unsigned char *)x->x_text)+len; + for (s=((unsigned char *)x->x_text); s < s_max; s++, ap++) { A2SDEBUG(post("any2string[%p]: atom buffer[%d]: SETFLOAT(a,%d='%c')", x, (ap-x->x_argv), *s, *s)); SETFLOAT(ap,*s); } @@ -167,7 +167,7 @@ static void *any2string_new(t_symbol *sel, int argc, t_atom *argv) } //-- allocate - x->x_text = (char *)getbytes(x->x_alloc*sizeof(char)); + x->x_text = getbytes(x->x_alloc*sizeof(char)); x->x_argc = 0; x->x_argv = (t_atom *)getbytes(x->x_alloc*sizeof(t_atom)); x->x_binbuf = binbuf_new(); diff --git a/src/pdstring.c b/src/pdstring.c index cf0bd6e..afc2f2e 100644 --- a/src/pdstring.c +++ b/src/pdstring.c @@ -4,7 +4,7 @@ * Author: Bryan Jurish <moocow@ling.uni-potsdam.de> * Description: pd string conversions : library * - * Copyright (c) 2004-2008 Bryan Jurish. + * Copyright (c) 2004-2009 Bryan Jurish. * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file "COPYING", in this distribution. @@ -38,7 +38,6 @@ /*===================================================================== * Constants *=====================================================================*/ -static char *pdstring_version = "\npdstring version " PACKAGE_VERSION " by Bryan Jurish"; /*===================================================================== * Structures and Types: pdstring [dummy] @@ -78,7 +77,9 @@ static void *pdstring_new(void) */ static void pdstring_help(t_pdstring *x) { - post(pdstring_version); + post(""); + post("pdstring: byte-string externals version " PACKAGE_VERSION " by Bryan Jurish"); + post("pdstring: compiled by " PDSTRING_USER " on " PDSTRING_DATE); } /*===================================================================== @@ -86,7 +87,7 @@ static void pdstring_help(t_pdstring *x) *=====================================================================*/ void pdstring_setup(void) { - post(pdstring_version); + pdstring_help(NULL); #ifndef PDSTRING_OBJECT_EXTERNALS any2string_setup_guts(); |