1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-22 14:08:06 +01:00

fixed some bugs

This commit is contained in:
kojima
2004-10-26 03:03:02 +00:00
parent 087a16400f
commit bbd1e5dada
6 changed files with 11 additions and 11 deletions

View File

@@ -51,12 +51,12 @@ wstrerror(int errnum)
if (errno < sys_nerr)
return sys_errlist[errnum];
sprintf (buf, _("Unknown error %d"), errnum);
snprintf(buf, sizeof(buf), _("Unknown error %d"), errnum);
return buf;
#else /* no strerror() and no sys_errlist[] */
static char buf[] = "Error 12345678901234567890";
sprintf(buf, _("Error %d"), errnum);
snprintf(buf, sizeof(buf), _("Error %d"), errnum);
return buf;
#endif
}

View File

@@ -24,7 +24,7 @@ POTFILES = \
SUFFIXES = .po .mo
.po.mo:
msgfmt -o $@ $<
msgfmt -c -o $@ $<
all-local: $(CATALOGS)

View File

@@ -24,11 +24,11 @@ xlfdToFcPattern(char *xlfd, int size)
FcPattern *pattern;
char *fname, *ptr;
fname = wmalloc(strlen(xlfd) + 20);
if (strstr(xlfd, "%d")!=NULL)
sprintf(fname, xlfd, size ? size : DEFAULT_SIZE);
else
strcpy(fname, xlfd);
if (strchr(xlfd, "%")!=NULL)
return FcNameParse("sans:pixelsize=12");
else {
fname= wstrdup(xlfd);
}
if ((ptr = strchr(fname, ','))) {
*ptr = 0;

View File

@@ -32,7 +32,7 @@ POTFILES = \
SUFFIXES = .po .mo
.po.mo:
msgfmt -o $@ $<
msgfmt -c -o $@ $<
all-local: $(CATALOGS)

View File

@@ -41,7 +41,7 @@ POTFILES = \
SUFFIXES = .po .mo
.po.mo:
msgfmt -o $@ $<
msgfmt -c -o $@ $<
all-local: $(CATALOGS)

View File

@@ -1299,7 +1299,7 @@ wWorkspaceRename(WScreen *scr, int workspace, char *name)
tmp = cropline(name);
if (strlen(tmp)==0) {
sprintf(buf, _("Workspace %i"), workspace+1);
snprintf(buf, sizeof(buf), _("Workspace %i"), workspace+1);
} else {
strncpy(buf, tmp, MAX_WORKSPACENAME_WIDTH);
}