Fixed code to compile in MacOSX

This commit is contained in:
mostafah%oeone.com 2002-09-06 18:34:32 +00:00
Родитель 8f214e7b5e
Коммит db344213c1
4 изменённых файлов: 9 добавлений и 23 удалений

Просмотреть файл

@ -38,7 +38,7 @@ dnl AC_CHECK_LIB(ical, main)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(time.h sys/types.h assert.h)
AC_CHECK_HEADERS(time.h sys/types.h assert.h wctype.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

Просмотреть файл

@ -2,7 +2,7 @@
# FILE: Makefile.am
# CREATOR: eric
#
# $Id: Makefile.am,v 1.3 2002/03/14 15:17:50 mikep%oeone.com Exp $
# $Id: Makefile.am,v 1.4 2002/09/06 18:34:31 mostafah%oeone.com Exp $
#
#
# (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
@ -43,6 +43,7 @@ CPPFLAGS = -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"
all: ical.h
INCLUDES = \
-I/usr/include/objc \
-I$(top_builddir) \
-I$(top_srcdir)/src \
-I$(top_builddir)/src \

Просмотреть файл

@ -5,7 +5,7 @@
DESCRIPTION:
$Id: icallangbind.c,v 1.5 2002/08/28 20:56:44 mostafah%oeone.com Exp $
$Id: icallangbind.c,v 1.6 2002/09/06 18:34:32 mostafah%oeone.com Exp $
$Locker: $
(C) COPYRIGHT 1999 Eric Busboom
@ -22,11 +22,7 @@
#include "icalproperty.h"
#include "icalerror.h"
#include "icalmemory.h"
#ifdef XP_MAC
#include <sys/malloc.h>
#else
#include <malloc.h>
#endif
#include <string.h>
#ifdef WIN32

Просмотреть файл

@ -3,7 +3,7 @@
FILE: icalparser.c
CREATOR: eric 04 August 1999
$Id: icalparser.c,v 1.5 2002/08/28 20:56:45 mostafah%oeone.com Exp $
$Id: icalparser.c,v 1.6 2002/09/06 18:34:32 mostafah%oeone.com Exp $
$Locker: $
The contents of this file are subject to the Mozilla Public License
@ -51,10 +51,11 @@
#include <string.h> /* For strncpy & size_t */
#include <stdio.h> /* For FILE and fgets and sprintf */
#include <stdlib.h> /* for free */
#ifdef XP_MAC
#include <ctype.h>
#else
#ifdef HAVE_WCTYPE_H
#include <wctype.h>
#else
#include <ctype.h>
#define iswspace isspace
#endif
#ifdef WIN32
#define snprintf _snprintf
@ -189,19 +190,11 @@ char* make_segment(char* start, char* end)
*(buf+size) = 0;
tmp = (buf+size);
#ifdef XP_MAC
while ( *tmp == '\0' || isspace(*tmp) )
{
*tmp = 0;
tmp--;
}
#else
while ( *tmp == '\0' || iswspace(*tmp) )
{
*tmp = 0;
tmp--;
}
#endif
return buf;
@ -551,11 +544,7 @@ char* icalparser_get_line(icalparser *parser,
} else {
*(line_p) = '\0';
}
#ifdef XP_MAC
while ( (*line_p == '\0' || isspace(*line_p)) && line_p > line )
#else
while ( (*line_p == '\0' || iswspace(*line_p)) && line_p > line )
#endif
{
*line_p = '\0';
line_p--;