Fixed #line
directives in miniprelude.c
This commit is contained in:
parent
352096ef60
commit
95aed94d2a
@ -30,8 +30,8 @@ class Prelude
|
|||||||
"<internal:" + prelude_base(filename) + ">"
|
"<internal:" + prelude_base(filename) + ">"
|
||||||
end
|
end
|
||||||
|
|
||||||
def initialize(init_name, preludes, vpath)
|
def initialize(output, preludes, vpath)
|
||||||
@init_name = init_name
|
@output = output
|
||||||
@have_sublib = false
|
@have_sublib = false
|
||||||
@vpath = vpath
|
@vpath = vpath
|
||||||
@preludes = {}
|
@preludes = {}
|
||||||
@ -114,7 +114,7 @@ static const struct {
|
|||||||
% size += line.size
|
% size += line.size
|
||||||
"<%=c_esc(line)%>"<%if comment%>/* <%=c_esc(comment)%> */<%end%>
|
"<%=c_esc(line)%>"<%if comment%>/* <%=c_esc(comment)%> */<%end%>
|
||||||
% }
|
% }
|
||||||
#line <%=_erbout.count("\n")+2%> "<%=@init_name%>.c"
|
#line <%=_erbout.count("\n")+2%> "<%=@output%>"
|
||||||
};
|
};
|
||||||
% }
|
% }
|
||||||
|
|
||||||
@ -201,8 +201,9 @@ prelude_require(VALUE self, VALUE nth)
|
|||||||
|
|
||||||
% end
|
% end
|
||||||
%end
|
%end
|
||||||
|
% init_name = @output && @output[/\w+(?=_prelude.c\b)/] || 'prelude'
|
||||||
void
|
void
|
||||||
Init_<%=@init_name%><%=%>(void)
|
Init_<%=init_name%><%=%>(void)
|
||||||
{
|
{
|
||||||
%unless @preludes.empty?
|
%unless @preludes.empty?
|
||||||
% if @have_sublib
|
% if @have_sublib
|
||||||
|
Loading…
x
Reference in New Issue
Block a user