Gilles Detillieux (grdetil@scrc.umanitoba.ca)
Thu, 21 Jan 1999 13:38:33 -0600 (CST)
* List: htdig3-dev@sob.htdig.org
According to Geoff Hutchison:
> Last week, Gilles noted a difference between the variable expansion
> documentation and the actual code--braces wouldn't be expanded.
>
> Now I may be naive, but wouldn't this fix the problem? This patch makes
> braces equivalent to parentheses.
Seems like it should do the trick! The only thing is it will also allow
improper nesting. E.g. ${VAR) or $(VAR}. No big deal, and a lot easier
than adding two or three extra states to deal with the braces. If you
add this patch, then you should also add one of the two following patches
to my wrapper enhancement, so it allows braces as well.
This one allows improper nesting:
--- ./htsearch/Display.cc.wrapper3 Mon Jan 18 17:01:34 1999
+++ ./htsearch/Display.cc Thu Jan 21 13:17:27 1999
@@ -222,8 +222,10 @@
header = h;
p[-1] = '\0';
}
- else if (p > h+1 && p[-1] == '(' && p[-2] == '$' &&
- p[strlen(wrap_sepr)] == ')')
+ else if (p > h+1 && p[-2] == '$' &&
+ (p[-1] == '(' || p[-1] == '{') &&
+ (p[strlen(wrap_sepr)] == ')' ||
+ p[strlen(wrap_sepr)] == '}'))
{
footer = p + strlen(wrap_sepr) + 1;
header = h;
This one does not allow improper nesting:
--- ./htsearch/Display.cc.wrapper3 Mon Jan 18 17:01:34 1999
+++ ./htsearch/Display.cc Thu Jan 21 13:15:00 1999
@@ -222,8 +222,9 @@
header = h;
p[-1] = '\0';
}
- else if (p > h+1 && p[-1] == '(' && p[-2] == '$' &&
- p[strlen(wrap_sepr)] == ')')
+ else if (p > h+1 && p[-2] == '$' &&
+ (p[-1] == '(' && p[strlen(wrap_sepr)] == ')' ||
+ p[-1] == '{' && p[strlen(wrap_sepr)] == '}'))
{
footer = p + strlen(wrap_sepr) + 1;
header = h;
-- Gilles R. Detillieux E-mail: <grdetil@scrc.umanitoba.ca> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil Dept. Physiology, U. of Manitoba Phone: (204)789-3766 Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930 ------------------------------------ To unsubscribe from the htdig3-dev mailing list, send a message to htdig3-dev@htdig.org containing the single word "unsubscribe" in the SUBJECT of the message.
This archive was generated by hypermail 2.0b3 on Thu Feb 04 1999 - 22:24:20 PST