From 9aa1d138a6631e1cc6eac635a150ec2589482e50 Mon Sep 17 00:00:00 2001 From: kojima Date: Sun, 9 Apr 2000 23:55:46 +0000 Subject: [PATCH] memory stats in info panel --- ChangeLog | 5 +++++ README | 12 +++++++++--- WINGs/puzzle.c | 1 - WPrefs.app/po/Makefile.in | 1 - WindowMaker/Defaults/WMWindowAttributes.in | 2 ++ configure.in | 4 ++-- contrib/Makefile.in | 1 - doc/Makefile.in | 1 - po/Makefile.in | 1 - src/dialog.c | 14 ++++++++++++++ src/screen.c | 2 +- test/Makefile.in | 1 - util/Makefile.am | 3 ++- util/Makefile.in | 2 +- util/wmsetbg.c | 8 ++++---- wmlib/Makefile.am | 2 +- wmlib/Makefile.in | 3 +-- wrlib/Makefile.am | 2 +- wrlib/convert.c | 3 ++- 19 files changed, 45 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3483764c..7358794f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,11 @@ Changes since version 0.62.0: - added option for f'n windoze cycling.. - added --create-stdcmap and made std colormap creation off by default - updated get/setstyle to account for new options +- fixed crash on restart bug +- made GNOME wm hints take precedence over KDE.. KDE hint will only be read + if GNOME hints dont exist +- updated kwm hint support (maximize hint) +- added memory usage in info panel Changes since version 0.61.1: ............................. diff --git a/README b/README index 40ccc829..c4be589a 100644 --- a/README +++ b/README @@ -309,9 +309,15 @@ bug report. To make a usefull backtrace, you need a core file with debugging information produced by Window Maker when it crashes. It should -have been installed without stripping too. If you -get the dialog window telling you that wmaker crashed and asks you -what to do, tell it to "Abort and leave a core file". +have been installed without stripping too. + +To compile wmaker with debugging information: + +./configure +make CFLAGS=-g + +If you get the dialog window telling you that wmaker crashed and +asks you what to do, tell it to "Abort and leave a core file". script cd src diff --git a/WINGs/puzzle.c b/WINGs/puzzle.c index 69518888..7ad304c7 100644 --- a/WINGs/puzzle.c +++ b/WINGs/puzzle.c @@ -128,7 +128,6 @@ void ResetGame(void) } - void buttonClick(WMWidget *w, void *ptr) { char buffer[300]; diff --git a/WPrefs.app/po/Makefile.in b/WPrefs.app/po/Makefile.in index a167fc3f..69a32657 100644 --- a/WPrefs.app/po/Makefile.in +++ b/WPrefs.app/po/Makefile.in @@ -62,7 +62,6 @@ host_triplet = @host@ AS = @AS@ CC = @CC@ CPP_PATH = @CPP_PATH@ -DFLAGS = @DFLAGS@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ GFXLIBS = @GFXLIBS@ diff --git a/WindowMaker/Defaults/WMWindowAttributes.in b/WindowMaker/Defaults/WMWindowAttributes.in index 91fb4a78..a676dc41 100644 --- a/WindowMaker/Defaults/WMWindowAttributes.in +++ b/WindowMaker/Defaults/WMWindowAttributes.in @@ -5,6 +5,8 @@ Dockit = {Icon = GNUstep3D.#extension#;}; DockApp = {NoAppIcon = NO;}; WMSoundServer = {Icon = sound.#extension#;}; + panel.Panel = {NoAppIcon = YES;}; + gmc.Gmc = {NoAppIcon = YES;}; XTerm = {Icon = Terminal.#extension#;}; NXTerm = {Icon = Terminal.#extension#;}; ScilabGraphic0.Xscilab = {KeepInsideScreen=YES;}; diff --git a/configure.in b/configure.in index 55b76cf9..42aeced7 100644 --- a/configure.in +++ b/configure.in @@ -100,7 +100,7 @@ dnl not used anywhere dnl AC_FUNC_MEMCMP AC_FUNC_VPRINTF AC_FUNC_ALLOCA -AC_CHECK_FUNCS(gethostname select poll strerror strncasecmp setpgid atexit) +AC_CHECK_FUNCS(gethostname select poll strerror strncasecmp setpgid atexit mallinfo) @@ -153,7 +153,7 @@ dnl AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_TIME AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h sys/types.h\ - libintl.h sys/select.h poll.h) + libintl.h sys/select.h poll.h malloc.h) diff --git a/contrib/Makefile.in b/contrib/Makefile.in index 1efe5a0b..55e18cab 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in @@ -62,7 +62,6 @@ host_triplet = @host@ AS = @AS@ CC = @CC@ CPP_PATH = @CPP_PATH@ -DFLAGS = @DFLAGS@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ GFXLIBS = @GFXLIBS@ diff --git a/doc/Makefile.in b/doc/Makefile.in index 373b878e..8b3e85ef 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -62,7 +62,6 @@ host_triplet = @host@ AS = @AS@ CC = @CC@ CPP_PATH = @CPP_PATH@ -DFLAGS = @DFLAGS@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ GFXLIBS = @GFXLIBS@ diff --git a/po/Makefile.in b/po/Makefile.in index 2de5f049..69c6d584 100644 --- a/po/Makefile.in +++ b/po/Makefile.in @@ -62,7 +62,6 @@ host_triplet = @host@ AS = @AS@ CC = @CC@ CPP_PATH = @CPP_PATH@ -DFLAGS = @DFLAGS@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ GFXLIBS = @GFXLIBS@ diff --git a/src/dialog.c b/src/dialog.c index cc29c21d..b5e402d4 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -36,6 +36,10 @@ #include #include +#ifdef HAVE_MALLOC_H +#include +#endif + #include #ifdef __FreeBSD__ #include @@ -1181,6 +1185,16 @@ wShowInfoPanel(WScreen *scr) (unsigned)scr->w_visual->visualid, visuals[scr->w_visual->class], scr->w_depth, version); +#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) + { + struct mallinfo ma = mallinfo(); + sprintf(buffer+strlen(buffer), + "Total allocated memory: %i kB. Total memory in use: %i kB.\n", + (ma.arena+ma.hblkhd)/1024, (ma.uordblks+ma.hblkhd)/1024); + + } +#endif + strcat(buffer, "Supported image formats: "); strl = RSupportedFileFormats(); for (i=0; strl[i]!=NULL; i++) { diff --git a/src/screen.c b/src/screen.c index cf16b063..c2f1d265 100644 --- a/src/screen.c +++ b/src/screen.c @@ -724,7 +724,7 @@ wScreenInit(int screen_number) /* will only be accounted for in PseudoColor */ - if (wPreferences.flags.createstdcmap) { + if (wPreferences.flags.create_stdcmap) { rattr.standard_colormap_mode = RCreateStdColormap; } else { rattr.standard_colormap_mode = RUseStdColormap; diff --git a/test/Makefile.in b/test/Makefile.in index bc856fb9..619d8247 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -62,7 +62,6 @@ host_triplet = @host@ AS = @AS@ CC = @CC@ CPP_PATH = @CPP_PATH@ -DFLAGS = @DFLAGS@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ GFXLIBS = @GFXLIBS@ diff --git a/util/Makefile.am b/util/Makefile.am index 91d30ae5..12b61db2 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -10,7 +10,8 @@ bin_SCRIPTS = wmaker.inst wm-oldmenu2new wsetfont wkdemenu.pl EXTRA_DIST = wmaker.inst.in bughint wm-oldmenu2new wsetfont directjpeg.c \ wkdemenu.pl -INCLUDES = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib @HEADER_SEARCH_PATH@ +INCLUDES = $(DFLAGS) -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib \ + @HEADER_SEARCH_PATH@ # X_EXTRA_LIBS is for libproplist in systems that need -lsocket liblist= @LIBRARY_SEARCH_PATH@ @LIBPL@ @X_EXTRA_LIBS@ diff --git a/util/Makefile.in b/util/Makefile.in index 79c04030..d73df566 100644 --- a/util/Makefile.in +++ b/util/Makefile.in @@ -102,7 +102,7 @@ bin_SCRIPTS = wmaker.inst wm-oldmenu2new wsetfont wkdemenu.pl EXTRA_DIST = wmaker.inst.in bughint wm-oldmenu2new wsetfont directjpeg.c wkdemenu.pl -INCLUDES = @DFLAGS@ -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib @HEADER_SEARCH_PATH@ +INCLUDES = $(DFLAGS) -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib @HEADER_SEARCH_PATH@ # X_EXTRA_LIBS is for libproplist in systems that need -lsocket diff --git a/util/wmsetbg.c b/util/wmsetbg.c index ddbe9244..0f404491 100644 --- a/util/wmsetbg.c +++ b/util/wmsetbg.c @@ -209,12 +209,12 @@ parseTexture(RContext *rc, char *text) case 'H': gtype = RHorizontalGradient; iwidth = scrWidth; - iheight = 8; + iheight = 32; break; case 'V': case 'v': gtype = RVerticalGradient; - iwidth = 8; + iwidth = 32; iheight = scrHeight; break; default: @@ -302,12 +302,12 @@ parseTexture(RContext *rc, char *text) case 'H': gtype = RHorizontalGradient; iwidth = scrWidth; - iheight = 8; + iheight = 32; break; case 'V': case 'v': gtype = RVerticalGradient; - iwidth = 8; + iwidth = 32; iheight = scrHeight; break; default: diff --git a/wmlib/Makefile.am b/wmlib/Makefile.am index 39887435..c29801a8 100644 --- a/wmlib/Makefile.am +++ b/wmlib/Makefile.am @@ -5,7 +5,7 @@ lib_LIBRARIES = libWMaker.a include_HEADERS = WMaker.h -INCLUDES = @XCFLAGS@ +INCLUDES = $(DFLAGS) @XCFLAGS@ libWMaker_a_SOURCES = \ menu.c \ diff --git a/wmlib/Makefile.in b/wmlib/Makefile.in index 1058951e..63a5c130 100644 --- a/wmlib/Makefile.in +++ b/wmlib/Makefile.in @@ -62,7 +62,6 @@ host_triplet = @host@ AS = @AS@ CC = @CC@ CPP_PATH = @CPP_PATH@ -DFLAGS = @DFLAGS@ DLLIBS = @DLLIBS@ DLLTOOL = @DLLTOOL@ GFXLIBS = @GFXLIBS@ @@ -100,7 +99,7 @@ lib_LIBRARIES = libWMaker.a include_HEADERS = WMaker.h -INCLUDES = @DFLAGS@ @XCFLAGS@ +INCLUDES = $(DFLAGS) @XCFLAGS@ libWMaker_a_SOURCES = menu.c app.c event.c command.c app.h menu.h diff --git a/wrlib/Makefile.am b/wrlib/Makefile.am index 9e646585..cfeba49b 100644 --- a/wrlib/Makefile.am +++ b/wrlib/Makefile.am @@ -57,7 +57,7 @@ x86_specific.o: x86_specific.c -INCLUDES = @HEADER_SEARCH_PATH@ +INCLUDES = $(DFLAGS) @HEADER_SEARCH_PATH@ LIBLIST = $(top_builddir)/wrlib/libwraster.la @LIBRARY_SEARCH_PATH@ @GFXLIBS@ @XLIBS@ -lm diff --git a/wrlib/convert.c b/wrlib/convert.c index 58ab9431..31f18948 100644 --- a/wrlib/convert.c +++ b/wrlib/convert.c @@ -179,7 +179,8 @@ convertTrueColor_generic(RXImage *ximg, RImage *image, int rer, ger, ber; unsigned char *ptr = image->data; int channels = image->format == RRGBAFormat ? 4 : 3; - + + /* convert and dither the image to XImage */ for (y=0; yheight; y++) { nerr[0] = 0; -- 2.11.4.GIT