Closed
Bug 5862
Opened 25 years ago
Closed 25 years ago
%{C++ block that begins an XPIDL file does not get to .h
Categories
(Core :: XPCOM, defect, P3)
Tracking
()
VERIFIED
FIXED
M7
People
(Reporter: hjtoi-bugzilla, Assigned: mike+mozilla)
Details
If you would like to have a comment begin a generated .h file, the XPIDL
compiler ignores starting %{C++ block. For example, if your .idl file starts:
%{C++
/*
* I want this comment in the .h file!
*
%}
. . .
That block does not appear in .h file.
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M6
Assignee | ||
Comment 1•25 years ago
|
||
Thanks for catching this!
One of those subtle bugs I thought noone would notice... Patrick Beard pointed
out a problem with our %{C++ code a few days ago (only handles \n, which isn't
xp) - I'll try to fix this at the same time.
Mike
Comment 2•25 years ago
|
||
If you're going to fix fiddle with this then you might look into why blank lines
get stripped
Assignee | ||
Comment 3•25 years ago
|
||
Yep, line handling is messed up in multiple ways, and I'm planning to look at
all of them.
Assignee | ||
Comment 4•25 years ago
|
||
John Fairhurst notes that this is also broken in another way on OS/2:
> I (thought I) got the xpidl compiler working fine on OS/2 about a month
> ago. A problem showed up the other day when it was used 'in anger' for
> the first time.
>
> The symptom was that lines between %{C++ and %} were not being emitted in
> 'header' mode. I traced this to a line in xpidl_header.h which read:
>
> if (strcmp(IDL_CODEFRAG(state->tree).desc, "C++"))
>
> Turned out that whenever this should have been true, the string at 'desc'
> was actually "C++\r". So I guess this comes from OS/2 using \r\n to
> separate lines, and the lexer rule in libIDL:
>
> <XPIDL>^%\{.*
>
> ...swallowing up characters up to and including the \r in the line.
>
> So, does anyone have any idea what bit of code I should change to fix
> this? Clearly hacking xpidl_header.c is a quick solution (and what I've
> done for now), but doesn't seem right -- who should be ignoring the '\r's?
> Doesn't windows use \r\n? Thanks for any pointers.
Assignee | ||
Comment 5•25 years ago
|
||
Adding John Fairhurst to the cc: list.
Assignee | ||
Updated•25 years ago
|
Target Milestone: M6 → M7
Assignee | ||
Comment 6•25 years ago
|
||
Postponing from m6, because:
- There's an easy workaround (put a newline before the %{C++ block)
- Shaver has promised me a rewrite of xpidl_idl.c, which is currently a tangle
of gotos and state.
Hm. John Fairhurst's complaint looks like it could be a problem with libIDL,
though that would be strage given that libIDL seems to work OK on windows, where
lines also end with \r\n. CCing Andrew Veliath as well.
Solved my problem -- a strange compiler option was making fopen()
always use binary mode. Purely a platform thing; xpidl not at fault...
Comment 8•25 years ago
|
||
Adding mang@subcarrier.org to cc list
Assignee | ||
Comment 9•25 years ago
|
||
Mike 3, what's the status of the xpidl_idl.c update? This should get folded in
with that. By m7?
Mike 1
Comment 10•25 years ago
|
||
Right now fixing line numbers gets priority since it's more annoying. m7 may
get pushed back by a week, in which case this will be fixed in time.
Is John Fairhurst's problem solved? (mjf35@cam.ac.uk == John Fairhurst?)
Assignee | ||
Comment 11•25 years ago
|
||
Sounds like the right priorities.
John Fairhurst's problem is solved, I think. He's mjf35@.
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 12•25 years ago
|
||
Should be fixed by my xpidl_idl.c landing, and my simple tests show that it is.
If not, assign it to me when you re-open.
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 13•25 years ago
|
||
Marking verified.
You need to log in
before you can comment on or make changes to this bug.
Description
•