[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] GSWeb compilation for old (2.95.X) compiler
From: |
S.J.Chun |
Subject: |
[PATCH] GSWeb compilation for old (2.95.X) compiler |
Date: |
Thu, 22 Apr 2004 02:10:51 +0900 (KST) |
Hi, attached patch is for compilation of gsweb using old, 2.95.X gcc compiler,
which does not support variable
declaration in the middle of code. Check this and apply to CVS please :-)
diff -urN gsweb.orig/gsweb/GSWExtensions.framework/GSWKeyValueConditional.m
gsweb/GSWExtensions.framework/GSWKeyValueConditional.m
--- gsweb.orig/gsweb/GSWExtensions.framework/GSWKeyValueConditional.m Tue Mar
2 16:25:40 2004
+++ gsweb/GSWExtensions.framework/GSWKeyValueConditional.m Tue Apr 20
18:12:03 2004
@@ -49,13 +49,15 @@
- (BOOL) condition
{
BOOL condition = NO;
+ id parentValue;
+ id value;
LOGObjectFnStart();
// id key = [self valueForBinding:@"key"];
// id parentValue = (key ? [[self parent] valueForKeyPath:key]:nil);
- id parentValue = [self valueForBinding:@"key"];
- id value = [self valueForBinding:@"value"];
+ parentValue = [self valueForBinding:@"key"];
+ value = [self valueForBinding:@"value"];
NSDebugMLLog(@"GSWComponent",@"parentValue=%@",parentValue);
NSDebugMLLog(@"GSWComponent",@"value=%@",value);
diff -urN gsweb.orig/gsweb/GSWeb.framework/GSWBaseParser.m
gsweb/GSWeb.framework/GSWBaseParser.m
--- gsweb.orig/gsweb/GSWeb.framework/GSWBaseParser.m Thu Mar 25 17:25:48 2004
+++ gsweb/GSWeb.framework/GSWBaseParser.m Tue Apr 20 17:06:14 2004
@@ -139,8 +139,8 @@
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;
+ printf("In %s (%s %d): length=%d index=%d ==>\n",fn,file,line,length,index);
for(i=index;i<length && i-index<charsCount;i++)
printf("%c",(char)(uniBuf[i]));
printf("\n");
diff -urN gsweb.orig/gsweb/GSWeb.framework/GSWDisplayGroup.m
gsweb/GSWeb.framework/GSWDisplayGroup.m
--- gsweb.orig/gsweb/GSWeb.framework/GSWDisplayGroup.m Wed Apr 21 00:46:25 2004
+++ gsweb/GSWeb.framework/GSWDisplayGroup.m Tue Apr 20 18:19:05 2004
@@ -365,8 +359,8 @@
objectsCount = [objects count];
if (objectsCount>0)
{
- result = YES;
int i=0;
+ result = YES;
for(i=0;i<objectsCount;i++)
{
id object=[objects objectAtIndex:i];
@@ -962,10 +956,11 @@
-(id)displayBatchContainingSelectedObject
{
int newBatchIndex = 1;
+ int selectionIndex;
LOGObjectFnStart();
- int selectionIndex=[self _selectionIndex];
+ selectionIndex=[self _selectionIndex];
if ([self batchCount]>0)
newBatchIndex = selectionIndex / _numberOfObjectsPerBatch + 1;
@@ -997,6 +992,7 @@
NSDebugMLLog(@"gswdisplaygroup",@"_numberOfObjectsPerBatch=%d",_numberOfObjectsPerBatch);
NSDebugMLLog(@"gswdisplaygroup",@"displayedObjectsCount=%d",displayedObjectsCount);
+
if (_numberOfObjectsPerBatch == 0 ||
_numberOfObjectsPerBatch>=displayedObjectsCount)
displayedObjects=_displayedObjects;
else
@@ -1945,9 +1941,10 @@
- (void)setDefaultStringMatchFormat:(NSString *)format
{
+ NSRange range;
LOGObjectFnStart();
// This must contains value format string
- NSRange range=[format rangeOfString:@"%@"];
+ range=[format rangeOfString:@"%@"];
if (range.length==0)
{
[[NSException exceptionWithName:NSInvalidArgumentException
@@ -2465,11 +2462,12 @@
LOGObjectFnStart();
if(_dataSource)
{
+ EOEditingContext *editingContext;
// Set flags to detect customer dataSource
_flags.isCustomDataSourceClass = [self
_isCustomDataSourceClass:[_dataSource class]];
// Add self as observer on dataSource editingContext
- EOEditingContext* editingContext = [_dataSource editingContext];
+ editingContext = [_dataSource editingContext];
if(editingContext)
{
[[NSNotificationCenter defaultCenter]
diff -urN gsweb.orig/gsweb/GSWeb.framework/GSWHTMLDynamicElement.m
gsweb/GSWeb.framework/GSWHTMLDynamicElement.m
--- gsweb.orig/gsweb/GSWeb.framework/GSWHTMLDynamicElement.m Fri Mar 26
12:57:57 2004
+++ gsweb/GSWeb.framework/GSWHTMLDynamicElement.m Tue Apr 20 17:57:12 2004
@@ -835,6 +835,9 @@
if ([pathQueryDictionary count]>0 || [otherPathQueryAssociations
count]>0)
{
NSMutableDictionary* pathKV=nil;
+ NSArray* keys;
+ int count;
+ int i;
if ([otherPathQueryAssociations count]>0)
{
NSEnumerator* enumerator = [otherPathQueryAssociations
keyEnumerator];
@@ -861,9 +864,9 @@
NSDebugMLLog(@"gswdync",@"pathKV=%@",pathKV);
// We sort keys so URL are always the same for same parameters
- NSArray* keys=[[pathKV
allKeys]sortedArrayUsingSelector:@selector(compare:)];
- int count=[keys count];
- int i=0;
+ keys=[[pathKV allKeys]sortedArrayUsingSelector:@selector(compare:)];
+ count=[keys count];
+ i=0;
NSDebugMLLog(@"gswdync",@"pathKV=%@",pathKV);
for(i=0;i<count;i++)
{
diff -urN gsweb.orig/gsweb/GSWeb.framework/GSWHTMLRawParser.m
gsweb/GSWeb.framework/GSWHTMLRawParser.m
--- gsweb.orig/gsweb/GSWeb.framework/GSWHTMLRawParser.m Wed Apr 7 00:41:40 2004
+++ gsweb/GSWeb.framework/GSWHTMLRawParser.m Tue Apr 20 17:25:50 2004
@@ -506,8 +506,9 @@
forKey:key];
else if (_uniBuf[index]=='=') // key=value
{
+ NSString *value;
index++;
- NSString* value=[self _parsePropertiesStringEndingWith:'='
+ value=[self _parsePropertiesStringEndingWith:'='
or:' '
index:&index
stopIndex:stopIndex];
@@ -609,6 +610,7 @@
else
{
NSString* tagPropertiesString=nil;
+ NSDictionary *tagProperties;
if (_uniBuf[_index-1]=='/')
{
stopTag=YES;
@@ -618,7 +620,7 @@
tagPropertiesString=[NSString
stringWithCharacters:_uniBuf+tagPropertiesStartIndex
length:tagPropertiesStopIndex-tagPropertiesStartIndex];
NSDebugMLog(@"tagPropertiesString='%@'",tagPropertiesString);
- NSDictionary* tagProperties=[self
tagPropertiesForType:tagType
+ tagProperties=[self
tagPropertiesForType:tagType
betweenIndex:tagPropertiesStartIndex
andIndex:tagPropertiesStopIndex-1];
NSDebugMLog(@"tagProperties='%@'",tagProperties);
diff -urN gsweb.orig/gsweb/GSWeb.framework/GSWRequest.m
gsweb/GSWeb.framework/GSWRequest.m
--- gsweb.orig/gsweb/GSWeb.framework/GSWRequest.m Fri Jan 9 20:34:39 2004
+++ gsweb/GSWeb.framework/GSWRequest.m Tue Apr 20 17:45:02 2004
@@ -66,11 +66,11 @@
count=[qvs count];
if (count>0)
{
+ int i=0;
//Sor oon quality desc
[qvs sortUsingSelector:@selector(compareOnQualityDesc:)];
//Remove Duplicates
- int i=0;
for(i=0;i<count;i++)
{
int j=0;
@@ -110,8 +110,9 @@
{
NSString* value=nil;
NSString* qualityString=nil;
+ NSRange qualitySeparatorRange;
string=[string stringByTrimmingSpaces];
- NSRange qualitySeparatorRange=[string rangeOfString:@";q="];
+ qualitySeparatorRange=[string rangeOfString:@";q="];
if (qualitySeparatorRange.length>0)
{
if (qualitySeparatorRange.location==0)
@@ -1192,10 +1193,13 @@
// build super->cookies
if (!_cookies)
{
+ NSDictionary* cookies;
+ NSEnumerator* keysEnum;
+ NSString* key;
[self _initCookies]; // super cookies init
- NSDictionary* cookies=[self cookieValues];
- NSEnumerator* keysEnum=[cookies keyEnumerator];
- NSString* key=nil;
+ cookies=[self cookieValues];
+ keysEnum=[cookies keyEnumerator];
+ key=nil;
while((key=[keysEnum nextObject]))
{
NSString* value=[cookies objectForKey:key];
diff -urN gsweb.orig/gsweb/GSWeb.framework/GSWStatisticsStore.m
gsweb/GSWeb.framework/GSWStatisticsStore.m
--- gsweb.orig/gsweb/GSWeb.framework/GSWStatisticsStore.m Tue Feb 17
13:45:00 2004
+++ gsweb/GSWeb.framework/GSWStatisticsStore.m Tue Apr 20 17:52:25 2004
@@ -267,13 +267,18 @@
//--------------------------------------------------------------------
-(void)_sessionTerminating:(GSWSession*)aSession
{
+ int activeSessionsCount;
+ NSArray *statistics;
+ NSDate *sessionBirthDate;
+ NSTimeInterval sessionTimeOut;
+ int sessionRequestCounter;
//OK
LOGObjectFnStart();
- int activeSessionsCount=[GSWApp _activeSessionsCount];
- NSArray* statistics=[aSession statistics];
- NSDate* sessionBirthDate=nil;
- NSTimeInterval sessionTimeOut=0;
- int sessionRequestCounter=0;
+ activeSessionsCount=[GSWApp _activeSessionsCount];
+ statistics=[aSession statistics];
+ sessionBirthDate=nil;
+ sessionTimeOut=0;
+ sessionRequestCounter=0;
[self _updatePathsStatisticsWithPaths:statistics];
sessionBirthDate=[aSession _birthDate];
sessionTimeOut=[aSession timeOut];
diff -urN gsweb.orig/gsweb/GSWeb.framework/GSWTemporaryElement.m
gsweb/GSWeb.framework/GSWTemporaryElement.m
--- gsweb.orig/gsweb/GSWeb.framework/GSWTemporaryElement.m Thu Mar 25
17:25:48 2004
+++ gsweb/GSWeb.framework/GSWTemporaryElement.m Tue Apr 20 17:05:39 2004
@@ -340,10 +340,10 @@
else
{
Class elementClass = NSClassFromString(elementType);
+ NSDictionary* associations=[declaration associations];
NSDebugMLog(@"elementClass=%@",elementClass);
- NSDictionary* associations=[declaration associations];
if ([properties count]>0)
{
NSEnumerator* _propertiesEnum = [properties keyEnumerator];
- [PATCH] GSWeb compilation for old (2.95.X) compiler,
S.J.Chun <=