summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-03-08 09:00:11 -0700
committerEduardo Chappa <chappa@washington.edu>2018-03-08 09:00:11 -0700
commit3e46e0308a5e2cd645025b48fdc46654553f4968 (patch)
tree80172d69e485f74de466e0ccd95d2f3a85473598 /pith
parent349642a84039a4b026513c32a3b4f8594acd50df (diff)
downloadalpine-3e46e0308a5e2cd645025b48fdc46654553f4968.tar.xz
* Change the definition of some definitions of some enum types from
Boolean to _Boolean, and Duration to _Duration, as these conflict with some predefined constants in Mac Sierra. Reported by Ed James. * Fix some compiler warnings in Mac Sierra. Reported by Ed James.
Diffstat (limited to 'pith')
-rw-r--r--pith/ical.c19
-rw-r--r--pith/icaltype.h4
2 files changed, 13 insertions, 10 deletions
diff --git a/pith/ical.c b/pith/ical.c
index 4128f2e3..de7a1152 100644
--- a/pith/ical.c
+++ b/pith/ical.c
@@ -12,7 +12,7 @@ typedef struct ical_iana_comp_s {
} ICAL_COMP_S;
typedef struct ical_iana_prop_s {
- char *prop; /* component name */
+ char *prop; /* component PROPerty name */
size_t len; /* size of component name (strlen(x->prop)) */
int pos; /* location of this component in the prop array */
void *(*parse)(); /* parser */
@@ -32,7 +32,7 @@ ICLINE_S *ical_cline_cpy(ICLINE_S *);
ICAL_PARAMETER_S *ical_parameter_cpy(ICAL_PARAMETER_S *param);
char *ical_get_value(char **);
-char *ical_decode(char *, unsigned short);
+unsigned char *ical_decode(char *, unsigned short);
/* pase component */
void *ical_parse_vcalendar(char **);
@@ -229,10 +229,10 @@ ICAL_PROP_S alarm_prop[] = {
/* Finally, here begins the code. */
-char *
+unsigned char *
ical_decode(char *text, unsigned short encoding)
{
- char *t;
+ unsigned char *t;
unsigned long callen;
if(encoding == ENCQUOTEDPRINTABLE){
t = rfc822_qprint ((unsigned char *) text,strlen(text),&callen);
@@ -241,7 +241,7 @@ ical_decode(char *text, unsigned short encoding)
fs_give((void **) &t);
}
}
- return text;
+ return (unsigned char *) text;
}
@@ -1858,8 +1858,11 @@ ICAL_TZPROP_S *
ical_std_or_daylight(struct tm *date, VTIMEZONE_S *vtz)
{
struct tm standard, daylight;
+ ICLINE_S *tzid = (ICLINE_S *) vtz->prop[TZCid];
+ standard = daylight;
+ return NULL;
}
@@ -1880,7 +1883,7 @@ ical_adjust_date(struct tm *date, VTIMEZONE_S *vtz)
tzname = cpystr(icl->value);
}
-//+++ cur_std_day = ical_std_or_daylight(date, vtz);
+ cur_std_day = ical_std_or_daylight(date, vtz);
}
void
@@ -1942,7 +1945,7 @@ ical_day_from_week(int month, Weekday day, int year)
for(nday = 1, wday = (Weekday) fday; wday != day; wday = (wday+1) % 7, nday++)
;
rv = fs_get(6*sizeof(int));
- memset((void *)&rv, 0, 6*sizeof(int));
+ memset((void *) rv, 0, 6*sizeof(int));
for(i = 0; nday <= month_len[month]; i++){
rv[i] = nday;
nday += 7;
@@ -2332,7 +2335,7 @@ ical_vevent_summary(VCALENDAR_S *vcal)
if(*s == ',') i++; /* a non-scaped comma is a new value for text */
}
- rv->description = fs_get((i+1)*sizeof(char *));
+ rv->description = fs_get((i+1)*sizeof(unsigned char *));
i = 0;
for (s = t = u = v, escaped = 0; *t != '\0'; t++){
if(*t == '\\' && escaped == 0){ escaped = 1; continue; }
diff --git a/pith/icaltype.h b/pith/icaltype.h
index a65c9e0b..162d08d2 100644
--- a/pith/icaltype.h
+++ b/pith/icaltype.h
@@ -260,7 +260,7 @@ typedef enum {RelBegin, RelEnd, RelUnknown} Related;
typedef enum {Parent, Child, Sibling} RelType;
typedef enum {ReqPart, Chair, OptPart, NonPart, RoleUnknown} Role;
typedef enum {RSVPFalse, RSVPTrue, RSVPUnknown} RSVP;
-typedef enum {Binary, Boolean, CalAddress, Date, DateTime, Duration,
+typedef enum {Binary, _Boolean, CalAddress, Date, DateTime, _Duration,
Float, Integer, Period, Recur, _Text, Time, Uri,
UtcOffset, ValueUnknown} Value;
@@ -441,7 +441,7 @@ typedef struct vevent_summary_s {
char *evend;
char **duration;
char **attendee;
- char **description;
+ unsigned char **description;
} VEVENT_SUMMARY_S;
typedef enum {VCalendar = 0, VTimeZone, VEvent, VTodo, VJournal,