aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Jurish <mukau@users.sourceforge.net>2009-01-17 12:54:30 +0000
committerBryan Jurish <mukau@users.sourceforge.net>2009-01-17 12:54:30 +0000
commitff1fe535ca2dcb796b95c93dd896b85d6b521854 (patch)
treed88c455e1f2aa88ceaf791dd96f7b22871091d7d
parent26ecf2950dabe24c91a22b43e340345619aac306 (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
-rw-r--r--Changes4
-rw-r--r--configure.in9
-rw-r--r--src/any2string.c12
-rw-r--r--src/pdstring.c9
4 files changed, 22 insertions, 12 deletions
diff --git a/Changes b/Changes
index b354bed..a09d79f 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
Change log for PD external 'pdstring'
+v0.07
+ + changed default output of [any2string] to "unsigned char"
+ - fixes sourceforge bug #2501709, reported by Roman Haefeli
+
v0.06
+ fixed asymmetricity bug (thanks to iohannes for the report)
diff --git a/configure.in b/configure.in
index 5f6ae4f..4d3ec62 100644
--- a/configure.in
+++ b/configure.in
@@ -4,7 +4,7 @@ AC_PREREQ(2.5)
dnl Some handy macros
define([THE_PACKAGE_NAME], [pdstring])
-define([THE_PACKAGE_VERSION], [0.06])
+define([THE_PACKAGE_VERSION], [0.07])
define([THE_PACKAGE_AUTHOR], [moocow@ling.uni-potsdam.de])
AC_INIT(THE_PACKAGE_NAME, THE_PACKAGE_VERSION, THE_PACKAGE_AUTHOR)
@@ -172,7 +172,12 @@ else
fi
AC_SUBST(DEBUG)
-
+##vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+## compiled
+AC_DEFINE_UNQUOTED(PDSTRING_DATE, "`date`", [Date this external was configured])
+AC_DEFINE_UNQUOTED(PDSTRING_USER, "$USER", [User who configured this external])
+## /compiled
+##^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dnl
dnl machine-dependent variables
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();