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/tutorial/cpp/CppClient.cpp b/tutorial/cpp/CppClient.cpp
index b971160..a21125b 100644
--- a/tutorial/cpp/CppClient.cpp
+++ b/tutorial/cpp/CppClient.cpp
@@ -26,10 +26,10 @@
 
   try {
     transport->open();
-    
+
     client.ping();
     printf("ping()\n");
-    
+
     int32_t sum = client.add(1,1);
     printf("1+1=%d\n", sum);
 
@@ -50,7 +50,7 @@
     work.num2 = 10;
     int32_t diff = client.calculate(1, work);
     printf("15-10=%d\n", diff);
-    
+
     // Note that C++ uses return by reference for complex types to avoid
     // costly copy construction
     SharedStruct ss;
diff --git a/tutorial/java/src/JavaClient.java b/tutorial/java/src/JavaClient.java
index 6667d6f..753f0c6 100644
--- a/tutorial/java/src/JavaClient.java
+++ b/tutorial/java/src/JavaClient.java
@@ -17,8 +17,8 @@
 public class JavaClient {
   public static void main(String [] args) {
     try {
-   
-      TTransport transport = new TSocket("localhost", 9090); 
+
+      TTransport transport = new TSocket("localhost", 9090);
       TProtocol protocol = new TBinaryProtocol(transport);
       Calculator.Client client = new Calculator.Client(protocol);
 
@@ -51,12 +51,12 @@
       } catch (InvalidOperation io) {
         System.out.println("Invalid operation: " + io.why);
       }
-      
+
       SharedStruct log = client.getStruct(1);
       System.out.println("Check log: " + log.value);
 
       transport.close();
-                  
+
     } catch (TException x) {
       x.printStackTrace();
     }
diff --git a/tutorial/php/PhpClient.php b/tutorial/php/PhpClient.php
index fdd12ac..dc36f6d 100755
--- a/tutorial/php/PhpClient.php
+++ b/tutorial/php/PhpClient.php
@@ -29,17 +29,17 @@
   $transport = new TBufferedTransport($socket, 1024, 1024);
   $protocol = new TBinaryProtocol($transport);
   $client = new CalculatorClient($protocol);
-  
+
   $transport->open();
-  
+
   $client->ping();
   print "ping()\n";
- 
+
   $sum = $client->add(1,1);
   print "1+1=$sum\n";
-  
+
   $work = new tutorial_Work();
-  
+
   $work->op = tutorial_Operation::DIVIDE;
   $work->num1 = 1;
   $work->num2 = 0;
@@ -50,18 +50,18 @@
   } catch (tutorial_InvalidOperation $io) {
     print "InvalidOperation: $io->why\n";
   }
-  
+
   $work->op = tutorial_Operation::SUBTRACT;
   $work->num1 = 15;
   $work->num2 = 10;
   $diff = $client->calculate(1, $work);
   print "15-10=$diff\n";
-  
+
   $log = $client->getStruct(1);
   print "Log: $log->value\n";
-  
+
   $transport->close();
-  
+
 } catch (TException $tx) {
   print 'TException: '.$tx->getMessage()."\n";
 }
diff --git a/tutorial/py/PythonClient.py b/tutorial/py/PythonClient.py
index 9dcecd9..05f1719 100755
--- a/tutorial/py/PythonClient.py
+++ b/tutorial/py/PythonClient.py
@@ -35,7 +35,7 @@
   print '1+1=%d' % (sum)
 
   work = Work()
-  
+
   work.op = Operation.DIVIDE
   work.num1 = 1
   work.num2 = 0
@@ -45,11 +45,11 @@
     print 'Whoa? You know how to divide by zero?'
   except InvalidOperation, io:
     print 'InvalidOperation: %s' % (io.__str__())
-    
+
   work.op = Operation.SUBTRACT
   work.num1 = 15
   work.num2 = 10
-    
+
   diff = client.calculate(1, work)
   print '15-10=%d' % (diff)
 
diff --git a/tutorial/py/PythonServer.py b/tutorial/py/PythonServer.py
index 3324bbd..111c44e 100755
--- a/tutorial/py/PythonServer.py
+++ b/tutorial/py/PythonServer.py
@@ -16,7 +16,7 @@
 class CalculatorHandler:
   def __init__(self):
     self.log = {}
-    
+
   def ping(self):
     print 'ping()'
 
@@ -26,7 +26,7 @@
 
   def calculate(self, logid, work):
     print 'calculate(%d, %s)' % (logid, work.__str__())
-    
+
     if work.op == Operation.ADD:
       val = work.num1 + work.num2
     elif work.op == Operation.SUBTRACT:
@@ -59,7 +59,7 @@
 
   def zip(self):
     print 'zip()'
-    
+
 handler = CalculatorHandler()
 processor = Calculator.Processor(handler)
 transport = TSocket.TServerSocket(9090)
diff --git a/tutorial/rb/RubyClient.rb b/tutorial/rb/RubyClient.rb
index 9ee6e79..d40ff49 100755
--- a/tutorial/rb/RubyClient.rb
+++ b/tutorial/rb/RubyClient.rb
@@ -9,7 +9,7 @@
 
 begin
   port = ARGV[0] || 9090
-  
+
   transport = TBufferedTransport.new(TSocket.new('localhost', port))
   protocol = TBinaryProtocol.new(transport)
   client = Calculator::Client.new(protocol)
diff --git a/tutorial/tutorial.thrift b/tutorial/tutorial.thrift
index f5e5836..323c96a 100755
--- a/tutorial/tutorial.thrift
+++ b/tutorial/tutorial.thrift
@@ -98,7 +98,7 @@
  * and can optionally inherit from another service using the extends keyword.
  */
 service Calculator extends shared.SharedService {
-  
+
   /**
    * A method definition looks like C code. It has a return type, arguments,
    * and optionally a list of exceptions that it may throw. Note that argument