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/erl/COPYING b/lib/erl/COPYING
index 039f21e..0101a7d 100644
--- a/lib/erl/COPYING
+++ b/lib/erl/COPYING
@@ -1,5 +1,5 @@
 Thrift Software License
-Copyright (c) 2006- Facebook, Inc. 
+Copyright (c) 2006- Facebook, Inc.
 
 Permission is hereby granted, free of charge, to any person or organization
 obtaining a copy of the software and accompanying documentation covered by
diff --git a/lib/erl/LICENSE b/lib/erl/LICENSE
index 039f21e..0101a7d 100644
--- a/lib/erl/LICENSE
+++ b/lib/erl/LICENSE
@@ -1,5 +1,5 @@
 Thrift Software License
-Copyright (c) 2006- Facebook, Inc. 
+Copyright (c) 2006- Facebook, Inc.
 
 Permission is hereby granted, free of charge, to any person or organization
 obtaining a copy of the software and accompanying documentation covered by
diff --git a/lib/erl/build/beamver b/lib/erl/build/beamver
index fe448b9..2b5f77b 100644
--- a/lib/erl/build/beamver
+++ b/lib/erl/build/beamver
@@ -11,7 +11,7 @@
 #
 # 5> code:which(acca_inets).
 # "/home/martin/work/otp/releases/<app>/../../acca/ebin/<app>.beam"
-# 
+#
 # 8> beam_lib:version(code:which(<app>)).
 # {ok,{<app>,['$Id: beamver,v 1.1.1.1 2003/06/13 21:43:21 mlogan Exp $ ']}}
 
diff --git a/lib/erl/build/otp.mk b/lib/erl/build/otp.mk
index 4e93ea8..1d16e2c 100644
--- a/lib/erl/build/otp.mk
+++ b/lib/erl/build/otp.mk
@@ -17,10 +17,10 @@
 
 # ERL_TOP is root of Erlang source tree
 # ERL_RUN_TOP is root of Erlang target tree (some Ericsson Makefiles use $ROOT)
-# ERLANG_OTP is target root for Erlang code 
+# ERLANG_OTP is target root for Erlang code
 # - see sasl/systools reference manual page; grep "TEST"
 
-# OS_TYPE is FreeBSD, NetBSD, OpenBSD, Linux, SCO_SV, SunOS. 
+# OS_TYPE is FreeBSD, NetBSD, OpenBSD, Linux, SCO_SV, SunOS.
 OS_TYPE=${shell uname}
 
 # MHOST is the host where this Makefile runs.
@@ -36,11 +36,11 @@
 # Edit to reflect local environment.
 # ifeq (${OS_TYPE},Linux)
 # ERL_RUN_TOP=/usr/local/lib/erlang
-#  Note* ERL_RUN_TOP can be determined by starting an 
+#  Note* ERL_RUN_TOP can be determined by starting an
 #        erlang shell and typing code:root_dir().
 # ERL_TOP=a symbolic link to the actual source top, which changes from version to version
-#  Note* ERL_TOP is the directory where the erlang 
-#        source files reside. Make sure to run ./configure there. 
+#  Note* ERL_TOP is the directory where the erlang
+#        source files reside. Make sure to run ./configure there.
 # TARGET=i686-pc-linux-gnu
 #  Note* Target can be found in $ERL_TOP/erts
 # endif
@@ -72,7 +72,7 @@
     LD=/usr/ccs/bin/ld
     RANLIB=/usr/ccs/bin/ranlib
 
-CFLAGS+=-Wall -pedantic -ansi -O 
+CFLAGS+=-Wall -pedantic -ansi -O
 CORE=*.core
 endif
 
diff --git a/lib/erl/build/otp_subdir.mk b/lib/erl/build/otp_subdir.mk
index 7333969..2a36c65 100644
--- a/lib/erl/build/otp_subdir.mk
+++ b/lib/erl/build/otp_subdir.mk
@@ -25,16 +25,16 @@
 # compliance with the License. You should have received a copy of the
 # Erlang Public License along with this software. If not, it can be
 # retrieved via the world wide web at http://www.erlang.org/.
-# 
+#
 # Software distributed under the License is distributed on an "AS IS"
 # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 # the License for the specific language governing rights and limitations
 # under the License.
-# 
+#
 # The Initial Developer of the Original Code is Ericsson Utvecklings AB.
 # Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
 # AB. All Rights Reserved.''
-# 
+#
 #     $Id: otp_subdir.mk,v 1.5 2004/07/12 15:12:23 jeinhorn Exp $
 #
 #
diff --git a/lib/erl/build/raw_test.mk b/lib/erl/build/raw_test.mk
index dbacf18..bf8535d 100644
--- a/lib/erl/build/raw_test.mk
+++ b/lib/erl/build/raw_test.mk
@@ -1,6 +1,6 @@
 # for testing erlang files directly. The set up for a
-# this type of test would be 
-# files to test reside in lib/<app_name>/src and the test files which are 
+# this type of test would be
+# files to test reside in lib/<app_name>/src and the test files which are
 # just plain erlang code reside in lib/<app_name>/test
 #
 # This color codes emitted while the tests run assume that you are using
@@ -25,5 +25,5 @@
 			echo $${MY_LRED:-$(LRED)}"$$d Test Failed"; \
 		fi; \
 		echo -n $(OFF)$(NO_COLOR); \
-        done  
+	done
 
diff --git a/lib/erl/include/protocol/tBinaryProtocol.hrl b/lib/erl/include/protocol/tBinaryProtocol.hrl
index c976839..dea2e29 100644
--- a/lib/erl/include/protocol/tBinaryProtocol.hrl
+++ b/lib/erl/include/protocol/tBinaryProtocol.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/protocol/tBinaryProtocolFactory.hrl b/lib/erl/include/protocol/tBinaryProtocolFactory.hrl
index 266932c..cf8c92b 100644
--- a/lib/erl/include/protocol/tBinaryProtocolFactory.hrl
+++ b/lib/erl/include/protocol/tBinaryProtocolFactory.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/protocol/tProtocol.hrl b/lib/erl/include/protocol/tProtocol.hrl
index 3e42d67..d393f35 100644
--- a/lib/erl/include/protocol/tProtocol.hrl
+++ b/lib/erl/include/protocol/tProtocol.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/protocol/tProtocolFactory.hrl b/lib/erl/include/protocol/tProtocolFactory.hrl
index 56c7fee..6335dd9 100644
--- a/lib/erl/include/protocol/tProtocolFactory.hrl
+++ b/lib/erl/include/protocol/tProtocolFactory.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/server/tErlServer.hrl b/lib/erl/include/server/tErlServer.hrl
index 0a66993..b60df71 100644
--- a/lib/erl/include/server/tErlServer.hrl
+++ b/lib/erl/include/server/tErlServer.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/server/tServer.hrl b/lib/erl/include/server/tServer.hrl
index 502a137..9488438 100644
--- a/lib/erl/include/server/tServer.hrl
+++ b/lib/erl/include/server/tServer.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/server/tSimpleServer.hrl b/lib/erl/include/server/tSimpleServer.hrl
index f115d0b..e6d257d 100644
--- a/lib/erl/include/server/tSimpleServer.hrl
+++ b/lib/erl/include/server/tSimpleServer.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/tErlProcessor.hrl b/lib/erl/include/tErlProcessor.hrl
index 78b91f1..65e5cd0 100644
--- a/lib/erl/include/tErlProcessor.hrl
+++ b/lib/erl/include/tErlProcessor.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/tProcessor.hrl b/lib/erl/include/tProcessor.hrl
index 3d138cd..1883397 100644
--- a/lib/erl/include/tProcessor.hrl
+++ b/lib/erl/include/tProcessor.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/transport/tBufferedTransport.hrl b/lib/erl/include/transport/tBufferedTransport.hrl
index 05c738e..0aa1a91 100644
--- a/lib/erl/include/transport/tBufferedTransport.hrl
+++ b/lib/erl/include/transport/tBufferedTransport.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/transport/tBufferedTransportFactory.hrl b/lib/erl/include/transport/tBufferedTransportFactory.hrl
index 3a4cdc5..69081b4 100644
--- a/lib/erl/include/transport/tBufferedTransportFactory.hrl
+++ b/lib/erl/include/transport/tBufferedTransportFactory.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/transport/tErlAcceptor.hrl b/lib/erl/include/transport/tErlAcceptor.hrl
index 333feb5..43babb5 100644
--- a/lib/erl/include/transport/tErlAcceptor.hrl
+++ b/lib/erl/include/transport/tErlAcceptor.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/transport/tServerSocket.hrl b/lib/erl/include/transport/tServerSocket.hrl
index a2c25ac..2f85b8a 100644
--- a/lib/erl/include/transport/tServerSocket.hrl
+++ b/lib/erl/include/transport/tServerSocket.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/transport/tServerTransport.hrl b/lib/erl/include/transport/tServerTransport.hrl
index 207bbf6..ccb75e4 100644
--- a/lib/erl/include/transport/tServerTransport.hrl
+++ b/lib/erl/include/transport/tServerTransport.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/transport/tSocket.hrl b/lib/erl/include/transport/tSocket.hrl
index 0317d5a..95d8d87 100644
--- a/lib/erl/include/transport/tSocket.hrl
+++ b/lib/erl/include/transport/tSocket.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/transport/tTransport.hrl b/lib/erl/include/transport/tTransport.hrl
index ca89413..8d74289 100644
--- a/lib/erl/include/transport/tTransport.hrl
+++ b/lib/erl/include/transport/tTransport.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/include/transport/tTransportFactory.hrl b/lib/erl/include/transport/tTransportFactory.hrl
index d488140..05aa820 100644
--- a/lib/erl/include/transport/tTransportFactory.hrl
+++ b/lib/erl/include/transport/tTransportFactory.hrl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
diff --git a/lib/erl/src/Makefile b/lib/erl/src/Makefile
index b42e005..452cfee 100644
--- a/lib/erl/src/Makefile
+++ b/lib/erl/src/Makefile
@@ -52,13 +52,13 @@
 # ----------------------------------------------------
 
 ERL_FLAGS +=
-ERL_COMPILE_FLAGS += -I../include -I../../fslib/include -I../../system_status/include 
+ERL_COMPILE_FLAGS += -I../include -I../../fslib/include -I../../system_status/include
 
 # ----------------------------------------------------
 # Targets
 # ----------------------------------------------------
 
-all debug opt: $(EBIN) $(TARGET_FILES) 
+all debug opt: $(EBIN) $(TARGET_FILES)
 
 #$(EBIN)/rm_logger.beam: $(APP_NAME).hrl
 include ../build/docs.mk
@@ -84,24 +84,24 @@
 		-e 's;%PFX%;$(PFX);' \
 		-e 's;%APP_NAME%;$(APP_NAME);' \
 		-e 's;%MODULES%;%MODULES%$(MODULES_STRING_LIST);' \
-		$< > $<".tmp" 
+		$< > $<".tmp"
 	sed -e 's/%MODULES%\(.*\),/\1/' \
-		$<".tmp" > $@ 
+		$<".tmp" > $@
 	rm $<".tmp"
 
 
 $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
 	sed -e 's;%VSN%;$(VSN);' $< > $@
 
-$(WEB_TARGET): ../markup/* 
-	rm -rf $(WEB_TARGET) 
-	mkdir $(WEB_TARGET) 
+$(WEB_TARGET): ../markup/*
+	rm -rf $(WEB_TARGET)
+	mkdir $(WEB_TARGET)
 	cp -r ../markup/ $(WEB_TARGET)
 	cp -r ../skins/ $(WEB_TARGET)
 
 # ----------------------------------------------------
 # Install Target
-# ---------------------------------------------------- 
+# ----------------------------------------------------
 
 install: all $(WEB_TARGET)
 #	$(INSTALL_DIR) $(INSTALL_DST)/src
diff --git a/lib/erl/src/protocol/tBinaryProtocolFactory.erl b/lib/erl/src/protocol/tBinaryProtocolFactory.erl
index ff7fa56..c525cdb 100644
--- a/lib/erl/src/protocol/tBinaryProtocolFactory.erl
+++ b/lib/erl/src/protocol/tBinaryProtocolFactory.erl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
@@ -24,11 +24,11 @@
 %%%
 
 ?DEFINE_ATTR(super).
-   
+
 %%%
 %%% behavior callbacks
 %%%
- 
+
 %%% super() -> SuperModule = atom()
 %%%             |  none
 
diff --git a/lib/erl/src/protocol/tProtocolFactory.erl b/lib/erl/src/protocol/tProtocolFactory.erl
index d697263..f756a29 100644
--- a/lib/erl/src/protocol/tProtocolFactory.erl
+++ b/lib/erl/src/protocol/tProtocolFactory.erl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
@@ -27,7 +27,7 @@
 %%%
 %%% behavior callbacks
 %%%
- 
+
 %%% super() -> SuperModule = atom()
 %%%             |  none
 
diff --git a/lib/erl/src/server/tServer.erl b/lib/erl/src/server/tServer.erl
index 23aef22..fc03331 100644
--- a/lib/erl/src/server/tServer.erl
+++ b/lib/erl/src/server/tServer.erl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
@@ -29,11 +29,11 @@
 ?DEFINE_ATTR(serverTransport);
 ?DEFINE_ATTR(transportFactory);
 ?DEFINE_ATTR(protocolFactory).
-   
+
 %%%
 %%% behavior callbacks
 %%%
- 
+
 %%% super() -> SuperModule = atom()
 %%%             |  none
 
@@ -58,17 +58,17 @@
 
 	     %% much ado about nothing but
 	     %% subclasses pass nil too
-	     transportFactory = 
+	     transportFactory =
 	     case TransportFactory of
 		 nil -> tTransportFactory:new();
 		 _   -> TransportFactory
 	     end,
-	     
-	     protocolFactory = 
+	
+	     protocolFactory =
 	     case ProtocolFactory of
 		 nil -> tBinaryProtocolFactory:new();
 		 _   -> ProtocolFactory
-	     end     
+	     end
 }.
 
 new(Handler, Processor, ServerTransport) ->
diff --git a/lib/erl/src/server/tSimpleServer.erl b/lib/erl/src/server/tSimpleServer.erl
index 6dcc723..833fe5d 100644
--- a/lib/erl/src/server/tSimpleServer.erl
+++ b/lib/erl/src/server/tSimpleServer.erl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
@@ -27,11 +27,11 @@
 %%%
 
 ?DEFINE_ATTR(super).
-   
+
 %%%
 %%% behavior callbacks
 %%%
- 
+
 %%% super() -> SuperModule = atom()
 %%%             |  none
 
@@ -86,16 +86,16 @@
     ?R0(Trans, effectful_close),
 
     serve_loop(This).
-    
+
 serve_loop_loop(This, Prot) ->
-    Next = 
+    Next =
 	try
 	    Handler   = oop:get(This, handler),
 	    Processor = oop:get(This, processor),
 	    Val = apply(Processor, process, [Handler, Prot, Prot]), %% TODO(cpiro): make processor a gen_server instance
 	    error_logger:info_msg("request processed: rv=~p", [Val]),
 	    loop
-	catch 
+	catch
 	    %% TODO(cpiro) case when is_record(...) to pick out our exception
 	    %% records vs. normal erlang throws
 	    E when is_record(E, tTransportException) ->
@@ -105,7 +105,7 @@
 		error_logger:info_msg("EXCEPTION: ~p", [F]),
 		close
 	end,
-    case Next of 
+    case Next of
 	loop -> serve_loop_loop(This, Prot);
 	close -> ok
     end.
diff --git a/lib/erl/src/tProcessor.erl b/lib/erl/src/tProcessor.erl
index 003748a..b62e5ad 100644
--- a/lib/erl/src/tProcessor.erl
+++ b/lib/erl/src/tProcessor.erl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
@@ -25,7 +25,7 @@
 %%%
 %%% behavior callbacks
 %%%
- 
+
 %%% super() -> SuperModule = atom()
 %%%             |  none
 
diff --git a/lib/erl/src/thrift_app.erl b/lib/erl/src/thrift_app.erl
index dabc7ed..17a14cf 100644
--- a/lib/erl/src/thrift_app.erl
+++ b/lib/erl/src/thrift_app.erl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/
 
@@ -15,7 +15,7 @@
 %%% behavior definition
 %%%
 
-start(_Type, _StartArgs) ->  
+start(_Type, _StartArgs) ->
     io:format("starting thrift~n"),
     thrift_logger:install(),
     {ok, Sup} = thrift_app_sup:start_link(),
diff --git a/lib/erl/src/thrift_app_sup.erl b/lib/erl/src/thrift_app_sup.erl
index 3a44c3f..545ffa8 100644
--- a/lib/erl/src/thrift_app_sup.erl
+++ b/lib/erl/src/thrift_app_sup.erl
@@ -1,6 +1,6 @@
 %%% Copyright (c) 2007- Facebook
 %%% Distributed under the Thrift Software License
-%%% 
+%%%
 %%% See accompanying file LICENSE or visit the Thrift site at:
 %%% http://developers.facebook.com/thrift/