pkgsrc/www/ns-remote/patches/patch-aa
2005-03-08 20:15:14 +00:00

66 lines
1.6 KiB
Text

$NetBSD: patch-aa,v 1.2 2005/03/08 20:15:14 bad Exp $
--- remote.c.orig 2005-03-08 21:09:05.000000000 +0100
+++ remote.c 2005-03-08 21:09:34.000000000 +0100
@@ -118,8 +118,12 @@
&version);
if (! version)
continue;
+#ifdef STANDALONE /* Pick most recent version */
+ if (! tenative_version || strcmp((char *) version, tenative_version) > 0 )
+#else
if (strcmp ((char *) version, expected_mozilla_version) &&
!tenative)
+#endif
{
tenative = w;
tenative_version = version;
@@ -135,22 +139,26 @@
if (result && tenative)
{
+#ifndef STANDALONE
fprintf (stderr,
"%s: warning: both version %s (0x%x) and version\n"
"\t%s (0x%x) are running. Using version %s.\n",
progname, tenative_version, (unsigned int) tenative,
expected_mozilla_version, (unsigned int) result,
expected_mozilla_version);
+#endif
XFree (tenative_version);
return result;
}
else if (tenative)
{
+#ifndef STANDALONE
fprintf (stderr,
"%s: warning: expected version %s but found version\n"
"\t%s (0x%x) instead.\n",
progname, expected_mozilla_version,
tenative_version, (unsigned int) tenative);
+#endif
XFree (tenative_version);
return tenative;
}
@@ -566,7 +574,7 @@
}
-void
+int
main (int argc, char **argv)
{
Display *dpy;
@@ -676,6 +684,12 @@
}
}
}
+ if (! remote_commands)
+ {
+ fprintf (stderr, "%s: No valid commands given\n", progname);
+ usage ();
+ exit (-1);
+ }
dpy = XOpenDisplay (dpy_string);
if (! dpy)