Compare commits
No commits in common. "94aecb1155022bc39eb2088d0fef3b13b6095df4" and "db2c41eac1a6c75c1c4f868c79e369e8f917ebac" have entirely different histories.
94aecb1155
...
db2c41eac1
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
*.o
|
*.o
|
||||||
|
|
||||||
libbubulles.a
|
|
||||||
tbb
|
tbb
|
||||||
gmon.out
|
gmon.out
|
||||||
dummy-file
|
dummy-file
|
||||||
|
2
Makefile
2
Makefile
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
|
||||||
OPT = -Wall -g -DDEBUG_LEVEL=0 -DMUST_ABORT
|
OPT = -Wall -g -DDEBUG_LEVEL=1 -DMUST_ABORT
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
|
||||||
libbubulles.a: bubulles.o
|
libbubulles.a: bubulles.o
|
||||||
|
@ -286,9 +286,6 @@ what->fidx = what->size - 1;
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* --------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------- */
|
||||||
/*
|
|
||||||
* this is the WTF function * see tbb.c
|
|
||||||
*/
|
|
||||||
int bubulles_to_data(char *fname, char *title, BBList *bbl, int k)
|
int bubulles_to_data(char *fname, char *title, BBList *bbl, int k)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
19
bubulles.h
19
bubulles.h
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
/* --------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------- */
|
||||||
|
|
||||||
#define LIBBB_VERSION 51
|
#define LIBBB_VERSION 50
|
||||||
|
|
||||||
#define SZ_BUBULLE_TEXT 51 /* arbitrary value */
|
#define SZ_BUBULLE_TEXT 51 /* arbitrary value */
|
||||||
|
|
||||||
@ -59,23 +59,8 @@ void bubulles_sizeof(int k);
|
|||||||
|
|
||||||
Bubulle * bubulle_getaddr(BBList *where, int idx);
|
Bubulle * bubulle_getaddr(BBList *where, int idx);
|
||||||
|
|
||||||
/*
|
int fprint_bubulles(FILE *fp, char *title, BBList *bbl, int k);
|
||||||
* export functions
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* export Awk machinable.
|
|
||||||
* flags :
|
|
||||||
* 0x0001 print diameter
|
|
||||||
* 0x0002 print graylevel
|
|
||||||
* 0x0004 print RGB values
|
|
||||||
*/
|
|
||||||
int fprint_bubulles(FILE *fp, char *title, BBList *bbl, int flags);
|
|
||||||
|
|
||||||
/* only human readable */
|
|
||||||
int niceprint_bubulle(Bubulle *what, int unused);
|
int niceprint_bubulle(Bubulle *what, int unused);
|
||||||
|
|
||||||
/* this is just a wtf function * see tbb.c */
|
|
||||||
int bubulles_to_data(char *fname, char *title, BBList *bbl, int k);
|
int bubulles_to_data(char *fname, char *title, BBList *bbl, int k);
|
||||||
|
|
||||||
/* --------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------- */
|
||||||
|
21
tbb.c
21
tbb.c
@ -23,7 +23,7 @@ if (NULL==bublist) {
|
|||||||
print_bublist_desc(bublist, 1);
|
print_bublist_desc(bublist, 1);
|
||||||
|
|
||||||
foo = free_bubulles(bublist, 0);
|
foo = free_bubulles(bublist, 0);
|
||||||
fprintf(stderr, "free bubulles -> %d\n", foo);
|
printf("free bubulles -> %d\n", foo);
|
||||||
|
|
||||||
}
|
}
|
||||||
/* --------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------- */
|
||||||
@ -37,20 +37,17 @@ bublist = alloc_bubulles("push & pop", nbelm, 0);
|
|||||||
|
|
||||||
for (idx=0; idx<nbelm; idx++) {
|
for (idx=0; idx<nbelm; idx++) {
|
||||||
bubulle.p.x = (double)idx;
|
bubulle.p.x = (double)idx;
|
||||||
if (idx & 0xf0)
|
|
||||||
bubulle.p.y = bubulle.p.z = 0.3;
|
bubulle.p.y = bubulle.p.z = 0.3;
|
||||||
else
|
|
||||||
bubulle.p.y = bubulle.p.z = 0.8;
|
|
||||||
foo = push_bubulle(bublist, &bubulle);
|
foo = push_bubulle(bublist, &bubulle);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* WTF ? where is the 'pop' test ? */
|
/* WTF ? where is the 'pop' test ? */
|
||||||
|
|
||||||
foo = bubulles_to_data("dummy-file", NULL, bublist, 0);
|
foo = bubulles_to_data("dummy-file", NULL, bublist, 0);
|
||||||
fprintf(stderr, "ecriture bubulles -> %d\n", foo);
|
printf("ecriture bubulles -> %d\n", foo);
|
||||||
|
|
||||||
foo = free_bubulles(bublist, 0);
|
foo = free_bubulles(bublist, 0);
|
||||||
fprintf(stderr, "free bubulles -> %d\n", foo);
|
printf("free bubulles -> %d\n", foo);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -81,23 +78,23 @@ in = nbre / 2;
|
|||||||
out = nbre + 42;
|
out = nbre + 42;
|
||||||
|
|
||||||
foo = peek_bubulle(bublist, &bubulle, in);
|
foo = peek_bubulle(bublist, &bubulle, in);
|
||||||
fprintf(stderr, "peek 1 -> %7d\n", foo);
|
printf("peek 1 -> %7d\n", foo);
|
||||||
|
|
||||||
foo = niceprint_bubulle(&bubulle, 0);
|
foo = niceprint_bubulle(&bubulle, 0);
|
||||||
if (foo) fprintf(stderr, "niceprint -> %d\n", foo);
|
printf("niceprint -> %7d\n", foo);
|
||||||
|
|
||||||
foo = peek_bubulle(bublist, &bubulle, out);
|
foo = peek_bubulle(bublist, &bubulle, out);
|
||||||
fprintf(stderr, "peek 2 -> %7d\n", foo);
|
printf("peek 2 -> %7d\n", foo);
|
||||||
|
|
||||||
bubulle.p.y = 3.14159;
|
bubulle.p.y = 3.14159;
|
||||||
foo = poke_bubulle(bublist, &bubulle, in);
|
foo = poke_bubulle(bublist, &bubulle, in);
|
||||||
fprintf(stderr, "poke 2 -> %7d\n", foo);
|
printf("poke 1 -> %7d\n", foo);
|
||||||
|
|
||||||
foo = peek_bubulle(bublist, &bubulle, in);
|
foo = peek_bubulle(bublist, &bubulle, in);
|
||||||
fprintf(stderr, "peek 3 -> %7d\n", foo);
|
printf("peek 3 -> %7d\n", foo);
|
||||||
|
|
||||||
foo = niceprint_bubulle(&bubulle, 0);
|
foo = niceprint_bubulle(&bubulle, 0);
|
||||||
if (foo) fprintf(stderr, "niceprint -> %d\n", foo);
|
printf("niceprint -> %7d\n", foo);
|
||||||
|
|
||||||
free_bubulles(bublist, 0);
|
free_bubulles(bublist, 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user