summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 184f4ae)
raw | patch | inline | side by side (parent: 184f4ae)
author | octo <octo> | |
Wed, 24 May 2006 16:12:16 +0000 (16:12 +0000) | ||
committer | octo <octo> | |
Wed, 24 May 2006 16:12:16 +0000 (16:12 +0000) |
src/apcups.c | patch | blob | history |
diff --git a/src/apcups.c b/src/apcups.c
index 8cad3dff23e31726e07558507c182bc906913265..e1b0178492e7dfe5bc65852126b1da271b3730be 100644 (file)
--- a/src/apcups.c
+++ b/src/apcups.c
# include <netinet/in.h>
#endif
+#ifndef APCMAIN
+# define APCMAIN 0
+#endif
+
#define NISPORT 3551
#define MAXSTRING 256
#define MODULE_NAME "apcups"
/*
* The following are only if not compiled to test the module with its own main.
*/
-/* FIXME: Rename DSes to be more generic and follow established conventions. */
-#ifndef APCMAIN
+#if APCMAIN
static char *bvolt_file_template = "apcups/voltage-%s.rrd";
static char *bvolt_ds_def[] =
{
};
static int config_keys_num = 2;
-#endif /* ifndef APCMAIN */
+#endif /* if APCMAIN */
struct apc_detail_s
{
return (0);
}
-#ifdef APCMAIN
+#if APCMAIN
/*
* This is used for testing apcups in a standalone mode.
* Usefull for debugging.
cf_register (MODULE_NAME, apcups_config, config_keys, config_keys_num);
}
-#endif /* ifdef APCMAIN */
+#endif /* if APCMAIN */
#undef MODULE_NAME