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/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/