diff --git a/.gitignore b/.gitignore index 9efe977..f7d9566 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,7 @@ libbubulles.a tbb gmon.out dummy-file + +tools/covid-19.obj +tools/read_obj + diff --git a/Makefile b/Makefile index 90f4f4a..ec9c5cb 100644 --- a/Makefile +++ b/Makefile @@ -12,12 +12,15 @@ CC = gcc OPT = -Wall -g -DDEBUG_LEVEL=0 -DMUST_ABORT -libbubulles.a: bubulles.o +libbubulles.a: bubulles.o importobj.o ar r $@ $? bubulles.o: bubulles.c bubulles.h Makefile $(CC) $(OPT) -c $< +importobj.o: importobj.c bubulles.h Makefile + $(CC) $(OPT) -c $< + # ------------------------------------------------ # --- build some tests and tools diff --git a/bubulles.h b/bubulles.h index df8a9c5..feff58f 100644 --- a/bubulles.h +++ b/bubulles.h @@ -4,7 +4,7 @@ /* --------------------------------------------------------------------- */ -#define LIBBB_VERSION 52 +#define LIBBB_VERSION 53 #define SZ_BUBULLE_TEXT 51 /* arbitrary value */ diff --git a/doc/tricks.txt b/doc/tricks.txt new file mode 100644 index 0000000..e69de29 diff --git a/importobj.c b/importobj.c new file mode 100644 index 0000000..94496c7 --- /dev/null +++ b/importobj.c @@ -0,0 +1,26 @@ +/* + LIBBUBULLES + + some functions for importing bubulles from dot-OBJ files. +*/ + +#include +#include +#include + +#include "bubulles.h" + +/* --------------------------------------------------------------------- */ + +int try_to_read_an_OBJ_file(char *fname, int notused) +{ +FILE *fpin; + +#if DEBUG_LEVEL +fprintf(stderr, ">>> %s ( '%s' %d)\n", fname, notused); +#endif + +return -7800; +} + +/* --------------------------------------------------------------------- */ diff --git a/tools/Makefile b/tools/Makefile new file mode 100644 index 0000000..1cb716b --- /dev/null +++ b/tools/Makefile @@ -0,0 +1,5 @@ + +BBFUNCS = ../libbubulles.a + +read_obj: read_obj.c Makefile ${BBFUNCS} + gcc -Wall $< ${BBFUNCS} -o $@ diff --git a/tools/read_obj.c b/tools/read_obj.c new file mode 100644 index 0000000..a5cc6c3 --- /dev/null +++ b/tools/read_obj.c @@ -0,0 +1,25 @@ +/* + tentatives de lecture des OBJ +*/ + +#include +#include +#include "../bubulles.h" + +int main(int argc, char *argv[]) +{ +int foo; + +if (2 != argc) { + bubulles_version(1); + exit(0); + } + + +// foo = try_to_read_an_OBJ_file(argv[1], 0); + + + + +return 0; +}