-#define print_to_socket(fh, ...) \
- if (fprintf (fh, __VA_ARGS__) < 0) { \
- char errbuf[1024]; \
- WARNING ("handle_flush: failed to write to socket #%i: %s", \
- fileno (fh), sstrerror (errno, errbuf, sizeof (errbuf))); \
- return -1; \
- }
-
-static int add_to_array (char ***array, int *array_num, char *value)
-{
- char **temp;
-
- temp = (char **) realloc (*array, sizeof (char *) * (*array_num + 1));
- if (temp == NULL)
- return (-1);
-
- *array = temp;
- (*array)[*array_num] = value;
- (*array_num)++;
-
- return (0);
-} /* int add_to_array */
-