Closed
Bug 260955
Opened 21 years ago
Closed 21 years ago
XUL preprocessor should apply filters to #include @VAR@/somepath
Categories
(SeaMonkey :: Build Config, defect)
SeaMonkey
Build Config
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: benjamin, Assigned: benjamin)
References
Details
(Keywords: fixed-aviary1.0)
Attachments
(1 file, 1 obsolete file)
|
1.13 KB,
patch
|
Details | Diff | Splinter Review |
For localization stuff, I want to apply filters to the path given in #include
directives:
#include @VAR@/path
Patch forthwith.
| Assignee | ||
Comment 1•21 years ago
|
||
| Assignee | ||
Comment 2•21 years ago
|
||
Comment on attachment 159723 [details] [diff] [review]
preprocess #include directive param
Hixie, feel free to steal this review from bryner.
Attachment #159723 -
Flags: review?(bryner)
Comment 3•21 years ago
|
||
Do we really want it to work like that?
| Assignee | ||
Comment 4•21 years ago
|
||
I do. See the dependent bug, I'm doing
#include @AB_CD@/extra-jar.mn
Simply allowing substitution in the #include directive would also suit my needs.
Comment 5•21 years ago
|
||
The problem I see is that it would be very unintuitive. For example,
#include foo bar.inc
...might include foo\ \ bar.inc, or might include foo\ bar.inc, you can't tell
from just looking at the line, you have to know what the arguments sent to the
preprocessor were.
I would rather we do something like this:
#substinclude @FOO@/bar.inc
...or some such. (I don't like the name "#substinclude" though.)
Comment 6•21 years ago
|
||
maybe #include-with-variables or something like that?
| Assignee | ||
Comment 7•21 years ago
|
||
Attachment #159723 -
Attachment is obsolete: true
| Assignee | ||
Comment 8•21 years ago
|
||
Comment on attachment 160230 [details] [diff] [review]
add an #includesubst filter
I couldn't do #include-subst because that's not a legal perl identifier.
Attachment #160230 -
Flags: review?(ian)
Comment 9•21 years ago
|
||
> (my $arg = shift) =~ s/@(\w+)@/$stack->get($1, 1)/gose;;
> my $filename = File::Spec::_0_8::catpath(File::Spec::_0_8::splitpath($arg));
...would be better as:
my($filename) = @_;
# substitute occurances of @var@ with the relevant variable
$filename =~ s/@(\w+)@/$stack->get($1, 1)/gose;
$filename = File::Spec::_0_8::catpath(File::Spec::_0_8::splitpath($filename));
Pity about the growing code duplication. I should go through the preprocessor
and fix some of that (and make the code generally more readable) at some point.
| Assignee | ||
Comment 10•21 years ago
|
||
Fix checked in on trunk and branch, with changes specified by Ian.
Updated•21 years ago
|
Attachment #159723 -
Flags: review?(bryner)
Updated•20 years ago
|
Product: Browser → Seamonkey
| Assignee | ||
Updated•20 years ago
|
Attachment #160230 -
Flags: review?(ian)
You need to log in
before you can comment on or make changes to this bug.
Description
•