Applying changes to make build possible on Mac OS X

This commit is contained in:
mostafah%oeone.com 2002-08-28 20:56:50 +00:00
Родитель 228032be6a
Коммит bff1ec5611
6 изменённых файлов: 59 добавлений и 29 удалений

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

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

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

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

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

@ -19,7 +19,7 @@
/* A lexical scanner generated by flex */ /* A lexical scanner generated by flex */
/* Scanner skeleton version: /* Scanner skeleton version:
* $Header: /home/jrmuizel/cvs-mirror/mozilla/other-licenses/libical/src/libicalss/Attic/icalsslexer.c,v 1.4 2002-03-14 15:17:57 mikep%oeone.com Exp $ * $Header: /home/jrmuizel/cvs-mirror/mozilla/other-licenses/libical/src/libicalss/Attic/icalsslexer.c,v 1.5 2002-08-28 20:56:47 mostafah%oeone.com Exp $
*/ */
#define FLEX_SCANNER #define FLEX_SCANNER
@ -152,7 +152,7 @@ extern FILE *yyin, *yyout;
} \ } \
while ( 0 ) while ( 0 )
#define unput(c) yyunput( c, yytext_ptr ) #define unput(c) yyunput( c, yytext_ptr2 )
/* The following is because we cannot portably get our hands on size_t /* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want * (without autoconf's help, which isn't available because we want
@ -296,13 +296,13 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
* corresponding action - sets up yytext. * corresponding action - sets up yytext.
*/ */
#define YY_DO_BEFORE_ACTION \ #define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \ yytext_ptr2 = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \ yyleng = (int) (yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \ yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \ *yy_cp = '\0'; \
if ( yyleng >= YYLMAX ) \ if ( yyleng >= YYLMAX ) \
YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \ YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
yy_flex_strncpy( yytext, yytext_ptr, yyleng + 1 ); \ yy_flex_strncpy( yytext, yytext_ptr2, yyleng + 1 ); \
yy_c_buf_p = yy_cp; yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 20 #define YY_NUM_RULES 20
@ -414,7 +414,7 @@ static char *yy_last_accepting_cpos;
#endif #endif
char yytext[YYLMAX]; char yytext[YYLMAX];
char *yytext_ptr; char *yytext_ptr2;
#line 1 "icalsslexer.l" #line 1 "icalsslexer.l"
#define INITIAL 0 #define INITIAL 0
#line 2 "icalsslexer.l" #line 2 "icalsslexer.l"
@ -425,7 +425,7 @@ char *yytext_ptr;
DESCRIPTION: DESCRIPTION:
$Id: icalsslexer.c,v 1.4 2002-03-14 15:17:57 mikep%oeone.com Exp $ $Id: icalsslexer.c,v 1.5 2002-08-28 20:56:47 mostafah%oeone.com Exp $
$Locker: $ $Locker: $
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
@ -483,7 +483,7 @@ extern int yywrap YY_PROTO(( void ));
static void yyunput YY_PROTO(( int c, char *buf_ptr )); static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif #endif
#ifndef yytext_ptr #ifndef yytext_ptr2
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif #endif
@ -828,7 +828,7 @@ case YY_STATE_EOF(string_value):
case YY_END_OF_BUFFER: case YY_END_OF_BUFFER:
{ {
/* Amount of text matched not including the EOB char. */ /* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr2) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */ /* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char; *yy_cp = yy_hold_char;
@ -861,7 +861,7 @@ case YY_STATE_EOF(string_value):
{ /* This was really a NUL. */ { /* This was really a NUL. */
yy_state_type yy_next_state; yy_state_type yy_next_state;
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_c_buf_p = yytext_ptr2 + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state(); yy_current_state = yy_get_previous_state();
@ -876,7 +876,7 @@ case YY_STATE_EOF(string_value):
yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext_ptr + YY_MORE_ADJ; yy_bp = yytext_ptr2 + YY_MORE_ADJ;
if ( yy_next_state ) if ( yy_next_state )
{ {
@ -910,7 +910,7 @@ case YY_STATE_EOF(string_value):
* YY_NULL, it'll still work - another * YY_NULL, it'll still work - another
* YY_NULL will get returned. * YY_NULL will get returned.
*/ */
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_c_buf_p = yytext_ptr2 + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START); yy_act = YY_STATE_EOF(YY_START);
goto do_action; goto do_action;
@ -926,12 +926,12 @@ case YY_STATE_EOF(string_value):
case EOB_ACT_CONTINUE_SCAN: case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yy_c_buf_p =
yytext_ptr + yy_amount_of_matched_text; yytext_ptr2 + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state(); yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p; yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ; yy_bp = yytext_ptr2 + YY_MORE_ADJ;
goto yy_match; goto yy_match;
case EOB_ACT_LAST_MATCH: case EOB_ACT_LAST_MATCH:
@ -941,7 +941,7 @@ case YY_STATE_EOF(string_value):
yy_current_state = yy_get_previous_state(); yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p; yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ; yy_bp = yytext_ptr2 + YY_MORE_ADJ;
goto yy_find_action; goto yy_find_action;
} }
break; break;
@ -966,7 +966,7 @@ case YY_STATE_EOF(string_value):
static int yy_get_next_buffer() static int yy_get_next_buffer()
{ {
register char *dest = yy_current_buffer->yy_ch_buf; register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr; register char *source = yytext_ptr2;
register int number_to_move, i; register int number_to_move, i;
int ret_val; int ret_val;
@ -976,7 +976,7 @@ static int yy_get_next_buffer()
if ( yy_current_buffer->yy_fill_buffer == 0 ) if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */ { /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) if ( yy_c_buf_p - yytext_ptr2 - YY_MORE_ADJ == 1 )
{ {
/* We matched a single character, the EOB, so /* We matched a single character, the EOB, so
* treat this as a final EOF. * treat this as a final EOF.
@ -996,7 +996,7 @@ static int yy_get_next_buffer()
/* Try to read more data. */ /* Try to read more data. */
/* First move last chars to start of buffer. */ /* First move last chars to start of buffer. */
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; number_to_move = (int) (yy_c_buf_p - yytext_ptr2) - 1;
for ( i = 0; i < number_to_move; ++i ) for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++); *(dest++) = *(source++);
@ -1087,7 +1087,7 @@ static int yy_get_next_buffer()
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; yytext_ptr2 = &yy_current_buffer->yy_ch_buf[0];
return ret_val; return ret_val;
} }
@ -1102,7 +1102,7 @@ static yy_state_type yy_get_previous_state()
yy_current_state = yy_start; yy_current_state = yy_start;
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) for ( yy_cp = yytext_ptr2 + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{ {
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] ) if ( yy_accept[yy_current_state] )
@ -1196,7 +1196,7 @@ register char *yy_bp;
*--yy_cp = (char) c; *--yy_cp = (char) c;
yytext_ptr = yy_bp; yytext_ptr2 = yy_bp;
yy_hold_char = *yy_cp; yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp; yy_c_buf_p = yy_cp;
} }
@ -1225,7 +1225,7 @@ static int input()
else else
{ /* need more input */ { /* need more input */
int offset = yy_c_buf_p - yytext_ptr; int offset = yy_c_buf_p - yytext_ptr2;
++yy_c_buf_p; ++yy_c_buf_p;
switch ( yy_get_next_buffer() ) switch ( yy_get_next_buffer() )
@ -1261,7 +1261,7 @@ static int input()
} }
case EOB_ACT_CONTINUE_SCAN: case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext_ptr + offset; yy_c_buf_p = yytext_ptr2 + offset;
break; break;
} }
} }
@ -1328,7 +1328,7 @@ void yy_load_buffer_state()
#endif #endif
{ {
yy_n_chars = yy_current_buffer->yy_n_chars; yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; yytext_ptr2 = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file; yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p; yy_hold_char = *yy_c_buf_p;
} }
@ -1624,7 +1624,7 @@ char msg[];
/* Internal utility routines. */ /* Internal utility routines. */
#ifndef yytext_ptr #ifndef yytext_ptr2
#ifdef YY_USE_PROTOS #ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else #else

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

@ -139,8 +139,12 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
#include <string.h> #include <string.h>
#ifndef __MWERKS__ #ifndef __MWERKS__
#ifdef XP_MAC
#include <objc/malloc.h>
#else
#include <malloc.h> #include <malloc.h>
#endif #endif
#endif
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>

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

@ -113,8 +113,12 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
#include <string.h> #include <string.h>
#ifndef __MWERKS__ #ifndef __MWERKS__
#ifdef XP_MAC
#include <objc/malloc.h>
#else
#include <malloc.h> #include <malloc.h>
#endif #endif
#endif
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>

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

@ -43,8 +43,12 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
*/ */
#ifndef MWERKS #ifndef MWERKS
#ifdef XP_MAC
#include <objc/malloc.h>
#else
#include <malloc.h> #include <malloc.h>
#endif #endif
#endif
#ifdef WIN32 #ifdef WIN32
#define snprintf _snprintf #define snprintf _snprintf