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/ocaml/src/TSocket.ml b/lib/ocaml/src/TSocket.ml
index 20c8613..2d82437 100644
--- a/lib/ocaml/src/TSocket.ml
+++ b/lib/ocaml/src/TSocket.ml
@@ -7,34 +7,34 @@
inherit T.t
val mutable chans = None
method isOpen = chans != None
- method opn =
+ method opn =
try
let addr = (let {Unix.h_addr_list=x} = Unix.gethostbyname host in x.(0)) in
chans <- Some(Unix.open_connection (Unix.ADDR_INET (addr,port)))
- with
+ with
Unix.Unix_error (e,fn,_) -> raise (T.E (T.NOT_OPEN, ("TSocket: Could not connect to "^host^":"^(string_of_int port)^" because: "^fn^":"^(Unix.error_message e))))
| _ -> raise (T.E (T.NOT_OPEN, ("TSocket: Could not connect to "^host^":"^(string_of_int port))))
- method close =
- match chans with
- None -> ()
- | Some(inc,out) -> (Unix.shutdown_connection inc;
- close_in inc;
+ method close =
+ match chans with
+ None -> ()
+ | Some(inc,out) -> (Unix.shutdown_connection inc;
+ close_in inc;
chans <- None)
method read buf off len = match chans with
None -> raise (T.E (T.NOT_OPEN, "TSocket: Socket not open"))
- | Some(i,o) ->
- try
+ | Some(i,o) ->
+ try
really_input i buf off len; len
with
Unix.Unix_error (e,fn,_) -> raise (T.E (T.UNKNOWN, ("TSocket: Could not read "^(string_of_int len)^" from "^host^":"^(string_of_int port)^" because: "^fn^":"^(Unix.error_message e))))
| _ -> raise (T.E (T.UNKNOWN, ("TSocket: Could not read "^(string_of_int len)^" from "^host^":"^(string_of_int port))))
- method write buf off len = match chans with
+ method write buf off len = match chans with
None -> raise (T.E (T.NOT_OPEN, "TSocket: Socket not open"))
| Some(i,o) -> output o buf off len
method flush = match chans with
None -> raise (T.E (T.NOT_OPEN, "TSocket: Socket not open"))
| Some(i,o) -> flush o
end
-
-
+
+