From 60eb9d480daa352d7af19ad67e410f384f0e9f74 Mon Sep 17 00:00:00 2001 From: nima Date: Thu, 3 Jul 2008 15:59:08 +0000 Subject: Major changes have been implemented, alas, untested, in hope to move towards a new version of dmi decode where rather than having data just printed to screen in functions, data is passed around, and some data structure is constructed, which is then used to construct the Python list/dicitonary objects. git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@10 abc39116-655e-4be6-ad55-d661dc543056 --- catsprintf.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'catsprintf.h') diff --git a/catsprintf.h b/catsprintf.h index 2c06130..46ac8e2 100644 --- a/catsprintf.h +++ b/catsprintf.h @@ -4,7 +4,24 @@ #include #include #include -int catsprintf(char *buf, int major, const char *format, ...); -/* sed -i -e 's/\ +#include + +typedef struct _dmi_codes_major { + const unsigned short code; + const char *id; + const char *desc; +} dmi_codes_major; + +typedef struct _dmi_minor { + long id; + dmi_codes_major* major; + char *key; + char value[512]; + struct _dmi_minor* last; +} dmi_minor; + +int catsprintf(char *buf, const char *format, ...); +dmi_minor* dmiAppendObject(long code, char const *key, const char *format, ...); #endif -- cgit