changeset 3951:1556939b6c80

Begin function support.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 24 Oct 2007 10:41:47 +0300
parents d087573f54fd
children 4f6c614aee5d
files src/audacious/tuple_compiler.c src/audacious/tuple_compiler.h
diffstat 2 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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 */