[syslinux:master] hdt: Cleaning macros

syslinux-bot for Erwan Velu erwanaliasr1 at gmail.com
Mon Apr 25 15:28:42 PDT 2011

Commit-ID:  9d15c69ab314c757edb24ba8d4f1cfdccf955a75
Gitweb:     http://syslinux.zytor.com/commit/9d15c69ab314c757edb24ba8d4f1cfdccf955a75
Author:     Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Sun, 3 Apr 2011 21:16:38 +0200
Committer:  Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Sun, 3 Apr 2011 21:16:38 +0200

hdt: Cleaning macros

They have to be simplier.

 com32/hdt/hdt-dump.h |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/com32/hdt/hdt-dump.h b/com32/hdt/hdt-dump.h
index d286562..66aacfb 100644
--- a/com32/hdt/hdt-dump.h
+++ b/com32/hdt/hdt-dump.h
@@ -46,8 +46,8 @@
 #define END_OF_APPEND NULL)); *item=temp_array;
 // Macros to manipulate objects
-#define CREATE_NEW_OBJECT *item = zzjson_create_object(config, NULL);
-#define FLUSH_OBJECT zzjson_print(config, *item); zzjson_free(config, *item);
+#define CREATE_NEW_OBJECT   *item = zzjson_create_object(config, NULL);
+#define FLUSH_OBJECT flush(config, item); 
 // Macros to manipulate integers as objects
 #define add_i(name,value) *item = zzjson_object_append(config, *item, name, zzjson_create_number_i(config, value))
@@ -63,19 +63,12 @@
 #define add_b(name,value) if (value==true) {add_bool_true(name);} else {add_bool_false(name);}
 #define add_hb(value) add_b(#value,hardware->value)
-// Macros to Temp Objects
-#define CREATE_TEMP_OBJECT ZZJSON *temp; temp=zzjson_create_object(config,NULL);
-#define add_ti(name,value) temp = zzjson_object_append(config, temp, name, zzjson_create_number_i(config, value))
-#define add_thi(value) add_ti(#value,hardware->value)
-#define add_ts(name,value) temp= zzjson_object_append(config, temp, name, zzjson_create_string(config, value))
-#define add_ths(value) add_ts(#value,(char *)hardware->value)
 extern struct print_buf p_buf;
 void print_and_flush(ZZJSON_CONFIG *config, ZZJSON **item);
 int dumpprintf(FILE *p, const char *format, ...);
-void flush (char *filename, ZZJSON_CONFIG *config, ZZJSON ** item);
+void flush (ZZJSON_CONFIG *config, ZZJSON ** item);
+void to_cpio(char *filename);
 void dump_cpu(struct s_hardware *hardware, ZZJSON_CONFIG *config, ZZJSON **item);
 void dump_pxe(struct s_hardware *hardware, ZZJSON_CONFIG *config, ZZJSON **item);

More information about the Syslinux-commits mailing list