aboutsummaryrefslogtreecommitdiffstats
path: root/libversit
diff options
context:
space:
mode:
authorSebastian Rittau <srittau@src.gnome.org>2002-03-12 08:41:53 +0800
committerSebastian Rittau <srittau@src.gnome.org>2002-03-12 08:41:53 +0800
commit4a54ffc858eaa2693044a981372644321c7316c5 (patch)
treef0be65e2f36e9957964ab9e5d6662f8dff181ce5 /libversit
parent4a3b1a551d58baa452006df9e927773209ce56f1 (diff)
downloadgsoc2013-evolution-4a54ffc858eaa2693044a981372644321c7316c5.tar
gsoc2013-evolution-4a54ffc858eaa2693044a981372644321c7316c5.tar.gz
gsoc2013-evolution-4a54ffc858eaa2693044a981372644321c7316c5.tar.bz2
gsoc2013-evolution-4a54ffc858eaa2693044a981372644321c7316c5.tar.lz
gsoc2013-evolution-4a54ffc858eaa2693044a981372644321c7316c5.tar.xz
gsoc2013-evolution-4a54ffc858eaa2693044a981372644321c7316c5.tar.zst
gsoc2013-evolution-4a54ffc858eaa2693044a981372644321c7316c5.zip
Christian: Fix linker errors on SGI IRIX 6.5 by not using libtool for
* libversit/Makefile.am: * gncal/Makefile.am: * gnomecard/Makefile.am: Christian: Fix linker errors on SGI IRIX 6.5 by not using libtool for libversit.a. (Bugzilla #61031) -rpath removal and some small cleanups by me. * gncal/corba-cal-factory.c: (init_corba_server, unregister_calendar_services): Christian: Fix startup crashes. * gncal/calobj.c: (ical_object_to_vobject): Christian: Don't save dtend if it's 0 (i.e. the epoch 1970-01-01 00:00). Partly addresses Bugzilla #6058. * gncal/calendar.c: (calendar_open): Store errno privately so that the displayed error message is correct. * gncal/gncal-week-view.c: (gncal_week_view_set): Put %W time format string in week_end part, since otherwise we get problems when the week start is set to Sunday. Also use %V instead of %W to get the ISO week number, instead of the C week number. This makes the week number consistent with the one from GtkCalendar. * libversit/vcc.y: Christian: Fix a problem with locale-dependent string comparisons. (Bugzilla #64801) svn path=/trunk/; revision=16114
Diffstat (limited to 'libversit')
-rw-r--r--libversit/Makefile.am11
-rw-r--r--libversit/vcc.y39
2 files changed, 39 insertions, 11 deletions
diff --git a/libversit/Makefile.am b/libversit/Makefile.am
index 5d42636c1c..63c677ccae 100644
--- a/libversit/Makefile.am
+++ b/libversit/Makefile.am
@@ -1,7 +1,8 @@
+# Makefile for libversit.a
-noinst_LTLIBRARIES = libversit.la
+# $Id: Makefile.am,v 1.8 2002/03/12 00:41:53 srittau Exp $
-libversit_la_SOURCES = \
+VERSIT_SRC = \
vcc.y \
vcc.h \
vobject.c \
@@ -10,6 +11,12 @@ libversit_la_SOURCES = \
vcaltmp.c \
vcaltmp.h
+noinst_LIBRARIES = libversit.a
+noinst_LTLIBRARIES = libversit_lt.la
+
+libversit_a_SOURCES = $(VERSIT_SRC)
+libversit_lt_la_SOURCES = $(VERSIT_SRC)
+
EXTRA_DIST = README.TXT vcaltest.c vctest.c
YFLAGS=-pversit_
diff --git a/libversit/vcc.y b/libversit/vcc.y
index 4cf92c5a3f..79cd95fd4e 100644
--- a/libversit/vcc.y
+++ b/libversit/vcc.y
@@ -178,6 +178,27 @@ static void enterValues(const char *value);
static void mime_error_(char *s);
static void appendValue(const char *value);
+static int
+ascii_tolower(const char i) {
+ if ('A' <= i && i <= 'Z')
+ return i - ('A' - 'a');
+ return i;
+}
+
+static int
+ascii_stricmp(const char* s1, const char* s2) {
+ const char *p = s1, *q = s2;
+ while (*p || *q) {
+ char c1 = ascii_tolower(*p++);
+ char c2 = ascii_tolower(*q++);
+ if (c1 < c2)
+ return -1;
+ if (c1 > c2)
+ return 1;
+ }
+ return 0;
+}
+
%}
/***************************************************************************/
@@ -486,10 +507,10 @@ static void enterAttr(const char *s1, const char *s2)
}
else
addProp(curProp,p1);
- if (stricmp(p1,VCBase64Prop) == 0 || (s2 && stricmp(p2,VCBase64Prop)==0))
+ if (ascii_stricmp(p1,VCBase64Prop) == 0 || (s2 && ascii_stricmp(p2,VCBase64Prop)==0))
lexPushMode(L_BASE64);
- else if (stricmp(p1,VCQuotedPrintableProp) == 0
- || (s2 && stricmp(p2,VCQuotedPrintableProp)==0))
+ else if (ascii_stricmp(p1,VCQuotedPrintableProp) == 0
+ || (s2 && ascii_stricmp(p2,VCQuotedPrintableProp)==0))
lexPushMode(L_QUOTED_PRINTABLE);
deleteStr(s1); deleteStr(s2);
}
@@ -820,10 +841,10 @@ static int match_begin_name(int end) {
char *n = lexLookaheadWord();
int token = ID;
if (n) {
- if (!stricmp(n,"vcard")) token = end?END_VCARD:BEGIN_VCARD;
- else if (!stricmp(n,"vcalendar")) token = end?END_VCAL:BEGIN_VCAL;
- else if (!stricmp(n,"vevent")) token = end?END_VEVENT:BEGIN_VEVENT;
- else if (!stricmp(n,"vtodo")) token = end?END_VTODO:BEGIN_VTODO;
+ if (!ascii_stricmp(n,"vcard")) token = end?END_VCARD:BEGIN_VCARD;
+ else if (!ascii_stricmp(n,"vcalendar")) token = end?END_VCAL:BEGIN_VCAL;
+ else if (!ascii_stricmp(n,"vevent")) token = end?END_VEVENT:BEGIN_VEVENT;
+ else if (!ascii_stricmp(n,"vtodo")) token = end?END_VTODO:BEGIN_VTODO;
deleteStr(n);
return token;
}
@@ -1134,10 +1155,10 @@ static int yylex() {
if (isalpha(c)) {
char *t = lexGetWord();
yylval.str = t;
- if (!stricmp(t, "begin")) {
+ if (!ascii_stricmp(t, "begin")) {
return match_begin_end_name(0);
}
- else if (!stricmp(t,"end")) {
+ else if (!ascii_stricmp(t,"end")) {
return match_begin_end_name(1);
}
else {