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:
@@ -51,12 +51,12 @@ wstrerror(int errnum)
|
|||||||
if (errno < sys_nerr)
|
if (errno < sys_nerr)
|
||||||
return sys_errlist[errnum];
|
return sys_errlist[errnum];
|
||||||
|
|
||||||
sprintf (buf, _("Unknown error %d"), errnum);
|
snprintf(buf, sizeof(buf), _("Unknown error %d"), errnum);
|
||||||
return buf;
|
return buf;
|
||||||
#else /* no strerror() and no sys_errlist[] */
|
#else /* no strerror() and no sys_errlist[] */
|
||||||
static char buf[] = "Error 12345678901234567890";
|
static char buf[] = "Error 12345678901234567890";
|
||||||
|
|
||||||
sprintf(buf, _("Error %d"), errnum);
|
snprintf(buf, sizeof(buf), _("Error %d"), errnum);
|
||||||
return buf;
|
return buf;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ POTFILES = \
|
|||||||
SUFFIXES = .po .mo
|
SUFFIXES = .po .mo
|
||||||
|
|
||||||
.po.mo:
|
.po.mo:
|
||||||
msgfmt -o $@ $<
|
msgfmt -c -o $@ $<
|
||||||
|
|
||||||
|
|
||||||
all-local: $(CATALOGS)
|
all-local: $(CATALOGS)
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ xlfdToFcPattern(char *xlfd, int size)
|
|||||||
FcPattern *pattern;
|
FcPattern *pattern;
|
||||||
char *fname, *ptr;
|
char *fname, *ptr;
|
||||||
|
|
||||||
fname = wmalloc(strlen(xlfd) + 20);
|
if (strchr(xlfd, "%")!=NULL)
|
||||||
if (strstr(xlfd, "%d")!=NULL)
|
return FcNameParse("sans:pixelsize=12");
|
||||||
sprintf(fname, xlfd, size ? size : DEFAULT_SIZE);
|
else {
|
||||||
else
|
fname= wstrdup(xlfd);
|
||||||
strcpy(fname, xlfd);
|
}
|
||||||
|
|
||||||
if ((ptr = strchr(fname, ','))) {
|
if ((ptr = strchr(fname, ','))) {
|
||||||
*ptr = 0;
|
*ptr = 0;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ POTFILES = \
|
|||||||
SUFFIXES = .po .mo
|
SUFFIXES = .po .mo
|
||||||
|
|
||||||
.po.mo:
|
.po.mo:
|
||||||
msgfmt -o $@ $<
|
msgfmt -c -o $@ $<
|
||||||
|
|
||||||
|
|
||||||
all-local: $(CATALOGS)
|
all-local: $(CATALOGS)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ POTFILES = \
|
|||||||
SUFFIXES = .po .mo
|
SUFFIXES = .po .mo
|
||||||
|
|
||||||
.po.mo:
|
.po.mo:
|
||||||
msgfmt -o $@ $<
|
msgfmt -c -o $@ $<
|
||||||
|
|
||||||
|
|
||||||
all-local: $(CATALOGS)
|
all-local: $(CATALOGS)
|
||||||
|
|||||||
@@ -1299,7 +1299,7 @@ wWorkspaceRename(WScreen *scr, int workspace, char *name)
|
|||||||
tmp = cropline(name);
|
tmp = cropline(name);
|
||||||
|
|
||||||
if (strlen(tmp)==0) {
|
if (strlen(tmp)==0) {
|
||||||
sprintf(buf, _("Workspace %i"), workspace+1);
|
snprintf(buf, sizeof(buf), _("Workspace %i"), workspace+1);
|
||||||
} else {
|
} else {
|
||||||
strncpy(buf, tmp, MAX_WORKSPACENAME_WIDTH);
|
strncpy(buf, tmp, MAX_WORKSPACENAME_WIDTH);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user