summaryrefslogtreecommitdiffstats
path: root/catsprintf.h
blob: b4060e68acb10bceb9c9319511731e9544c0e672 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef CAT
#define CAT 1

#include <Python.h>

#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#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* next;
} dmi_minor;

int catsprintf(char *buf, const char *format, ...);
dmi_minor* dmiAppendObject(long code, char const *key, const char *format, ...);
int dmiSetItem(PyObject* dict, const char *key, const char *format, ...);

#endif