Thrift: Whitespace cleanup.
Summary:
- Expanded tabs to spaces where spaces were the norm.
- Deleted almost all trailing whitespace.
- Added newlines to the ends of a few files.
- Ran dos2unix on one file or two.
Reviewed By: mcslee
Test Plan: git diff -b
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665467 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cocoa/src/transport/THTTPClient.h b/lib/cocoa/src/transport/THTTPClient.h
index d9ea1a9..0aabb46 100644
--- a/lib/cocoa/src/transport/THTTPClient.h
+++ b/lib/cocoa/src/transport/THTTPClient.h
@@ -13,7 +13,7 @@
- (id) initWithURL: (NSURL *) aURL;
-- (id) initWithURL: (NSURL *) aURL
+- (id) initWithURL: (NSURL *) aURL
userAgent: (NSString *) userAgent
timeout: (int) timeout;
diff --git a/lib/cocoa/src/transport/THTTPClient.m b/lib/cocoa/src/transport/THTTPClient.m
index f5186e2..4bad09c 100644
--- a/lib/cocoa/src/transport/THTTPClient.m
+++ b/lib/cocoa/src/transport/THTTPClient.m
@@ -9,7 +9,7 @@
if (mRequest != nil) {
[mRequest release];
}
-
+
// set up our request object that we'll use for each request
mRequest = [[NSMutableURLRequest alloc] initWithURL: mURL];
[mRequest setHTTPMethod: @"POST"];
@@ -37,7 +37,7 @@
}
-- (id) initWithURL: (NSURL *) aURL
+- (id) initWithURL: (NSURL *) aURL
userAgent: (NSString *) userAgent
timeout: (int) timeout
{
@@ -45,7 +45,7 @@
if (!self) {
return nil;
}
-
+
mTimeout = timeout;
if (userAgent) {
mUserAgent = [userAgent retain];
@@ -56,7 +56,7 @@
// create our request data buffer
mRequestData = [[NSMutableData alloc] initWithCapacity: 1024];
-
+
return self;
}
@@ -66,7 +66,7 @@
[aURL retain];
[mURL release];
mURL = aURL;
-
+
[self setupRequest];
}
@@ -108,7 +108,7 @@
// make the HTTP request
NSURLResponse * response;
NSError * error;
- NSData * responseData =
+ NSData * responseData =
[NSURLConnection sendSynchronousRequest: mRequest returningResponse: &response error: &error];
[mRequestData setLength: 0];
@@ -126,10 +126,10 @@
NSHTTPURLResponse * httpResponse = (NSHTTPURLResponse *) response;
if ([httpResponse statusCode] != 200) {
@throw [TTransportException exceptionWithName: @"TTransportException"
- reason: [NSString stringWithFormat: @"Bad response from HTTP server: %d",
+ reason: [NSString stringWithFormat: @"Bad response from HTTP server: %d",
[httpResponse statusCode]]];
}
-
+
// phew!
[mResponseData release];
mResponseData = [responseData retain];
diff --git a/lib/cocoa/src/transport/TNSFileHandleTransport.m b/lib/cocoa/src/transport/TNSFileHandleTransport.m
index 79a9e8d..c97b6c9 100644
--- a/lib/cocoa/src/transport/TNSFileHandleTransport.m
+++ b/lib/cocoa/src/transport/TNSFileHandleTransport.m
@@ -16,10 +16,10 @@
outputFileHandle: (NSFileHandle *) outputFileHandle
{
self = [super init];
-
+
mInputFileHandle = [inputFileHandle retain];
mOutputFileHandle = [outputFileHandle retain];
-
+
return self;
}
@@ -49,16 +49,16 @@
- (void) write: (uint8_t *) data offset: (unsigned int) offset length: (unsigned int) length
{
- NSData * dataObject = [[NSData alloc] initWithBytesNoCopy: data+offset
+ NSData * dataObject = [[NSData alloc] initWithBytesNoCopy: data+offset
length: length
freeWhenDone: NO];
-
+
[mOutputFileHandle writeData: dataObject];
-
+
[dataObject release];
}
-
+
- (void) flush
{
diff --git a/lib/cocoa/src/transport/TNSStreamTransport.m b/lib/cocoa/src/transport/TNSStreamTransport.m
index 42a197e..92da5b3 100644
--- a/lib/cocoa/src/transport/TNSStreamTransport.m
+++ b/lib/cocoa/src/transport/TNSStreamTransport.m
@@ -51,7 +51,7 @@
} else if (result != length) {
@throw [TTransportException exceptionWithReason: @"Output stream did not write all of our data."];
}
-}
+}
- (void) flush
{
diff --git a/lib/cocoa/src/transport/TSocketClient.m b/lib/cocoa/src/transport/TSocketClient.m
index e8ae6e9..e3da164 100644
--- a/lib/cocoa/src/transport/TSocketClient.m
+++ b/lib/cocoa/src/transport/TSocketClient.m
@@ -8,16 +8,16 @@
{
NSInputStream * input = nil;
NSOutputStream * output = nil;
-
+
[NSStream getStreamsToHost: [NSHost hostWithName: hostname]
port: port
- inputStream: &input
+ inputStream: &input
outputStream: &output];
self = [super initWithInputStream: input outputStream: output];
[input open];
[output open];
-
+
return self;
}