mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-04-23 15:33:43 +00:00
* GSWeb/GNUmakefile
* GSWeb/GSWProcFS.m * GSWeb/GSWUtils.m * GSWeb/GSWHTMLStaticElement.m * GSWeb/GSWRecording.m * GSWeb/NSString+HTML.m * GSWeb/GSWMessage.m * GSWeb/GSWRequest.m * GSWeb/WOKeyValueUnarchiver.m * GSWeb/GSWMultiKeyDictionary.m * GSWeb/GSWTemporaryElement.m fix some format strings, patch based on submission from Graham Lee to bug report 39087 git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@36679 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
af07675e30
commit
65807fb6e8
12 changed files with 47 additions and 32 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,7 +1,23 @@
|
|||
2013-05-29: Sebastian Reitenbach <sebastia@l00-bugdead-prods.de>
|
||||
* GSWeb/GNUmakefile
|
||||
* GSWeb/GSWProcFS.m
|
||||
* GSWeb/GSWUtils.m
|
||||
* GSWeb/GSWHTMLStaticElement.m
|
||||
* GSWeb/GSWRecording.m
|
||||
* GSWeb/NSString+HTML.m
|
||||
* GSWeb/GSWMessage.m
|
||||
* GSWeb/GSWRequest.m
|
||||
* GSWeb/WOKeyValueUnarchiver.m
|
||||
* GSWeb/GSWMultiKeyDictionary.m
|
||||
* GSWeb/GSWTemporaryElement.m
|
||||
fix some format strings, patch based on submission from
|
||||
Graham Lee to bug report 39087
|
||||
|
||||
2013-05-27: Sebastian Reitenbach <sebastia@l00-bugdead-prods.de>
|
||||
* GSWeb/NSString+HTML.m
|
||||
* GSWeb/GSWDeclarationParser.m
|
||||
make inline functions static to please clang
|
||||
|
||||
2013-03-04 David Wetzel <dave@turbocat.de>
|
||||
* GSWExtensions/GSWLongResponsePage.m
|
||||
* GSWDatabase/WODisplayGroup.m
|
||||
|
|
|
@ -397,6 +397,6 @@ ifeq ($(doc),yes)
|
|||
include $(GNUSTEP_MAKEFILES)/documentation.make
|
||||
endif
|
||||
|
||||
ADDITIONAL_OBJCFLAGS = -Werror-implicit-function-declaration -Werror
|
||||
ADDITIONAL_OBJCFLAGS = -Werror-implicit-function-declaration
|
||||
|
||||
-include Makefile.postamble
|
||||
|
|
|
@ -339,9 +339,9 @@ static Class GSWHTMLBareStringClass = Nil;
|
|||
BYTE element=0;
|
||||
int elementsN[3]={0,0,0};
|
||||
|
||||
NSAssert2(fromIndex<[_elementsMap length],@"fromIndex out of range:%u (length=%d)",
|
||||
NSAssert2(fromIndex<[_elementsMap length],@"fromIndex out of range:%u (length=%"PRIuPTR")",
|
||||
fromIndex,[_elementsMap length]);
|
||||
NSAssert2(toIndex<[_elementsMap length],@"toIndex out of range:%u (length=%d)",
|
||||
NSAssert2(toIndex<[_elementsMap length],@"toIndex out of range:%u (length=%"PRIuPTR")",
|
||||
toIndex,[_elementsMap length]);
|
||||
NSAssert2(fromIndex<=toIndex,@"fromIndex>toIndex %u %u ",
|
||||
fromIndex,toIndex);
|
||||
|
|
|
@ -834,7 +834,7 @@ static __inline__ NSMutableData *_checkBody(GSWMessage *self) {
|
|||
allowLossyConversion:YES];
|
||||
|
||||
[NSException raise:NSInvalidArgumentException
|
||||
format:@"%s: could not convert '%s' non-lossy to encoding %i",
|
||||
format:@"%s: could not convert '%s' non-lossy to encoding %"PRIuPTR,
|
||||
__PRETTY_FUNCTION__, [lossyData bytes], _contentEncoding];
|
||||
}
|
||||
|
||||
|
@ -990,7 +990,7 @@ NSLog(@"%s - '%s' '%@'",__PRETTY_FUNCTION__, string, nsstring);
|
|||
{
|
||||
if ([replaceData length]>0) // is there something to replace ?
|
||||
{
|
||||
NSDebugMLog(@"[_contentData length]=%d",[_contentData length]);
|
||||
NSDebugMLog(@"[_contentData length]=%"PRIuPTR,[_contentData length]);
|
||||
if ([_contentData length]>0)
|
||||
{
|
||||
[_contentData replaceOccurrencesOfData:replaceData
|
||||
|
|
|
@ -335,7 +335,7 @@ static void GSWMapMoreNodes(GSWMapTable map, unsigned required)
|
|||
map,map->base,required,map->base->nodeSize,sizeof(GSWMapNode_t));
|
||||
*/
|
||||
NSCAssert2(map->base->nodeSize>=sizeof(GSWMapNode_t),
|
||||
@"Bad node size: %u < %u",
|
||||
@"Bad node size: %"PRIuPTR" < %"PRIuPTR,
|
||||
map->base->nodeSize,
|
||||
sizeof(GSWMapNode_t));
|
||||
chunkSize = chunkCount * map->base->nodeSize;
|
||||
|
@ -1007,7 +1007,7 @@ static void GSWMapBaseInitWithZoneAndCapacity(GSWMapBase base,
|
|||
+(id)dictionaryWithNodeSize:(NSUInteger)nodeSize
|
||||
{
|
||||
NSCAssert2(nodeSize>=sizeof(GSWMapNode_t),
|
||||
@"Bad node size: %u < %u",
|
||||
@"Bad node size: %"PRIuPTR" < %"PRIuPTR,
|
||||
nodeSize,
|
||||
sizeof(GSWMapNode_t));
|
||||
return [[self alloc]initWithNodeSize:nodeSize];
|
||||
|
@ -1023,7 +1023,7 @@ static void GSWMapBaseInitWithZoneAndCapacity(GSWMapBase base,
|
|||
-(id)initWithNodeSize:(NSUInteger)nodeSize
|
||||
{
|
||||
NSCAssert2(nodeSize>=sizeof(GSWMapNode_t),
|
||||
@"Bad node size: %u < %u",
|
||||
@"Bad node size: %"PRIuPTR" < %"PRIuPTR,
|
||||
nodeSize,
|
||||
sizeof(GSWMapNode_t));
|
||||
self=[self initWithNodeSize:nodeSize
|
||||
|
@ -1043,7 +1043,7 @@ static void GSWMapBaseInitWithZoneAndCapacity(GSWMapBase base,
|
|||
capacity:(NSUInteger)capacity
|
||||
{
|
||||
NSCAssert2(nodeSize>=sizeof(GSWMapNode_t),
|
||||
@"Bad node size: %u < %u",
|
||||
@"Bad node size: %"PRIuPTR" < %"PRIuPTR,
|
||||
nodeSize,
|
||||
sizeof(GSWMapNode_t));
|
||||
if ((self=[super init]))
|
||||
|
|
|
@ -41,7 +41,7 @@ RCS_ID("$Id$")
|
|||
NSString* formattedByteSizeValue(unsigned int value)
|
||||
{
|
||||
if (value<1024)
|
||||
return [NSString stringWithFormat:@"%lu b",value];
|
||||
return [NSString stringWithFormat:@"%l b",value];
|
||||
else if (value<1024L*1024L)
|
||||
return [NSString stringWithFormat:@"%.3f Kb",
|
||||
(((double)value)/1024)];
|
||||
|
@ -122,7 +122,7 @@ NSString* formattedByteSizeValue(unsigned int value)
|
|||
_ttyc,
|
||||
_environ,
|
||||
_commandLine];
|
||||
dscr=[dscr stringByAppendingFormat:@"uid: %d\npid: %d\nppid: %d\npgrp: %d\nsession: %d\ntty: %d\ntpgid: %d\npriority: %d\nnice: %d\nsignal: %LX\nblocked: %LX\nsigIgnore: %LX\nsigCache: %LX\n",
|
||||
dscr=[dscr stringByAppendingFormat:@"uid: %d\npid: %d\nppid: %d\npgrp: %d\nsession: %d\ntty: %d\ntpgid: %d\npriority: %d\nnice: %d\nsignal: %llX\nblocked: %llX\nsigIgnore: %llX\nsigCache: %llX\n",
|
||||
_uid,
|
||||
_pid,
|
||||
_ppid,
|
||||
|
@ -269,7 +269,7 @@ NSString* formattedByteSizeValue(unsigned int value)
|
|||
|
||||
if (sscanf(statsChars,
|
||||
"%c %d %d %d %d %d %lu %lu %lu %lu %lu %ld %ld %ld %ld %d "
|
||||
"%d %lu %lu %ld %lu %lu %lu %lu %lu %lu %lu %lu %LX %LX %LX %LX %lu",
|
||||
"%d %lu %lu %ld %lu %lu %lu %lu %lu %lu %lu %lu %llX %llX %llX %llX %lu",
|
||||
&cState, //state
|
||||
&_ppid,//ppid
|
||||
&_pgrp,//pgrp
|
||||
|
|
|
@ -216,7 +216,7 @@ RCS_ID("$Id$")
|
|||
-(void)saveRequest:(GSWRequest*)request
|
||||
{
|
||||
|
||||
NSDebugMLog(@"_recordingStep=%d",_recordingStep);
|
||||
NSDebugMLog(@"_recordingStep=%ld",_recordingStep);
|
||||
|
||||
ASSIGN(_request,request);
|
||||
|
||||
|
@ -230,7 +230,7 @@ RCS_ID("$Id$")
|
|||
|
||||
NSString* requestURI=[_request uri];
|
||||
NSString* filePath= [_recordingPath stringByAppendingPathComponent:
|
||||
[NSString stringWithFormat:@"%0.6d-request",_recordingStep]];
|
||||
[NSString stringWithFormat:@"%0.6ld-request",_recordingStep]];
|
||||
|
||||
[GSWApplication logWithFormat:@"Saving Request into '%@'",filePath];
|
||||
|
||||
|
@ -259,7 +259,7 @@ RCS_ID("$Id$")
|
|||
NSError * error = nil;
|
||||
|
||||
|
||||
NSDebugMLog(@"_recordingStep=%d",_recordingStep);
|
||||
NSDebugMLog(@"_recordingStep=%ld",_recordingStep);
|
||||
|
||||
NSDebugMLLog(@"GSWRecording",@"recordingSessionID=%@",
|
||||
[response headerForKey:GSWHTTPHeader_RecordingSessionID[GSWebNamingConv]]);
|
||||
|
@ -267,7 +267,7 @@ RCS_ID("$Id$")
|
|||
response = [self _wildcardedResponse:response];
|
||||
|
||||
filePath= [_recordingPath stringByAppendingPathComponent:
|
||||
[NSString stringWithFormat:@"%0.6d-response",_recordingStep]];
|
||||
[NSString stringWithFormat:@"%0.6ld-response",_recordingStep]];
|
||||
|
||||
[GSWApplication logWithFormat:@"Saving Response into '%@'",filePath];
|
||||
|
||||
|
@ -288,7 +288,7 @@ RCS_ID("$Id$")
|
|||
|
||||
_recordingStep++;
|
||||
|
||||
NSDebugMLog(@"_recordingStep=%d",_recordingStep);
|
||||
NSDebugMLog(@"_recordingStep=%ld",_recordingStep);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -608,7 +608,7 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(NSString*)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%s %p - method=%@, uri=%@, httpVersion=%@, headers=%@, content=%@, userInfo=%@, defaultFormValueEncoding=%u, formValueEncoding=%u, formValues=%@, uriElements=%@, cookie=%@, applicationURLPrefix=%@, requestHandlerPathArray=%@, browserLanguages=%@, requestType=%d, isUsingWebServer=%s, formValueEncodingDetectionEnabled=%s, applicationNumber=%d",
|
||||
return [NSString stringWithFormat:@"<%s %p - method=%@, uri=%@, httpVersion=%@, headers=%@, content=%@, userInfo=%@, defaultFormValueEncoding=%"PRIuPTR", formValueEncoding=%"PRIuPTR", formValues=%@, uriElements=%@, cookie=%@, applicationURLPrefix=%@, requestHandlerPathArray=%@, browserLanguages=%@, requestType=%d, isUsingWebServer=%s, formValueEncodingDetectionEnabled=%s, applicationNumber=%d",
|
||||
object_getClassName(self),
|
||||
(void*)self,
|
||||
_method,
|
||||
|
|
|
@ -85,7 +85,7 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(NSString*)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%s %p: properties=%@ parent=%p children count=%d templateInfo=%@>",
|
||||
return [NSString stringWithFormat:@"<%s %p: properties=%@ parent=%p children count=%"PRIuPTR" templateInfo=%@>",
|
||||
object_getClassName(self),
|
||||
(void*)self,
|
||||
_properties,
|
||||
|
|
|
@ -138,7 +138,7 @@ char* GSWIntToString(char* buffer,NSUInteger bufferSize,int value,NSUInteger* re
|
|||
value=-value;
|
||||
do
|
||||
{
|
||||
NSCAssert2(i>0,@"Buffer not large (%d) enough for %d",bufferSize,origValue);//>0 for null term
|
||||
NSCAssert2(i>0,@"Buffer not large (%"PRIuPTR") enough for %d",bufferSize,origValue);//>0 for null term
|
||||
buffer[i--]='0'+(value%10);
|
||||
value=value/10;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ char* GSWIntToString(char* buffer,NSUInteger bufferSize,int value,NSUInteger* re
|
|||
j=0;
|
||||
if (origValue<0)
|
||||
{
|
||||
NSCAssert2(i>0,@"Buffer not large (%d) enough for %d",bufferSize,origValue);
|
||||
NSCAssert2(i>0,@"Buffer not large (%"PRIuPTR") enough for %d",bufferSize,origValue);
|
||||
buffer[j++]='-';
|
||||
};
|
||||
do
|
||||
|
@ -1050,8 +1050,7 @@ loggedLockBeforeDateFromFunctionInFileInLine(id self,
|
|||
NSDebugFLLog(@"locking",
|
||||
@"tried lock FAILED thread %@ "
|
||||
@"date:%@ file:%s function:%s line:%li "
|
||||
@"lock:%@ "
|
||||
@"exception:%@ reason:%@ info:%@",
|
||||
@"lock:%@ ",
|
||||
thread,
|
||||
limit, file, function, line,
|
||||
volatileInternalDescription(self));
|
||||
|
@ -1520,8 +1519,8 @@ NSString* GSWGetDefaultDocRoot()
|
|||
NSRange range=NSMakeRange(NSNotFound,0);
|
||||
NSDebugFLog(@"self=%@",self);
|
||||
NSDebugFLog(@"aData=%@",aData);
|
||||
NSDebugFLog(@"mask=%u",mask);
|
||||
NSDebugFLog(@"aRange=(%u,%u)",aRange.location,aRange.length);
|
||||
NSDebugFLog(@"mask=%"PRIuPTR,mask);
|
||||
NSDebugFLog(@"aRange=(%"PRIuPTR",%"PRIuPTR")",aRange.location,aRange.length);
|
||||
if (aData)
|
||||
{
|
||||
int aDataLength=[aData length];
|
||||
|
@ -1529,7 +1528,7 @@ NSString* GSWGetDefaultDocRoot()
|
|||
NSDebugFLog(@"aDataLength=%d",aDataLength);
|
||||
NSDebugFLog(@"selfLength=%d",selfLength);
|
||||
if (aRange.location+aRange.length>selfLength)
|
||||
[NSException raise:NSInvalidArgumentException format:@"Bad Range (%d,%d) for self length %d",
|
||||
[NSException raise:NSInvalidArgumentException format:@"Bad Range (%"PRIuPTR",%"PRIuPTR") for self length %d",
|
||||
aRange.location,
|
||||
aRange.length,
|
||||
selfLength];
|
||||
|
@ -1668,7 +1667,7 @@ NSString* GSWGetDefaultDocRoot()
|
|||
void* mutableBytes=NULL;
|
||||
NSUInteger length=[self length];
|
||||
NSAssert2(length>=bytesCount,
|
||||
@"Can't delete %d first bytes from a data of length %d",
|
||||
@"Can't delete %"PRIuPTR" first bytes from a data of length %"PRIuPTR,
|
||||
bytesCount,length);
|
||||
mutableBytes=[self mutableBytes];
|
||||
memmove(mutableBytes,mutableBytes+bytesCount,bytesCount);
|
||||
|
@ -1680,7 +1679,7 @@ NSString* GSWGetDefaultDocRoot()
|
|||
{
|
||||
NSUInteger length=[self length];
|
||||
NSAssert2(length>=bytesCount,
|
||||
@"Can't delete %d last bytes from a data of length %d",
|
||||
@"Can't delete %"PRIuPTR" last bytes from a data of length %"PRIuPTR,
|
||||
bytesCount,length);
|
||||
[self setLength:length-bytesCount];
|
||||
};
|
||||
|
@ -1969,10 +1968,10 @@ NSString* GSWGetDefaultDocRoot()
|
|||
tmpString = [tmpString initWithData:tmpData
|
||||
encoding:encoding];
|
||||
if (!tmpString) {
|
||||
NSLog(@"%s NO STRING for path '%@' encoding:%d", __PRETTY_FUNCTION__, path, encoding);
|
||||
NSLog(@"%s NO STRING for path '%@' encoding:%"PRIuPTR, __PRETTY_FUNCTION__, path, encoding);
|
||||
|
||||
[NSException raise:NSInvalidArgumentException
|
||||
format:@"%s: could not open convert file contents '%s' non-lossy to encoding %i",
|
||||
format:@"%s: could not open convert file contents '%@' non-lossy to encoding %"PRIuPTR,
|
||||
__PRETTY_FUNCTION__, path, encoding];
|
||||
|
||||
}
|
||||
|
|
|
@ -319,7 +319,7 @@ void allocOrReallocUnicharString(unichar** ptrPtr,NSUInteger* capacityPtr,NSUInt
|
|||
NSUInteger allocSize=newCapacity*sizeof(unichar);
|
||||
unichar* newPtr=GSAutoreleasedBuffer(allocSize);
|
||||
|
||||
NSCAssert1(newPtr,@"Can't alloc %d allocSize bytes",
|
||||
NSCAssert1(newPtr,@"Can't alloc %"PRIuPTR" allocSize bytes",
|
||||
allocSize);
|
||||
|
||||
if (length>0)
|
||||
|
|
|
@ -400,7 +400,7 @@
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"gsdb", @"WOKeyValueUnarchiver",@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
NSDebugMLLog(@"gsdb", @"WOKeyValueUnarchiver" @"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,
|
||||
[localException reason],
|
||||
__FILE__,
|
||||
|
|
Loading…
Reference in a new issue