# HG changeset patch # User William Pitcock # Date 1192793256 18000 # Node ID 67827c5ab4bdcb8ed1a45afe037d2c5eff179bbf # Parent a0e4a85a67783eb7567fd557d5d9b329501c641c# Parent 52a52dac45279bf451a579843e85a4c1709f7ecf Automated merge with ssh://hg.atheme.org//hg/audacious diff -r a0e4a85a6778 -r 67827c5ab4bd src/audacious/tuple_compiler.c --- a/src/audacious/tuple_compiler.c Fri Oct 19 06:26:46 2007 -0500 +++ b/src/audacious/tuple_compiler.c Fri Oct 19 06:27:36 2007 -0500 @@ -33,6 +33,10 @@ #include #include "tuple_compiler.h" +#define MAX_STR (256) +#define MIN_ALLOC_NODES (8) +#define MIN_ALLOC_BUF (64) + void tuple_error(const char *fmt, ...) { @@ -753,7 +757,7 @@ assert(ctx != NULL); assert(tuple != NULL); - if (!expr) return NULL; + if (!expr) return res; tuple_formatter_eval_do(ctx, expr, tuple, &res, &resmax, &reslen); diff -r a0e4a85a6778 -r 67827c5ab4bd src/audacious/tuple_compiler.h --- a/src/audacious/tuple_compiler.h Fri Oct 19 06:26:46 2007 -0500 +++ b/src/audacious/tuple_compiler.h Fri Oct 19 06:27:36 2007 -0500 @@ -25,10 +25,7 @@ #include "tuple.h" -#define MAX_VAR (4) -#define MAX_STR (256) -#define MIN_ALLOC_NODES (8) -#define MIN_ALLOC_BUF (64) +#define TUP_MAX_VARS (4) enum { @@ -79,8 +76,8 @@ typedef struct _TupleEvalNode { gint opcode; /* operator, see OP_ enums */ - gint var[MAX_VAR]; /* tuple / global variable references (perhaps hashes, or just indexes to a list?) */ - gboolean global[MAX_VAR]; + gint var[TUP_MAX_VARS]; /* tuple / global variable references (perhaps hashes, or just indexes to a list?) */ + gboolean global[TUP_MAX_VARS]; gchar *text; /* raw text, if any (OP_RAW) */ gint function, expression; /* for OP_FUNCTION and OP_EXPRESSION */ struct _TupleEvalNode *children, *next, *prev; /* children of this struct, and pointer to next node. */