Commit e76fe1d8 authored by gerd's avatar gerd

continnued


git-svn-id: https://gps.dynxs.de/private/svn/app-plasma/[email protected] 55289a75-7b90-4627-9e07-ffb4263930b2
parent 53f5c0ed
...@@ -12,6 +12,7 @@ LOAD = \ ...@@ -12,6 +12,7 @@ LOAD = \
DOCS = plasmafs_start.txt \ DOCS = plasmafs_start.txt \
plasmafs_deployment.txt \ plasmafs_deployment.txt \
plasmafs_protocol.txt \
commands/cmd_plasma.txt \ commands/cmd_plasma.txt \
commands/cmd_plasmad.txt \ commands/cmd_plasmad.txt \
commands/cmd_plasma_datanode_init.txt \ commands/cmd_plasma_datanode_init.txt \
......
...@@ -7,13 +7,12 @@ open Printf ...@@ -7,13 +7,12 @@ open Printf
let start_re = Str.regexp "^[ \t]*/\\*\\*" let start_re = Str.regexp "^[ \t]*/\\*\\*"
let end_re = Str.regexp "\\*/" let end_re = Str.regexp "\\*/"
let special_re = Str.regexp "[]{}@[]" let special_re = Str.regexp "[]{}@[]"
let non_ws_re = Str.regexp "[^ \t\r\n]"
let only_ws s =
try ignore(Str.search_forward non_ws_re s 0); false
with Not_found -> true
let rec non_space s k =
if k < String.length s then
let c = s.[k] in
if c = ' ' then non_space s (k+1) else Some k
else
None
let convert f_in f_out = let convert f_in f_out =
let mode = ref `Code in let mode = ref `Code in
...@@ -29,10 +28,8 @@ let convert f_in f_out = ...@@ -29,10 +28,8 @@ let convert f_in f_out =
let flush_code() = let flush_code() =
let s = Buffer.contents code_buf in let s = Buffer.contents code_buf in
Buffer.clear code_buf; Buffer.clear code_buf;
match non_space s 0 with if not(only_ws s) then
| None -> () fprintf f_out "\n{v %s v}\n" s in
| Some nonspc ->
fprintf f_out "{v %s v}" s in
let output_comment s = let output_comment s =
flush_code(); flush_code();
output_string f_out s in output_string f_out s in
...@@ -67,9 +64,11 @@ let convert f_in f_out = ...@@ -67,9 +64,11 @@ let convert f_in f_out =
output_comment (String.sub line (pos+3) (len - pos - 3)) output_comment (String.sub line (pos+3) (len - pos - 3))
| None, (Some pos) -> | None, (Some pos) ->
output_comment (String.sub line 0 pos); output_comment (String.sub line 0 pos);
output_string f_out "\n";
output_code (String.sub line (pos+2) (len - pos - 2)) output_code (String.sub line (pos+2) (len - pos - 2))
| (Some spos), (Some epos) -> | (Some spos), (Some epos) ->
output_comment (String.sub line (spos+3) (epos - spos - 3)); output_comment (String.sub line (spos+3) (epos - spos - 3));
output_string f_out "\n";
output_code (String.sub line (epos+2) (len - epos - 2)) output_code (String.sub line (epos+2) (len - epos - 2))
); );
......
...@@ -10,6 +10,7 @@ in user space, and can be accessed via RPC calls, or via NFS. ...@@ -10,6 +10,7 @@ in user space, and can be accessed via RPC calls, or via NFS.
- {!Plasmafs_start}: Feature set, theory of operation - {!Plasmafs_start}: Feature set, theory of operation
- {!Plasmafs_deployment}: Deploying PlasmaFS - {!Plasmafs_deployment}: Deploying PlasmaFS
- {!Plasmafs_protocol}: The PlasmaFS protocol
{2 PlasmaFS Commands} {2 PlasmaFS Commands}
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment