Browse Source

some domments added

Tonton Th 6 months ago
parent
commit
94aecb1155
5 changed files with 24 additions and 5 deletions
  1. 1
    0
      .gitignore
  2. 1
    1
      Makefile
  3. 3
    0
      bubulles.c
  4. 17
    2
      bubulles.h
  5. 2
    2
      tbb.c

+ 1
- 0
.gitignore View File

@@ -1,6 +1,7 @@
1 1
 
2 2
 *.o
3 3
 
4
+libbubulles.a
4 5
 tbb
5 6
 gmon.out
6 7
 dummy-file

+ 1
- 1
Makefile View File

@@ -10,7 +10,7 @@
10 10
 
11 11
 CC = gcc
12 12
 
13
-OPT = -Wall -g -DDEBUG_LEVEL=1 -DMUST_ABORT
13
+OPT = -Wall -g -DDEBUG_LEVEL=0 -DMUST_ABORT
14 14
 CC = gcc
15 15
 
16 16
 libbubulles.a:	bubulles.o

+ 3
- 0
bubulles.c View File

@@ -286,6 +286,9 @@ what->fidx = what->size - 1;
286 286
 return 0;
287 287
 }
288 288
 /* --------------------------------------------------------------------- */
289
+/*
290
+ *				this is the WTF function * see tbb.c 
291
+ */
289 292
 int bubulles_to_data(char *fname, char *title, BBList *bbl, int k)
290 293
 {
291 294
 FILE		*fp;

+ 17
- 2
bubulles.h View File

@@ -4,7 +4,7 @@
4 4
 
5 5
 /* --------------------------------------------------------------------- */
6 6
 
7
-#define LIBBB_VERSION		50
7
+#define LIBBB_VERSION		51
8 8
 
9 9
 #define SZ_BUBULLE_TEXT		51		/* arbitrary value */
10 10
 
@@ -59,8 +59,23 @@ void	bubulles_sizeof(int k);
59 59
 
60 60
 Bubulle * bubulle_getaddr(BBList *where, int idx);
61 61
 
62
-int fprint_bubulles(FILE *fp, char *title, BBList *bbl, int k);
62
+/*
63
+ *	export functions
64
+ */
65
+
66
+/*
67
+ *		export Awk machinable.
68
+ * flags :
69
+ *	0x0001		print diameter
70
+ *	0x0002		print graylevel
71
+ *	0x0004		print RGB values
72
+ */
73
+int fprint_bubulles(FILE *fp, char *title, BBList *bbl, int flags);
74
+
75
+/* only human readable */
63 76
 int niceprint_bubulle(Bubulle *what, int unused);
77
+
78
+/* this is just a wtf function * see tbb.c */
64 79
 int bubulles_to_data(char *fname, char *title, BBList *bbl, int k);
65 80
 
66 81
 /* --------------------------------------------------------------------- */

+ 2
- 2
tbb.c View File

@@ -84,7 +84,7 @@ foo = peek_bubulle(bublist, &bubulle, in);
84 84
 fprintf(stderr, "peek 1     -> %7d\n", foo);
85 85
 
86 86
 foo = niceprint_bubulle(&bubulle, 0);
87
-fprintf(stderr, "niceprint  -> %7d\n", foo);
87
+if (foo) fprintf(stderr, "niceprint  -> %d\n", foo);
88 88
 
89 89
 foo = peek_bubulle(bublist, &bubulle, out);
90 90
 fprintf(stderr, "peek 2     -> %7d\n", foo);
@@ -97,7 +97,7 @@ foo = peek_bubulle(bublist, &bubulle, in);
97 97
 fprintf(stderr, "peek 3     -> %7d\n", foo);
98 98
 
99 99
 foo = niceprint_bubulle(&bubulle, 0);
100
-fprintf(stderr, "niceprint  -> %7d\n", foo);
100
+if (foo) fprintf(stderr, "niceprint  -> %d\n", foo);
101 101
 
102 102
 free_bubulles(bublist, 0);
103 103
 

Loading…
Cancel
Save