* GSWeb.framework/GSWUtils.h (NSTimeIntervalSleep): Declare.

* GSWeb.framework/GSWGenericContainer.m
        ([GSWGenericContainer takeValuesFromRequest:inContext:]): Don't
        try to return value in method returning void.
        * GSWeb.framework/GSWHyperlink.m
        ([GSWHyperlink invokeActionForRequest:inContext:]): Add cast
        to silence compiler on OS X.
        * GSWeb.framework/GSWResourceManager.m
        ([GSWResourceManager _applicationGSWBundle]): Remove obsolete
        logging.
        * GSWeb.framework/NSData+Compress.m ([NSData deflate]):
        Remove dependancy on GNUstep extenstions.
        * GSWeb.framework/stacktrace.m: Add test for __MACH__.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18696 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ayers 2004-02-27 17:01:02 +00:00
parent 54bc7abdd4
commit 3ee371e7f5
7 changed files with 51 additions and 41 deletions

View file

@ -1,3 +1,19 @@
2004-02-27 David Ayers <d.ayers@inode.at>
* GSWeb.framework/GSWUtils.h (NSTimeIntervalSleep): Declare.
* GSWeb.framework/GSWGenericContainer.m
([GSWGenericContainer takeValuesFromRequest:inContext:]): Don't
try to return value in method returning void.
* GSWeb.framework/GSWHyperlink.m
([GSWHyperlink invokeActionForRequest:inContext:]): Add cast
to silence compiler on OS X.
* GSWeb.framework/GSWResourceManager.m
([GSWResourceManager _applicationGSWBundle]): Remove obsolete
logging.
* GSWeb.framework/NSData+Compress.m ([NSData deflate]):
Remove dependancy on GNUstep extenstions.
* GSWeb.framework/stacktrace.m: Add test for __MACH__.
2004-02-26 David Ayers <d.ayers@inode.at>
* GSWeb.framework/GSWDefaultAdaptorThread.m

View file

@ -112,8 +112,8 @@ RCS_ID("$Id$")
-(void)takeValuesFromRequest:(GSWRequest*)aRequest
inContext:(GSWContext*)aContext
{
return [_element takeValuesFromRequest:aRequest
inContext:aContext];
[_element takeValuesFromRequest:aRequest
inContext:aContext];
};
//--------------------------------------------------------------------

View file

@ -759,7 +759,7 @@ RCS_ID("$Id$")
NSString* anUrl=[_redirectURL valueInComponent:component];
id redirectComponent = [GSWApp pageWithName:@"GSWRedirect"
inContext:context];
[redirectComponent setURL:anUrl];
[redirectComponent setURL: (id)anUrl];
element=redirectComponent;
}
else if (_href)

View file

@ -1603,16 +1603,6 @@ bundle if none is found
ofType:@"plist"];
NSDebugMLLog(@"resmanager",@"globalMimePListPathName=%@",globalMimePListPathName);
#ifdef DEBUG
if (!globalMimePListPathName)
{
NSDictionary* env=[[NSProcessInfo processInfo] environment];
NSDebugMLLog(@"error",@"GNUSTEP_USER_ROOT=%@",[env objectForKey: @"GNUSTEP_USER_ROOT"]);
NSDebugMLLog(@"error",@"GNUSTEP_LOCAL_ROOT=%@",[env objectForKey: @"GNUSTEP_LOCAL_ROOT"]);
NSDebugMLLog(@"error",@"gnustepBundle resourcePath=%@",[[NSBundle gnustepBundle]resourcePath]);
};
#endif
NSAssert(globalMimePListPathName,@"No resource MIME.plist");
{
NSDictionary* tmpMimeTypes=nil;

View file

@ -118,6 +118,7 @@ extern BOOL SBIsValueIsIn(id id1,id id2);
extern id GetTmpName(NSString* dir,NSString* prefix);
extern NSTimeInterval NSTimeIntervalFromTimeVal(struct timeval* tv);
extern void NSTimeIntervalSleep(NSTimeInterval ti);
/* Basic data structure which holds all information we can get about a process.
* (unless otherwise specified, fields are read from /proc/#/stat)
*/

View file

@ -52,9 +52,9 @@ static int gzHeaderSize=10;
//====================================================================
@implementation NSData (GSWZLib)
-(NSData*)deflate
- (NSData *)deflate
{
NSMutableData* outData=nil;
NSMutableData *outData=nil;
z_stream c_stream; // compression stream
int err=Z_OK;
unsigned int selfLength=[self length];
@ -76,34 +76,38 @@ static int gzHeaderSize=10;
else
{
const void* inBytes=[self bytes];
NSMutableData* outTempData=[NSMutableData dataWithCapacity:max(1024,selfLength/10)];
void* outTempBytes=[outTempData bytes];
unsigned int capacity = max(1024, selfLength/10);
NSMutableData* outTempData
= [NSMutableData dataWithCapacity: capacity];
void* outTempBytes=[outTempData mutableBytes];
void* outBytes=NULL;
uLong crc = crc32(0L, Z_NULL, 0);
unsigned flushedData=0;
crc = crc32(crc,inBytes,selfLength);//calculate crc
outData=[NSMutableData dataWithCapacity:gzHeaderSize];
outData = [NSMutableData dataWithCapacity: gzHeaderSize];
// gzip nead header !
[outData setLength:gzHeaderSize];
outBytes=[outData bytes];
((unsigned char*)outBytes)[0]=gzMagic[0];
((unsigned char*)outBytes)[1]=gzMagic[1];
((unsigned char*)outBytes)[2]=Z_DEFLATED;
((unsigned char*)outBytes)[3]=0; //flags
((unsigned char*)outBytes)[4]=0; //time
((unsigned char*)outBytes)[5]=0;//time
((unsigned char*)outBytes)[6]=0;//time
((unsigned char*)outBytes)[7]=0;//time
((unsigned char*)outBytes)[8]=2;//binary
((unsigned char*)outBytes)[9]=0x3;//OS
c_stream.next_in = inBytes;
[outData setLength: gzHeaderSize];
outBytes = [outData mutableBytes];
((unsigned char*)outBytes)[0] = gzMagic[0];
((unsigned char*)outBytes)[1] = gzMagic[1];
((unsigned char*)outBytes)[2] = Z_DEFLATED;
((unsigned char*)outBytes)[3] = 0; //flags
((unsigned char*)outBytes)[4] = 0; //time
((unsigned char*)outBytes)[5] = 0;//time
((unsigned char*)outBytes)[6] = 0;//time
((unsigned char*)outBytes)[7] = 0;//time
((unsigned char*)outBytes)[8] = 2;//binary
((unsigned char*)outBytes)[9] = 0x3;//OS
c_stream.next_in = (Bytef *)inBytes;
c_stream.avail_in = (uInt)selfLength;
[outTempData setLength:[outTempData capacity]];
[outTempData setLength: capacity];
c_stream.next_out = outTempBytes;
c_stream.avail_out = (uInt)[outTempData capacity];
c_stream.avail_out = (uInt)[outTempData length];
do
{
err = deflate(&c_stream, Z_NO_FLUSH);
@ -119,13 +123,11 @@ static int gzHeaderSize=10;
flushedData+=[outTempData length];
c_stream.next_out = outTempBytes;
c_stream.avail_out = (uInt)[outTempData capacity];
[outTempData setLength:[outTempData capacity]];
c_stream.avail_out = (uInt)[outTempData length];
};
};
}
while (c_stream.avail_in>0 && err==Z_OK);
if (err==Z_OK)
{
do
@ -138,8 +140,7 @@ static int gzHeaderSize=10;
flushedData+=[outTempData length];
c_stream.next_out = outTempBytes;
c_stream.avail_out = (uInt)[outTempData capacity];
[outTempData setLength:[outTempData capacity]];
c_stream.avail_out = (uInt)[outTempData length];
}
else
{

View file

@ -54,6 +54,8 @@
# if defined(__SVR4) || defined(__svr4__)
# define PLATFORM_SOLARIS
# endif
#elif defined(__MACH__)
# define PLATFORM_MACH
#endif
/* ANSI C includes */
@ -64,7 +66,7 @@
#include <limits.h>
#include <errno.h>
#include <signal.h>
#if defined(PLATFORM_UNIX)
#if defined(PLATFORM_UNIX) || defined(PLATFORM_MACH)
# include <unistd.h>
# include <sys/types.h>
# include <sys/wait.h>