Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
8139b905
Commit
8139b905
authored
Oct 06, 2007
by
Christophe Mutricy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
galaktos/*: warnings hunt
parent
b14c3b37
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
130 additions
and
61 deletions
+130
-61
modules/visualization/galaktos/PCM.c
modules/visualization/galaktos/PCM.c
+4
-0
modules/visualization/galaktos/beat_detect.c
modules/visualization/galaktos/beat_detect.c
+2
-0
modules/visualization/galaktos/builtin_funcs.c
modules/visualization/galaktos/builtin_funcs.c
+31
-29
modules/visualization/galaktos/custom_shape.c
modules/visualization/galaktos/custom_shape.c
+5
-4
modules/visualization/galaktos/custom_wave.c
modules/visualization/galaktos/custom_wave.c
+9
-7
modules/visualization/galaktos/eval.c
modules/visualization/galaktos/eval.c
+2
-1
modules/visualization/galaktos/fftsg.c
modules/visualization/galaktos/fftsg.c
+7
-0
modules/visualization/galaktos/fftsg.h
modules/visualization/galaktos/fftsg.h
+30
-0
modules/visualization/galaktos/func.c
modules/visualization/galaktos/func.c
+2
-0
modules/visualization/galaktos/init_cond.c
modules/visualization/galaktos/init_cond.c
+3
-0
modules/visualization/galaktos/main.c
modules/visualization/galaktos/main.c
+2
-0
modules/visualization/galaktos/param.c
modules/visualization/galaktos/param.c
+2
-1
modules/visualization/galaktos/parser.c
modules/visualization/galaktos/parser.c
+2
-0
modules/visualization/galaktos/per_frame_eqn.c
modules/visualization/galaktos/per_frame_eqn.c
+2
-0
modules/visualization/galaktos/per_pixel_eqn.c
modules/visualization/galaktos/per_pixel_eqn.c
+6
-4
modules/visualization/galaktos/preset.c
modules/visualization/galaktos/preset.c
+3
-1
modules/visualization/galaktos/splaytree.c
modules/visualization/galaktos/splaytree.c
+14
-13
modules/visualization/galaktos/tree_types.c
modules/visualization/galaktos/tree_types.c
+3
-1
modules/visualization/galaktos/video_init.c
modules/visualization/galaktos/video_init.c
+1
-0
No files found.
modules/visualization/galaktos/PCM.c
View file @
8139b905
...
...
@@ -30,8 +30,12 @@
//Takes sound data from wherever and hands it back out.
//Returns PCM Data or spectrum data, or the derivative of the PCM data
#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include "fftsg.h"
double
**
PCMd
;
//data structure to store PCM data PCM[channels][maxsamples]
int
maxsamples
;
//size of PCM buffer
int
start
;
//where to add data next
...
...
modules/visualization/galaktos/beat_detect.c
View file @
8139b905
...
...
@@ -30,6 +30,8 @@
//
//Some stuff was taken from Frederic Patin's beat-detection article, you'll find it online
#include <stdlib.h>
#include <stdio.h>
#include "engine_vars.h"
double
beat_buffer
[
32
][
80
],
beat_instant
[
32
],
beat_history
[
32
];
...
...
modules/visualization/galaktos/builtin_funcs.c
View file @
8139b905
...
...
@@ -24,29 +24,31 @@
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
/* Values to optimize the sigmoid function */
#define R 32767
#define RR 65534
inline
double
int_wrapper
(
double
*
arg_list
)
{
static
inline
double
int_wrapper
(
double
*
arg_list
)
{
return
floor
(
arg_list
[
0
]);
}
inline
double
sqr_wrapper
(
double
*
arg_list
)
{
static
inline
double
sqr_wrapper
(
double
*
arg_list
)
{
return
pow
(
2
,
arg_list
[
0
]);
}
inline
double
sign_wrapper
(
double
*
arg_list
)
{
static
inline
double
sign_wrapper
(
double
*
arg_list
)
{
return
-
arg_list
[
0
];
}
inline
double
min_wrapper
(
double
*
arg_list
)
{
static
inline
double
min_wrapper
(
double
*
arg_list
)
{
if
(
arg_list
[
0
]
>
arg_list
[
1
])
return
arg_list
[
1
];
...
...
@@ -54,7 +56,7 @@ inline double min_wrapper(double * arg_list) {
return
arg_list
[
0
];
}
inline
double
max_wrapper
(
double
*
arg_list
)
{
static
inline
double
max_wrapper
(
double
*
arg_list
)
{
if
(
arg_list
[
0
]
>
arg_list
[
1
])
return
arg_list
[
0
];
...
...
@@ -63,25 +65,25 @@ inline double max_wrapper(double * arg_list) {
}
/* consult your AI book */
inline
double
sigmoid_wrapper
(
double
*
arg_list
)
{
static
inline
double
sigmoid_wrapper
(
double
*
arg_list
)
{
return
(
RR
/
(
1
+
exp
(
-
(((
double
)(
arg_list
[
0
]))
*
arg_list
[
1
])
/
R
)
-
R
));
}
inline
double
bor_wrapper
(
double
*
arg_list
)
{
static
inline
double
bor_wrapper
(
double
*
arg_list
)
{
return
(
double
)((
int
)
arg_list
[
0
]
||
(
int
)
arg_list
[
1
]);
}
inline
double
band_wrapper
(
double
*
arg_list
)
{
static
inline
double
band_wrapper
(
double
*
arg_list
)
{
return
(
double
)((
int
)
arg_list
[
0
]
&&
(
int
)
arg_list
[
1
]);
}
inline
double
bnot_wrapper
(
double
*
arg_list
)
{
static
inline
double
bnot_wrapper
(
double
*
arg_list
)
{
return
(
double
)(
!
(
int
)
arg_list
[
0
]);
}
inline
double
if_wrapper
(
double
*
arg_list
)
{
static
inline
double
if_wrapper
(
double
*
arg_list
)
{
if
((
int
)
arg_list
[
0
]
==
0
)
return
arg_list
[
2
];
...
...
@@ -89,7 +91,7 @@ inline double if_wrapper(double * arg_list) {
}
inline
double
rand_wrapper
(
double
*
arg_list
)
{
static
inline
double
rand_wrapper
(
double
*
arg_list
)
{
double
l
;
// printf("RAND ARG:(%d)\n", (int)arg_list[0]);
...
...
@@ -98,78 +100,78 @@ inline double rand_wrapper(double * arg_list) {
return
l
;
}
inline
double
equal_wrapper
(
double
*
arg_list
)
{
static
inline
double
equal_wrapper
(
double
*
arg_list
)
{
return
(
arg_list
[
0
]
==
arg_list
[
1
]);
}
inline
double
above_wrapper
(
double
*
arg_list
)
{
static
inline
double
above_wrapper
(
double
*
arg_list
)
{
return
(
arg_list
[
0
]
>
arg_list
[
1
]);
}
inline
double
below_wrapper
(
double
*
arg_list
)
{
static
inline
double
below_wrapper
(
double
*
arg_list
)
{
return
(
arg_list
[
0
]
<
arg_list
[
1
]);
}
inline
double
sin_wrapper
(
double
*
arg_list
)
{
static
inline
double
sin_wrapper
(
double
*
arg_list
)
{
return
(
sin
(
arg_list
[
0
]));
}
inline
double
cos_wrapper
(
double
*
arg_list
)
{
static
inline
double
cos_wrapper
(
double
*
arg_list
)
{
return
(
cos
(
arg_list
[
0
]));
}
inline
double
tan_wrapper
(
double
*
arg_list
)
{
static
inline
double
tan_wrapper
(
double
*
arg_list
)
{
return
(
tan
(
arg_list
[
0
]));
}
inline
double
asin_wrapper
(
double
*
arg_list
)
{
static
inline
double
asin_wrapper
(
double
*
arg_list
)
{
return
(
asin
(
arg_list
[
0
]));
}
inline
double
acos_wrapper
(
double
*
arg_list
)
{
static
inline
double
acos_wrapper
(
double
*
arg_list
)
{
return
(
acos
(
arg_list
[
0
]));
}
inline
double
atan_wrapper
(
double
*
arg_list
)
{
static
inline
double
atan_wrapper
(
double
*
arg_list
)
{
return
(
atan
(
arg_list
[
0
]));
}
inline
double
atan2_wrapper
(
double
*
arg_list
)
{
static
inline
double
atan2_wrapper
(
double
*
arg_list
)
{
return
(
atan2
(
arg_list
[
0
],
arg_list
[
1
]));
}
inline
double
pow_wrapper
(
double
*
arg_list
)
{
static
inline
double
pow_wrapper
(
double
*
arg_list
)
{
return
(
pow
(
arg_list
[
0
],
arg_list
[
1
]));
}
inline
double
exp_wrapper
(
double
*
arg_list
)
{
static
inline
double
exp_wrapper
(
double
*
arg_list
)
{
return
(
exp
(
arg_list
[
0
]));
}
inline
double
abs_wrapper
(
double
*
arg_list
)
{
static
inline
double
abs_wrapper
(
double
*
arg_list
)
{
return
(
fabs
(
arg_list
[
0
]));
}
inline
double
log_wrapper
(
double
*
arg_list
)
{
static
inline
double
log_wrapper
(
double
*
arg_list
)
{
return
(
log
(
arg_list
[
0
]));
}
inline
double
log10_wrapper
(
double
*
arg_list
)
{
static
inline
double
log10_wrapper
(
double
*
arg_list
)
{
return
(
log10
(
arg_list
[
0
]));
}
inline
double
sqrt_wrapper
(
double
*
arg_list
)
{
static
inline
double
sqrt_wrapper
(
double
*
arg_list
)
{
return
(
sqrt
(
arg_list
[
0
]));
}
inline
double
nchoosek_wrapper
(
double
*
arg_list
)
{
static
inline
double
nchoosek_wrapper
(
double
*
arg_list
)
{
unsigned
long
cnm
=
1UL
;
int
i
,
f
;
int
n
,
m
;
...
...
@@ -189,7 +191,7 @@ inline double nchoosek_wrapper(double * arg_list) {
}
inline
double
fact_wrapper
(
double
*
arg_list
)
{
static
inline
double
fact_wrapper
(
double
*
arg_list
)
{
int
result
=
1
;
...
...
modules/visualization/galaktos/custom_shape.c
View file @
8139b905
...
...
@@ -23,6 +23,7 @@
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include "common.h"
#include "fatal.h"
...
...
@@ -54,7 +55,7 @@
custom_shape_t
*
interface_shape
=
NULL
;
int
cwave_interface_id
=
0
;
extern
preset_t
*
active_preset
;
inline
void
eval_custom_shape_init_conds
(
custom_shape_t
*
custom_shape
);
static
inline
void
eval_custom_shape_init_conds
(
custom_shape_t
*
custom_shape
);
void
load_unspec_init_cond_shape
(
param_t
*
param
);
void
destroy_param_db_tree_shape
(
splaytree_t
*
tree
);
...
...
@@ -518,12 +519,12 @@ custom_shape_t * find_custom_shape(int id, preset_t * preset, int create_flag) {
return
custom_shape
;
}
inline
void
evalCustomShapeInitConditions
()
{
static
inline
void
evalCustomShapeInitConditions
()
{
splay_traverse
(
eval_custom_shape_init_conds
,
active_preset
->
custom_shape_tree
);
}
inline
void
eval_custom_shape_init_conds
(
custom_shape_t
*
custom_shape
)
{
static
inline
void
eval_custom_shape_init_conds
(
custom_shape_t
*
custom_shape
)
{
splay_traverse
(
eval_init_cond
,
custom_shape
->
init_cond_tree
);
splay_traverse
(
eval_init_cond
,
custom_shape
->
per_frame_init_eqn_tree
);
}
...
...
@@ -587,7 +588,7 @@ void load_unspec_init_cond_shape(param_t * param) {
/* Interface function. Makes another custom shape the current
concern for per frame / point equations */
inline
custom_shape_t
*
nextCustomShape
()
{
static
inline
custom_shape_t
*
nextCustomShape
()
{
if
((
interface_shape
=
splay_find
(
&
cwave_interface_id
,
active_preset
->
custom_shape_tree
))
==
NULL
)
{
cwave_interface_id
=
0
;
...
...
modules/visualization/galaktos/custom_wave.c
View file @
8139b905
...
...
@@ -23,6 +23,8 @@
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "common.h"
#include "fatal.h"
...
...
@@ -59,14 +61,14 @@ extern int mesh_i;
custom_wave_t
*
interface_wave
=
NULL
;
int
interface_id
=
0
;
extern
preset_t
*
active_preset
;
inline
void
eval_custom_wave_init_conds
(
custom_wave_t
*
custom_wave
);
static
inline
void
eval_custom_wave_init_conds
(
custom_wave_t
*
custom_wave
);
void
load_unspec_init_cond
(
param_t
*
param
);
void
destroy_per_point_eqn_tree
(
splaytree_t
*
tree
);
void
destroy_param_db_tree
(
splaytree_t
*
tree
);
void
destroy_per_frame_eqn_tree
(
splaytree_t
*
tree
);
void
destroy_per_frame_init_eqn_tree
(
splaytree_t
*
tree
);
void
destroy_init_cond_tree
(
splaytree_t
*
tree
);
inline
void
evalPerPointEqn
(
per_point_eqn_t
*
per_point_eqn
);
static
inline
void
evalPerPointEqn
(
per_point_eqn_t
*
per_point_eqn
);
custom_wave_t
*
new_custom_wave
(
int
id
)
{
...
...
@@ -602,18 +604,18 @@ custom_wave_t * find_custom_wave(int id, preset_t * preset, int create_flag) {
return
custom_wave
;
}
inline
void
evalCustomWaveInitConditions
()
{
static
inline
void
evalCustomWaveInitConditions
()
{
splay_traverse
(
eval_custom_wave_init_conds
,
active_preset
->
custom_wave_tree
);
}
inline
void
eval_custom_wave_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
);
}
/* Interface function. Makes another custom wave the current
concern for per frame / point equations */
inline
custom_wave_t
*
nextCustomWave
()
{
static
inline
custom_wave_t
*
nextCustomWave
()
{
if
((
interface_wave
=
splay_find
(
&
interface_id
,
active_preset
->
custom_wave_tree
))
==
NULL
)
{
interface_id
=
0
;
...
...
@@ -628,7 +630,7 @@ inline custom_wave_t * nextCustomWave() {
}
inline
void
evalPerPointEqns
()
{
static
inline
void
evalPerPointEqns
()
{
int
x
;
...
...
@@ -654,7 +656,7 @@ inline void evalPerPointEqns() {
}
/* Evaluates a per point equation for the current custom wave given by interface_wave ptr */
inline
void
evalPerPointEqn
(
per_point_eqn_t
*
per_point_eqn
)
{
static
inline
void
evalPerPointEqn
(
per_point_eqn_t
*
per_point_eqn
)
{
int
samples
,
size
;
...
...
modules/visualization/galaktos/eval.c
View file @
8139b905
...
...
@@ -26,6 +26,7 @@
/* Evaluation Code */
#include <stdio.h>
#include "common.h"
#include "fatal.h"
...
...
@@ -47,7 +48,7 @@ static inline double eval_prefun_expr(prefun_expr_t * prefun_expr);
static
inline
double
eval_val_expr
(
val_expr_t
*
val_expr
);
inline
double
eval_gen_expr
(
gen_expr_t
*
gen_expr
)
{
static
inline
double
eval_gen_expr
(
gen_expr_t
*
gen_expr
)
{
double
l
;
if
(
gen_expr
==
NULL
)
...
...
modules/visualization/galaktos/fftsg.c
View file @
8139b905
...
...
@@ -778,6 +778,8 @@ void makect(int nc, int *ip, double *c)
#define CDFT_4THREADS_BEGIN_N 65536
#endif
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#define cdft_thread_t pthread_t
#define cdft_thread_create(thp,func,argp) { \
if (pthread_create(thp, NULL, func, (void *) argp) != 0) { \
...
...
@@ -803,6 +805,11 @@ void makect(int nc, int *ip, double *c)
#define CDFT_4THREADS_BEGIN_N 524288
#endif
#include <windows.h>
<<<<<<<
.
working
#include <stdlib.h>
=======
#include <stdio.h>
>>>>>>>
.
merge
-
right
.
r21326
#define cdft_thread_t HANDLE
#define cdft_thread_create(thp,func,argp) { \
DWORD thid; \
...
...
modules/visualization/galaktos/fftsg.h
0 → 100644
View file @
8139b905
/*****************************************************************************
* fftsg.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.
*****************************************************************************/
void
cdft
(
int
,
int
,
double
*
,
int
*
,
double
*
);
void
rdft
(
int
,
int
,
double
*
,
int
*
,
double
*
);
void
ddct
(
int
,
int
,
double
*
,
int
*
,
double
*
);
void
ddst
(
int
,
int
,
double
*
,
int
*
,
double
*
);
void
dfct
(
int
,
double
*
,
double
*
,
int
*
,
double
*
);
void
dfst
(
int
,
double
*
,
double
*
,
int
*
,
double
*
);
modules/visualization/galaktos/func.c
View file @
8139b905
/* Function management */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "common.h"
#include "fatal.h"
...
...
modules/visualization/galaktos/init_cond.c
View file @
8139b905
...
...
@@ -26,6 +26,9 @@
/* Library functions to manipulate initial condition values */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "common.h"
#include "fatal.h"
...
...
modules/visualization/galaktos/main.c
View file @
8139b905
...
...
@@ -27,6 +27,8 @@
#include <GL/glu.h>
#include <unistd.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include "common.h"
#include "preset_types.h"
#include "preset.h"
...
...
modules/visualization/galaktos/param.c
View file @
8139b905
...
...
@@ -27,7 +27,8 @@
/* Basic Parameter Functions */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include "fatal.h"
#include "common.h"
...
...
modules/visualization/galaktos/parser.c
View file @
8139b905
...
...
@@ -27,6 +27,8 @@
/* parser.c */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "common.h"
#include "fatal.h"
...
...
modules/visualization/galaktos/per_frame_eqn.c
View file @
8139b905
...
...
@@ -24,9 +24,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "fatal.h"
#include "common.h"
#include "param.h"
#include "per_frame_eqn_types.h"
#include "per_frame_eqn.h"
...
...
modules/visualization/galaktos/per_pixel_eqn.c
View file @
8139b905
...
...
@@ -22,6 +22,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "fatal.h"
...
...
@@ -50,7 +52,7 @@ extern int mesh_j;
/* Evaluates a per pixel equation */
inline
void
evalPerPixelEqn
(
per_pixel_eqn_t
*
per_pixel_eqn
)
{
static
inline
void
evalPerPixelEqn
(
per_pixel_eqn_t
*
per_pixel_eqn
)
{
double
**
param_matrix
=
NULL
;
gen_expr_t
*
eqn_ptr
=
NULL
;
...
...
@@ -92,7 +94,7 @@ inline void evalPerPixelEqn(per_pixel_eqn_t * per_pixel_eqn) {
per_pixel_eqn
->
param
->
matrix_flag
=
1
;
}
inline
void
evalPerPixelEqns
()
{
static
inline
void
evalPerPixelEqns
()
{
/* Evaluate all per pixel equations using splay traversal */
splay_traverse
(
evalPerPixelEqn
,
active_preset
->
per_pixel_eqn_tree
);
...
...
@@ -209,13 +211,13 @@ void free_per_pixel_eqn(per_pixel_eqn_t * per_pixel_eqn) {
return
;
}
inline
int
isPerPixelEqn
(
int
op
)
{
static
inline
int
isPerPixelEqn
(
int
op
)
{
return
active_preset
->
per_pixel_flag
[
op
];
}
inline
int
resetPerPixelEqnFlags
(
preset_t
*
preset
)
{
static
inline
int
resetPerPixelEqnFlags
(
preset_t
*
preset
)
{
int
i
;
for
(
i
=
0
;
i
<
NUM_OPS
;
i
++
)
...
...
modules/visualization/galaktos/preset.c
View file @
8139b905
...
...
@@ -23,8 +23,10 @@
*****************************************************************************/
#include <vlc/vlc.h>
#include <vlc_charset.h>
#include <stdlib.h>
#include <stdio.h>
#include <dirent.h>
#include <time.h>
#include "common.h"
...
...
modules/visualization/galaktos/splaytree.c
View file @
8139b905
...
...
@@ -73,6 +73,7 @@
*/
#include <stdlib.h>
#include <stdio.h>
#include "common.h"
#include "fatal.h"
...
...
@@ -94,7 +95,7 @@ static inline 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 */
inline
splaytree_t
*
create_splaytree
(
int
(
*
compare
)(),
void
*
(
*
copy_key
)(),
void
(
*
free_key
)())
{
static
inline
splaytree_t
*
create_splaytree
(
int
(
*
compare
)(),
void
*
(
*
copy_key
)(),
void
(
*
free_key
)())
{
splaytree_t
*
splaytree
;
...
...
@@ -113,7 +114,7 @@ inline splaytree_t * create_splaytree(int (*compare)(), void * (*copy_key)(), vo
}
/* Destroys a splay tree */
inline
int
destroy_splaytree
(
splaytree_t
*
splaytree
)
{
static
inline
int
destroy_splaytree
(
splaytree_t
*
splaytree
)
{
/* Null argument check */
if
(
splaytree
==
NULL
)
...
...
@@ -158,7 +159,7 @@ static inline int free_splaynode(splaynode_t * splaynode, void (*free_key)()) {
}
/* Traverses the entire splay tree with the given function func_ptr */
inline
void
splay_traverse
(
void
(
*
func_ptr
)(),
splaytree_t
*
splaytree
)
{
static
inline
void
splay_traverse
(
void
(
*
func_ptr
)(),
splaytree_t
*
splaytree
)
{
/* Null argument check */
...
...
@@ -204,7 +205,7 @@ static inline void splay_traverse_helper (void (*func_ptr)(), splaynode_t * spla
}
/* Find the node corresponding to the given key in splaytree, return its data pointer */
inline
void
*
splay_find
(
void
*
key
,
splaytree_t
*
splaytree
)
{
static
inline
void
*
splay_find
(
void
*
key
,
splaytree_t
*
splaytree
)
{
splaynode_t
*
splaynode
;
int
match_type
;
...
...
@@ -244,7 +245,7 @@ inline void * splay_find(void * key, splaytree_t * splaytree) {
}
/* Gets the splaynode that the given key points to */
inline
splaynode_t
*
get_splaynode_of
(
void
*
key
,
splaytree_t
*
splaytree
)
{
static
inline
splaynode_t
*
get_splaynode_of
(
void
*
key
,
splaytree_t
*
splaytree
)
{
splaynode_t
*
splaynode
;
int
match_type
;
...
...
@@ -325,7 +326,7 @@ static inline splaynode_t * splay (void * key, splaynode_t * t, int * match_type
/* Deletes a splay node from a splay tree. If the node doesn't exist
then nothing happens */
inline
int
splay_delete
(
void
*
key
,
splaytree_t
*
splaytree
)
{
static
inline
int
splay_delete
(
void
*
key
,
splaytree_t
*
splaytree
)
{
splaynode_t
*
splaynode
;
...
...
@@ -402,7 +403,7 @@ static inline splaynode_t * new_splaynode(int type, void * key, void * data) {
}
/* Inserts a link into the splay tree */
inline
int
splay_insert_link
(
void
*
alias_key
,
void
*
orig_key
,
splaytree_t
*
splaytree
)
{
static
inline
int
splay_insert_link
(
void
*
alias_key
,
void
*
orig_key
,
splaytree_t
*
splaytree
)
{
splaynode_t
*
splaynode
,
*
data_node
;
void
*
key_clone
;
...
...
@@ -439,7 +440,7 @@ inline int splay_insert_link(void * alias_key, void * orig_key, splaytree_t * sp
}
/* Inserts 'data' into the 'splaytree' paired with the passed 'key' */
inline
int
splay_insert
(
void
*
data
,
void
*
key
,
splaytree_t
*
splaytree
)
{
static
inline
int
splay_insert
(
void
*
data
,
void
*
key
,
splaytree_t
*
splaytree
)
{
splaynode_t
*
splaynode
;
void
*
key_clone
;
...
...
@@ -527,7 +528,7 @@ static inline int splay_insert_node(splaynode_t * splaynode, splaytree_t * splay
}
/* Returns the 'maximum' key that is less than the given key in the splaytree */
inline
void
*
splay_find_below_max
(
void
*
key
,
splaytree_t
*
splaytree
)
{
static
inline
void
*
splay_find_below_max
(
void
*
key
,
splaytree_t
*
splaytree
)
{
void
*
closest_key
;
...
...
@@ -548,7 +549,7 @@ inline void * splay_find_below_max(void * key, splaytree_t * splaytree) {
/* Returns the 'minimum' key that is greater than the given key in the splaytree */
inline
void
*
splay_find_above_min
(
void
*
key
,
splaytree_t
*
splaytree
)
{
static
inline
void
*
splay_find_above_min
(
void
*
key
,
splaytree_t
*
splaytree
)
{
void
*
closest_key
;
...
...
@@ -643,7 +644,7 @@ static inline void splay_find_above_min_helper(void * max_key, void ** closest_k
}
/* Find the minimum entry of the splay tree */
inline
void
*
splay_find_min
(
splaytree_t
*
t
)
{
static
inline
void
*
splay_find_min
(
splaytree_t
*
t
)
{
splaynode_t
*
splaynode
;
...
...
@@ -662,7 +663,7 @@ inline void * splay_find_min(splaytree_t * t) {
/* Find the maximum entry of the splay tree */
inline
void
*
splay_find_max
(
splaytree_t
*
t
)
{
static
inline
void
*
splay_find_max
(
splaytree_t
*
t
)
{
splaynode_t
*
splaynode
;
...
...
@@ -680,7 +681,7 @@ inline void * splay_find_max(splaytree_t * t) {
return
splaynode
->
data
;
}
inline
int
splay_size
(
splaytree_t
*
t
)
{
static
inline
int
splay_size
(
splaytree_t
*
t
)
{
if
(
t
==
NULL
)
return
0
;
...
...
modules/visualization/galaktos/tree_types.c
View file @
8139b905
...
...
@@ -22,8 +22,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "common.h"
/* Compares integer value numbers in 32 bit range */
...
...
modules/visualization/galaktos/video_init.c
View file @
8139b905
...
...
@@ -32,6 +32,7 @@
//also able to handle resizing and fullscreening of windows
//just call init_display again with differant variables
#include <stdlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include "video_init.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment