Removed the 'ascmonths' global declaration from libCitadel.
authorArt Cancro <ajc@citadel.org>
Mon, 19 Nov 2007 04:34:42 +0000 (04:34 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 19 Nov 2007 04:34:42 +0000 (04:34 +0000)
This should clean up the build on Mac OS.

libcitadel/lib/libcitadel.c
libcitadel/lib/mime_parser.c
libcitadel/lib/tools.c
libcitadel/lib/vcard.c

index fd64fa99d61dbc1c744560ecc369832d469e424d..8c83bfd9a34130c4771e1d0d8fd0b268a90a68b6 100644 (file)
@@ -3,7 +3,6 @@
  *
  */
 
-
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
@@ -15,7 +14,6 @@
 #include <errno.h>
 #include "libcitadel.h"
 
-
 char *libcitadel_version_string(void) {
        return "$Id$";
 }
index 33fc854f74d55084d23b59464eb69fa3e5ee05b2..2b14d7129d9b1f8c79389af76104a42edc369e6c 100644 (file)
@@ -3,7 +3,7 @@
  *
  * 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.
  *
  */
@@ -20,7 +20,6 @@
 
 #include "libcitadel.h"
 
-
 void extract_key(char *target, char *source, char *key)
 {
        char *ptr;
index 016ec9ab82c884984274a317114f51321eb07f43..ab885268bf08bf1e44d9625b986368dc5fb41f0d 100644 (file)
@@ -1,5 +1,6 @@
 /*
- *
+ * A basic toolset containing miscellaneous functions for string manipluation,
+ * encoding/decoding, and a bunch of other stuff.
  */
 
 
@@ -35,12 +36,6 @@ typedef unsigned char byte;        /* Byte type */
 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;
@@ -518,6 +513,11 @@ void fmt_date(char *buf, size_t n, time_t thetime, int seconds) {
        struct tm tm;
        int hour;
 
+       /* 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);
 
@@ -527,7 +527,7 @@ void fmt_date(char *buf, size_t n, time_t thetime, int seconds) {
 
        if (seconds) {
                snprintf(buf, n, "%s %d %4d %d:%02d:%02d%s",
-                       ascmonths[tm.tm_mon],
+                       fmt_date_months[tm.tm_mon],
                        tm.tm_mday,
                        tm.tm_year + 1900,
                        hour,
@@ -537,7 +537,7 @@ void fmt_date(char *buf, size_t n, time_t thetime, int seconds) {
                );
        } else {
                snprintf(buf, n, "%s %d %4d %d:%02d%s",
-                       ascmonths[tm.tm_mon],
+                       fmt_date_months[tm.tm_mon],
                        tm.tm_mday,
                        tm.tm_year + 1900,
                        hour,
@@ -869,7 +869,7 @@ int is_msg_in_mset(char *mset, long msgnum) {
 }
 
 
-/**
+/*
  * \brief searches for a  paternn within asearch string
  * \param search the string to search 
  * \param patn the pattern to find in string
index f0afd47060614acd9d58dcef65f78d5b44aa4bee..e28f4783d30489bf9bc7ed99c05b973cb4ab02dd 100644 (file)
@@ -3,7 +3,7 @@
  *
  * 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.
  */