This should clean up the build on Mac OS.
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include "libcitadel.h"
#include <errno.h>
#include "libcitadel.h"
char *libcitadel_version_string(void) {
return "$Id$";
}
char *libcitadel_version_string(void) {
return "$Id$";
}
*
* This is the MIME parser for Citadel.
*
*
* This is the MIME parser for Citadel.
*
- * Copyright (c) 1998-2007 by Art Cancro
+ * Copyright (c) 1998-2007 by the citadel.org development team.
* This code is distributed under the GNU General Public License v3.
*
*/
* This code is distributed under the GNU General Public License v3.
*
*/
void extract_key(char *target, char *source, char *key)
{
char *ptr;
void extract_key(char *target, char *source, char *key)
{
char *ptr;
+ * A basic toolset containing miscellaneous functions for string manipluation,
+ * encoding/decoding, and a bunch of other stuff.
static byte dtable[256] = "\0"; /* base64 decode table */
static byte etable[256] = "\0"; /* base64 encode table */
static byte dtable[256] = "\0"; /* base64 decode table */
static byte etable[256] = "\0"; /* base64 encode table */
-/* Month strings for date conversions */
-char *ascmonths[12] = {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-};
-
char *safestrncpy(char *dest, const char *src, size_t n)
{
int i = 0;
char *safestrncpy(char *dest, const char *src, size_t n)
{
int i = 0;
+ /* Month strings for date conversions ... this needs to be localized eventually */
+ char *fmt_date_months[12] = {
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
+ };
+
strcpy(buf, "");
localtime_r(&thetime, &tm);
strcpy(buf, "");
localtime_r(&thetime, &tm);
if (seconds) {
snprintf(buf, n, "%s %d %4d %d:%02d:%02d%s",
if (seconds) {
snprintf(buf, n, "%s %d %4d %d:%02d:%02d%s",
+ fmt_date_months[tm.tm_mon],
tm.tm_mday,
tm.tm_year + 1900,
hour,
tm.tm_mday,
tm.tm_year + 1900,
hour,
);
} else {
snprintf(buf, n, "%s %d %4d %d:%02d%s",
);
} else {
snprintf(buf, n, "%s %d %4d %d:%02d%s",
+ fmt_date_months[tm.tm_mon],
tm.tm_mday,
tm.tm_year + 1900,
hour,
tm.tm_mday,
tm.tm_year + 1900,
hour,
* \brief searches for a paternn within asearch string
* \param search the string to search
* \param patn the pattern to find in string
* \brief searches for a paternn within asearch string
* \param search the string to search
* \param patn the pattern to find in string
*
* vCard implementation for Citadel
*
*
* vCard implementation for Citadel
*
- * Copyright (C) 1999-2007 by Art Cancro
+ * Copyright (C) 1999-2007 by the citadel.org development team.
* This code is freely redistributable under the terms of the GNU General
* Public License. All other rights reserved.
*/
* This code is freely redistributable under the terms of the GNU General
* Public License. All other rights reserved.
*/