diff options
author | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-07-03 15:59:08 +0000 |
---|---|---|
committer | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-07-03 15:59:08 +0000 |
commit | 60eb9d480daa352d7af19ad67e410f384f0e9f74 (patch) | |
tree | 7816a737b025fedbeb1866362d166d2fc16ebb84 /catsprintf.h | |
parent | 831e6bd3e28b85a87f68917bb928b1f3ce7601ce (diff) | |
download | python-dmidecode-60eb9d480daa352d7af19ad67e410f384f0e9f74.tar.gz python-dmidecode-60eb9d480daa352d7af19ad67e410f384f0e9f74.tar.xz python-dmidecode-60eb9d480daa352d7af19ad67e410f384f0e9f74.zip |
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
Diffstat (limited to 'catsprintf.h')
-rw-r--r-- | catsprintf.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/catsprintf.h b/catsprintf.h index 2c06130..46ac8e2 100644 --- a/catsprintf.h +++ b/catsprintf.h @@ -4,7 +4,24 @@ #include <stdarg.h> #include <string.h> #include <stdio.h> -int catsprintf(char *buf, int major, const char *format, ...); -/* sed -i -e 's/\<printf(/catsprintf(buffer, /g' dmidecode.c */ +#include <stdlib.h> +#include <assert.h> + +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 |