diff options
Diffstat (limited to 'apps/xwininfo')
-rw-r--r-- | apps/xwininfo/clientwin.c | 2 | ||||
-rw-r--r-- | apps/xwininfo/config.h | 111 | ||||
-rw-r--r-- | apps/xwininfo/dsimple.c | 1 | ||||
-rw-r--r-- | apps/xwininfo/dsimple.h | 5 | ||||
-rw-r--r-- | apps/xwininfo/makefile | 19 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/xwininfo/xwininfo.c | 11 |
6 files changed, 147 insertions, 2 deletions
diff --git a/apps/xwininfo/clientwin.c b/apps/xwininfo/clientwin.c index 2b1de04e8..c568e1011 100644 --- a/apps/xwininfo/clientwin.c +++ b/apps/xwininfo/clientwin.c @@ -19,6 +19,8 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ +#include "config.h" + #include <xcb/xcb.h> #include <xcb/xproto.h> diff --git a/apps/xwininfo/config.h b/apps/xwininfo/config.h new file mode 100644 index 000000000..d842dcc60 --- /dev/null +++ b/apps/xwininfo/config.h @@ -0,0 +1,111 @@ +/* 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. */ +#define PACKAGE_STRING "xwininfo" + +/* 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 + +#define _X_COLD 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 6699e7634..7dacdee92 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 520719bdd..e3caae4e2 100644..100755 --- 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 @@ -443,6 +446,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; @@ -454,7 +458,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"; @@ -538,6 +544,10 @@ main (int argc, char **argv) tree = stats = bits = events = wm = size = shape = 1; continue; } + if (!strcmp(argv[i], "-pause")) { + pauseatend = 1; + continue; + } if (!strcmp(argv[i], "-version")) { puts(PACKAGE_STRING); exit(0); @@ -683,6 +693,7 @@ main (int argc, char **argv) if (shape) Display_Window_Shape (window); printf ("\n"); + if (pauseatend) getchar(); wininfo_wipe (w); xcb_disconnect (dpy); |