Use strncmp() instead of strnstr() since the latter does not exist in
FreeBSD 4.x before 4.5. Prompted by: Edward Glowacki <glowack2@msu.edu>
This commit is contained in:
parent
04dd382a5e
commit
b983020a10
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=58465
2 changed files with 10 additions and 10 deletions
|
@ -5,11 +5,11 @@
|
|||
{
|
||||
/* try to expand as files */
|
||||
- if (realpath (args[i], buffer) != NULL)
|
||||
+ if (!strnstr(args[i], "ghelp:", strlen("ghelp:")) &&
|
||||
+ !strnstr(args[i], "toc:", strlen("toc:")) &&
|
||||
+ !strnstr(args[i], "info:", strlen("info:")) &&
|
||||
+ !strnstr(args[i], "main:", strlen("man:")) &&
|
||||
+ !strnstr(args[i], "gnome-help:", strlen("gnome-help")) &&
|
||||
+ if (strncmp(args[i], "ghelp:", strlen("ghelp:")) &&
|
||||
+ strncmp(args[i], "toc:", strlen("toc:")) &&
|
||||
+ strncmp(args[i], "info:", strlen("info:")) &&
|
||||
+ strncmp(args[i], "main:", strlen("man:")) &&
|
||||
+ strncmp(args[i], "gnome-help:", strlen("gnome-help")) &&
|
||||
+ realpath (args[i], buffer) != NULL)
|
||||
{
|
||||
(*urls)[i] = g_strconcat ("file://", buffer, NULL);
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
{
|
||||
/* try to expand as files */
|
||||
- if (realpath (args[i], buffer) != NULL)
|
||||
+ if (!strnstr(args[i], "ghelp:", strlen("ghelp:")) &&
|
||||
+ !strnstr(args[i], "toc:", strlen("toc:")) &&
|
||||
+ !strnstr(args[i], "info:", strlen("info:")) &&
|
||||
+ !strnstr(args[i], "main:", strlen("man:")) &&
|
||||
+ !strnstr(args[i], "gnome-help:", strlen("gnome-help")) &&
|
||||
+ if (strncmp(args[i], "ghelp:", strlen("ghelp:")) &&
|
||||
+ strncmp(args[i], "toc:", strlen("toc:")) &&
|
||||
+ strncmp(args[i], "info:", strlen("info:")) &&
|
||||
+ strncmp(args[i], "main:", strlen("man:")) &&
|
||||
+ strncmp(args[i], "gnome-help:", strlen("gnome-help")) &&
|
||||
+ realpath (args[i], buffer) != NULL)
|
||||
{
|
||||
(*urls)[i] = g_strconcat ("file://", buffer, NULL);
|
||||
|
|
Loading…
Reference in a new issue