@@ -67,12 +67,12 @@ return; } unicodeLen = [self length]; - unicodeString = [self allocMemoryWithItemSize: sizeof(of_unichar_t) - count: unicodeLen]; + unicodeString = [self allocMemoryWithSize: sizeof(of_unichar_t) + count: unicodeLen]; i = j = 0; newCStringLength = 0; while (i < s->cStringLength) { @@ -176,12 +176,12 @@ return; } if (length > oldLength) { s->cString = [self resizeMemory: s->cString - toSize: s->cStringLength - - oldLength + length + 1]; + size: s->cStringLength - oldLength + + length + 1]; memmove(s->cString + index + length, s->cString + index + oldLength, s->cStringLength - index - oldLength); memcpy(s->cString + index, buffer, length); @@ -206,11 +206,11 @@ s->cStringLength += length; s->cString[s->cStringLength] = '\0'; @try { s->cString = [self resizeMemory: s->cString - toSize: s->cStringLength + 1]; + size: s->cStringLength + 1]; } @catch (OFOutOfMemoryException *e) { /* We don't really care, as we only made it smaller */ } return; @@ -237,11 +237,11 @@ @throw [OFInvalidEncodingException exceptionWithClass: isa]; } s->hashed = NO; s->cString = [self resizeMemory: s->cString - toSize: s->cStringLength + + size: s->cStringLength + UTF8StringLength + 1]; memcpy(s->cString + s->cStringLength, UTF8String, UTF8StringLength + 1); s->cStringLength += UTF8StringLength; s->length += length; @@ -265,11 +265,11 @@ @throw [OFInvalidEncodingException exceptionWithClass: isa]; } s->hashed = NO; s->cString = [self resizeMemory: s->cString - toSize: s->cStringLength + + size: s->cStringLength + UTF8StringLength + 1]; memcpy(s->cString + s->cStringLength, UTF8String, UTF8StringLength); s->cStringLength += UTF8StringLength; s->length += length; @@ -312,11 +312,11 @@ UTF8StringLength = [string UTF8StringLength]; s->hashed = NO; s->cString = [self resizeMemory: s->cString - toSize: s->cStringLength + + size: s->cStringLength + UTF8StringLength + 1]; memcpy(s->cString + s->cStringLength, [string UTF8String], UTF8StringLength); s->cStringLength += UTF8StringLength; @@ -451,11 +451,11 @@ s->cStringLength); newCStringLength = s->cStringLength + [string UTF8StringLength]; s->hashed = NO; s->cString = [self resizeMemory: s->cString - toSize: newCStringLength + 1]; + size: newCStringLength + 1]; memmove(s->cString + index + [string UTF8StringLength], s->cString + index, s->cStringLength - index); memcpy(s->cString + index, [string UTF8String], [string UTF8StringLength]); @@ -494,11 +494,11 @@ s->cStringLength -= end - start; s->cString[s->cStringLength] = 0; @try { s->cString = [self resizeMemory: s->cString - toSize: s->cStringLength + 1]; + size: s->cStringLength + 1]; } @catch (OFOutOfMemoryException *e) { /* We don't really care, as we only made it smaller */ } } @@ -523,11 +523,11 @@ newCStringLength = s->cStringLength - (end - start) + [replacement UTF8StringLength]; s->hashed = NO; s->cString = [self resizeMemory: s->cString - toSize: newCStringLength + 1]; + size: newCStringLength + 1]; memmove(s->cString + start + [replacement UTF8StringLength], s->cString + end, s->cStringLength - end); memcpy(s->cString + start, [replacement UTF8String], [replacement UTF8StringLength]); @@ -570,11 +570,11 @@ continue; @try { newCString = [self resizeMemory: newCString - toSize: newCStringLength + i - last + + size: newCStringLength + i - last + replacementLength + 1]; } @catch (id e) { [self freeMemory: newCString]; @throw e; } @@ -589,14 +589,13 @@ i += searchLength - 1; last = i + 1; } @try { - newCString = [self - resizeMemory: newCString - toSize: newCStringLength + - s->cStringLength - last + 1]; + newCString = [self resizeMemory: newCString + size: newCStringLength + + s->cStringLength - last + 1]; } @catch (id e) { [self freeMemory: newCString]; @throw e; } memcpy(newCString + newCStringLength, s->cString + last, @@ -628,11 +627,11 @@ memmove(s->cString, s->cString + i, s->cStringLength); s->cString[s->cStringLength] = '\0'; @try { s->cString = [self resizeMemory: s->cString - toSize: s->cStringLength + 1]; + size: s->cStringLength + 1]; } @catch (OFOutOfMemoryException *e) { /* We don't really care, as we only made it smaller */ } } @@ -656,11 +655,11 @@ s->cStringLength -= d; s->length -= d; @try { s->cString = [self resizeMemory: s->cString - toSize: s->cStringLength + 1]; + size: s->cStringLength + 1]; } @catch (OFOutOfMemoryException *e) { /* We don't really care, as we only made it smaller */ } } @@ -696,11 +695,11 @@ memmove(s->cString, s->cString + i, s->cStringLength); s->cString[s->cStringLength] = '\0'; @try { s->cString = [self resizeMemory: s->cString - toSize: s->cStringLength + 1]; + size: s->cStringLength + 1]; } @catch (OFOutOfMemoryException *e) { /* We don't really care, as we only made it smaller */ } }