diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-01-31 23:35:06 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-01-31 23:35:06 +0000 |
commit | 6ad1c1c257c74c82179a0eb62277ceef1cc4e9e0 (patch) | |
tree | 73a0657cad8a96c0d0611ec900b95adc4a264be0 /hardinfo2/computer.h | |
parent | e9906f6d9335ae96cd6afac714646b97edc469a5 (diff) |
Sync with internal subversion
Diffstat (limited to 'hardinfo2/computer.h')
-rw-r--r-- | hardinfo2/computer.h | 83 |
1 files changed, 40 insertions, 43 deletions
diff --git a/hardinfo2/computer.h b/hardinfo2/computer.h index 3cb3d9e9..d6244305 100644 --- a/hardinfo2/computer.h +++ b/hardinfo2/computer.h @@ -23,41 +23,38 @@ static struct { gchar *file, *codename; } distro_db[] = { - { - DB_PREFIX "debian_version", "deb"}, { - DB_PREFIX "slackware-version", "slk"}, { - DB_PREFIX "mandrake-release", "mdk"}, { - DB_PREFIX "gentoo-release", "gnt"}, { - DB_PREFIX "conectiva-release", "cnc"}, { - DB_PREFIX "versão-conectiva", "cnc"}, { - DB_PREFIX "turbolinux-release", "tl"}, { - DB_PREFIX "yellowdog-release", "yd"}, { - DB_PREFIX "SuSE-release", "suse"}, { - DB_PREFIX "sun-release", "sun"}, - /* - * RedHat must be the *last* one to be checked, since - * some distros (like Mandrake) includes a redhat-relase - * file too. - */ - { - DB_PREFIX "redhat-release", "rh"}, { - NULL, NULL} + { DB_PREFIX "debian_version", "deb" }, + { DB_PREFIX "slackware-version", "slk" }, + { DB_PREFIX "mandrake-release", "mdk" }, + { DB_PREFIX "gentoo-release", "gnt" }, + { DB_PREFIX "conectiva-release", "cnc" }, + { DB_PREFIX "versão-conectiva", "cnc" }, + { DB_PREFIX "turbolinux-release", "tl" }, + { DB_PREFIX "yellowdog-release", "yd" }, + { DB_PREFIX "SuSE-release", "suse" }, + { DB_PREFIX "sun-release", "sun" }, + /* + * RedHat must be the *last* one to be checked, since + * some distros (like Mandrake) includes a redhat-relase + * file too. + */ + { DB_PREFIX "redhat-release", "rh" }, + { NULL, NULL } }; +typedef struct _Computer Computer; +typedef struct _Processor Processor; +typedef struct _OperatingSystem OperatingSystem; +typedef struct _MemoryInfo MemoryInfo; +typedef struct _UptimeInfo UptimeInfo; +typedef struct _LoadInfo LoadInfo; +typedef struct _DisplayInfo DisplayInfo; -typedef struct _Computer Computer; -typedef struct _Processor Processor; -typedef struct _OperatingSystem OperatingSystem; -typedef struct _MemoryInfo MemoryInfo; -typedef struct _UptimeInfo UptimeInfo; -typedef struct _LoadInfo LoadInfo; -typedef struct _DisplayInfo DisplayInfo; +typedef struct _AlsaInfo AlsaInfo; +typedef struct _AlsaCard AlsaCard; -typedef struct _AlsaInfo AlsaInfo; -typedef struct _AlsaCard AlsaCard; - -typedef struct _FileSystem FileSystem; -typedef struct _FileSystemEntry FileSystemEntry; +typedef struct _FileSystem FileSystem; +typedef struct _FileSystemEntry FileSystemEntry; struct _AlsaCard { gchar *alsa_name; @@ -143,23 +140,23 @@ struct _MemoryInfo { gfloat ratio; }; -#define get_str(field_name,ptr) \ +#define get_str(field_name,ptr) \ if (g_str_has_prefix(tmp[0], field_name)) { \ - ptr = g_strdup(tmp[1]); \ - g_strfreev(tmp); \ - continue; \ + ptr = g_strdup(tmp[1]); \ + g_strfreev(tmp); \ + continue; \ } -#define get_int(field_name,ptr) \ +#define get_int(field_name,ptr) \ if (g_str_has_prefix(tmp[0], field_name)) { \ - ptr = atoi(tmp[1]); \ - g_strfreev(tmp); \ - continue; \ + ptr = atoi(tmp[1]); \ + g_strfreev(tmp); \ + continue; \ } -#define get_float(field_name,ptr) \ +#define get_float(field_name,ptr) \ if (g_str_has_prefix(tmp[0], field_name)) { \ - ptr = atof(tmp[1]); \ - g_strfreev(tmp); \ - continue; \ + ptr = atof(tmp[1]); \ + g_strfreev(tmp); \ + continue; \ } #endif /* __COMPUTER_H__ */ |