mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-27 20:25:12 +00:00
Update regexps in mimedb to work on NetBSD. (NetBSD does not support having empty subexpressions. This bug was reported and diagnosed by Claes Nästén.
darcs-hash:20070524063728-ac50b-9377f6d2ba709e997c00d716e766a912cc1ee23e.gz
This commit is contained in:
parent
1c6236831c
commit
c40eb8a716
1 changed files with 7 additions and 2 deletions
9
mimedb.c
9
mimedb.c
|
@ -66,7 +66,7 @@ license. Read the source code of the library for more information.
|
||||||
/**
|
/**
|
||||||
Start tag for langauge-specific comment
|
Start tag for langauge-specific comment
|
||||||
*/
|
*/
|
||||||
#define START_TAG "<comment *(| +xml:lang *= *(\"%s\"|'%s') *)>"
|
#define START_TAG "<comment( +xml:lang *= *(\"%s\"|'%s'))? *>"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
End tab for comment
|
End tab for comment
|
||||||
|
@ -434,11 +434,13 @@ static char *get_lang_re()
|
||||||
case '.':
|
case '.':
|
||||||
case '_':
|
case '_':
|
||||||
if( close )
|
if( close )
|
||||||
|
{
|
||||||
*out++ = ')';
|
*out++ = ')';
|
||||||
|
*out++ = '?';
|
||||||
|
}
|
||||||
|
|
||||||
close=1;
|
close=1;
|
||||||
*out++ = '(';
|
*out++ = '(';
|
||||||
*out++ = '|';
|
|
||||||
*out++ = *lang;
|
*out++ = *lang;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -448,7 +450,10 @@ static char *get_lang_re()
|
||||||
}
|
}
|
||||||
|
|
||||||
if( close )
|
if( close )
|
||||||
|
{
|
||||||
*out++ = ')';
|
*out++ = ')';
|
||||||
|
*out++ = '?';
|
||||||
|
}
|
||||||
*out++=0;
|
*out++=0;
|
||||||
|
|
||||||
return buff;
|
return buff;
|
||||||
|
|
Loading…
Reference in a new issue