1 /***************************************************************************
2 lib_utils.c - description
4 begin : Sun Jan 20 15:34:25 CET 2002
5 copyright : (C) 2002-2004 by Noberasco Michele
6 e-mail : noberasco.gnu@disi.unige.it
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 * This program is distributed in the hope that it will be useful, *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19 * GNU General Public License for more details. *
21 * You should have received a copy of the GNU General Public License *
22 * along with this program; if not, write to the *
23 * Free Software Foundation, Inc., *
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
26 ***************************************************************************/
36 #include <sys/types.h>
41 #include "lib_utils.h"
44 char *jump_next_line(char *ptr
)
48 if (!ptr
) return NULL
;
50 for (temp
=ptr
; temp
[0]!='\0'; temp
++)
51 if (temp
[0] == '\n') return (temp
+1);
56 /* append any number of strings to dst */
57 char *StrApp (char **dst
, ...)
63 if (dst
) if (*dst
) len
+= strlen(*dst
);
67 pt
= va_arg(va
, char *);
74 temp
= (char *) calloc((size_t)len
, sizeof(char));
86 pt
= va_arg(va
, char *);