Skip to content

Commit

Permalink
- s/sprintf/snprintf
Browse files Browse the repository at this point in the history
- updated some po's
- fixed crash bug when removing WINDOWS_MENU or WORKSPACE_MENU from rootmenu
- some other stuff i forgot
  • Loading branch information
kojima committed Jul 23, 2001
1 parent 0931e14 commit 882b9a8
Show file tree
Hide file tree
Showing 61 changed files with 3,170 additions and 2,328 deletions.
22 changes: 19 additions & 3 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@

Changes since version 0.65.0:
.............................

- removed FocusFollowMouse from wmaker and WPrefs
- fixed problem with alpha images showing a blue tint on big endian machines
- fixed problem with WINGs based apps exiting with a "X_RotateProperties"
related error when text was selected in a textfiled (including WPrefs.app
and Window Maker itself).
- fixed bug with maximization of windows with fixed resize increments
- added None geometry display type
- fixed window enumeration bug
- removed GNUisms from wsetfont (Marcelo E. Magallon <marcelo.magallon@bigfoot.com>, Masahide -mac- NODA <mac@clave.gr.jp>)
- added slovakian translations from (tomka@oalevice.sk)
- added WINGs i18n patch from tomka@oalevice.sk
- fixed wmsetbg.c to work in servers capable of multiple depths (overlay)
- added HMaximizeKey (Ruda Moura <ruda@conectiva.com.br>)
- fixed bad SIGPIPE handling setup across forks (Philippe Troin <phil@fifi.org>)
- added workaround for bug in locale handling on font set creation (Seiichi SATO <sato@cvs-net.co.jp>)
- Fixed some non-portable shell constructs used in installed scripts
(Johnny C. Lam <lamj@stat.cmu.edu>)
- Fixed crash with long titles in the window list menu
(Alban Hertroys <dalroi@wit401310.student.utwente.nl>)

- Fixed crash with long titles in the window list menu (buffer overflow)
(Alban Hertroys <dalroi@wit401310.student.utwente.nl>, reported by
Robert Marshall <robert@chezmarshall.freeserve.co.uk>)
- Replaced almost all sprintf() calls with snprintf()
- fixed crash when removing menu entry for Window List or Workspace submenu

Changes since version 0.64.0:
.............................
Expand Down
3 changes: 3 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ SUPPORTED PLATFORMS
- IBM S/390 running Linux
- iBook running Darwin
- Windows NT with Cygwin/XFree86
- Sony PlayStation2 running Linux

All registered trademarks are registered by their owners. (duh)

Patches to make it work on other platforms are welcome.

Expand Down
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ SUBDIRS = wrlib WINGs src util po WindowMaker wmlib test WPrefs.app doc\
EXTRA_DIST = TODO BUGS BUGFORM FAQ FAQ.I18N MIRRORS COPYING.WTFPL \
Install acconfig.h INSTALL.pt README.pt\
mkpatch README.KDE README.GNOME WindowMaker.lsm.in\
README.definable-cursor
README.definable-cursor \
FAQ.I18N.sk INSTALL.sk
# libwmfun-0.0.3.tar.gz

WindowMaker.lsm: WindowMaker.lsm.in
Expand Down
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ NEWS for veteran Window Maker users

Removed FocusFollowMouse option, only SloppyFocus present now.

Added None option to MoveDisplay and ResizeDisplay

--- 0.65.0

Expand Down
2 changes: 1 addition & 1 deletion WINGs/Extras/wtableview.c
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ static void handleResize(W_ViewDelegate *self, WMView *view)
vh = WMIN(size.height, height);

W_MoveView(table->tableView, 21, 1+table->headerHeight+1);
W_ResizeView(table->tableView, WMAX(vw, 1), WMAX(vh, 1));
W_ResizeView(table->tableView, WMAX(vw, 1), WMAX(vh, 1)+1);

adjustScrollers(table);

Expand Down
7 changes: 5 additions & 2 deletions WINGs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

AUTOMAKE_OPTIONS = no-dependencies

SUBDIRS = WINGs . Documentation Resources Examples Extras Tests
SUBDIRS = WINGs . po Documentation Resources Examples Extras Tests



Expand All @@ -13,7 +13,7 @@ bin_SCRIPTS = get-wings-flags get-wutil-flags
lib_LIBRARIES = libWINGs.a libWUtil.a


LDADD= libWINGs.a $(top_builddir)/wrlib/libwraster.la @LIBPL@
LDADD= libWINGs.a $(top_builddir)/wrlib/libwraster.la @LIBPL@ @INTLIBS@


EXTRA_DIST = BUGS
Expand Down Expand Up @@ -50,6 +50,7 @@ libWINGs_a_SOURCES = \
wcolor.c \
wcolorpanel.c \
wcolorwell.c \
wconfig.h \
wevent.c \
wfilepanel.c \
wframe.c \
Expand Down Expand Up @@ -95,8 +96,10 @@ libWUtil_a_SOURCES = \
userdefaults.c \
usleep.c \
wapplication.c \
wconfig.h \
wutil.c

CPPFLAGS = @CPPFLAGS@ -DLOCALEDIR=\"$(NLSDIR)\"

INCLUDES = -I$(top_srcdir)/WINGs/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@ -DDEBUG
Expand Down
20 changes: 16 additions & 4 deletions WINGs/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@


#include "../src/config.h"
#include "wconfig.h"

#include <unistd.h>
#include <fcntl.h>
Expand Down Expand Up @@ -351,6 +352,12 @@ getSocketAddress(char* name, char* service, char* protocol) /*FOLD00*/
return &socketaddr;
}

static void
handle_sigpipe(int signum)
{
if (0) signum=0; /* To avoid a gcc warning */
return;
}

static WMConnection*
createConnectionWithSocket(int sock, Bool closeOnRelease) /*FOLD00*/
Expand All @@ -377,7 +384,12 @@ createConnectionWithSocket(int sock, Bool closeOnRelease) /*FOLD00*/

/* ignore dead pipe */
if (!SigInitialized) {
sig_action.sa_handler = SIG_IGN;
sig_action.sa_handler = &handle_sigpipe;
/* Because POSIX mandates that only signal with handlers are reset
accross an exec*(), we do not want to propagate ignoring SIGPIPEs
to children. Hence the dummy handler.
Philippe Troin <phil@fifi.org>
*/
sig_action.sa_flags = SA_RESTART;
sigaction(SIGPIPE, &sig_action, NULL);
SigInitialized = True;
Expand Down Expand Up @@ -448,7 +460,7 @@ WMCreateConnectionAsServerAtAddress(char *host, char *service, char *protocol) /
WCErrorCode = 0;

if ((socketaddr = getSocketAddress(host, service, protocol)) == NULL) {
wwarning("Bad address-service-protocol combination");
wwarning(_("Bad address-service-protocol combination"));
return NULL;
}

Expand Down Expand Up @@ -513,7 +525,7 @@ WMCreateConnectionToAddress(char *host, char *service, char *protocol) /*FOLD00*
host = "localhost";

if ((socketaddr = getSocketAddress(host, service, protocol)) == NULL) {
wwarning("Bad address-service-protocol combination");
wwarning(_("Bad address-service-protocol combination"));
return NULL;
}

Expand Down Expand Up @@ -556,7 +568,7 @@ WMCreateConnectionToAddressAndNotify(char *host, char *service, char *protocol)
host = "localhost";

if ((socketaddr = getSocketAddress(host, service, protocol)) == NULL) {
wwarning("Bad address-service-protocol combination");
wwarning(_("Bad address-service-protocol combination"));
return NULL;
}

Expand Down
14 changes: 8 additions & 6 deletions WINGs/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include "../src/config.h"

#include "wconfig.h"

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
Expand Down Expand Up @@ -51,12 +53,12 @@ wstrerror(int errnum)
if (errno < sys_nerr)
return sys_errlist[errnum];

sprintf (buf, "Unknown error %d", errnum);
sprintf (buf, _("Unknown error %d"), errnum);
return buf;
#else /* no strerror() and no sys_errlist[] */
static char buf[] = "Error 12345678901234567890";

sprintf(buf, "Error %d", errnum);
sprintf(buf, _("Error %d"), errnum);
return buf;
#endif
}
Expand Down Expand Up @@ -107,7 +109,7 @@ wwarning(const char *msg, ...)
strcat(buf,"\n");
fflush(stdout);
fputs(_WINGS_progname, stderr);
fputs(" warning: ",stderr);
fputs(_(" warning: "),stderr);
fputs(buf, stderr);
fflush(stdout);
fflush(stderr);
Expand All @@ -134,7 +136,7 @@ wfatal(const char *msg, ...)
strcat(buf,"\n");
fflush(stdout);
fputs(_WINGS_progname, stderr);
fputs(" fatal error: ",stderr);
fputs(_(" fatal error: "),stderr);
fputs(buf, stderr);
fflush(stdout);
fflush(stderr);
Expand All @@ -160,7 +162,7 @@ wsyserror(const char *msg, ...)
vsnprintf(buf, MAXLINE-3, msg, args);
fflush(stdout);
fputs(_WINGS_progname, stderr);
fputs(" error: ", stderr);
fputs(_(" error: "), stderr);
fputs(buf, stderr);
fputs(": ", stderr);
fputs(wstrerror(error), stderr);
Expand Down Expand Up @@ -189,7 +191,7 @@ wsyserrorwithcode(int error, const char *msg, ...)
vsnprintf(buf, MAXLINE-3, msg, args);
fflush(stdout);
fputs(_WINGS_progname, stderr);
fputs(" error: ", stderr);
fputs(_(" error: "), stderr);
fputs(buf, stderr);
fputs(": ", stderr);
fputs(wstrerror(error), stderr);
Expand Down
6 changes: 4 additions & 2 deletions WINGs/findfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include "../src/config.h"

#include "wconfig.h"

#include "WUtil.h"

#include <stdlib.h>
Expand All @@ -45,7 +47,7 @@ wgethomedir()

user = getpwuid(getuid());
if (!user) {
wsyserror("could not get password entry for UID %i", getuid());
wsyserror(_("could not get password entry for UID %i"), getuid());
return "/";
}
if (!user->pw_dir) {
Expand All @@ -63,7 +65,7 @@ getuserhomedir(char *username)

user = getpwnam(username);
if (!user) {
wsyserror("could not get password entry for user %s", username);
wsyserror(_("could not get password entry for user %s"), username);
return NULL;
}
if (!user->pw_dir) {
Expand Down
4 changes: 3 additions & 1 deletion WINGs/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include "../src/config.h"

#include "wconfig.h"

#include <unistd.h>
#include <string.h>
#include <netdb.h>
Expand Down Expand Up @@ -111,7 +113,7 @@ WMGetCurrentHost()
char name[W_MAXHOSTNAMELEN+1];

if (gethostname(name, W_MAXHOSTNAMELEN) < 0) {
wsyserror("Cannot get current host name");
wsyserror(_("Cannot get current host name"));
return NULL;
}

Expand Down
16 changes: 15 additions & 1 deletion WINGs/wapplication.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

#include "WINGsP.h"

#include "wconfig.h"

#include "X11/Xlocale.h"


extern void W_InitNotificationCenter(void);

Expand All @@ -26,11 +30,21 @@ void
WMInitializeApplication(char *applicationName, int *argc, char **argv)
{
int i;

assert(argc!=NULL);
assert(argv!=NULL);
assert(applicationName!=NULL);


setlocale(LC_ALL, "");

#ifdef I18N
if (getenv("NLSPATH"))
bindtextdomain("WINGs", getenv("NLSPATH"));
else
bindtextdomain("WINGs", LOCALEDIR);
#endif

_WINGS_progname = argv[0];

WMApplication.applicationName = wstrdup(applicationName);
Expand Down
10 changes: 6 additions & 4 deletions WINGs/wcolor.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

#include "WINGsP.h"

#include "wconfig.h"

#include <wraster.h>

#define LIGHT_STIPPLE_WIDTH 4
Expand Down Expand Up @@ -193,7 +195,7 @@ WMWhiteColor(WMScreen *scr)
if (!scr->white) {
scr->white = WMCreateRGBColor(scr, 0xffff, 0xffff, 0xffff, True);
if (!scr->white->flags.exact)
wwarning("could not allocate %s color", "white");
wwarning(_("could not allocate %s color"), _("white"));
}
return WMRetainColor(scr->white);
}
Expand All @@ -206,7 +208,7 @@ WMBlackColor(WMScreen *scr)
if (!scr->black) {
scr->black = WMCreateRGBColor(scr, 0, 0, 0, True);
if (!scr->black->flags.exact)
wwarning("could not allocate %s color", "black");
wwarning(_("could not allocate %s color"), _("black"));
}
return WMRetainColor(scr->black);
}
Expand Down Expand Up @@ -245,7 +247,7 @@ WMGrayColor(WMScreen *scr)
} else {
color = WMCreateRGBColor(scr, 0xaeba, 0xaaaa, 0xaeba, True);
if (!color->flags.exact)
wwarning("could not allocate %s color", "gray");
wwarning(_("could not allocate %s color"), _("gray"));
}
scr->gray = color;
}
Expand Down Expand Up @@ -286,7 +288,7 @@ WMDarkGrayColor(WMScreen *scr)
} else {
color = WMCreateRGBColor(scr, 0x5144, 0x5555, 0x5144, True);
if (!color->flags.exact)
wwarning("could not allocate %s color", "dark gray");
wwarning(_("could not allocate %s color"), _("dark gray"));
}
scr->darkGray = color;
}
Expand Down
Loading

0 comments on commit 882b9a8

Please sign in to comment.