diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/xcalc/actions.h | 16 | ||||
-rw-r--r-- | apps/xcalc/makefile | 36 | ||||
-rw-r--r-- | apps/xcalc/xcalc.c | 18 | ||||
-rw-r--r-- | apps/xclock/Clock.c | 3 | ||||
-rw-r--r-- | apps/xclock/makefile | 38 | ||||
-rw-r--r-- | apps/xwininfo/config.h | 109 | ||||
-rw-r--r-- | apps/xwininfo/dsimple.c | 1 | ||||
-rw-r--r-- | apps/xwininfo/dsimple.h | 5 | ||||
-rw-r--r-- | apps/xwininfo/makefile | 28 | ||||
-rw-r--r-- | apps/xwininfo/xwininfo.c | 11 |
10 files changed, 240 insertions, 25 deletions
diff --git a/apps/xcalc/actions.h b/apps/xcalc/actions.h index 69f1983a5..741b36597 100644 --- a/apps/xcalc/actions.h +++ b/apps/xcalc/actions.h @@ -36,14 +36,14 @@ from the X Consortium. */ extern void - add(), back(), bell(), clearit(), cosine(), decimal(), - degree(), digit(), divide(), e(), enter(), epower(), equal(), - exchange(), factorial(), - inverse(), leftParen(), logarithm(), multiply(), naturalLog(), - negate(), nop(), off(), pi(), power(), quit(), recall(), - reciprocal(), rightParen(), roll(), scientific(), selection(), sine(), - square(), squareRoot(), store(), subtract(), sum(), - tangent(), tenpower(), XexchangeY(); + add(Widget,XEvent*,String*,Cardinal*), back(Widget,XEvent*,String*,Cardinal*), bell(Widget,XEvent*,String*,Cardinal*), clearit(Widget,XEvent*,String*,Cardinal*), cosine(Widget,XEvent*,String*,Cardinal*), decimal(Widget,XEvent*,String*,Cardinal*), + degree(Widget,XEvent*,String*,Cardinal*), digit(Widget,XEvent*,String*,Cardinal*), divide(Widget,XEvent*,String*,Cardinal*), e(Widget,XEvent*,String*,Cardinal*), enter(Widget,XEvent*,String*,Cardinal*), epower(Widget,XEvent*,String*,Cardinal*), equal(Widget,XEvent*,String*,Cardinal*), + exchange(Widget,XEvent*,String*,Cardinal*), factorial(Widget,XEvent*,String*,Cardinal*), + inverse(Widget,XEvent*,String*,Cardinal*), leftParen(Widget,XEvent*,String*,Cardinal*), logarithm(Widget,XEvent*,String*,Cardinal*), multiply(Widget,XEvent*,String*,Cardinal*), naturalLog(Widget,XEvent*,String*,Cardinal*), + negate(Widget,XEvent*,String*,Cardinal*), nop(Widget,XEvent*,String*,Cardinal*), off(Widget,XEvent*,String*,Cardinal*), pi(Widget,XEvent*,String*,Cardinal*), power(Widget,XEvent*,String*,Cardinal*), quit(Widget,XEvent*,String*,Cardinal*), recall(Widget,XEvent*,String*,Cardinal*), + reciprocal(Widget,XEvent*,String*,Cardinal*), rightParen(Widget,XEvent*,String*,Cardinal*), roll(Widget,XEvent*,String*,Cardinal*), scientific(Widget,XEvent*,String*,Cardinal*), selection(Widget,XEvent*,String*,Cardinal*), sine(Widget,XEvent*,String*,Cardinal*), + square(Widget,XEvent*,String*,Cardinal*), squareRoot(Widget,XEvent*,String*,Cardinal*), store(Widget,XEvent*,String*,Cardinal*), subtract(Widget,XEvent*,String*,Cardinal*), sum(Widget,XEvent*,String*,Cardinal*), + tangent(Widget,XEvent*,String*,Cardinal*), tenpower(Widget,XEvent*,String*,Cardinal*), XexchangeY(Widget,XEvent*,String*,Cardinal*); /* * calculator action table diff --git a/apps/xcalc/makefile b/apps/xcalc/makefile new file mode 100644 index 000000000..5288e202d --- /dev/null +++ b/apps/xcalc/makefile @@ -0,0 +1,36 @@ +WINAPP = xcalc + +DEFINES += XT_NO_SM IEEE + +INCLUDELIBFILES = \ + $(MHMAKECONF)\libXt\src\$(OBJDIR)\libXt.lib \ + $(MHMAKECONF)\libX11\src\xkb\$(OBJDIR)\libxkb.lib \ + $(MHMAKECONF)\libX11\src\xcms\$(OBJDIR)\libxcms.lib \ + $(MHMAKECONF)\libx11\src\xlibi18n\$(OBJDIR)\libi18n.lib \ + $(MHMAKECONF)\libx11\modules\lc\xlocale\$(OBJDIR)\libxlocale.lib \ + $(MHMAKECONF)\libx11\modules\lc\utf8\$(OBJDIR)\libxlcUTF8Load.lib \ + $(MHMAKECONF)\libx11\modules\lc\def\$(OBJDIR)\libxlcDef.lib \ + $(MHMAKECONF)\libx11\modules\om\generic\$(OBJDIR)\libxomGeneric.lib \ + $(MHMAKECONF)\libx11\modules\lc\gen\$(OBJDIR)\liblcGenConvLoad.lib \ + $(MHMAKECONF)\libx11\modules\im\ximcp\$(OBJDIR)\libximcp.lib \ + $(MHMAKECONF)\libxcb\src\$(OBJDIR)\libxcb.lib \ + $(MHMAKECONF)\libxpm\src\$(OBJDIR)\libxpm.lib \ + $(MHMAKECONF)\libxau\$(OBJDIR)\libxau.lib \ + $(MHMAKECONF)\libXaw\src\$(OBJDIR)\libXaw.lib \ + $(MHMAKECONF)\libXext\src\$(OBJDIR)\libXext.lib \ + $(MHMAKECONF)\libXmu\src\$(OBJDIR)\libXmu.lib \ + $(MHMAKECONF)\libX11\src\$(OBJDIR)\libX11.lib +LIBDIRS=$(dir $(INCLUDELIBFILES)) + +load_makefile $(LIBDIRS:%$(OBJDIR)\=%makefile MAKESERVER=$(MAKESERVER) DEBUG=$(DEBUG);) + +ifeq ($(DEBUG),1) +LINKLIBS += $(MHMAKECONF)\pthreads\pthreadVC2d.lib +else +LINKLIBS += $(MHMAKECONF)\pthreads\pthreadVC2.lib +endif + +CSRCS = \ + actions.c \ + math.c \ + xcalc.c diff --git a/apps/xcalc/xcalc.c b/apps/xcalc/xcalc.c index 0f943115a..5c9bc632a 100644 --- a/apps/xcalc/xcalc.c +++ b/apps/xcalc/xcalc.c @@ -339,14 +339,7 @@ void Syntax(argc, argv) */ /*ARGSUSED*/ -Boolean convert(w, selection, target, type, value, length, format) - Widget w; - Atom *selection; - Atom *target; - Atom *type; - XtPointer *value; - unsigned long *length; - int *format; +Boolean convert(Widget w, Atom *selection, Atom *target, Atom *type, XtPointer *value, unsigned long *length, int *format) { if (*target == XA_STRING) { @@ -364,9 +357,7 @@ Boolean convert(w, selection, target, type, value, length, format) * called when xcalc loses ownership of the selection. */ /*ARGSUSED*/ -void lose(w, selection) - Widget w; - Atom *selection; +void lose(Widget w, Atom *selection) { XawToggleUnsetCurrent(LCD); } @@ -375,10 +366,7 @@ void lose(w, selection) * called when some other client got the selection. */ /*ARGSUSED*/ -void done(w, selection, target) - Widget w; - Atom *selection; - Atom *target; +void done(Widget w, Atom *selection, Atom *target) { selstr[0] = '\0'; } diff --git a/apps/xclock/Clock.c b/apps/xclock/Clock.c index 70eb0a155..f0bab4740 100644 --- a/apps/xclock/Clock.c +++ b/apps/xclock/Clock.c @@ -86,6 +86,7 @@ SOFTWARE. #include <X11/Xosdefs.h> #include <stdio.h> #include <X11/Xos.h> +#include <X11\Xwinsock.h> #include <X11/Xaw/XawInit.h> #if !defined(NO_I18N) && defined(HAVE_ICONV) #include <iconv.h> @@ -130,8 +131,10 @@ extern Boolean no_locale; /* if True, use old (unlocalized) behaviour */ #define ANALOG_SIZE_DEFAULT 164 +#ifndef max #define max(a, b) ((a) > (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b)) +#endif /* #define abs(a) ((a) < 0 ? -(a) : (a)) */ diff --git a/apps/xclock/makefile b/apps/xclock/makefile new file mode 100644 index 000000000..35bb8853d --- /dev/null +++ b/apps/xclock/makefile @@ -0,0 +1,38 @@ +WINAPP = xclock + +DEFINES += XT_NO_SM + +INCLUDELIBFILES = \ + $(MHMAKECONF)\libXt\src\$(OBJDIR)\libXt.lib \ + $(MHMAKECONF)\libX11\src\xkb\$(OBJDIR)\libxkb.lib \ + $(MHMAKECONF)\libX11\src\xcms\$(OBJDIR)\libxcms.lib \ + $(MHMAKECONF)\libx11\src\xlibi18n\$(OBJDIR)\libi18n.lib \ + $(MHMAKECONF)\libx11\modules\lc\xlocale\$(OBJDIR)\libxlocale.lib \ + $(MHMAKECONF)\libx11\modules\lc\utf8\$(OBJDIR)\libxlcUTF8Load.lib \ + $(MHMAKECONF)\libx11\modules\lc\def\$(OBJDIR)\libxlcDef.lib \ + $(MHMAKECONF)\libx11\modules\om\generic\$(OBJDIR)\libxomGeneric.lib \ + $(MHMAKECONF)\libx11\modules\lc\gen\$(OBJDIR)\liblcGenConvLoad.lib \ + $(MHMAKECONF)\libx11\modules\im\ximcp\$(OBJDIR)\libximcp.lib \ + $(MHMAKECONF)\libxcb\src\$(OBJDIR)\libxcb.lib \ + $(MHMAKECONF)\libxkbfile\src\$(OBJDIR)\libxkbfile.lib \ + $(MHMAKECONF)\libxpm\src\$(OBJDIR)\libxpm.lib \ + $(MHMAKECONF)\libxau\$(OBJDIR)\libxau.lib \ + $(MHMAKECONF)\libXaw\src\$(OBJDIR)\libXaw.lib \ + $(MHMAKECONF)\libXext\src\$(OBJDIR)\libXext.lib \ + $(MHMAKECONF)\libXmu\src\$(OBJDIR)\libXmu.lib \ + $(MHMAKECONF)\libX11\src\$(OBJDIR)\libX11.lib + +LIBDIRS=$(dir $(INCLUDELIBFILES)) + +load_makefile $(LIBDIRS:%$(OBJDIR)\=%makefile MAKESERVER=$(MAKESERVER) DEBUG=$(DEBUG);) + +ifeq ($(DEBUG),1) +LINKLIBS += $(MHMAKECONF)\pthreads\pthreadVC2d.lib +else +LINKLIBS += $(MHMAKECONF)\pthreads\pthreadVC2.lib +endif + +CSRCS = \ + Clock.c \ + xclock.c + 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 a9b867896..36ee5c29a 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 b6adc4345..d5aff6cfe 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 char *program_name; /* Name of this program */ diff --git a/apps/xwininfo/makefile b/apps/xwininfo/makefile new file mode 100644 index 000000000..d0b3abae0 --- /dev/null +++ b/apps/xwininfo/makefile @@ -0,0 +1,28 @@ +TTYAPP = xwininfo + +INCLUDELIBFILES = \ + $(MHMAKECONF)\libX11\src\xkb\$(OBJDIR)\libxkb.lib \ + $(MHMAKECONF)\libX11\src\xcms\$(OBJDIR)\libxcms.lib \ + $(MHMAKECONF)\libx11\src\xlibi18n\$(OBJDIR)\libi18n.lib \ + $(MHMAKECONF)\libx11\modules\lc\xlocale\$(OBJDIR)\libxlocale.lib \ + $(MHMAKECONF)\libx11\modules\lc\utf8\$(OBJDIR)\libxlcUTF8Load.lib \ + $(MHMAKECONF)\libx11\modules\lc\def\$(OBJDIR)\libxlcDef.lib \ + $(MHMAKECONF)\libx11\modules\om\generic\$(OBJDIR)\libxomGeneric.lib \ + $(MHMAKECONF)\libx11\modules\lc\gen\$(OBJDIR)\liblcGenConvLoad.lib \ + $(MHMAKECONF)\libx11\modules\im\ximcp\$(OBJDIR)\libximcp.lib \ + $(MHMAKECONF)\libxcb\src\$(OBJDIR)\libxcb.lib \ + $(MHMAKECONF)\libxau\$(OBJDIR)\libxau.lib \ + $(MHMAKECONF)\libXext\src\$(OBJDIR)\libXext.lib \ + $(MHMAKECONF)\libX11\src\$(OBJDIR)\libX11.lib + +ifeq ($(DEBUG),1) +LINKLIBS += $(MHMAKECONF)\pthreads\pthreadVC2d.lib +else +LINKLIBS += $(MHMAKECONF)\pthreads\pthreadVC2.lib +endif + +CSRCS = \ + clientwin.c \ + dsimple.c \ + xwininfo.c + diff --git a/apps/xwininfo/xwininfo.c b/apps/xwininfo/xwininfo.c index 265f6c611..db392bb2b 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 @@ -427,6 +430,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; @@ -438,7 +442,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"; @@ -522,6 +528,10 @@ main (int argc, char **argv) tree = stats = bits = events = wm = size = shape = 1; continue; } + if (!strcmp(argv[i], "-pause")) { + pauseatend = 1; + continue; + } usage (); } @@ -663,6 +673,7 @@ main (int argc, char **argv) if (shape) Display_Window_Shape (window); printf ("\n"); + if (pauseatend) getchar(); wininfo_wipe (w); xcb_disconnect (dpy); |