[Initng-svn] r2315 - in initng: plugins/iparser
plugins/simple_launcher src
svn at initng.thinktux.net
svn at initng.thinktux.net
Sat Dec 3 01:14:43 CET 2005
Author: deac
Date: Sat Dec 3 01:14:42 2005
New Revision: 2315
Modified:
initng/plugins/iparser/initng_i_parser.c
initng/plugins/simple_launcher/initng_simple_launcher.c
initng/src/initng.h
initng/src/initng_active_db.c
initng/src/initng_plugin_hook.h
initng/src/initng_string_tools.c
initng/src/initng_string_tools.h
initng/src/initng_toolbox.h
Log:
lesser warnings; split_argv -> split_delim
Modified: initng/plugins/iparser/initng_i_parser.c
==============================================================================
--- initng/plugins/iparser/initng_i_parser.c (original)
+++ initng/plugins/iparser/initng_i_parser.c Sat Dec 3 01:14:42 2005
@@ -46,8 +46,8 @@
char *g_filename = NULL;
char *g_pointer = NULL;
-#define print_line(a,m) err_print_line2t(a, m, MSG, __FILE__, __PRETTY_FUNCTION__, __LINE__)
-#define err_print_line(a,m) err_print_line2t(a, m, MSG_FAIL, __FILE__, __PRETTY_FUNCTION__, __LINE__)
+#define print_line(a,m) err_print_line2t(a, m, MSG, __FILE__, (const char*)__PRETTY_FUNCTION__, __LINE__)
+#define err_print_line(a,m) err_print_line2t(a, m, MSG_FAIL, __FILE__, (const char*)__PRETTY_FUNCTION__, __LINE__)
static void err_print_line2t(char *point, const char *message, e_mt err,
const char *file, const char *func,
int codeline);
Modified: initng/plugins/simple_launcher/initng_simple_launcher.c
==============================================================================
--- initng/plugins/simple_launcher/initng_simple_launcher.c (original)
+++ initng/plugins/simple_launcher/initng_simple_launcher.c Sat Dec 3 01:14:42 2005
@@ -122,7 +122,7 @@
D_("PATH determined to be %s\n", PATH);
/* split path by ':' char */
- path_argv = split_argv(PATH, ":", &path_c);
+ path_argv = split_delim(PATH, ":", &path_c);
/* walk the list of entrys */
for (i = 0; path_argv[i]; i++)
@@ -186,12 +186,12 @@
exec_t = fix_variables(exec, service);
/* argv-entries are pointer to exec_t[x] */
- exec_argv = split_argv(exec_t, WHITESPACE, &exec_c);
+ exec_argv = split_delim(exec_t, WHITESPACE, &exec_c);
/* make sure we got something from the split */
if (!exec_argv || !exec_argv[0])
{
- D_("split_argv on exec returns NULL.\n");
+ D_("split_delim on exec returns NULL.\n");
goto go_free;
}
@@ -222,10 +222,10 @@
}
exec_args_argv =
- split_argv(exec_args_t, WHITESPACE, &exec_args_c);
+ split_delim(exec_args_t, WHITESPACE, &exec_args_c);
if (!exec_args_argv || !exec_args_argv[0])
{
- D_("split_argv exec_args returns NULL.\n");
+ D_("split_delim exec_args returns NULL.\n");
goto go_free;
}
Modified: initng/src/initng.h
==============================================================================
--- initng/src/initng.h (original)
+++ initng/src/initng.h Sat Dec 3 01:14:42 2005
@@ -67,19 +67,19 @@
*/
#define P_(fmt, ...) \
- print_error(MSG, __FILE__, __PRETTY_FUNCTION__, __LINE__, fmt, ## __VA_ARGS__)
+ print_error(MSG, __FILE__, (const char*)__PRETTY_FUNCTION__, __LINE__, fmt, ## __VA_ARGS__)
#define F_(fmt, ...) \
- print_error(MSG_FAIL, __FILE__, __PRETTY_FUNCTION__, __LINE__, fmt, ## __VA_ARGS__)
+ print_error(MSG_FAIL, __FILE__, (const char*)__PRETTY_FUNCTION__, __LINE__, fmt, ## __VA_ARGS__)
#define W_(fmt, ...) \
- print_error(MSG_WARN, __FILE__, __PRETTY_FUNCTION__, __LINE__, fmt, ## __VA_ARGS__)
+ print_error(MSG_WARN, __FILE__, (const char*)__PRETTY_FUNCTION__, __LINE__, fmt, ## __VA_ARGS__)
#ifdef DEBUG
#define V_ADD(to_verb) s_set_another_string(VERBOSE_THIS, to_verb)
#define D_(fmt, ...) \
- print_debug(__FILE__, __PRETTY_FUNCTION__, __LINE__, fmt, ## __VA_ARGS__)
-#define S_ print_func(__FILE__, __PRETTY_FUNCTION__)
+ print_debug(__FILE__, (const char*)__PRETTY_FUNCTION__, __LINE__, fmt, ## __VA_ARGS__)
+#define S_ print_func(__FILE__, (const char*)__PRETTY_FUNCTION__)
#else
#define D_(fmt, ...)
#define S_
Modified: initng/src/initng_active_db.c
==============================================================================
--- initng/src/initng_active_db.c (original)
+++ initng/src/initng_active_db.c Sat Dec 3 01:14:42 2005
@@ -49,7 +49,7 @@
{
active_h *current = NULL;
- D_("(%s);", service);
+ D_("(%s);", (char*)service);
assert(service);
@@ -75,7 +75,7 @@
assert(service);
active_h *current = NULL;
- D_("(%s);", service);
+ D_("(%s);", (char*)service);
/* first give the exact find a shot */
if ((current = active_db_find_by_exact_name(service)))
@@ -108,7 +108,7 @@
assert(service);
- D_("(%s);", service);
+ D_("(%s);", (char*)service);
/* first search by name */
if ((current = active_db_find_by_name(service)))
Modified: initng/src/initng_plugin_hook.h
==============================================================================
--- initng/src/initng_plugin_hook.h (original)
+++ initng/src/initng_plugin_hook.h Sat Dec 3 01:14:42 2005
@@ -30,6 +30,6 @@
#define initng_add_hook(t,o,h) \
initng_add_hook_real(__FILE__, t, o, h)
#define initng_del_hook(t,h) \
- initng_del_hook_real(__FILE__, __PRETTY_FUNCTION__, __LINE__, t, h)
+ initng_del_hook_real(__FILE__, (const char*)__PRETTY_FUNCTION__, __LINE__, t, h)
#endif
Modified: initng/src/initng_string_tools.c
==============================================================================
--- initng/src/initng_string_tools.c (original)
+++ initng/src/initng_string_tools.c Sat Dec 3 01:14:42 2005
@@ -88,7 +88,7 @@
* @idea DEac-
* @author TheLich
*/
-char **split_argv(char *string, const char *delim, size_t * argc)
+char **split_delim(char *string, const char *delim, size_t * argc)
{
int len, pos = 0;
char **array = (char **) initng_calloc(1, sizeof(char *));
Modified: initng/src/initng_string_tools.h
==============================================================================
--- initng/src/initng_string_tools.h (original)
+++ initng/src/initng_string_tools.h Sat Dec 3 01:14:42 2005
@@ -56,9 +56,9 @@
int st_strip_end(char **string);
char *st_get_path(char *string);
-/* to use with split_argv */
+/* to use with split_delim */
#define WHITESPACE " \t\n\r\v"
-char **split_argv(char *string, const char *delim, size_t * argc);
+char **split_delim(char *string, const char *delim, size_t * argc);
/* pattern searching */
int service_match(const char *string, const char *pattern);
Modified: initng/src/initng_toolbox.h
==============================================================================
--- initng/src/initng_toolbox.h (original)
+++ initng/src/initng_toolbox.h Sat Dec 3 01:14:42 2005
@@ -32,15 +32,15 @@
#undef initng_realloc
#define initng_realloc(ptr, size) \
- initng_realloc2(ptr, size, __func__, __LINE__)
+ initng_realloc2(ptr, size, (const char*)__func__, __LINE__)
void *initng_realloc2(void *ptr, size_t size, const char *func, int line);
#undef i_strdup
-#define i_strdup(s) i_strdup2(s, __func__, __LINE__)
+#define i_strdup(s) i_strdup2(s, (const char*)__func__, __LINE__)
char *i_strdup2(const char *s, const char *func, int line);
#undef i_strndup
-#define i_strndup(s, n) i_strndup2(s, n, __func__, __LINE__)
+#define i_strndup(s, n) i_strndup2(s, n, (const char*)__func__, __LINE__)
char *i_strndup2(const char *s, size_t n, const char *func, int line);
int set_proc_title(const char *fmt, ...);
More information about the Initng-svn
mailing list