/*
* vCard implementation for Citadel
*
- * Copyright (C) 1999-2008 by the citadel.org development team.
+ * Copyright (C) 1999-2023 by the citadel.org development team.
*
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// This program is open source software. Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
*/
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-
+#include <time.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
t = num_tokens(strbuf, ';');
for (i=0; i<t; ++i) {
extract_token(compare, strbuf, i, ';', sizeof compare);
- striplt(compare);
+ string_trim(compare);
if (!strncasecmp(compare, "charset=", 8)) {
remove_token(strbuf, i, ';');
}
/* Anything left is probably the first name */
safestrncpy(firstname, buf, sizeof firstname);
- striplt(firstname);
+ string_trim(firstname);
/* Compose the structured name */
snprintf(vname, vname_size, "%s;%s;%s;%s;%s", lastname, firstname, middlename,