* GSWExtensions.framework/GSWKeyValueConditional.m

([GSWKeyValueConditional condition]): Declare all variables at
        top of block to be able to compile with gcc 2.95.
        * GSWeb.framework/GSWBaseParser.m
        (_ParserDebugLogBuffer):Ditto.
        * GSWeb.framework/GSWDisplayGroup.m
        ([GSWDisplayGroup _deleteObjects]),
        ([GSWDisplayGroup displayBatchContainingSelectedObject]),
        ([GSWDisplayGroup setDefaultStringMatchFormat:]),
        ([GSWDisplayGroup _setUpForNewDataSource]): Ditto.
        * GSWeb.framework/GSWHTMLDynamicElement.m
        ([GSWHTMLDynamicElement
        computeActionStringWithActionClassAssociation:
        directActionNameAssociation:pathQueryDictionaryAssociation:
        otherPathQueryAssociations:inContext:]): Ditto.
        * GSWeb.framework/GSWHTMLRawParser.m
        ([GSWHTMLRawParser
        tagPropertiesForType:betweenIndex:andIndex:]),
        ([GSWHTMLRawParser parseHTML]): Ditto.
        * GSWeb.framework/GSWRequest.m
        ([GSWRequest valuesFromHeaderString:], [GSWRequest initWithString:]),
        ([GSWRequest cookies]): Ditto.
        * GSWeb.framework/GSWStatisticsStore.m
        ([GSWStatisticsStore _sessionTerminating:]): Ditto.
        * GSWeb.framework/GSWTemporaryElement.m
        ([GSWTemporaryElement _elementWithDeclaration:name:properties:
        template:languages:]): Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@19171 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Ayers 2004-04-22 12:08:29 +00:00
parent fc93d944cd
commit 1262062463
9 changed files with 80 additions and 29 deletions

View file

@ -1,3 +1,32 @@
2004-04-22 S.J. Chun <chunsj@embian.com>
* GSWExtensions.framework/GSWKeyValueConditional.m
([GSWKeyValueConditional condition]): Declare all variables at top
of block to be able to compile with gcc 2.95.
* GSWeb.framework/GSWBaseParser.m
(_ParserDebugLogBuffer):Ditto.
* GSWeb.framework/GSWDisplayGroup.m
([GSWDisplayGroup _deleteObjects]),
([GSWDisplayGroup displayBatchContainingSelectedObject]),
([GSWDisplayGroup setDefaultStringMatchFormat:]),
([GSWDisplayGroup _setUpForNewDataSource]): Ditto.
* GSWeb.framework/GSWHTMLDynamicElement.m
([GSWHTMLDynamicElement computeActionStringWithActionClassAssociation:
directActionNameAssociation:pathQueryDictionaryAssociation:
otherPathQueryAssociations:inContext:]): Ditto.
* GSWeb.framework/GSWHTMLRawParser.m
([GSWHTMLRawParser tagPropertiesForType:betweenIndex:andIndex:]),
([GSWHTMLRawParser parseHTML]): Ditto.
* GSWeb.framework/GSWRequest.m
([GSWRequest valuesFromHeaderString:], [GSWRequest initWithString:]),
([GSWRequest cookies]): Ditto.
* GSWeb.framework/GSWStatisticsStore.m
([GSWStatisticsStore _sessionTerminating:]): Ditto.
* GSWeb.framework/GSWTemporaryElement.m
([GSWTemporaryElement _elementWithDeclaration:name:properties:
template:languages:]): Ditto.
2004-04-20 David Ayers <d.ayers@inode.at> 2004-04-20 David Ayers <d.ayers@inode.at>
* GSWeb.framework/GSWDisplayGroup.m: * GSWeb.framework/GSWDisplayGroup.m:

View file

@ -49,13 +49,15 @@ RCS_ID("$Id$")
- (BOOL) condition - (BOOL) condition
{ {
BOOL condition = NO; BOOL condition = NO;
id parentValue;
id value;
LOGObjectFnStart(); LOGObjectFnStart();
// id key = [self valueForBinding:@"key"]; // key = [self valueForBinding:@"key"];
// id parentValue = (key ? [[self parent] valueForKeyPath:key]:nil); // parentValue = (key ? [[self parent] valueForKeyPath:key]:nil);
id parentValue = [self valueForBinding:@"key"]; parentValue = [self valueForBinding:@"key"];
id value = [self valueForBinding:@"value"]; value = [self valueForBinding:@"value"];
NSDebugMLLog(@"GSWComponent",@"parentValue=%@",parentValue); NSDebugMLLog(@"GSWComponent",@"parentValue=%@",parentValue);
NSDebugMLLog(@"GSWComponent",@"value=%@",value); NSDebugMLLog(@"GSWComponent",@"value=%@",value);

View file

@ -139,8 +139,8 @@ RCS_ID("$Id$")
void _ParserDebugLogBuffer(char* fn,char* file,int line,unichar* uniBuf,int length,int index,int charsCount) void _ParserDebugLogBuffer(char* fn,char* file,int line,unichar* uniBuf,int length,int index,int charsCount)
{ {
printf("In %s (%s %d): length=%d index=%d ==>\n",fn,file,line,length,index);
int i=0; int i=0;
printf("In %s (%s %d): length=%d index=%d ==>\n",fn,file,line,length,index);
for(i=index;i<length && i-index<charsCount;i++) for(i=index;i<length && i-index<charsCount;i++)
printf("%c",(char)(uniBuf[i])); printf("%c",(char)(uniBuf[i]));
printf("\n"); printf("\n");

View file

@ -365,8 +365,8 @@ static BOOL globalDefaultForValidatesChangesImmediately = NO;
objectsCount = [objects count]; objectsCount = [objects count];
if (objectsCount>0) if (objectsCount>0)
{ {
result = YES;
int i=0; int i=0;
result = YES;
for(i=0;i<objectsCount;i++) for(i=0;i<objectsCount;i++)
{ {
id object=[objects objectAtIndex:i]; id object=[objects objectAtIndex:i];
@ -962,10 +962,11 @@ static BOOL globalDefaultForValidatesChangesImmediately = NO;
-(id)displayBatchContainingSelectedObject -(id)displayBatchContainingSelectedObject
{ {
int newBatchIndex = 1; int newBatchIndex = 1;
int selectionIndex;
LOGObjectFnStart(); LOGObjectFnStart();
int selectionIndex=[self _selectionIndex]; selectionIndex=[self _selectionIndex];
if ([self batchCount]>0) if ([self batchCount]>0)
newBatchIndex = selectionIndex / _numberOfObjectsPerBatch + 1; newBatchIndex = selectionIndex / _numberOfObjectsPerBatch + 1;
@ -1945,9 +1946,10 @@ of all Batches, not only the current one.
- (void)setDefaultStringMatchFormat:(NSString *)format - (void)setDefaultStringMatchFormat:(NSString *)format
{ {
NSRange range;
LOGObjectFnStart(); LOGObjectFnStart();
// This must contains value format string // This must contains value format string
NSRange range=[format rangeOfString:@"%@"]; range=[format rangeOfString:@"%@"];
if (range.length==0) if (range.length==0)
{ {
[[NSException exceptionWithName:NSInvalidArgumentException [[NSException exceptionWithName:NSInvalidArgumentException
@ -2465,11 +2467,12 @@ of all Batches, not only the current one.
LOGObjectFnStart(); LOGObjectFnStart();
if(_dataSource) if(_dataSource)
{ {
EOEditingContext* editingContext;
// Set flags to detect customer dataSource // Set flags to detect customer dataSource
_flags.isCustomDataSourceClass = [self _isCustomDataSourceClass:[_dataSource class]]; _flags.isCustomDataSourceClass = [self _isCustomDataSourceClass:[_dataSource class]];
// Add self as observer on dataSource editingContext // Add self as observer on dataSource editingContext
EOEditingContext* editingContext = [_dataSource editingContext]; editingContext = [_dataSource editingContext];
if(editingContext) if(editingContext)
{ {
[[NSNotificationCenter defaultCenter] [[NSNotificationCenter defaultCenter]

View file

@ -835,6 +835,10 @@ attributeAssociations:(NSDictionary*)attributeAssociations
if ([pathQueryDictionary count]>0 || [otherPathQueryAssociations count]>0) if ([pathQueryDictionary count]>0 || [otherPathQueryAssociations count]>0)
{ {
NSMutableDictionary* pathKV=nil; NSMutableDictionary* pathKV=nil;
NSArray* keys;
unsigned int count;
unsigned int i;
if ([otherPathQueryAssociations count]>0) if ([otherPathQueryAssociations count]>0)
{ {
NSEnumerator* enumerator = [otherPathQueryAssociations keyEnumerator]; NSEnumerator* enumerator = [otherPathQueryAssociations keyEnumerator];
@ -861,9 +865,9 @@ attributeAssociations:(NSDictionary*)attributeAssociations
NSDebugMLLog(@"gswdync",@"pathKV=%@",pathKV); NSDebugMLLog(@"gswdync",@"pathKV=%@",pathKV);
// We sort keys so URL are always the same for same parameters // We sort keys so URL are always the same for same parameters
NSArray* keys=[[pathKV allKeys]sortedArrayUsingSelector:@selector(compare:)]; keys=[[pathKV allKeys]sortedArrayUsingSelector:@selector(compare:)];
int count=[keys count]; count=[keys count];
int i=0;
NSDebugMLLog(@"gswdync",@"pathKV=%@",pathKV); NSDebugMLLog(@"gswdync",@"pathKV=%@",pathKV);
for(i=0;i<count;i++) for(i=0;i<count;i++)
{ {

View file

@ -506,8 +506,9 @@ if it is not the case but you'll have problems later...)
forKey:key]; forKey:key];
else if (_uniBuf[index]=='=') // key=value else if (_uniBuf[index]=='=') // key=value
{ {
NSString *value;
index++; index++;
NSString* value=[self _parsePropertiesStringEndingWith:'=' value=[self _parsePropertiesStringEndingWith:'='
or:' ' or:' '
index:&index index:&index
stopIndex:stopIndex]; stopIndex:stopIndex];
@ -609,6 +610,8 @@ May raise exception.
else else
{ {
NSString* tagPropertiesString=nil; NSString* tagPropertiesString=nil;
NSDictionary* tagProperties;
if (_uniBuf[_index-1]=='/') if (_uniBuf[_index-1]=='/')
{ {
stopTag=YES; stopTag=YES;
@ -618,7 +621,7 @@ May raise exception.
tagPropertiesString=[NSString stringWithCharacters:_uniBuf+tagPropertiesStartIndex tagPropertiesString=[NSString stringWithCharacters:_uniBuf+tagPropertiesStartIndex
length:tagPropertiesStopIndex-tagPropertiesStartIndex]; length:tagPropertiesStopIndex-tagPropertiesStartIndex];
NSDebugMLog(@"tagPropertiesString='%@'",tagPropertiesString); NSDebugMLog(@"tagPropertiesString='%@'",tagPropertiesString);
NSDictionary* tagProperties=[self tagPropertiesForType:tagType tagProperties=[self tagPropertiesForType:tagType
betweenIndex:tagPropertiesStartIndex betweenIndex:tagPropertiesStartIndex
andIndex:tagPropertiesStopIndex-1]; andIndex:tagPropertiesStopIndex-1];
NSDebugMLog(@"tagProperties='%@'",tagProperties); NSDebugMLog(@"tagProperties='%@'",tagProperties);

View file

@ -66,11 +66,11 @@ RCS_ID("$Id$")
count=[qvs count]; count=[qvs count];
if (count>0) if (count>0)
{ {
unsigned int i;
//Sor oon quality desc //Sor oon quality desc
[qvs sortUsingSelector:@selector(compareOnQualityDesc:)]; [qvs sortUsingSelector:@selector(compareOnQualityDesc:)];
//Remove Duplicates //Remove Duplicates
int i=0;
for(i=0;i<count;i++) for(i=0;i<count;i++)
{ {
int j=0; int j=0;
@ -110,8 +110,9 @@ RCS_ID("$Id$")
{ {
NSString* value=nil; NSString* value=nil;
NSString* qualityString=nil; NSString* qualityString=nil;
NSRange qualitySeparatorRange;
string=[string stringByTrimmingSpaces]; string=[string stringByTrimmingSpaces];
NSRange qualitySeparatorRange=[string rangeOfString:@";q="]; qualitySeparatorRange=[string rangeOfString:@";q="];
if (qualitySeparatorRange.length>0) if (qualitySeparatorRange.length>0)
{ {
if (qualitySeparatorRange.location==0) if (qualitySeparatorRange.location==0)
@ -1192,10 +1193,13 @@ RCS_ID("$Id$")
// build super->cookies // build super->cookies
if (!_cookies) if (!_cookies)
{ {
NSDictionary* cookies;
NSEnumerator* keysEnum;
NSString* key;
[self _initCookies]; // super cookies init [self _initCookies]; // super cookies init
NSDictionary* cookies=[self cookieValues]; cookies=[self cookieValues];
NSEnumerator* keysEnum=[cookies keyEnumerator]; keysEnum=[cookies keyEnumerator];
NSString* key=nil; key=nil;
while((key=[keysEnum nextObject])) while((key=[keysEnum nextObject]))
{ {
NSString* value=[cookies objectForKey:key]; NSString* value=[cookies objectForKey:key];

View file

@ -267,13 +267,18 @@ RCS_ID("$Id$")
//-------------------------------------------------------------------- //--------------------------------------------------------------------
-(void)_sessionTerminating:(GSWSession*)aSession -(void)_sessionTerminating:(GSWSession*)aSession
{ {
int activeSessionsCount;
NSArray* statistics;
NSDate* sessionBirthDate;
NSTimeInterval sessionTimeOut;
int sessionRequestCounter;
//OK //OK
LOGObjectFnStart(); LOGObjectFnStart();
int activeSessionsCount=[GSWApp _activeSessionsCount]; activeSessionsCount=[GSWApp _activeSessionsCount];
NSArray* statistics=[aSession statistics]; statistics=[aSession statistics];
NSDate* sessionBirthDate=nil; sessionBirthDate=nil;
NSTimeInterval sessionTimeOut=0; sessionTimeOut=0;
int sessionRequestCounter=0; sessionRequestCounter=0;
[self _updatePathsStatisticsWithPaths:statistics]; [self _updatePathsStatisticsWithPaths:statistics];
sessionBirthDate=[aSession _birthDate]; sessionBirthDate=[aSession _birthDate];
sessionTimeOut=[aSession timeOut]; sessionTimeOut=[aSession timeOut];

View file

@ -340,10 +340,11 @@ May raise exception if element can't be created
else else
{ {
Class elementClass = NSClassFromString(elementType); Class elementClass = NSClassFromString(elementType);
NSDictionary* associations;
NSDebugMLog(@"elementClass=%@",elementClass); NSDebugMLog(@"elementClass=%@",elementClass);
NSDictionary* associations=[declaration associations]; associations=[declaration associations];
if ([properties count]>0) if ([properties count]>0)
{ {
NSEnumerator* _propertiesEnum = [properties keyEnumerator]; NSEnumerator* _propertiesEnum = [properties keyEnumerator];