aboutsummaryrefslogtreecommitdiff
path: root/apps/xwininfo
diff options
context:
space:
mode:
Diffstat (limited to 'apps/xwininfo')
-rw-r--r--apps/xwininfo/config.h109
-rw-r--r--apps/xwininfo/dsimple.c1
-rw-r--r--apps/xwininfo/dsimple.h5
-rw-r--r--apps/xwininfo/makefile19
-rw-r--r--apps/xwininfo/xwininfo.c11
5 files changed, 143 insertions, 2 deletions
diff --git a/apps/xwininfo/config.h b/apps/xwininfo/config.h
new file mode 100644
index 000000000..b77456819
--- /dev/null
+++ b/apps/xwininfo/config.h
@@ -0,0 +1,109 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if you have the iconv() function */
+#undef HAVE_ICONV
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strlcat' function. */
+#undef HAVE_STRLCAT
+
+/* Define to 1 if you have a working strnlen function. */
+#define HAVE_STRNLEN
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Major version of this package */
+#undef PACKAGE_VERSION_MAJOR
+
+/* Minor version of this package */
+#undef PACKAGE_VERSION_MINOR
+
+/* Patch version of this package */
+#undef PACKAGE_VERSION_PATCHLEVEL
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Define to 1 to call xcb-icccm library functions instead of local
+ replacements */
+#undef USE_XCB_ICCCM
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
diff --git a/apps/xwininfo/dsimple.c b/apps/xwininfo/dsimple.c
index 6432e1335..d42e56aa3 100644
--- a/apps/xwininfo/dsimple.c
+++ b/apps/xwininfo/dsimple.c
@@ -58,6 +58,7 @@ from The Open Group.
#include <X11/cursorfont.h>
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <stdarg.h>
#include <string.h>
#include "clientwin.h"
diff --git a/apps/xwininfo/dsimple.h b/apps/xwininfo/dsimple.h
index 952960542..d0dd71ae9 100644
--- a/apps/xwininfo/dsimple.h
+++ b/apps/xwininfo/dsimple.h
@@ -39,8 +39,9 @@ from The Open Group.
#include <xcb/xcb.h>
#include <xcb/xproto.h>
-typedef enum { False = 0, True } Bool;
-
+typedef int Bool;
+#define False 0
+#define True 1
/* Global variables used by routines in dsimple.c */
extern const char *program_name; /* Name of this program */
diff --git a/apps/xwininfo/makefile b/apps/xwininfo/makefile
new file mode 100644
index 000000000..cacef1297
--- /dev/null
+++ b/apps/xwininfo/makefile
@@ -0,0 +1,19 @@
+TTYAPP = xwininfo
+
+INCLUDELIBFILES = \
+ $(MHMAKECONF)\libxcb\src\$(OBJDIR)\libxcb.lib \
+ $(MHMAKECONF)\libXau\$(OBJDIR)\libXau.lib \
+ $(MHMAKECONF)\libXext\src\$(OBJDIR)\libXext.lib \
+ $(MHMAKECONF)\libX11\$(OBJDIR)\libX11.lib
+
+LIBDIRS=$(dir $(INCLUDELIBFILES))
+
+load_makefile $(LIBDIRS:%$(OBJDIR)\=%makefile MAKESERVER=0 DEBUG=$(DEBUG);)
+
+LINKLIBS += $(PTHREADLIB)
+
+CSRCS = \
+ clientwin.c \
+ dsimple.c \
+ xwininfo.c
+
diff --git a/apps/xwininfo/xwininfo.c b/apps/xwininfo/xwininfo.c
index 39ae6ea27..59e09aff8 100644
--- a/apps/xwininfo/xwininfo.c
+++ b/apps/xwininfo/xwininfo.c
@@ -74,9 +74,12 @@ of the copyright holder.
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <string.h>
#include <locale.h>
+#ifndef _MSC_VER
#include <langinfo.h>
+#endif
#ifdef HAVE_ICONV
# include <iconv.h>
#endif
@@ -442,6 +445,7 @@ main (int argc, char **argv)
register int i;
int tree = 0, stats = 0, bits = 0, events = 0, wm = 0, size = 0, shape = 0;
int frame = 0, children = 0;
+ int pauseatend = 0;
int use_root = 0;
xcb_window_t window = 0;
char *display_name = NULL;
@@ -453,7 +457,9 @@ main (int argc, char **argv)
if (!setlocale (LC_ALL, ""))
fprintf (stderr, "%s: can not set locale properly\n", program_name);
+#ifndef _MSC_VER
user_encoding = nl_langinfo (CODESET);
+#endif
if (user_encoding == NULL)
user_encoding = "unknown encoding";
@@ -537,6 +543,10 @@ main (int argc, char **argv)
tree = stats = bits = events = wm = size = shape = 1;
continue;
}
+ if (!strcmp(argv[i], "-pause")) {
+ pauseatend = 1;
+ continue;
+ }
usage ();
}
@@ -676,6 +686,7 @@ main (int argc, char **argv)
if (shape)
Display_Window_Shape (window);
printf ("\n");
+ if (pauseatend) getchar();
wininfo_wipe (w);
xcb_disconnect (dpy);