Skip to content
Browse files

""

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@273 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
1 parent 2596f2c commit 9cd59a315b8aa6423270a28fecb82d04310132f8 @klacke committed Nov 16, 2002
Showing with 9 additions and 7 deletions.
  1. +3 −1 src/yaws_api.erl
  2. +6 −6 src/yaws_compile.erl
View
4 src/yaws_api.erl
@@ -553,7 +553,9 @@ htmlize(<<Char, Tail/binary>>) ->
<<Bin/binary, (htmlize(Tail))/binary>>
end;
htmlize(<<>>) ->
- <<>>.
+ <<>>;
+htmlize(List) when list(List) ->
+ htmlize_l(List).
htmlize_char($>) ->
<<"&gt;">>;
View
12 src/yaws_compile.erl
@@ -43,7 +43,7 @@
comp_opts(GC) ->
?Debug("I=~p~n", [GC#gconf.include_dir]),
I = lists:map(fun(Dir) -> {i, Dir} end, GC#gconf.include_dir),
- Opts = [binary, report_errors | I],
+ Opts = [binary, return_errors | I],
?Debug("Compile opts = ~p~n", [Opts]),
Opts.
@@ -53,15 +53,15 @@ compile_file(File, GC, SC) ->
{ok, Fd} ->
Spec = compile_file(#comp{infile = File,
infd = Fd, gc = GC, sc = SC},
- 1,
+ 1,
io:get_line(Fd, ''), init, 0, [], 0),
Spec;
_Err ->
yaws:elog("can't open ~s~n", [File]),
exit(normal)
end.
-compile_file(C, _LineNo, eof, _Mode, NumChars, Ack, Errors) ->
+compile_file(C, _LineNo, eof, _Mode, NumChars, Ack, Errors) ->
file:close(C#comp.infd),
{ok, [{errors, Errors} |lists:reverse([{data, NumChars} |Ack])]};
@@ -79,7 +79,7 @@ compile_file(C, LineNo, Chars, init, NumChars, Ack, Errs) ->
%% first chunk is html, keep whitespace
Fd=C#comp.infd,
file:position(Fd, bof),
- compile_file(C,1,io:get_line(Fd,''),html,0,[], Errs)
+ compile_file(C,noline,io:get_line(Fd,''),html,0,[], Errs)
end;
compile_file(C, LineNo, Chars = "<erl>" ++ _Tail, html, NumChars, Ack,Es) ->
@@ -122,8 +122,8 @@ compile_file(C, LineNo, Chars = "</erl>" ++ _Tail, erl, NumChars, Ack, Es) ->
%% this is boring but does actually happen
%% in order to get proper user errors here we need to catch i/o
%% or hack compiler/parser
- yaws:elog("Dynamic compile error in file ~s, line~w",
- [C#comp.infile, LineNo]),
+ yaws:elog("Dynamic compile error in file ~s, line ~w~n~s",
+ [C#comp.infile, LineNo, Str]),
A2 = {error, NumChars2, ?F("<pre> Dynamic compile error in file "
" ~s line ~w~n~s </pre>",
[C#comp.infile, LineNo, Str])},

0 comments on commit 9cd59a3

Please sign in to comment.
Something went wrong with that request. Please try again.