[65319] users/toby/objcports
toby at macports.org
toby at macports.org
Wed Mar 24 23:47:26 PDT 2010
Revision: 65319
http://trac.macports.org/changeset/65319
Author: toby at macports.org
Date: 2010-03-24 23:47:26 -0700 (Wed, 24 Mar 2010)
Log Message:
-----------
whitespace
Modified Paths:
--------------
users/toby/objcports/MPIndex.m
users/toby/objcports/Tcl_NSDataChannel.m
Modified: users/toby/objcports/MPIndex.m
===================================================================
--- users/toby/objcports/MPIndex.m 2010-03-25 06:42:24 UTC (rev 65318)
+++ users/toby/objcports/MPIndex.m 2010-03-25 06:47:26 UTC (rev 65319)
@@ -11,15 +11,15 @@
NSMutableDictionary *result;
Tcl_Interp *interp;
Tcl_Channel chan;
-
+
result = [[NSMutableDictionary alloc] initWithCapacity:0];
-
+
interp = Tcl_CreateInterp();
- assert(Tcl_SetSystemEncoding(interp, "utf-8") == TCL_OK);
-
+ Tcl_SetSystemEncoding(interp, "utf-8");
+
chan = Tcl_CreateNSDataChannel(data);
Tcl_RegisterChannel(interp, chan);
-
+
for (;;) {
int objc;
Tcl_Obj **objv;
@@ -27,10 +27,10 @@
int len;
NSString *key;
NSDictionary *value;
-
+
line = Tcl_NewObj();
Tcl_IncrRefCount(line);
-
+
/* Read info line. */
if (Tcl_GetsObj(chan, line) < 0) {
Tcl_DecrRefCount(line);
@@ -40,24 +40,24 @@
assert(objc == 2);
key = [[NSString alloc] initWithTclObject:objv[0]];
Tcl_GetIntFromObj(interp, objv[1], &len);
-
+
/* Read dictionary. */
Tcl_ReadChars(chan, line, len, 0);
Tcl_ListObjGetElements(interp, line, &objc, &objv);
value = [[NSDictionary alloc] initWithTclObjects:objv count:objc];
assert(value);
-
+
/* Store data. */
[result setObject:value forKey:key];
[key release];
[value release];
-
+
Tcl_DecrRefCount(line);
}
-
+
Tcl_UnregisterChannel(interp, chan);
Tcl_DeleteInterp(interp);
-
+
return result;
}
@@ -71,7 +71,7 @@
self = [super init];
_source = [source retain];
-
+
data = [[NSData alloc] initWithContentsOfURL:[_source URLByAppendingPathComponent:@"PortIndex"] options:(NSDataReadingMapped | NSDataReadingUncached) error:&error];
if (data) {
_index = MPCopyPortIndex(data);
Modified: users/toby/objcports/Tcl_NSDataChannel.m
===================================================================
--- users/toby/objcports/Tcl_NSDataChannel.m 2010-03-25 06:42:24 UTC (rev 65318)
+++ users/toby/objcports/Tcl_NSDataChannel.m 2010-03-25 06:47:26 UTC (rev 65319)
@@ -73,7 +73,7 @@
ctx = malloc(sizeof(*ctx));
ctx->data = [data retain];
ctx->offset = 0;
-
+
asprintf(&channel_name, "%p", data);
channel = Tcl_CreateChannel(&NSDataChannelType, channel_name, ctx, TCL_READABLE);
free(channel_name);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100324/49d145f1/attachment.html>
More information about the macports-changes
mailing list