]> err.no Git - sope/commitdiff
fixed gcc 4.0 warnings
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Wed, 27 Jul 2005 12:26:12 +0000 (12:26 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Wed, 27 Jul 2005 12:26:12 +0000 (12:26 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@940 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

14 files changed:
sope-appserver/NGObjWeb/SoObjects/README
sope-gdl1/PostgreSQL/ChangeLog
sope-gdl1/PostgreSQL/NSCalendarDate+PGVal.m
sope-gdl1/PostgreSQL/PostgreSQL72Channel+Model.m
sope-gdl1/PostgreSQL/Version
sope-gdl1/SQLite3/ChangeLog
sope-gdl1/SQLite3/NSCalendarDate+SQLiteVal.m
sope-gdl1/SQLite3/NSData+SQLiteVal.m
sope-gdl1/SQLite3/NSNumber+SQLiteVal.m
sope-gdl1/SQLite3/NSString+SQLiteVal.m
sope-gdl1/SQLite3/SQLiteChannel+Model.m
sope-gdl1/SQLite3/SQLiteChannel.m
sope-gdl1/SQLite3/SQLiteValues.m
sope-gdl1/SQLite3/Version

index d231d3aa2a8f66f71a76f28543a9b1c40a2210dd..7c76755801b9dc301c138bc86a884352d27929f4 100644 (file)
@@ -22,6 +22,19 @@ NOTES
 => both, when found, are added to the traversal path, this has the advantage
    that it leaves the URI of a node intact
 
+FAQ
+===
+
+Q: Why is that in NGObjWeb and not in a separate framework?
+A: The idea is that the WO concept could be represented on top of SoObjects,
+   that is, the request handler, the session object etc could all become
+   SoObjects. The main control would be passed over to SOPE. Eg:
+     /MyApp/wo/1283746571/18233445.1.2.3.4.5
+   Could be
+     MyApp      lookup: wo                 => WORequestHandler
+     wo         lookup: 1283746571         => WOSession
+     1283746571 lookup: 18233445.1.2.3.4.5 => WOContext with element-id
+
 Class Hierarchy
 ===============
 
index 7de6d4cd670f2ca15a7b0e6533cff2e5f5929f69..6e4ff66b8b2a44d8134f060300cb3f1d3aba5f00 100644 (file)
@@ -1,3 +1,11 @@
+2005-07-27  Helge Hess  <helge.hess@skyrix.com>
+
+       * v4.5.42
+
+       * PostgreSQL72Channel+Model.m: fixed an EOJoin related gcc 4.0 warning
+
+       * NSCalendarDate+PGVal.m: fixed gcc 4.0 signed-warnings
+
 2005-04-21  Helge Hess  <helge.hess@opengroupware.org>
 
        * PostgreSQL72Channel.m: changed for -describeResults: API (v4.5.41)
index d7470cce276f0d39a4bf9e956857ef6aecccc292..616a3fe769bc99f948482b853f33e4c9b10a8fae 100644 (file)
@@ -51,8 +51,8 @@ static NSTimeZone *gmt02 = nil;
   attribute:(EOAttribute *)_attribute
   adaptorChannel:(PostgreSQL72Channel *)_channel
 {
-  static unsigned char buf[28]; // reused buffer
-  unsigned char  *p;
+  static char buf[28]; // reused buffer THREAD
+  char           *p;
   NSTimeZone     *attrTZ;
   NSCalendarDate *date;
   int            year, month, day, hour, min, sec, tzOffset = 0;
index 80d974d64a8e1e49ec2b4af1b3c3ae06ea81f55b..b82a2a203f2cc17f41a250f50b2844f0b9fc3e8b 100644 (file)
@@ -204,7 +204,9 @@ static BOOL debugOn = NO;
       da               = [fkey objectForKey:@"targetAttr"];
       dt               = [fkey objectForKey:@"targetTable"];
       rel              = [[[EORelationship alloc] init] autorelease];
-      join             = [[[EOJoin alloc] init] autorelease];
+
+      // TODO: do something about the join (just use rel?)
+      join = [[[NSClassFromString(@"EOJoin") alloc] init] autorelease];
       
       if ([pkeys containsObject:sa])
         relName = [@"to" stringByAppendingString:[dt _pgModelMakeClassName]];
index 05ec198e574f67941130b274f39ec94da4f7ee1f..a3c4ecc6a85f3ce5aad8bcd2082f9bbcd1dc7fae 100644 (file)
@@ -1,5 +1,5 @@
 # version file
 
-SUBMINOR_VERSION:=41
+SUBMINOR_VERSION:=42
 
 # v4.5.41 requires libGDLAccess v4.5.50
index 5291a2ac3381b2c94ac15b9f6225f9891808fc0b..82d728b84b8873359dbad4926278fa3b4f2be4c5 100644 (file)
@@ -1,3 +1,7 @@
+2005-07-27  Helge Hess  <helge.hess@skyrix.com>
+
+       * fixed gcc 4.0 warnings (char signedness) (v4.5.18)
+
 2005-04-21  Helge Hess  <helge.hess@opengroupware.org>
 
        * v4.5.17
index b1b8c1a0f77a9edcf342846a0662aa821a58e8f3..679496a7e54561f0e88b09e8e2f6e23cf0d7c64e 100644 (file)
@@ -53,9 +53,9 @@ static NSTimeZone *gmt01 = nil;
 static NSTimeZone *gmt02 = nil;
 
 - (id)initWithSQLiteData:(const void *)_value length:(int)_length {
-  static unsigned char buf[28]; // reused buffer, THREAD
+  static char buf[28]; // reused buffer, THREAD
   const char *_cstr = _value;
-  unsigned char  *p;
+  char           *p;
   NSTimeZone     *attrTZ;
   NSCalendarDate *date;
   int            year, month, day, hour, min, sec, tzOffset;
@@ -156,7 +156,7 @@ static NSTimeZone *gmt02 = nil;
 }
 
 - (id)initWithSQLiteText:(const unsigned char *)_value {
-  return [self initWithSQLiteData:_value length:strlen(_value)];
+  return [self initWithSQLiteData:_value length:strlen((char *)_value)];
 }
 
 /* generating value */
index c1f871c7cf1fe70d7c36f60a38f75c6adafeccb6..128a6d861c874fca7a0ab6b2c324a28355a0d8b3 100644 (file)
@@ -37,7 +37,7 @@
   return [self initWithBytes:&_value length:sizeof(double)];
 }
 - (id)initWithSQLiteText:(const unsigned char *)_value {
-  return [self initWithBytes:_value length:strlen(_value)];
+  return [self initWithBytes:_value length:strlen((char *)_value)];
 }
 - (id)initWithSQLiteData:(const void *)_value length:(int)_length {
   return [self initWithBytes:_value length:_length];
index 92118b235ebb268c8a510504a7cdbc58d74823be..cad242922bf24a3497d5b93d96c435cb8aba37a7 100644 (file)
@@ -36,9 +36,9 @@
   return [self initWithDouble:_value];
 }
 - (id)initWithSQLiteText:(const unsigned char *)_value {
-  return index(_value, '.') != NULL
-    ? [self initWithDouble:atof(_value)]
-    : [self initWithInt:atoi(_value)];
+  return index((char *)_value, '.') != NULL
+    ? [self initWithDouble:atof((char *)_value)]
+    : [self initWithInt:atoi((char *)_value)];
 }
 
 - (id)initWithSQLiteData:(const void *)_value length:(int)_length {
index f5104c6791aedd80a9d3d1b9f957bee061763b7c..09002057e685e67cb15e2c7290c80f6b924e00d8 100644 (file)
@@ -44,7 +44,7 @@ static Class EOExprClass = Nil;
 }
 
 - (id)initWithSQLiteText:(const unsigned char *)_value {
-  return [self initWithUTF8String:_value];
+  return [self initWithUTF8String:(char *)_value];
 }
 
 - (id)initWithSQLiteData:(const void *)_value length:(int)_length {
@@ -98,7 +98,7 @@ static Class EOExprClass = Nil;
     return [s autorelease];
   }
   case 'i': case 'I': { // int
-    unsigned char buf[128];
+    char buf[128];
     sprintf(buf, "%i", [self intValue]);
     return [NSString stringWithCString:buf];
   }
index 1932633b5bd5819f40ec0349e1e8180d6f9f66ce..22e5095a554bf1419ac6c95a050979a54c923965 100644 (file)
 }
 
 - (EOModel *)describeModelWithTableNames:(NSArray *)_tableNames {
-  NSMutableArray *buildRelShips = [NSMutableArray arrayWithCapacity:64];
-  EOModel *model = AUTORELEASE([EOModel new]);
-  int cnt, tc = [_tableNames count];
-
-  for (cnt = 0; cnt < tc; cnt++) {
-    NSMutableDictionary *relNamesUsed         =
-      [NSMutableDictionary dictionaryWithCapacity:16];
-    NSMutableArray      *classProperties      =
-      [NSMutableArray arrayWithCapacity:16];
-    NSMutableArray      *primaryKeyAttributes =
-      [NSMutableArray arrayWithCapacity:2];
-    NSString *tableName  = [_tableNames objectAtIndex:cnt];
-    NSArray  *attributes = [self _attributesForTableName:tableName];
-    NSArray  *pkeys      = [self _primaryKeysNamesForTableName:tableName];
-    NSArray  *fkeys      = [self _foreignKeysForTableName:tableName];
-    EOEntity *entity     = [[EOEntity new] autorelease];
-    int      cnt2;
-    int      ac  = [attributes count];
-    int      fkc = [fkeys      count];
+  // TODO: is this correct for SQLite?!
+  NSMutableArray *buildRelShips;
+  EOModel *model;
+  int cnt, tc;
+
+  buildRelShips = [NSMutableArray arrayWithCapacity:64];
+  model = [[[EOModel alloc] init] autorelease];
+  
+  for (cnt = 0, tc = [_tableNames count]; cnt < tc; cnt++) {
+    NSMutableDictionary *relNamesUsed;
+    NSMutableArray      *classProperties, *primaryKeyAttributes;
+    NSString *tableName;
+    NSArray  *attributes, *pkeys, *fkeys;
+    EOEntity *entity;
+    int      cnt2, ac, fkc;
+    
+    relNamesUsed         = [NSMutableDictionary dictionaryWithCapacity:16];
+    classProperties      = [NSMutableArray arrayWithCapacity:16];
+    primaryKeyAttributes = [NSMutableArray arrayWithCapacity:2];
+    tableName            = [_tableNames objectAtIndex:cnt];
+    attributes           = [self _attributesForTableName:tableName];
+    pkeys                = [self _primaryKeysNamesForTableName:tableName];
+    fkeys                = [self _foreignKeysForTableName:tableName];
+    entity               = [[[EOEntity alloc] init] autorelease];
+    ac                   = [attributes count];
+    fkc                  = [fkeys      count];
 
     [entity setName:[tableName _sqlite3ModelMakeClassName]];
     [entity setClassName:
-              [@"EO" stringByAppendingString:[tableName _sqlite3ModelMakeClassName]]];
+              [@"EO" stringByAppendingString:
+                  [tableName _sqlite3ModelMakeClassName]]];
     [entity setExternalName:tableName];
     [classProperties addObjectsFromArray:[entity classProperties]];
     [primaryKeyAttributes addObjectsFromArray:[entity primaryKeyAttributes]];
     [entity setPrimaryKeyAttributes:primaryKeyAttributes];
     
     for (cnt2 = 0; cnt2 < fkc; cnt2++) {
-      NSDictionary   *fkey             = [fkeys objectAtIndex:cnt2];
-      NSMutableArray *classProperties  =
-        AUTORELEASE([NSMutableArray new]);
-      NSString       *sa               = [fkey objectForKey:@"sourceAttr"];
-      NSString       *da               = [fkey objectForKey:@"targetAttr"];
-      NSString       *dt               = [fkey objectForKey:@"targetTable"];
-      EORelationship *rel              = 
-        [[[EORelationship alloc] init] autorelease];
-      EOJoin         *join             = 
-        [[[EOJoin alloc] init] autorelease];
-      NSString       *relName          = nil;
+      NSDictionary   *fkey;
+      NSMutableArray *classProperties;
+      NSString       *sa, *da, *dt;
+      EORelationship *rel;
+      EOJoin         *join; // TODO: fix me, EOJoin is deprecated
+      NSString       *relName;
+      
+      fkey             = [fkeys objectAtIndex:cnt2];
+      classProperties  = [NSMutableArray arrayWithCapacity:8];
+      sa               = [fkey objectForKey:@"sourceAttr"];
+      da               = [fkey objectForKey:@"targetAttr"];
+      dt               = [fkey objectForKey:@"targetTable"];
+      rel              = [[[EORelationship alloc] init] autorelease];
+
+      // TODO: fix me
+      join = [[[NSClassFromString(@"EOJoin") alloc] init] autorelease];
 
       if ([pkeys containsObject:sa]) {
         relName = [@"to" stringByAppendingString:
index a44bf264855a321164e7179c0622b56d4df514d9..92b0e9972abd82d6b99b2ec025a42a8e53e35638 100644 (file)
@@ -114,7 +114,7 @@ static int openConnectionCount = 0;
 }
 
 - (BOOL)openChannel {
-  const unsigned char *cDBName;
+  const char *cDBName;
   SQLiteAdaptor *adaptor;
   int rc;
   
index e02bf04cf683499d08a404052509273679259ac6..969c56a71fdf804b9ba4bcbcd973a7e3c83933e5 100644 (file)
   if ([self respondsToSelector:@selector(initWithString:)]) {
     NSString *s;
     
-    s = [[NSString alloc] initWithUTF8String:_value];
+    s = [[NSString alloc] initWithUTF8String:(char *)_value];
     self = [(NSString *)self initWithString:s];
     [s release];
     return self;
index 937ad5bb64bb4b3dafd00cc589ae452b9e467a4c..eaa8b063b0e0c74b4fb9f3e9c6bff2ab90f792a3 100644 (file)
@@ -1,5 +1,5 @@
 # Version file
 
-SUBMINOR_VERSION:=17
+SUBMINOR_VERSION:=18
 
 # v4.5.17 requires libGDLAccess v4.5.50