param.c param.h param_types.h \
engine_vars.c engine_vars.h \
parser.c parser.h \
- builtin_funcs.c \
eval.c eval.h \
init_cond.c init_cond.h init_cond_types.h \
PCM.c PCM.h \
+++ /dev/null
-/*****************************************************************************
- * builtin_funcs.c:
- *****************************************************************************
- * Copyright (C) 2004 the VideoLAN team
- * $Id$
- *
- * Authors: Cyril Deguet <asmax@videolan.org>
- * code from projectM http://xmms-projectm.sourceforge.net
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-
-#include <math.h>
-#include <stdlib.h>
-#include <stdio.h>
-/* Values to optimize the sigmoid function */
-#define R 32767
-#define RR 65534
-
-static inline double int_wrapper(double * arg_list) {
-
- return floor(arg_list[0]);
-
-}
-
-
-static inline double sqr_wrapper(double * arg_list) {
-
- return pow(2, arg_list[0]);
-}
-
-
-static inline double sign_wrapper(double * arg_list) {
-
- return -arg_list[0];
-}
-
-static inline double min_wrapper(double * arg_list) {
-
- if (arg_list[0] > arg_list[1])
- return arg_list[1];
-
- return arg_list[0];
-}
-
-static inline double max_wrapper(double * arg_list) {
-
- if (arg_list[0] > arg_list[1])
- return arg_list[0];
-
- return arg_list[1];
-}
-
-/* consult your AI book */
-static inline double sigmoid_wrapper(double * arg_list) {
- return (RR / (1 + exp( -(((double)(arg_list[0])) * arg_list[1]) / R) - R));
-}
-
-
-static inline double bor_wrapper(double * arg_list) {
-
- return (double)((int)arg_list[0] || (int)arg_list[1]);
-}
-
-static inline double band_wrapper(double * arg_list) {
- return (double)((int)arg_list[0] && (int)arg_list[1]);
-}
-
-static inline double bnot_wrapper(double * arg_list) {
- return (double)(!(int)arg_list[0]);
-}
-
-static inline double if_wrapper(double * arg_list) {
-
- if ((int)arg_list[0] == 0)
- return arg_list[2];
- return arg_list[1];
-}
-
-
-static inline double rand_wrapper(double * arg_list) {
- double l;
-
- // printf("RAND ARG:(%d)\n", (int)arg_list[0]);
- l = (double)((rand()) % ((int)arg_list[0]));
- //printf("VAL: %f\n", l);
- return l;
-}
-
-static inline double equal_wrapper(double * arg_list) {
-
- return (arg_list[0] == arg_list[1]);
-}
-
-
-static inline double above_wrapper(double * arg_list) {
-
- return (arg_list[0] > arg_list[1]);
-}
-
-
-static inline double below_wrapper(double * arg_list) {
-
- return (arg_list[0] < arg_list[1]);
-}
-
-static inline double sin_wrapper(double * arg_list) {
- return (sin (arg_list[0]));
-}
-
-
-static inline double cos_wrapper(double * arg_list) {
- return (cos (arg_list[0]));
-}
-
-static inline double tan_wrapper(double * arg_list) {
- return (tan(arg_list[0]));
-}
-
-static inline double asin_wrapper(double * arg_list) {
- return (asin (arg_list[0]));
-}
-
-static inline double acos_wrapper(double * arg_list) {
- return (acos (arg_list[0]));
-}
-
-static inline double atan_wrapper(double * arg_list) {
- return (atan (arg_list[0]));
-}
-
-static inline double atan2_wrapper(double * arg_list) {
- return (atan2 (arg_list[0], arg_list[1]));
-}
-
-static inline double pow_wrapper(double * arg_list) {
- return (pow (arg_list[0], arg_list[1]));
-}
-
-static inline double exp_wrapper(double * arg_list) {
- return (exp(arg_list[0]));
-}
-
-static inline double abs_wrapper(double * arg_list) {
- return (fabs(arg_list[0]));
-}
-
-static inline double log_wrapper(double *arg_list) {
- return (log (arg_list[0]));
-}
-
-static inline double log10_wrapper(double * arg_list) {
- return (log10 (arg_list[0]));
-}
-
-static inline double sqrt_wrapper(double * arg_list) {
- return (sqrt (arg_list[0]));
-}
-
-
-static inline double nchoosek_wrapper(double * arg_list) {
- unsigned long cnm = 1UL;
- int i, f;
- int n, m;
-
- n = (int)arg_list[0];
- m = (int)arg_list[1];
-
- if (m*2 >n) m = n-m;
- for (i=1 ; i <= m; n--, i++)
- {
- if ((f=n) % i == 0)
- f /= i;
- else cnm /= i;
- cnm *= f;
- }
- return (double)cnm;
-}
-
-
-static inline double fact_wrapper(double * arg_list) {
-
-
- int result = 1;
-
- int n = (int)arg_list[0];
-
- while (n > 1) {
- result = result * n;
- n--;
- }
- return (double)result;
-}
-/* Wrappers for all the builtin functions
- The arg_list pointer is a list of doubles. Its
- size is equal to the number of arguments the parameter
- takes */
+/*****************************************************************************
+ * builtin_funcs.c:
+ *****************************************************************************
+ * Copyright (C) 2004 the VideoLAN team
+ * $Id$
+ *
+ * Authors: Cyril Deguet <asmax@videolan.org>
+ * code from projectM http://xmms-projectm.sourceforge.net
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+/* Values to optimize the sigmoid function */
+#define R 32767
+#define RR 65534
-inline double below_wrapper(double * arg_list);
-inline double above_wrapper(double * arg_list);
-inline double equal_wrapper(double * arg_list);
-inline double if_wrapper(double * arg_list);
-inline double bnot_wrapper(double * arg_list);
-inline double rand_wrapper(double * arg_list);
-inline double bor_wrapper(double * arg_list);
-inline double band_wrapper(double * arg_list);
-inline double sigmoid_wrapper(double * arg_list);
-inline double max_wrapper(double * arg_list);
-inline double min_wrapper(double * arg_list);
-inline double sign_wrapper(double * arg_list);
-inline double sqr_wrapper(double * arg_list);
-inline double int_wrapper(double * arg_list);
-inline double nchoosek_wrapper(double * arg_list);
-inline double sin_wrapper(double * arg_list);
-inline double cos_wrapper(double * arg_list);
-inline double tan_wrapper(double * arg_list);
-inline double fact_wrapper(double * arg_list);
-inline double asin_wrapper(double * arg_list);
-inline double acos_wrapper(double * arg_list);
-inline double atan_wrapper(double * arg_list);
-inline double atan2_wrapper(double * arg_list);
-
-inline double pow_wrapper(double * arg_list);
-inline double exp_wrapper(double * arg_list);
-inline double abs_wrapper(double * arg_list);
-inline double log_wrapper(double *arg_list);
-inline double log10_wrapper(double * arg_list);
-inline double sqrt_wrapper(double * arg_list);
+static inline double int_wrapper(double * arg_list) {
+
+ return floor(arg_list[0]);
+
+}
+
+
+static inline double sqr_wrapper(double * arg_list) {
+
+ return pow(2, arg_list[0]);
+}
+
+
+static inline double sign_wrapper(double * arg_list) {
+
+ return -arg_list[0];
+}
+
+static inline double min_wrapper(double * arg_list) {
+
+ if (arg_list[0] > arg_list[1])
+ return arg_list[1];
+
+ return arg_list[0];
+}
+
+static inline double max_wrapper(double * arg_list) {
+
+ if (arg_list[0] > arg_list[1])
+ return arg_list[0];
+
+ return arg_list[1];
+}
+
+/* consult your AI book */
+static inline double sigmoid_wrapper(double * arg_list) {
+ return (RR / (1 + exp( -(((double)(arg_list[0])) * arg_list[1]) / R) - R));
+}
+
+
+static inline double bor_wrapper(double * arg_list) {
+
+ return (double)((int)arg_list[0] || (int)arg_list[1]);
+}
+
+static inline double band_wrapper(double * arg_list) {
+ return (double)((int)arg_list[0] && (int)arg_list[1]);
+}
+
+static inline double bnot_wrapper(double * arg_list) {
+ return (double)(!(int)arg_list[0]);
+}
+
+static inline double if_wrapper(double * arg_list) {
+
+ if ((int)arg_list[0] == 0)
+ return arg_list[2];
+ return arg_list[1];
+}
+
+
+static inline double rand_wrapper(double * arg_list) {
+ double l;
+
+ // printf("RAND ARG:(%d)\n", (int)arg_list[0]);
+ l = (double)((rand()) % ((int)arg_list[0]));
+ //printf("VAL: %f\n", l);
+ return l;
+}
+
+static inline double equal_wrapper(double * arg_list) {
+
+ return (arg_list[0] == arg_list[1]);
+}
+
+
+static inline double above_wrapper(double * arg_list) {
+
+ return (arg_list[0] > arg_list[1]);
+}
+
+
+static inline double below_wrapper(double * arg_list) {
+
+ return (arg_list[0] < arg_list[1]);
+}
+
+static inline double sin_wrapper(double * arg_list) {
+ return (sin (arg_list[0]));
+}
+
+
+static inline double cos_wrapper(double * arg_list) {
+ return (cos (arg_list[0]));
+}
+
+static inline double tan_wrapper(double * arg_list) {
+ return (tan(arg_list[0]));
+}
+
+static inline double asin_wrapper(double * arg_list) {
+ return (asin (arg_list[0]));
+}
+
+static inline double acos_wrapper(double * arg_list) {
+ return (acos (arg_list[0]));
+}
+
+static inline double atan_wrapper(double * arg_list) {
+ return (atan (arg_list[0]));
+}
+
+static inline double atan2_wrapper(double * arg_list) {
+ return (atan2 (arg_list[0], arg_list[1]));
+}
+
+static inline double pow_wrapper(double * arg_list) {
+ return (pow (arg_list[0], arg_list[1]));
+}
+
+static inline double exp_wrapper(double * arg_list) {
+ return (exp(arg_list[0]));
+}
+
+static inline double abs_wrapper(double * arg_list) {
+ return (fabs(arg_list[0]));
+}
+
+static inline double log_wrapper(double *arg_list) {
+ return (log (arg_list[0]));
+}
+
+static inline double log10_wrapper(double * arg_list) {
+ return (log10 (arg_list[0]));
+}
+
+static inline double sqrt_wrapper(double * arg_list) {
+ return (sqrt (arg_list[0]));
+}
+
+
+static inline double nchoosek_wrapper(double * arg_list) {
+ unsigned long cnm = 1UL;
+ int i, f;
+ int n, m;
+
+ n = (int)arg_list[0];
+ m = (int)arg_list[1];
+
+ if (m*2 >n) m = n-m;
+ for (i=1 ; i <= m; n--, i++)
+ {
+ if ((f=n) % i == 0)
+ f /= i;
+ else cnm /= i;
+ cnm *= f;
+ }
+ return (double)cnm;
+}
+
+
+static inline double fact_wrapper(double * arg_list) {
+
+
+ int result = 1;
+
+ int n = (int)arg_list[0];
+
+ while (n > 1) {
+ result = result * n;
+ n--;
+ }
+ return (double)result;
+}
return custom_shape;
}
-static inline void evalCustomShapeInitConditions() {
+void evalCustomShapeInitConditions() {
splay_traverse(eval_custom_shape_init_conds, active_preset->custom_shape_tree);
}
/* Interface function. Makes another custom shape the current
concern for per frame / point equations */
-static inline custom_shape_t * nextCustomShape() {
+custom_shape_t * nextCustomShape() {
if ((interface_shape = splay_find(&cwave_interface_id, active_preset->custom_shape_tree)) == NULL) {
cwave_interface_id = 0;
custom_shape_t * new_custom_shape(int id);
custom_shape_t * find_custom_shape(int id, preset_t * preset, int create_flag);
void load_unspecified_init_conds_shape(custom_shape_t * custom_shape);
-inline void evalCustomShapeInitConditions();
-inline custom_shape_t * nextCustomShape();
+void evalCustomShapeInitConditions();
+custom_shape_t * nextCustomShape();
#endif
return custom_wave;
}
-static inline void evalCustomWaveInitConditions() {
- splay_traverse(eval_custom_wave_init_conds, active_preset->custom_wave_tree);
-}
-
-static inline void eval_custom_wave_init_conds(custom_wave_t * custom_wave) {
- splay_traverse(eval_init_cond, custom_wave->init_cond_tree);
- splay_traverse(eval_init_cond, custom_wave->per_frame_init_eqn_tree);
-}
-
/* Interface function. Makes another custom wave the current
concern for per frame / point equations */
-static inline custom_wave_t * nextCustomWave() {
+custom_wave_t * nextCustomWave() {
if ((interface_wave = splay_find(&interface_id, active_preset->custom_wave_tree)) == NULL) {
interface_id = 0;
}
-static inline void evalPerPointEqns() {
+void evalPerPointEqns() {
int x;
}
}
+
+void evalCustomWaveInitConditions() {
+ splay_traverse(eval_custom_wave_init_conds, active_preset->custom_wave_tree);
+}
#include "expr_types.h"
#include "custom_wave_types.h"
#include "preset_types.h"
+#include "splaytree.h"
+#include "init_cond.h"
+
void free_custom_wave(custom_wave_t * custom_wave);
custom_wave_t * new_custom_wave(int id);
custom_wave_t * find_custom_wave(int id, preset_t * preset, int create_flag);
int add_per_point_eqn(char * name, gen_expr_t * gen_expr, custom_wave_t * custom_wave);
-inline void evalCustomWaveInitConditions();
-inline void evalPerPointEqns();
-inline custom_wave_t * nextCustomWave();
+void evalCustomWaveInitConditions();
+void evalPerPointEqns();
+custom_wave_t * nextCustomWave();
void load_unspecified_init_conds(custom_wave_t * custom_wave);
+static inline void eval_custom_wave_init_conds(custom_wave_t * custom_wave) {
+ splay_traverse(eval_init_cond, custom_wave->init_cond_tree);
+ splay_traverse(eval_init_cond, custom_wave->per_frame_init_eqn_tree);
+}
#endif
static inline double eval_val_expr(val_expr_t * val_expr);
-static inline double eval_gen_expr(gen_expr_t * gen_expr) {
+double eval_gen_expr(gen_expr_t * gen_expr) {
double l;
if (gen_expr == NULL)
//#define EVAL_DEBUG
-inline double eval_gen_expr(gen_expr_t * gen_expr);
+double eval_gen_expr(gen_expr_t * gen_expr);
inline gen_expr_t * opt_gen_expr(gen_expr_t * gen_expr, int ** param_list);
gen_expr_t * const_to_expr(double val);
#define INIT_COND_H
#define INIT_COND_DEBUG 0
#include "param_types.h"
+#include "init_cond_types.h"
#include "splaytree_types.h"
void eval_init_cond(init_cond_t * init_cond);
#include "custom_wave.h"
#include "custom_shape_types.h"
#include "custom_shape.h"
+#include "splaytree.h"
//#include <dmalloc.h>
// Forward declarations
char *buffer; //XXX
+
+static inline int isPerPixelEqn(int op) {
+
+ return active_preset->per_pixel_flag[op];
+
+}
int galaktos_init( galaktos_thread_t *p_thread )
{
init_per_pixel_matrices();
glPopMatrix();
}
-
/* Evaluates a per pixel equation */
-static inline void evalPerPixelEqn(per_pixel_eqn_t * per_pixel_eqn) {
+void evalPerPixelEqn(per_pixel_eqn_t * per_pixel_eqn) {
double ** param_matrix = NULL;
gen_expr_t * eqn_ptr = NULL;
per_pixel_eqn->param->matrix_flag = 1;
}
-static inline void evalPerPixelEqns() {
+void evalPerPixelEqns() {
/* Evaluate all per pixel equations using splay traversal */
splay_traverse(evalPerPixelEqn, active_preset->per_pixel_eqn_tree);
return;
}
-static inline int isPerPixelEqn(int op) {
-
- return active_preset->per_pixel_flag[op];
-
-}
-
static inline int resetPerPixelEqnFlags(preset_t * preset) {
int i;
#include "preset_types.h"
#define PER_PIXEL_EQN_DEBUG 0
-inline void evalPerPixelEqns();
-inline int isPerPixelEqn(int index);
+void evalPerPixelEqns();
int add_per_pixel_eqn(char * name, gen_expr_t * gen_expr, struct PRESET_T * preset);
void free_per_pixel_eqn(per_pixel_eqn_t * per_pixel_eqn);
per_pixel_eqn_t * new_per_pixel_eqn(int index, param_t * param, gen_expr_t * gen_expr);
-static inline splaynode_t * splay (void * key, splaynode_t * t, int * match_type, int (*compare)());
-static inline int free_splaynode(splaynode_t * splaynode, void (*free_key)());
-static inline void splay_traverse_helper (void (*func_ptr)(), splaynode_t * splaynode);
-static inline splaynode_t * splay_delete_helper(void * key, splaynode_t * t, int (*compare)(), void (*free_key)());
-static inline void splay_find_above_min_helper(void * max_key, void ** closest_key, splaynode_t * root, int (*compare)());
-static inline void splay_find_below_max_helper(void * max_key, void ** closest_key, splaynode_t * root, int (*compare)());
-static inline splaynode_t * new_splaynode(int type, void * key, void * data);
-static inline int splay_insert_node(splaynode_t * splaynode, splaytree_t * splaytree);
-static inline int splay_rec_size(splaynode_t * splaynode);
+splaynode_t * splay (void * key, splaynode_t * t, int * match_type, int (*compare)());
+int free_splaynode(splaynode_t * splaynode, void (*free_key)());
+void splay_traverse_helper (void (*func_ptr)(), splaynode_t * splaynode);
+splaynode_t * splay_delete_helper(void * key, splaynode_t * t, int (*compare)(), void (*free_key)());
+void splay_find_above_min_helper(void * max_key, void ** closest_key, splaynode_t * root, int (*compare)());
+void splay_find_below_max_helper(void * max_key, void ** closest_key, splaynode_t * root, int (*compare)());
+splaynode_t * new_splaynode(int type, void * key, void * data);
+int splay_insert_node(splaynode_t * splaynode, splaytree_t * splaytree);
+int splay_rec_size(splaynode_t * splaynode);
/* Creates a splay tree given a compare key function, copy key function, and free key function.
Ah yes, the wonders of procedural programming */
-static inline splaytree_t * create_splaytree(int (*compare)(), void * (*copy_key)(), void (*free_key)()) {
+splaytree_t * create_splaytree(int (*compare)(), void * (*copy_key)(), void (*free_key)()) {
splaytree_t * splaytree;
}
/* Destroys a splay tree */
-static inline int destroy_splaytree(splaytree_t * splaytree) {
+int destroy_splaytree(splaytree_t * splaytree) {
/* Null argument check */
if (splaytree == NULL)
}
/* Recursively free all the splaynodes */
-static inline int free_splaynode(splaynode_t * splaynode, void (*free_key)()) {
+int free_splaynode(splaynode_t * splaynode, void (*free_key)()) {
/* Ok if this happens, a recursive base case */
if (splaynode == NULL)
}
/* Traverses the entire splay tree with the given function func_ptr */
-static inline void splay_traverse(void (*func_ptr)(), splaytree_t * splaytree) {
+void splay_traverse(void (*func_ptr)(), splaytree_t * splaytree) {
/* Null argument check */
}
/* Helper function to traverse the entire splaytree */
-static inline void splay_traverse_helper (void (*func_ptr)(), splaynode_t * splaynode) {
+void splay_traverse_helper (void (*func_ptr)(), splaynode_t * splaynode) {
/* Normal if this happens, its a base case of recursion */
if (splaynode == NULL)
}
/* Find the node corresponding to the given key in splaytree, return its data pointer */
-static inline void * splay_find(void * key, splaytree_t * splaytree) {
+void * splay_find(void * key, splaytree_t * splaytree) {
splaynode_t * splaynode;
int match_type;
}
/* Gets the splaynode that the given key points to */
-static inline splaynode_t * get_splaynode_of(void * key, splaytree_t * splaytree) {
+splaynode_t * get_splaynode_of(void * key, splaytree_t * splaytree) {
splaynode_t * splaynode;
int match_type;
}
/* Finds the desired node, and changes the tree such that it is the root */
-static inline splaynode_t * splay (void * key, splaynode_t * t, int * match_type, int (*compare)()) {
+splaynode_t * splay (void * key, splaynode_t * t, int * match_type, int (*compare)()) {
/* Simple top down splay, not requiring key to be in the tree t.
What it does is described above. */
/* Deletes a splay node from a splay tree. If the node doesn't exist
then nothing happens */
-static inline int splay_delete(void * key, splaytree_t * splaytree) {
+int splay_delete(void * key, splaytree_t * splaytree) {
splaynode_t * splaynode;
}
/* Deletes a splay node */
-static inline splaynode_t * splay_delete_helper(void * key, splaynode_t * splaynode, int (*compare)(), void (*free_key)()) {
+splaynode_t * splay_delete_helper(void * key, splaynode_t * splaynode, int (*compare)(), void (*free_key)()) {
splaynode_t * new_root;
int match_type;
}
/* Create a new splay node type */
-static inline splaynode_t * new_splaynode(int type, void * key, void * data) {
+splaynode_t * new_splaynode(int type, void * key, void * data) {
splaynode_t * splaynode;
/* Argument checks */
if (data == NULL)
}
/* Inserts a link into the splay tree */
-static inline int splay_insert_link(void * alias_key, void * orig_key, splaytree_t * splaytree) {
+int splay_insert_link(void * alias_key, void * orig_key, splaytree_t * splaytree) {
splaynode_t * splaynode, * data_node;
void * key_clone;
}
/* Inserts 'data' into the 'splaytree' paired with the passed 'key' */
-static inline int splay_insert(void * data, void * key, splaytree_t * splaytree) {
+int splay_insert(void * data, void * key, splaytree_t * splaytree) {
splaynode_t * splaynode;
void * key_clone;
}
/* Helper function to insert splaynodes into the splaytree */
-static inline int splay_insert_node(splaynode_t * splaynode, splaytree_t * splaytree) {
+int splay_insert_node(splaynode_t * splaynode, splaytree_t * splaytree) {
int match_type;
int cmpval;
void * key;
}
/* Returns the 'maximum' key that is less than the given key in the splaytree */
-static inline void * splay_find_below_max(void * key, splaytree_t * splaytree) {
+void * splay_find_below_max(void * key, splaytree_t * splaytree) {
void * closest_key;
/* Returns the 'minimum' key that is greater than the given key in the splaytree */
-static inline void * splay_find_above_min(void * key, splaytree_t * splaytree) {
+void * splay_find_above_min(void * key, splaytree_t * splaytree) {
void * closest_key;
}
/* Helper function */
-static inline void splay_find_below_max_helper(void * min_key, void ** closest_key, splaynode_t * root, int (*compare)()) {
+void splay_find_below_max_helper(void * min_key, void ** closest_key, splaynode_t * root, int (*compare)()) {
/* Empty root, return*/
if (root == NULL)
}
/* Helper function */
-static inline void splay_find_above_min_helper(void * max_key, void ** closest_key, splaynode_t * root, int (*compare)()) {
+void splay_find_above_min_helper(void * max_key, void ** closest_key, splaynode_t * root, int (*compare)()) {
/* Empty root, stop */
if (root == NULL)
}
/* Find the minimum entry of the splay tree */
-static inline void * splay_find_min(splaytree_t * t) {
+void * splay_find_min(splaytree_t * t) {
splaynode_t * splaynode;
/* Find the maximum entry of the splay tree */
-static inline void * splay_find_max(splaytree_t * t) {
+void * splay_find_max(splaytree_t * t) {
splaynode_t * splaynode;
return splaynode->data;
}
-static inline int splay_size(splaytree_t * t) {
+int splay_size(splaytree_t * t) {
if (t == NULL)
return 0;
}
-static inline int splay_rec_size(splaynode_t * splaynode) {
+int splay_rec_size(splaynode_t * splaynode) {
if (!splaynode)
return 0;
-inline void * splay_find(void * key, splaytree_t * t);
-inline int splay_insert(void * data, void * key, splaytree_t * t);
-inline int splay_insert_link(void * alias_key, void * orig_key, splaytree_t * splaytree);
-inline int splay_delete(void * key, splaytree_t * splaytree);
-inline int splay_size(splaytree_t * t);
-inline splaytree_t * create_splaytree(int (*compare)(), void * (*copy_key)(), void (*free_key)());
-inline int destroy_splaytree(splaytree_t * splaytree);
-inline void splay_traverse(void (*func_ptr)(), splaytree_t * splaytree);
-inline splaynode_t * get_splaynode_of(void * key, splaytree_t * splaytree);
-inline void * splay_find_above_min(void * key, splaytree_t * root);
-inline void * splay_find_below_max(void * key, splaytree_t * root);
-inline void * splay_find_min(splaytree_t * t);
-inline void * splay_find_max(splaytree_t * t);
+void * splay_find(void * key, splaytree_t * t);
+int splay_insert(void * data, void * key, splaytree_t * t);
+int splay_insert_link(void * alias_key, void * orig_key, splaytree_t * splaytree);
+int splay_delete(void * key, splaytree_t * splaytree);
+int splay_size(splaytree_t * t);
+splaytree_t * create_splaytree(int (*compare)(), void * (*copy_key)(), void (*free_key)());
+int destroy_splaytree(splaytree_t * splaytree);
+void splay_traverse(void (*func_ptr)(), splaytree_t * splaytree);
+splaynode_t * get_splaynode_of(void * key, splaytree_t * splaytree);
+void * splay_find_above_min(void * key, splaytree_t * root);
+void * splay_find_below_max(void * key, splaytree_t * root);
+void * splay_find_min(splaytree_t * t);
+void * splay_find_max(splaytree_t * t);
#endif