From 7ed11a886fc8fcaf3c2b8324294e2f24e02b0f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Wei=C3=9F?= Date: Mon, 15 Nov 2010 12:05:16 +0100 Subject: Call chmod without the "-f" flag "-f" is a non-standard chmod option which at least SGI IRIX and HP UX do not support. As the only effect of the "-f" flag is to suppress warning messages, it can be safely omitted. --- lib/edoc/test/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/edoc') diff --git a/lib/edoc/test/Makefile b/lib/edoc/test/Makefile index 4ce9799f6d..011963e8fa 100644 --- a/lib/edoc/test/Makefile +++ b/lib/edoc/test/Makefile @@ -60,7 +60,7 @@ release_tests_spec: make_emakefile $(INSTALL_DIR) $(RELSYSDIR) $(INSTALL_DATA) $(EMAKEFILE) $(ERL_FILES) $(RELSYSDIR) $(INSTALL_DATA) edoc.spec $(RELSYSDIR) - chmod -f -R u+w $(RELSYSDIR) + chmod -R u+w $(RELSYSDIR) @tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -) release_docs_spec: -- cgit v1.2.3 From 6ac05e50a77cc8ebcf335fd9d6908efc74e3e201 Mon Sep 17 00:00:00 2001 From: Taylor Venable Date: Tue, 1 Feb 2011 18:52:10 -0500 Subject: Fix infinite loop for malformed edoc input When processing an edoc comment with ``` in it, if the comment ends without a matching ''' then an infinite loop occurs in the function edoc_wiki:strip_empty_lines/2. This change fixes that by adding a clause to return from the function upon the end of the comment input. This allows an error to be thrown to indicate the problem, which is the same behaviour as leaving either `` or ` unmatched. --- lib/edoc/src/edoc_wiki.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/edoc') diff --git a/lib/edoc/src/edoc_wiki.erl b/lib/edoc/src/edoc_wiki.erl index e4a3d74734..6f269996c8 100644 --- a/lib/edoc/src/edoc_wiki.erl +++ b/lib/edoc/src/edoc_wiki.erl @@ -295,6 +295,8 @@ push_uri(Us, Ss, As) -> strip_empty_lines(Cs) -> strip_empty_lines(Cs, 0). +strip_empty_lines([], N) -> + {[], N}; % reached the end of input strip_empty_lines(Cs, N) -> {Cs1, Cs2} = edoc_lib:split_at(Cs, $\n), case edoc_lib:is_space(Cs1) of -- cgit v1.2.3