aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2011-04-03 21:16:38 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2011-04-03 21:16:38 +0200
commit9d15c69ab314c757edb24ba8d4f1cfdccf955a75 (patch)
tree9ad18ee0625f7580d33eb84a8845b99dbcee9cec
parentb0ca086f7b98cdb92355c7adfddd3d976b7c94fc (diff)
downloadsyslinux-9d15c69ab314c757edb24ba8d4f1cfdccf955a75.tar.gz
syslinux-9d15c69ab314c757edb24ba8d4f1cfdccf955a75.tar.xz
syslinux-9d15c69ab314c757edb24ba8d4f1cfdccf955a75.zip
hdt: Cleaning macros
They have to be simplier.
-rw-r--r--com32/hdt/hdt-dump.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/com32/hdt/hdt-dump.h b/com32/hdt/hdt-dump.h
index d286562b..66aacfb1 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)
-#define APPEND_TEMP_OBJECT_ARRAY APPEND_OBJECT_ARRAY(temp);
-
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);