int pos;
int start, end;
- char ench;
+ char ench, eench;
char urlbuf[SIZ];
char outbuf[1024];
start = (-1);
end = strlen(buf);
ench = 0;
+ eench = 0;
for (pos = 0; pos < strlen(buf); ++pos) {
if (!strncasecmp(&buf[pos], "http://", 7))
if ((start > 0) && (buf[start - 1] == '<'))
ench = '>';
- if ((start > 0) && (buf[start - 1] == '['))
- ench = ']';
if ((start > 0) && (buf[start - 1] == '('))
ench = ')';
if ((start > 0) && (buf[start - 1] == '{'))
ench = '}';
+ if ((start > 0) && (buf[start - 1] == '[')) {
+ ench = ']';
+ eench = '|';
+ }
for (pos = strlen(buf); pos > start; --pos) {
- if ((buf[pos] == ' ') || (buf[pos] == ench))
+ if ((buf[pos] == ' ') ||
+ (buf[pos] == ench) ||
+ (buf[pos] == eench))
end = pos;
}