Debian Codegraph @

server/tools.h

raw symbols SCIP
1 /*******************************************************************************
2 *
3 * Copyright (c) 2004 Guillaume Cottenceau
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2, as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 ******************************************************************************/
19
20 #include <stdlib.h>
21 #include <stdarg.h>
22
23 #include <glib.h>
24
25 int charstar_to_int(const char* s);
26 char* asprintf_(const char* msg, ...);
27 char* vasprintf_(const char* msg, va_list args);
28 void* malloc_(size_t size);
29 void* realloc_(void* ptr, size_t size);
30 char* strdup_(char* input);
31 void* memdup(void* src, size_t size);
32 size_t strconcat(char *dst, const char *src, size_t size);
33
34 void * GListp2data(GList * elem);
35 typedef gpointer (*GFoldFunc) (gpointer data, gpointer partial, gpointer user_data);
36 gpointer g_list_fold_left(GList * list, gpointer first, GFoldFunc func, gpointer user_data);
37 typedef gboolean (*GTruthFunc) (gconstpointer data, gconstpointer user_data);
38 gboolean g_list_any(GList * list, GTruthFunc func, gpointer user_data);
39
40 void daemonize();
41 void reregister_server_if_needed();
42
43 #define str_begins_static_str(pointer, static_str) \
44 (!strncmp(pointer, static_str, sizeof(static_str) - 1))
45 #define streq(a, b) (!strcmp(a, b))