зеркало из https://github.com/mozilla/pjs.git
Updating files for windows builds and adding windows makefiles.
This commit is contained in:
Родитель
2b544ba26e
Коммит
f1d2176e53
|
@ -2,7 +2,7 @@
|
|||
FILE: icalcomponent.c
|
||||
CREATOR: eric 28 April 1999
|
||||
|
||||
$Id: icalcomponent.c,v 1.1 2001-11-15 19:26:53 mikep%oeone.com Exp $
|
||||
$Id: icalcomponent.c,v 1.2 2001-11-22 19:21:47 mikep%oeone.com Exp $
|
||||
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -43,6 +43,10 @@
|
|||
#include <assert.h>
|
||||
#include <stdio.h> /* for fprintf */
|
||||
|
||||
#ifndef win32
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#define MAX_TMP 1024
|
||||
|
||||
struct icalcomponent_impl
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
FILE: icalerror.c
|
||||
CREATOR: eric 16 May 1999
|
||||
|
||||
$Id: icalerror.c,v 1.1 2001-11-15 19:26:56 mikep%oeone.com Exp $
|
||||
$Id: icalerror.c,v 1.2 2001-11-22 19:21:47 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
|
||||
|
@ -30,6 +30,7 @@
|
|||
#endif
|
||||
|
||||
#include "icalerror.h"
|
||||
#include <string.h>
|
||||
|
||||
icalerrorenum icalerrno;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
DESCRIPTION:
|
||||
|
||||
$Id: icallangbind.c,v 1.1 2001-11-15 19:26:57 mikep%oeone.com Exp $
|
||||
$Id: icallangbind.c,v 1.2 2001-11-22 19:21:48 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 1999 Eric Busboom
|
||||
|
@ -25,6 +25,10 @@
|
|||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
#endif
|
||||
int* icallangbind_new_array(int size){
|
||||
int* p = (int*)malloc(size*sizeof(int));
|
||||
return p; /* Caller handles failures */
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
CREATOR: eric 30 June 1999
|
||||
|
||||
|
||||
$Id: icalmemory.h,v 1.1 2001-11-15 19:26:59 mikep%oeone.com Exp $
|
||||
$Id: icalmemory.h,v 1.2 2001-11-22 19:21:48 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
@ -26,8 +26,11 @@
|
|||
#ifndef ICALMEMORY_H
|
||||
#define ICALMEMORY_H
|
||||
|
||||
#ifndef WIN32
|
||||
#include <sys/types.h> /* for size_t */
|
||||
|
||||
#else
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
/* Tmp buffers are managed by ical. References can be returned to the
|
||||
caller, although the caller will not own the memory. */
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
CREATOR: eric 26 July 2000
|
||||
|
||||
|
||||
$Id: icalmime.c,v 1.1 2001-11-15 19:26:59 mikep%oeone.com Exp $
|
||||
$Id: icalmime.c,v 1.2 2001-11-22 19:21:49 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -38,6 +38,11 @@
|
|||
#include "dmalloc.h"
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
#endif
|
||||
|
||||
|
||||
/* These *_part routines are called by the MIME parser via the
|
||||
local_action_map */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
FILE: icalparser.c
|
||||
CREATOR: eric 04 August 1999
|
||||
|
||||
$Id: icalparser.c,v 1.1 2001-11-15 19:27:03 mikep%oeone.com Exp $
|
||||
$Id: icalparser.c,v 1.2 2001-11-22 19:21:49 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License
|
||||
|
@ -52,6 +52,10 @@
|
|||
#include <stdio.h> /* For FILE and fgets and sprintf */
|
||||
#include <stdlib.h> /* for free */
|
||||
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
#endif
|
||||
|
||||
extern icalvalue* icalparser_yy_value;
|
||||
void set_parser_value_state(icalvalue_kind kind);
|
||||
|
@ -185,7 +189,9 @@ char* make_segment(char* start, char* end)
|
|||
|
||||
const char* input_buffer;
|
||||
const char* input_buffer_p;
|
||||
#ifndef WIN32
|
||||
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
int icalparser_flex_input(char* buf, int max_size)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
FILE: icalproperty.c
|
||||
CREATOR: eric 28 April 1999
|
||||
|
||||
$Id: icalproperty.c,v 1.1 2001-11-15 19:27:07 mikep%oeone.com Exp $
|
||||
$Id: icalproperty.c,v 1.2 2001-11-22 19:21:49 mikep%oeone.com Exp $
|
||||
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -45,6 +45,11 @@
|
|||
#include <stdio.h> /* for printf */
|
||||
#include <stdarg.h> /* for va_list, va_start, etc. */
|
||||
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
#endif
|
||||
|
||||
#define TMP_BUF_SIZE 1024
|
||||
|
||||
/* Private routines for icalproperty */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
FILE: icaltime.c
|
||||
CREATOR: eric 02 June 2000
|
||||
|
||||
$Id: icaltime.c,v 1.1 2001-11-15 19:27:10 mikep%oeone.com Exp $
|
||||
$Id: icaltime.c,v 1.2 2001-11-22 19:21:49 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -45,7 +45,11 @@
|
|||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
#include <time.h>
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
#endif
|
||||
|
||||
struct icaltimetype
|
||||
icaltime_from_timet(time_t tm, int is_date)
|
||||
|
@ -115,6 +119,9 @@ struct set_tz_save set_tz(const char* tzid)
|
|||
/* Old value of TZ and the string we will have to free later */
|
||||
savetz.orig_tzid = orig_tzid;
|
||||
savetz.new_env_str = new_env_str;
|
||||
#ifdef WIN32
|
||||
_tzset();
|
||||
#endif
|
||||
|
||||
return savetz;
|
||||
}
|
||||
|
@ -143,6 +150,10 @@ void unset_tz(struct set_tz_save savetz)
|
|||
} else {
|
||||
putenv("TZ"); /* Delete from environment */
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
_tzset();
|
||||
#endif
|
||||
|
||||
if(savetz.new_env_str != 0){
|
||||
free(savetz.new_env_str);
|
||||
|
@ -170,10 +181,16 @@ time_t icaltime_as_timet(struct icaltimetype tt)
|
|||
stm.tm_isdst = -1;
|
||||
|
||||
if(tt.is_utc == 1 || tt.is_date == 1){
|
||||
#ifndef WIN32
|
||||
struct set_tz_save old_tz = set_tz("UTC");
|
||||
t = mktime(&stm);
|
||||
unset_tz(old_tz);
|
||||
} else {
|
||||
#else
|
||||
t = mktime(&stm);
|
||||
_tzset();
|
||||
t -= _timezone;
|
||||
#endif
|
||||
} else {
|
||||
t = mktime(&stm);
|
||||
}
|
||||
|
||||
|
@ -254,16 +271,26 @@ int icaltime_utc_offset(struct icaltimetype ictt, const char* tzid)
|
|||
old_tz = set_tz(tzid);
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
/* Mis-interpret a UTC broken out time as local time */
|
||||
gtm = *(gmtime(&tt));
|
||||
gtm.tm_isdst = localtime(&tt)->tm_isdst;
|
||||
offset_tt = mktime(>m);
|
||||
|
||||
#else
|
||||
_tzset();
|
||||
offset_tt = _timezone;
|
||||
if ( localtime(&tt)->tm_isdst )
|
||||
offset_tt -= 3600;
|
||||
#endif
|
||||
if(tzid != 0){
|
||||
unset_tz(old_tz);
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
return tt-offset_tt;
|
||||
#else
|
||||
return -offset_tt;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -353,7 +380,7 @@ struct icaltimetype icaltime_from_string(const char* str)
|
|||
}
|
||||
#endif
|
||||
|
||||
char ctime_str[20];
|
||||
char ctime_str[32];
|
||||
char* icaltime_as_ctime(struct icaltimetype t)
|
||||
{
|
||||
time_t tt;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
FILE: icaltypes.c
|
||||
CREATOR: eric 16 May 1999
|
||||
|
||||
$Id: icaltypes.c,v 1.1 2001-11-15 19:27:10 mikep%oeone.com Exp $
|
||||
$Id: icaltypes.c,v 1.2 2001-11-22 19:21:50 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
|
||||
|
@ -34,6 +34,10 @@
|
|||
#include <errno.h> /* for errno */
|
||||
#include <string.h> /* for icalmemory_strdup */
|
||||
#include <assert.h>
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
#endif
|
||||
|
||||
#define TEMP_MAX 1024
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
FILE: icalvalue.c
|
||||
CREATOR: eric 02 May 1999
|
||||
|
||||
$Id: icalvalue.c,v 1.1 2001-11-15 19:27:10 mikep%oeone.com Exp $
|
||||
$Id: icalvalue.c,v 1.2 2001-11-22 19:21:50 mikep%oeone.com Exp $
|
||||
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -45,6 +45,10 @@
|
|||
#include <time.h> /* for mktime */
|
||||
#include <stdlib.h> /* for atoi and atof */
|
||||
#include <limits.h> /* for SHRT_MAX */
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
#endif
|
||||
|
||||
#if _MAC_OS_
|
||||
#include "icalmemory_strdup.h"
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
|
||||
DESCRIPTION:
|
||||
|
||||
$Id: icalyacc.c,v 1.1 2001-11-15 19:27:12 mikep%oeone.com Exp $
|
||||
$Id: icalyacc.c,v 1.2 2001-11-22 19:21:51 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 1999 Eric Busboom
|
||||
|
|
|
@ -0,0 +1,120 @@
|
|||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
#
|
||||
|
||||
|
||||
|
||||
MODULE = libical
|
||||
EXPORTS = ical.h
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build SUN-JAVA/JPEG Library (NEW)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH= ..\..\..\..
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Make Variables here: (ie. PDFFILE, MAPFILE, ...)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
EXPORT_LIBRARY=1
|
||||
LIBRARY_NAME=libical$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
PDBFILE=$(LIBRARY_NAME).pdb
|
||||
MAPFILE=$(LIBRARY_NAME).map
|
||||
!if "$(MOZ_BITS)" == "16"
|
||||
DEFFILE=jpg$(MOZ_BIGS)$(VERSION_NUMBER).def
|
||||
!endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any local options for the make tools
|
||||
#// (ie. LCFLAGS, LLFLAGS, LLIBS, LINCS)
|
||||
#// -Zi -GM needed to compile mmx functions in assembly.
|
||||
LCFLAGS = -Zi -GM
|
||||
LINCS = -I$(XPDIST)\include
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define the files necessary to build the target (ie. OBJS)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
LIBICAL_OBJS= .\$(OBJDIR)\icalattendee.obj \
|
||||
.\$(OBJDIR)\icalcomponent.obj \
|
||||
.\$(OBJDIR)\icalderivedparameter.obj \
|
||||
.\$(OBJDIR)\icalderivedproperty.obj \
|
||||
.\$(OBJDIR)\icalderivedvalue.obj \
|
||||
.\$(OBJDIR)\icalduration.obj \
|
||||
.\$(OBJDIR)\icalenums.obj \
|
||||
.\$(OBJDIR)\icalerror.obj \
|
||||
.\$(OBJDIR)\icallangbind.obj \
|
||||
.\$(OBJDIR)\icallexer.obj \
|
||||
.\$(OBJDIR)\icalmemory.obj \
|
||||
.\$(OBJDIR)\icalmime.obj \
|
||||
.\$(OBJDIR)\icalparameter.obj \
|
||||
.\$(OBJDIR)\icalparser.obj \
|
||||
.\$(OBJDIR)\icalperiod.obj \
|
||||
.\$(OBJDIR)\icalproperty.obj \
|
||||
.\$(OBJDIR)\icalrecur.obj \
|
||||
.\$(OBJDIR)\icalrestriction.obj \
|
||||
.\$(OBJDIR)\icaltime.obj \
|
||||
.\$(OBJDIR)\icaltypes.obj \
|
||||
.\$(OBJDIR)\icalvalue.obj \
|
||||
.\$(OBJDIR)\icalyacc.obj \
|
||||
.\$(OBJDIR)\pvl.obj \
|
||||
.\$(OBJDIR)\sspm.obj \
|
||||
.\$(OBJDIR)\vsnprintf.obj \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
||||
OBJS= \
|
||||
$(LIBICAL_OBJS) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Targets here (ie. PROGRAM, LIBRARY, DLL, ...)
|
||||
#// (these must be defined before the common makefiles are included)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
LIBRARY = .\$(OBJDIR)\$(LIBRARY_NAME).lib
|
||||
MAPFILE= $(DLLNAME).map
|
||||
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include <$(DEPTH)/config/rules.mak>
|
|
@ -3,7 +3,7 @@
|
|||
FILE: sspm.c Parse Mime
|
||||
CREATOR: eric 25 June 2000
|
||||
|
||||
$Id: sspm.c,v 1.1 2001-11-15 19:27:13 mikep%oeone.com Exp $
|
||||
$Id: sspm.c,v 1.2 2001-11-22 19:21:51 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License
|
||||
|
@ -40,6 +40,10 @@
|
|||
#include <ctype.h> /* for tolower */
|
||||
#include <stdlib.h> /* for malloc, free */
|
||||
#include <string.h> /* for strcasecmp */
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
#endif
|
||||
|
||||
#ifdef DMALLOC
|
||||
#include "dmalloc.h"
|
||||
|
@ -278,8 +282,12 @@ int sspm_is_mime_header(char *line)
|
|||
}
|
||||
|
||||
for(i = 0; mime_headers[i] != 0; i++){
|
||||
#ifndef WIN32
|
||||
if(strcasecmp(name, mime_headers[i]) == 0)
|
||||
return 1;
|
||||
#else
|
||||
if(stricmp(name, mime_headers[i]) == 0)
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
FILE: icalcstps.c
|
||||
CREATOR: ebusboom 23 Jun 2000
|
||||
|
||||
$Id: icalcstp.c,v 1.1 2001-11-15 19:27:20 mikep%oeone.com Exp $
|
||||
$Id: icalcstp.c,v 1.2 2001-11-22 19:21:53 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -31,8 +31,10 @@
|
|||
#include "pvl.h"
|
||||
|
||||
#include <sys/types.h> /* For send(), others */
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h> /* For send(), others. */
|
||||
#include <unistd.h> /* For alarm */
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include <stdlib.h> /* for malloc */
|
||||
#include <string.h>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
FILE: icalcstps.c
|
||||
CREATOR: ebusboom 23 Jun 2000
|
||||
|
||||
$Id: icalcstpclient.c,v 1.1 2001-11-15 19:27:20 mikep%oeone.com Exp $
|
||||
$Id: icalcstpclient.c,v 1.2 2001-11-22 19:21:53 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -32,8 +32,10 @@
|
|||
#include "pvl.h"
|
||||
|
||||
#include <sys/types.h> /* For send(), others */
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h> /* For send(), others. */
|
||||
#include <unistd.h> /* For alarm */
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include <stdlib.h> /* for malloc */
|
||||
#include <string.h>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
FILE: icalcstpserver.c
|
||||
CREATOR: ebusboom 13 Feb 01
|
||||
|
||||
$Id: icalcstpserver.c,v 1.1 2001-11-15 19:27:24 mikep%oeone.com Exp $
|
||||
$Id: icalcstpserver.c,v 1.2 2001-11-22 19:21:54 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -32,8 +32,10 @@
|
|||
#include "pvl.h"
|
||||
|
||||
#include <sys/types.h> /* For send(), others */
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h> /* For send(), others. */
|
||||
#include <unistd.h> /* For alarm */
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include <stdlib.h> /* for malloc */
|
||||
#include <string.h>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
FILE: icaldirset.c
|
||||
CREATOR: eric 28 November 1999
|
||||
|
||||
$Id: icaldirset.c,v 1.1 2001-11-15 19:27:24 mikep%oeone.com Exp $
|
||||
$Id: icaldirset.c,v 1.2 2001-11-22 19:21:54 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -66,17 +66,31 @@
|
|||
#include "icalgauge.h"
|
||||
|
||||
#include <limits.h> /* For PATH_MAX */
|
||||
#ifndef WIN32
|
||||
#include <dirent.h> /* for opendir() */
|
||||
#include <unistd.h> /* for stat, getpid */
|
||||
#include <sys/utsname.h> /* for uname */
|
||||
#else
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include <sys/types.h> /* for opendir() */
|
||||
#include <sys/stat.h> /* for stat */
|
||||
#include <unistd.h> /* for stat, getpid */
|
||||
#include <time.h> /* for clock() */
|
||||
#include <stdlib.h> /* for rand(), srand() */
|
||||
#include <sys/utsname.h> /* for uname */
|
||||
#include <string.h> /* for strdup */
|
||||
#include "icaldirsetimpl.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
|
||||
#define _S_ISTYPE(mode, mask) (((mode) & _S_IFMT) == (mask))
|
||||
|
||||
#define S_ISDIR(mode) _S_ISTYPE((mode), _S_IFDIR)
|
||||
#define S_ISREG(mode) _S_ISTYPE((mode), _S_IFREG)
|
||||
#endif
|
||||
|
||||
|
||||
struct icaldirset_impl* icaldirset_new_impl()
|
||||
{
|
||||
|
@ -129,9 +143,10 @@ void icaldirset_unlock(const char* dir)
|
|||
/* Load the contents of the store directory into the store's internal directory list*/
|
||||
icalerrorenum icaldirset_read_directory(struct icaldirset_impl* impl)
|
||||
{
|
||||
char *str;
|
||||
#ifndef WIN32
|
||||
struct dirent *de;
|
||||
DIR* dp;
|
||||
char *str;
|
||||
|
||||
dp = opendir(impl->dir);
|
||||
|
||||
|
@ -160,6 +175,39 @@ icalerrorenum icaldirset_read_directory(struct icaldirset_impl* impl)
|
|||
}
|
||||
|
||||
closedir(dp);
|
||||
#else
|
||||
struct _finddata_t c_file;
|
||||
long hFile;
|
||||
|
||||
/* Find first .c file in current directory */
|
||||
if( (hFile = _findfirst( "*", &c_file )) == -1L )
|
||||
{
|
||||
icalerror_set_errno(ICAL_FILE_ERROR);
|
||||
return ICAL_FILE_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
while((str = pvl_pop(impl->directory))){
|
||||
free(str);
|
||||
}
|
||||
|
||||
/* load all of the cluster names in the directory list */
|
||||
do
|
||||
{
|
||||
/* Remove known directory names '.' and '..'*/
|
||||
if (strcmp(c_file.name,".") == 0 ||
|
||||
strcmp(c_file.name,"..") == 0 ){
|
||||
continue;
|
||||
}
|
||||
|
||||
pvl_push(impl->directory, (void*)strdup(c_file.name));
|
||||
}
|
||||
while ( _findnext( hFile, &c_file ) == 0 );
|
||||
|
||||
_findclose( hFile );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return ICAL_NO_ERROR;
|
||||
}
|
||||
|
@ -334,19 +382,23 @@ void icaldirset_add_uid(icaldirset* store, icaldirset* comp)
|
|||
{
|
||||
char uidstring[ICAL_PATH_MAX];
|
||||
icalproperty *uid;
|
||||
#ifndef WIN32
|
||||
struct utsname unamebuf;
|
||||
|
||||
#endif
|
||||
icalerror_check_arg_rv( (store!=0), "store");
|
||||
icalerror_check_arg_rv( (comp!=0), "comp");
|
||||
|
||||
uid = icalcomponent_get_first_property(comp,ICAL_UID_PROPERTY);
|
||||
|
||||
if (uid == 0) {
|
||||
|
||||
#ifndef WIN32
|
||||
uname(&unamebuf);
|
||||
|
||||
sprintf(uidstring,"%d-%s",(int)getpid(),unamebuf.nodename);
|
||||
|
||||
#else
|
||||
sprintf(uidstring,"%d-%s",(int)getpid(),"WINDOWS"); /* FIX: There must be an easy get the system name */
|
||||
#endif
|
||||
uid = icalproperty_new_uid(uidstring);
|
||||
icalcomponent_add_property(comp,uid);
|
||||
} else {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
FILE: icalfileset.c
|
||||
CREATOR: eric 23 December 1999
|
||||
|
||||
$Id: icalfileset.c,v 1.1 2001-11-15 19:27:24 mikep%oeone.com Exp $
|
||||
$Id: icalfileset.c,v 1.2 2001-11-22 19:21:54 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -34,13 +34,27 @@
|
|||
#include "icalgauge.h"
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h> /* for stat */
|
||||
#ifndef WIN32
|
||||
#include <unistd.h> /* for stat, getpid */
|
||||
#else
|
||||
#include <io.h>
|
||||
#include <share.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h> /* for fcntl */
|
||||
#include <unistd.h> /* for fcntl */
|
||||
#include "icalfilesetimpl.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
|
||||
#define _S_ISTYPE(mode, mask) (((mode) & _S_IFMT) == (mask))
|
||||
|
||||
#define S_ISDIR(mode) _S_ISTYPE((mode), _S_IFDIR)
|
||||
#define S_ISREG(mode) _S_ISTYPE((mode), _S_IFREG)
|
||||
#endif
|
||||
|
||||
extern int errno;
|
||||
|
||||
int icalfileset_lock(icalfileset *cluster);
|
||||
|
@ -98,16 +112,21 @@ icalfileset* icalfileset_new_open(const char* path, int flags, mode_t mode)
|
|||
return 0;
|
||||
}
|
||||
|
||||
impl->fd = open(impl->path,flags, mode);
|
||||
|
||||
#ifndef WIN32
|
||||
impl->fd = open(impl->path,flags, mode);
|
||||
#else
|
||||
impl->fd = sopen(impl->path,flags, _SH_DENYWR, _S_IREAD | _S_IWRITE);
|
||||
#endif
|
||||
if (impl->fd < 0){
|
||||
icalerror_set_errno(ICAL_FILE_ERROR);
|
||||
icalfileset_free(impl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef WIN32 // We need this under win32, we'd open'd and lock'd in one operation
|
||||
icalfileset_lock(impl);
|
||||
|
||||
#endif
|
||||
if(cluster_file_size > 0 ){
|
||||
icalerrorenum error;
|
||||
if((error = icalfileset_read_file(impl,mode))!= ICAL_NO_ERROR){
|
||||
|
@ -251,6 +270,7 @@ const char* icalfileset_path(icalfileset* cluster)
|
|||
|
||||
int icalfileset_lock(icalfileset *cluster)
|
||||
{
|
||||
#ifndef WIN32
|
||||
struct icalfileset_impl *impl = (struct icalfileset_impl*)cluster;
|
||||
struct flock lock;
|
||||
int rtrn;
|
||||
|
@ -265,10 +285,14 @@ int icalfileset_lock(icalfileset *cluster)
|
|||
rtrn = fcntl(impl->fd, F_SETLKW, &lock);
|
||||
|
||||
return rtrn;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int icalfileset_unlock(icalfileset *cluster)
|
||||
{
|
||||
#ifndef WIN32
|
||||
struct icalfileset_impl *impl = (struct icalfileset_impl*)cluster;
|
||||
struct flock lock;
|
||||
icalerror_check_arg_rz((impl->fd>0),"impl->fd");
|
||||
|
@ -280,6 +304,9 @@ int icalfileset_unlock(icalfileset *cluster)
|
|||
|
||||
return (fcntl(impl->fd, F_UNLCK, &lock));
|
||||
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ICAL_SAFESAVES
|
||||
|
@ -340,9 +367,11 @@ icalerrorenum icalfileset_commit(icalfileset* cluster)
|
|||
|
||||
impl->changed = 0;
|
||||
|
||||
#ifndef WIN32
|
||||
if(ftruncate(impl->fd,write_size) < 0){
|
||||
return ICAL_FILE_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ICAL_NO_ERROR;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
CREATOR: eric 23 December 1999
|
||||
|
||||
|
||||
$Id: icalfileset.h,v 1.1 2001-11-15 19:27:25 mikep%oeone.com Exp $
|
||||
$Id: icalfileset.h,v 1.2 2001-11-22 19:21:54 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -32,9 +32,13 @@
|
|||
#include "ical.h"
|
||||
#include "icalset.h"
|
||||
#include "icalgauge.h"
|
||||
#ifndef WIN32
|
||||
#include <sys/types.h> /* For open() flags and mode */
|
||||
#include <sys/stat.h> /* For open() flags and mode */
|
||||
#include <fcntl.h> /* For open() flags and mode */
|
||||
#else
|
||||
#define mode_t int
|
||||
#endif
|
||||
|
||||
extern int icalfileset_safe_saves;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
icalheapset Store components on the heap
|
||||
icalmysqlset Store components in a mysql database.
|
||||
|
||||
$Id: icalset.c,v 1.1 2001-11-15 19:27:28 mikep%oeone.com Exp $
|
||||
$Id: icalset.c,v 1.2 2001-11-22 19:21:54 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -43,6 +43,7 @@
|
|||
#include <stdlib.h>
|
||||
/*#include "icalheapset.h"*/
|
||||
/*#include "icalmysqlset.h"*/
|
||||
#include <string.h>
|
||||
|
||||
#define ICALSET_ID "set "
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
FILE: icalspanlist.c
|
||||
CREATOR: ebusboom 23 aug 2000
|
||||
|
||||
$Id: icalspanlist.c,v 1.1 2001-11-15 19:27:29 mikep%oeone.com Exp $
|
||||
$Id: icalspanlist.c,v 1.2 2001-11-22 19:21:55 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -30,6 +30,7 @@
|
|||
#include "icalspanlist.h"
|
||||
#include "pvl.h"
|
||||
#include <stdlib.h> /* for free and malloc */
|
||||
#include <string.h>
|
||||
|
||||
struct icalspanlist_impl {
|
||||
pvl_list spans;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
CREATOR: eric 23 December 1999
|
||||
|
||||
|
||||
$Id: icalss.h,v 1.1 2001-11-15 19:27:30 mikep%oeone.com Exp $
|
||||
$Id: icalss.h,v 1.2 2001-11-22 19:21:55 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -28,6 +28,9 @@
|
|||
|
||||
#ifndef ICALGAUGE_H
|
||||
#define ICALGAUGE_H
|
||||
#ifdef WIN32
|
||||
#define mode_t int
|
||||
#endif
|
||||
|
||||
typedef void icalgauge;
|
||||
|
||||
|
@ -63,7 +66,7 @@ icalcomponent* icalgauge_new_clone(icalgauge* g, icalcomponent* comp);
|
|||
icalheapset Store components on the heap
|
||||
icalmysqlset Store components in a mysql database.
|
||||
|
||||
$Id: icalss.h,v 1.1 2001-11-15 19:27:30 mikep%oeone.com Exp $
|
||||
$Id: icalss.h,v 1.2 2001-11-22 19:21:55 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -164,7 +167,7 @@ icalcomponent* icalset_get_next_component(icalset* set);
|
|||
CREATOR: eric 23 December 1999
|
||||
|
||||
|
||||
$Id: icalss.h,v 1.1 2001-11-15 19:27:30 mikep%oeone.com Exp $
|
||||
$Id: icalss.h,v 1.2 2001-11-22 19:21:55 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -266,7 +269,7 @@ icalcomponent* icalfileset_get_component(icalfileset* cluster);
|
|||
CREATOR: eric 28 November 1999
|
||||
|
||||
|
||||
$Id: icalss.h,v 1.1 2001-11-15 19:27:30 mikep%oeone.com Exp $
|
||||
$Id: icalss.h,v 1.2 2001-11-22 19:21:55 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -347,7 +350,7 @@ icalcomponent* icaldirset_get_next_component(icaldirset* store);
|
|||
CREATOR: eric 23 December 1999
|
||||
|
||||
|
||||
$Id: icalss.h,v 1.1 2001-11-15 19:27:30 mikep%oeone.com Exp $
|
||||
$Id: icalss.h,v 1.2 2001-11-22 19:21:55 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -412,7 +415,7 @@ icalset* icalcalendar_get_freebusy(icalcalendar* calendar);
|
|||
CREATOR: eric 21 Aug 2000
|
||||
|
||||
|
||||
$Id: icalss.h,v 1.1 2001-11-15 19:27:30 mikep%oeone.com Exp $
|
||||
$Id: icalss.h,v 1.2 2001-11-22 19:21:55 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -483,7 +486,7 @@ icalcomponent* icalclassify_find_overlaps(icalset* set, icalcomponent* comp);
|
|||
CREATOR: eric 21 Aug 2000
|
||||
|
||||
|
||||
$Id: icalss.h,v 1.1 2001-11-15 19:27:30 mikep%oeone.com Exp $
|
||||
$Id: icalss.h,v 1.2 2001-11-22 19:21:55 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -535,7 +538,7 @@ void icalspanlist_dump(icalspanlist* s);
|
|||
CREATOR: eric 07 Nov 2000
|
||||
|
||||
|
||||
$Id: icalss.h,v 1.1 2001-11-15 19:27:30 mikep%oeone.com Exp $
|
||||
$Id: icalss.h,v 1.2 2001-11-22 19:21:55 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -604,7 +607,7 @@ icalcomponent* icalmessage_new_error_reply(icalcomponent* c,
|
|||
FILE: icalcstp.h
|
||||
CREATOR: eric 20 April 1999
|
||||
|
||||
$Id: icalss.h,v 1.1 2001-11-15 19:27:30 mikep%oeone.com Exp $
|
||||
$Id: icalss.h,v 1.2 2001-11-22 19:21:55 mikep%oeone.com Exp $
|
||||
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -682,7 +685,7 @@ icalcstp_command icalcstp_string_to_command(const char* str);
|
|||
FILE: icalcstpclient.h
|
||||
CREATOR: eric 4 Feb 01
|
||||
|
||||
$Id: icalss.h,v 1.1 2001-11-15 19:27:30 mikep%oeone.com Exp $
|
||||
$Id: icalss.h,v 1.2 2001-11-22 19:21:55 mikep%oeone.com Exp $
|
||||
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -780,7 +783,7 @@ icalerrorenum icalcstpc_sendata(icalcstpc* cstp, unsigned int time,
|
|||
FILE: icalcstpserver.h
|
||||
CREATOR: eric 13 Feb 01
|
||||
|
||||
$Id: icalss.h,v 1.1 2001-11-15 19:27:30 mikep%oeone.com Exp $
|
||||
$Id: icalss.h,v 1.2 2001-11-22 19:21:55 mikep%oeone.com Exp $
|
||||
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/* A lexical scanner generated by flex */
|
||||
|
||||
/* Scanner skeleton version:
|
||||
* $Header: /home/jrmuizel/cvs-mirror/mozilla/other-licenses/libical/src/libicalss/Attic/icalsslexer.c,v 1.1 2001-11-15 19:27:30 mikep%oeone.com Exp $
|
||||
* $Header: /home/jrmuizel/cvs-mirror/mozilla/other-licenses/libical/src/libicalss/Attic/icalsslexer.c,v 1.2 2001-11-22 19:21:56 mikep%oeone.com Exp $
|
||||
*/
|
||||
|
||||
#define FLEX_SCANNER
|
||||
|
@ -27,7 +27,9 @@
|
|||
#define YY_FLEX_MINOR_VERSION 5
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
|
||||
#ifdef c_plusplus
|
||||
|
@ -40,7 +42,6 @@
|
|||
#ifdef __cplusplus
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Use prototypes in function declarations. */
|
||||
#define YY_USE_PROTOS
|
||||
|
@ -421,7 +422,7 @@ char *yytext_ptr;
|
|||
|
||||
DESCRIPTION:
|
||||
|
||||
$Id: icalsslexer.c,v 1.1 2001-11-15 19:27:30 mikep%oeone.com Exp $
|
||||
$Id: icalsslexer.c,v 1.2 2001-11-22 19:21:56 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -1373,11 +1374,6 @@ YY_BUFFER_STATE b;
|
|||
}
|
||||
|
||||
|
||||
#ifndef YY_ALWAYS_INTERACTIVE
|
||||
#ifndef YY_NEVER_INTERACTIVE
|
||||
extern int isatty YY_PROTO(( int ));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef YY_USE_PROTOS
|
||||
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
|
||||
|
|
|
@ -0,0 +1,107 @@
|
|||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
#
|
||||
|
||||
|
||||
|
||||
MODULE = libicalss
|
||||
EXPORTS = icalss.h
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build SUN-JAVA/JPEG Library (NEW)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH= ..\..\..\..
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Make Variables here: (ie. PDFFILE, MAPFILE, ...)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
EXPORT_LIBRARY=1
|
||||
LIBRARY_NAME=libicalss$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
PDBFILE=$(LIBRARY_NAME).pdb
|
||||
MAPFILE=$(LIBRARY_NAME).map
|
||||
!if "$(MOZ_BITS)" == "16"
|
||||
DEFFILE=jpg$(MOZ_BIGS)$(VERSION_NUMBER).def
|
||||
!endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any local options for the make tools
|
||||
#// (ie. LCFLAGS, LLFLAGS, LLIBS, LINCS)
|
||||
#// -Zi -GM needed to compile mmx functions in assembly.
|
||||
LCFLAGS = -Zi -GM -DPACKAGE=\"libcal\" -DVERSION=$(VERSION_NUMBER)
|
||||
LINCS = -I$(XPDIST)\include -I..\libical
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define the files necessary to build the target (ie. OBJS)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
LIBICAL_OBJS= .\$(OBJDIR)\icalclassify.obj \
|
||||
.\$(OBJDIR)\icalcstp.obj \
|
||||
.\$(OBJDIR)\icalcstpclient.obj \
|
||||
.\$(OBJDIR)\icalcstpserver.obj \
|
||||
.\$(OBJDIR)\icaldirset.obj \
|
||||
.\$(OBJDIR)\icalfileset.obj \
|
||||
.\$(OBJDIR)\icalgauge.obj \
|
||||
.\$(OBJDIR)\icalmessage.obj \
|
||||
.\$(OBJDIR)\icalset.obj \
|
||||
.\$(OBJDIR)\icalspanlist.obj \
|
||||
.\$(OBJDIR)\icalsslexer.obj \
|
||||
.\$(OBJDIR)\icalssyacc.obj \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
||||
OBJS= ..\libical\$(OBJDIR)\libical$(MOZ_BITS)$(VERSION_NUMBER).lib \
|
||||
$(LIBICAL_OBJS) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Targets here (ie. PROGRAM, LIBRARY, DLL, ...)
|
||||
#// (these must be defined before the common makefiles are included)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
LIBRARY = .\$(OBJDIR)\$(LIBRARY_NAME).lib
|
||||
MAPFILE= $(DLLNAME).map
|
||||
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include <$(DEPTH)/config/rules.mak>
|
|
@ -2,7 +2,7 @@
|
|||
FILE: icalvcal.c
|
||||
CREATOR: eric 25 May 00
|
||||
|
||||
$Id: icalvcal.c,v 1.1 2001-11-15 19:27:36 mikep%oeone.com Exp $
|
||||
$Id: icalvcal.c,v 1.2 2001-11-22 19:22:01 mikep%oeone.com Exp $
|
||||
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
@ -41,6 +41,10 @@
|
|||
|
||||
#include "icalvcal.h"
|
||||
#include <string.h>
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
#endif
|
||||
|
||||
enum datatype {
|
||||
COMPONENT,
|
||||
|
|
|
@ -0,0 +1,100 @@
|
|||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
#
|
||||
|
||||
|
||||
|
||||
MODULE = libicalvcal
|
||||
EXPORTS = icalvcal.h
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build SUN-JAVA/JPEG Library (NEW)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH= ..\..\..\..
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Make Variables here: (ie. PDFFILE, MAPFILE, ...)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
EXPORT_LIBRARY=1
|
||||
LIBRARY_NAME=libicalvcal$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
PDBFILE=$(LIBRARY_NAME).pdb
|
||||
MAPFILE=$(LIBRARY_NAME).map
|
||||
!if "$(MOZ_BITS)" == "16"
|
||||
DEFFILE=jpg$(MOZ_BIGS)$(VERSION_NUMBER).def
|
||||
!endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any local options for the make tools
|
||||
#// (ie. LCFLAGS, LLFLAGS, LLIBS, LINCS)
|
||||
#// -Zi -GM needed to compile mmx functions in assembly.
|
||||
LCFLAGS = -Zi -GM
|
||||
LINCS = -I$(XPDIST)\include -I..\libical
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define the files necessary to build the target (ie. OBJS)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
LIBICAL_OBJS= .\$(OBJDIR)\icalvcal.obj \
|
||||
.\$(OBJDIR)\vcaltest.obj \
|
||||
.\$(OBJDIR)\vcaltmp.obj \
|
||||
.\$(OBJDIR)\vcc.obj \
|
||||
.\$(OBJDIR)\vobject.obj \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
||||
OBJS= ..\libical\$(OBJDIR)\libical$(MOZ_BITS)$(VERSION_NUMBER).lib \
|
||||
$(LIBICAL_OBJS) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Targets here (ie. PROGRAM, LIBRARY, DLL, ...)
|
||||
#// (these must be defined before the common makefiles are included)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
LIBRARY = .\$(OBJDIR)\$(LIBRARY_NAME).lib
|
||||
MAPFILE= $(DLLNAME).map
|
||||
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include <$(DEPTH)/config/rules.mak>
|
|
@ -79,7 +79,12 @@ For example:
|
|||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
#define stricmp strcasecmp
|
||||
#else
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
#endif
|
||||
|
||||
#if defined(__CPLUSPLUS__) || defined(__cplusplus)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..\..
|
||||
|
||||
DIRS = libical \
|
||||
libicalss \
|
||||
libicalvcal \
|
||||
$(NULL)
|
||||
|
||||
!include $(DEPTH)\config\rules.mak
|
|
@ -0,0 +1,137 @@
|
|||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
#
|
||||
|
||||
|
||||
|
||||
MODULE = jpeg
|
||||
EXPORTS = jconfig.h jerror.h jinclude.h jmorecfg.h jpeglib.h jpegint.h jwinfig.h
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build SUN-JAVA/JPEG Library (NEW)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH= ..\
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Make Variables here: (ie. PDFFILE, MAPFILE, ...)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
EXPORT_LIBRARY=1
|
||||
LIBRARY_NAME=jpeg$(MOZ_BITS)$(VERSION_NUMBER)
|
||||
PDBFILE=$(LIBRARY_NAME).pdb
|
||||
MAPFILE=$(LIBRARY_NAME).map
|
||||
!if "$(MOZ_BITS)" == "16"
|
||||
DEFFILE=jpg$(MOZ_BIGS)$(VERSION_NUMBER).def
|
||||
!endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any local options for the make tools
|
||||
#// (ie. LCFLAGS, LLFLAGS, LLIBS, LINCS)
|
||||
#// -Zi -GM needed to compile mmx functions in assembly.
|
||||
LCFLAGS = -Zi -GM
|
||||
LINCS = -I$(XPDIST)\include
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define the files necessary to build the target (ie. OBJS)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
JPEG_OBJS= .\$(OBJDIR)\jdapimin.obj \
|
||||
.\$(OBJDIR)\jdapistd.obj \
|
||||
.\$(OBJDIR)\jdatasrc.obj \
|
||||
.\$(OBJDIR)\jdatadst.obj \
|
||||
.\$(OBJDIR)\jdmaster.obj \
|
||||
.\$(OBJDIR)\jdinput.obj \
|
||||
.\$(OBJDIR)\jdmarker.obj \
|
||||
.\$(OBJDIR)\jdhuff.obj \
|
||||
.\$(OBJDIR)\jdphuff.obj \
|
||||
.\$(OBJDIR)\jdmainct.obj \
|
||||
.\$(OBJDIR)\jdcoefct.obj \
|
||||
.\$(OBJDIR)\jdpostct.obj \
|
||||
.\$(OBJDIR)\jddctmgr.obj \
|
||||
.\$(OBJDIR)\jidctfst.obj \
|
||||
.\$(OBJDIR)\jidctflt.obj \
|
||||
.\$(OBJDIR)\jidctint.obj \
|
||||
.\$(OBJDIR)\jdsample.obj \
|
||||
.\$(OBJDIR)\jdcolor.obj \
|
||||
.\$(OBJDIR)\jquant1.obj \
|
||||
.\$(OBJDIR)\jquant2.obj \
|
||||
.\$(OBJDIR)\jdmerge.obj \
|
||||
.\$(OBJDIR)\jcomapi.obj \
|
||||
.\$(OBJDIR)\jutils.obj \
|
||||
.\$(OBJDIR)\jerror.obj \
|
||||
.\$(OBJDIR)\jmemmgr.obj \
|
||||
.\$(OBJDIR)\jmemnobs.obj \
|
||||
.\$(OBJDIR)\jfdctflt.obj \
|
||||
.\$(OBJDIR)\jfdctfst.obj \
|
||||
.\$(OBJDIR)\jfdctint.obj \
|
||||
.\$(OBJDIR)\jcapimin.obj \
|
||||
.\$(OBJDIR)\jcparam.obj \
|
||||
.\$(OBJDIR)\jcapistd.obj \
|
||||
.\$(OBJDIR)\jcmarker.obj \
|
||||
.\$(OBJDIR)\jcinit.obj \
|
||||
.\$(OBJDIR)\jcmainct.obj \
|
||||
.\$(OBJDIR)\jchuff.obj \
|
||||
.\$(OBJDIR)\jcsample.obj \
|
||||
.\$(OBJDIR)\jcmaster.obj \
|
||||
.\$(OBJDIR)\jccoefct.obj \
|
||||
.\$(OBJDIR)\jccolor.obj \
|
||||
.\$(OBJDIR)\jcphuff.obj \
|
||||
.\$(OBJDIR)\jcdctmgr.obj \
|
||||
.\$(OBJDIR)\jcprepct.obj \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
||||
OBJS= \
|
||||
$(JPEG_OBJS) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Targets here (ie. PROGRAM, LIBRARY, DLL, ...)
|
||||
#// (these must be defined before the common makefiles are included)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
MAPFILE= $(DLLNAME).map
|
||||
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include <$(DEPTH)/config/rules.mak>
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
DESCRIPTION:
|
||||
|
||||
$Id: regression.c,v 1.1 2001-11-15 19:27:49 mikep%oeone.com Exp $
|
||||
$Id: regression.c,v 1.2 2001-11-22 19:22:04 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 1999 Eric Busboom
|
||||
|
@ -35,11 +35,18 @@
|
|||
#include <stdlib.h> /* for malloc */
|
||||
#include <stdio.h> /* for printf */
|
||||
#include <time.h> /* for time() */
|
||||
#ifndef WIN32
|
||||
#include <unistd.h> /* for unlink, fork */
|
||||
#include <sys/wait.h> /* For waitpid */
|
||||
#include <sys/types.h> /* For wait pid */
|
||||
#include <sys/time.h> /* for select */
|
||||
#else
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
#include <sys/types.h> /* For wait pid */
|
||||
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
/* For GNU libc, strcmp appears to be a macro, so using strcmp in
|
||||
assert results in incomprehansible assertion messages. This
|
||||
|
@ -2796,6 +2803,7 @@ void test_fileset()
|
|||
|
||||
void microsleep(int us)
|
||||
{
|
||||
#ifndef WIN32
|
||||
struct timeval tv;
|
||||
|
||||
tv.tv_sec = 0;
|
||||
|
@ -2803,11 +2811,15 @@ void microsleep(int us)
|
|||
|
||||
select(0,0,0,0,&tv);
|
||||
|
||||
#else
|
||||
Sleep(us);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void test_file_locks()
|
||||
{
|
||||
#ifndef WIN32
|
||||
pid_t pid;
|
||||
char *path = "test_fileset_locktest.ics";
|
||||
icalfileset *fs;
|
||||
|
@ -2846,7 +2858,7 @@ void test_file_locks()
|
|||
|
||||
pid = fork();
|
||||
|
||||
assert(pid >= 0);
|
||||
assert(pid >= 0);
|
||||
|
||||
if(pid == 0){
|
||||
/*child*/
|
||||
|
@ -2943,6 +2955,7 @@ void test_file_locks()
|
|||
|
||||
|
||||
assert(sec == final);
|
||||
#endif
|
||||
}
|
||||
|
||||
void test_action()
|
||||
|
@ -3349,7 +3362,7 @@ int main(int argc, char *argv[])
|
|||
if(argc==1) {
|
||||
ttime = trecur = tspan = tmisc = tgauge = tfile = tbasic = 1;
|
||||
}
|
||||
|
||||
#ifndef WIN32 /* not getopt under win32 */
|
||||
while ((c = getopt(argc, argv, "t:s:r:m:g:f:b:")) != -1) {
|
||||
switch (c) {
|
||||
|
||||
|
@ -3406,6 +3419,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
|
||||
#endif
|
||||
if(ttime==1 || ttime==2){
|
||||
printf("\n------------Test time parser ----------\n");
|
||||
test_time_parser();
|
||||
|
|
Загрузка…
Ссылка в новой задаче