read .OBJ file, first try
This commit is contained in:
		
							parent
							
								
									ee00eec000
								
							
						
					
					
						commit
						5a6e98d034
					
				
							
								
								
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -5,3 +5,7 @@ libbubulles.a
 | 
				
			|||||||
tbb
 | 
					tbb
 | 
				
			||||||
gmon.out
 | 
					gmon.out
 | 
				
			||||||
dummy-file
 | 
					dummy-file
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					tools/covid-19.obj
 | 
				
			||||||
 | 
					tools/read_obj
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										5
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								Makefile
									
									
									
									
									
								
							@ -12,12 +12,15 @@ CC = gcc
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
OPT = -Wall -g -DDEBUG_LEVEL=0 -DMUST_ABORT
 | 
					OPT = -Wall -g -DDEBUG_LEVEL=0 -DMUST_ABORT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
libbubulles.a:	bubulles.o
 | 
					libbubulles.a:	bubulles.o importobj.o
 | 
				
			||||||
	ar r $@ $?
 | 
						ar r $@ $?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bubulles.o:	bubulles.c bubulles.h Makefile
 | 
					bubulles.o:	bubulles.c bubulles.h Makefile
 | 
				
			||||||
	$(CC) $(OPT) -c $< 
 | 
						$(CC) $(OPT) -c $< 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					importobj.o:	importobj.c bubulles.h Makefile
 | 
				
			||||||
 | 
						$(CC) $(OPT) -c $< 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ------------------------------------------------
 | 
					# ------------------------------------------------
 | 
				
			||||||
# --- build some tests and tools
 | 
					# --- build some tests and tools
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/* --------------------------------------------------------------------- */
 | 
					/* --------------------------------------------------------------------- */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define LIBBB_VERSION		52
 | 
					#define LIBBB_VERSION		53
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SZ_BUBULLE_TEXT		51		/* arbitrary value */
 | 
					#define SZ_BUBULLE_TEXT		51		/* arbitrary value */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										0
									
								
								doc/tricks.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								doc/tricks.txt
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										26
									
								
								importobj.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								importobj.c
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,26 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
						          LIBBUBULLES
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						some functions for importing bubulles from dot-OBJ files.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include  <stdio.h>
 | 
				
			||||||
 | 
					#include  <stdlib.h>
 | 
				
			||||||
 | 
					#include  <string.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#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;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* --------------------------------------------------------------------- */
 | 
				
			||||||
							
								
								
									
										5
									
								
								tools/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								tools/Makefile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					BBFUNCS = ../libbubulles.a 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					read_obj:	read_obj.c Makefile ${BBFUNCS}
 | 
				
			||||||
 | 
						gcc -Wall  $< ${BBFUNCS} -o $@
 | 
				
			||||||
							
								
								
									
										25
									
								
								tools/read_obj.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								tools/read_obj.c
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,25 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					     tentatives de lecture des OBJ
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include	<stdio.h>
 | 
				
			||||||
 | 
					#include	<stdlib.h>
 | 
				
			||||||
 | 
					#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;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user