# HG changeset patch # User Matti Hamalainen # Date 1193211707 -10800 # Node ID 1556939b6c805a92452b223ca30d01c9f3410d67 # Parent d087573f54fd2c8522608e860e4940e52b08722e Begin function support. diff -r d087573f54fd -r 1556939b6c80 src/audacious/tuple_compiler.c --- a/src/audacious/tuple_compiler.c Sun Oct 21 17:06:20 2007 +0300 +++ b/src/audacious/tuple_compiler.c Wed Oct 24 10:41:47 2007 +0300 @@ -1,6 +1,6 @@ /* * Audacious - Tuplez compiler - * Copyright (c) 2007 Matti 'ccr' Hämäläinen + * Copyright (c) 2007 Matti 'ccr' Hämäläinen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r d087573f54fd -r 1556939b6c80 src/audacious/tuple_compiler.h --- a/src/audacious/tuple_compiler.h Sun Oct 21 17:06:20 2007 +0300 +++ b/src/audacious/tuple_compiler.h Wed Oct 24 10:41:47 2007 +0300 @@ -1,6 +1,6 @@ /* * Audacious - Tuplez compiler - * Copyright (c) 2007 Matti 'ccr' Hämäläinen + * Copyright (c) 2007 Matti 'ccr' Hämäläinen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -58,13 +58,6 @@ */ typedef struct { gchar *name; - gboolean isdeterministic; - gchar *(*func)(Tuple *tuple, gchar **argument); -} TupleEvalFunc; - - -typedef struct { - gchar *name; gboolean istemp; /* Scope of variable - TRUE = temporary */ gint type; /* Type of variable, see VAR_* */ gchar *defval; /* Defined value ${=foo,bar} */ @@ -74,9 +67,16 @@ } TupleEvalVar; +typedef struct { + gchar *name; + gboolean isdeterministic; + gchar *(*func)(Tuple *tuple, TupleEvalVar **argument); +} TupleEvalFunc; + + typedef struct _TupleEvalNode { gint opcode; /* operator, see OP_ enums */ - gint var[TUP_MAX_VARS]; /* tuple / global variable references (perhaps hashes, or just indexes to a list?) */ + gint var[TUP_MAX_VARS]; /* tuple / global variable references */ gboolean global[TUP_MAX_VARS]; gchar *text; /* raw text, if any (OP_RAW) */ gint function, expression; /* for OP_FUNCTION and OP_EXPRESSION */