- /* This is the bad way to do things :) */
- while (*list)
- list++;
- *list = Safe_strdup (str);
- if (!*list)
- {
- werror (E_OUT_OF_MEM, __FILE__, 0);
- exit (1);
- }
- *(++list) = NULL;
-}
-
-/** Given an array of string pointers returns a string containing all
- of the strings seperated by spaces. The returned string is on the
- heap. The join stops when a NULL pointer is hit.
-*/
-char *
-join(const char **pplist)
-{
- buffer[0] = 0;
-
- while (*pplist)
- {
- strncatz(buffer, *pplist, PATH_MAX);
- strncatz(buffer, " ", PATH_MAX);
- pplist++;
- }
-
- return buffer;
-}
-
-/** Given an array of string pointers, returns a string containing all
- of the strings seperated by spaces. The returned string is on the
- heap. n is the number of strings in the list.
-*/
-char *
-joinn(char **pplist, int n)
-{
- buffer[0] = 0;
-
- while (n--)
- {
- strncatz(buffer, *pplist, PATH_MAX);
- strncatz(buffer, " ", PATH_MAX);
- pplist++;
- }
-
- return buffer;
-}