Module Name:    xsrc
Committed By:   mrg
Date:           Mon Aug 23 21:28:59 UTC 2021

Modified Files:
        xsrc/external/mit/xeyes/dist: compile
        xsrc/external/mit/xrdb/dist: xrdb.c
Removed Files:
        xsrc/external/mit/xeyes/dist: README
        xsrc/external/mit/xwd/dist: README

Log Message:
merge xeyes 1.2.0, xrdb 1.2.1, and xwd 1.0.8.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r0 xsrc/external/mit/xeyes/dist/README
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xeyes/dist/compile
cvs rdiff -u -r1.10 -r1.11 xsrc/external/mit/xrdb/dist/xrdb.c
cvs rdiff -u -r1.1.1.2 -r0 xsrc/external/mit/xwd/dist/README

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xeyes/dist/compile
diff -u xsrc/external/mit/xeyes/dist/compile:1.3 xsrc/external/mit/xeyes/dist/compile:1.4
--- xsrc/external/mit/xeyes/dist/compile:1.3	Sun Mar 11 08:15:22 2018
+++ xsrc/external/mit/xeyes/dist/compile	Mon Aug 23 21:28:58 2021
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 # Written by Tom Tromey <tro...@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -53,7 +53,7 @@ func_file_conv ()
 	  MINGW*)
 	    file_conv=mingw
 	    ;;
-	  CYGWIN*)
+	  CYGWIN* | MSYS*)
 	    file_conv=cygwin
 	    ;;
 	  *)
@@ -67,7 +67,7 @@ func_file_conv ()
 	mingw/*)
 	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
 	  ;;
-	cygwin/*)
+	cygwin/* | msys/*)
 	  file=`cygpath -m "$file" || echo "$file"`
 	  ;;
 	wine/*)
@@ -255,7 +255,8 @@ EOF
     echo "compile $scriptversion"
     exit $?
     ;;
-  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+  icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
     func_cl_wrapper "$@"      # Doesn't return...
     ;;
 esac
@@ -339,9 +340,9 @@ exit $ret
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:

Index: xsrc/external/mit/xrdb/dist/xrdb.c
diff -u xsrc/external/mit/xrdb/dist/xrdb.c:1.10 xsrc/external/mit/xrdb/dist/xrdb.c:1.11
--- xsrc/external/mit/xrdb/dist/xrdb.c:1.10	Sun Mar  3 08:36:21 2019
+++ xsrc/external/mit/xrdb/dist/xrdb.c	Mon Aug 23 21:28:58 2021
@@ -48,6 +48,7 @@
 #include <X11/Xatom.h>
 #include <X11/Xos.h>
 #include <X11/Xmu/SysUtil.h>
+#include <X11/Xresource.h>
 #include <stdio.h>
 #include <ctype.h>
 #include <errno.h>
@@ -84,6 +85,7 @@
 #define OPLOAD 4
 #define OPMERGE 5
 #define OPOVERRIDE 6
+#define OPGET 7
 
 #define BACKUP_SUFFIX ".bak"    /* for editing */
 
@@ -126,6 +128,7 @@ static char *editFile = NULL;
 static const char *cpp_program = NULL;
 static const char * const cpp_locations[] = { CPP };
 static const char *backup_suffix = BACKUP_SUFFIX;
+static const char *resource_name = NULL;
 static Bool dont_execute = False;
 static Bool show_cpp = False;
 static String defines;
@@ -745,6 +748,8 @@ EditFile(Entries *new, FILE *in, FILE *o
             buff[0] = '\0';
             if (!fgets(buff, BUFSIZ, in))
                 goto cleanup;
+            if (buff[0] == '\0')
+                continue;
             AppendToBuffer(&b, buff, strlen(buff));
             c = &b.buff[b.used - 1];
             if ((*(c--) == '\n') && (b.used == 1 || *c != '\\'))
@@ -784,6 +789,7 @@ Syntax(const char *errmsg)
             " -nocpp              do not use a preprocessor\n"
             " -E                  show preprocessor command & processed input file\n"
             " -query              query resources\n"
+            " -get name           get the content of a resource\n"
             " -load               load resources from file [default]\n"
             " -override           add in resources from file\n"
             " -merge              merge resources from file & sort\n"
@@ -982,6 +988,13 @@ main(int argc, char *argv[])
                 oper = OPQUERY;
                 continue;
             }
+            else if (isabbreviation("-get", arg, 2)) {
+                oper = OPGET;
+                if (++i >= argc)
+                    Syntax("-get requires an argument");
+                resource_name = argv[i];
+                continue;
+            }
             else if (isabbreviation("-load", arg, 2)) {
                 oper = OPLOAD;
                 continue;
@@ -1055,7 +1068,7 @@ main(int argc, char *argv[])
             }
             else if (!strcmp("-undef", arg)) {
                 if (num_cmd_defines < MAX_CMD_DEFINES) {
-                    cmd_defines[num_cmd_defines++] = "-undef";
+                    cmd_defines[num_cmd_defines++] = (char *) "-undef";
                 }
                 else {
                     fatal("%s: Too many cpp arguments\n", ProgramName);
@@ -1282,7 +1295,19 @@ Process(int scrno, Bool doScreen, Bool e
     }
     else if (oper == OPQUERY) {
         if (xdefs)
-            printf("%s", xdefs);        /* fputs broken in SunOS 4.0 */
+            fputs(xdefs, stdout);
+    }
+    else if (oper == OPGET) {
+        if (xdefs && resource_name != NULL) {
+            char *type = NULL;
+            XrmValue value;
+            XrmDatabase xrdb = XrmGetStringDatabase(xdefs);
+            Bool found = XrmGetResource(xrdb, resource_name,
+                                        resource_name, &type, &value);
+            if (found == True && value.addr != NULL)
+                printf("%s\n", value.addr);
+            XrmDestroyDatabase(xrdb);
+        }
     }
     else if (oper == OPREMOVE) {
         if (xdefs)
@@ -1454,7 +1479,7 @@ Process(int scrno, Bool doScreen, Bool e
     }
     if (execute)
         FreeEntries(&newDB);
-    if (doScreen && xdefs)
+    if (doScreen)
         XFree(xdefs);
 }
 

Reply via email to