From 9e3c5a677982a70c04ac0bfcbcb327ebb16a5903 Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 2 May 2002 18:36:44 +0000 Subject: Use strncmp() instead of strnstr() since the latter does not exist in FreeBSD 4.x before 4.5. Prompted by: Edward Glowacki --- www/galeon/files/patch-src_main.c | 10 +++++----- www/galeon2/files/patch-src_main.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/www/galeon/files/patch-src_main.c b/www/galeon/files/patch-src_main.c index 584e80953a4e..61f7df20bcd6 100644 --- a/www/galeon/files/patch-src_main.c +++ b/www/galeon/files/patch-src_main.c @@ -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); diff --git a/www/galeon2/files/patch-src_main.c b/www/galeon2/files/patch-src_main.c index 584e80953a4e..61f7df20bcd6 100644 --- a/www/galeon2/files/patch-src_main.c +++ b/www/galeon2/files/patch-src_main.c @@ -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); -- cgit