mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-16 05:55:45 +01:00
Idle fixes
- add new wglobaldefaultspathfordomain() to wings (replaces several hand-rolled individual implementations in utils/) - make all of 'em handle -h|--help, -v|--version - try making them not to nothing silently - change various ways of knowing thyselves to using __progname - generally try to make them feel similar (NOT right, similar -- right is a completely different matter)
This commit is contained in:
committed by
Carlos R. Mafra
parent
9dadfe7a68
commit
118a93808a
@@ -298,6 +298,7 @@ WMRange wmkrange(int start, int count);
|
||||
char* wusergnusteppath();
|
||||
|
||||
char* wdefaultspathfordomain(char *domain);
|
||||
char* wglobaldefaultspathfordomain(const char *domain);
|
||||
|
||||
void wusleep(unsigned int microsec);
|
||||
|
||||
|
||||
@@ -80,6 +80,22 @@ char *wdefaultspathfordomain(char *domain)
|
||||
return path;
|
||||
}
|
||||
|
||||
/* XXX: doesn't quite belong to *user*defaults.c */
|
||||
#ifndef GLOBAL_DEFAULTS_SUBDIR
|
||||
#define GLOBAL_DEFAULTS_SUBDIR "WindowMaker"
|
||||
#endif
|
||||
char *wglobaldefaultspathfordomain(const char *domain)
|
||||
{
|
||||
char *t = NULL;
|
||||
size_t len;
|
||||
|
||||
len = strlen( SYSCONFDIR ) + strlen( GLOBAL_DEFAULTS_SUBDIR ) + strlen(domain) + 3;
|
||||
t = wmalloc(len);
|
||||
snprintf(t, len, "%s/%s/%s", SYSCONFDIR, GLOBAL_DEFAULTS_SUBDIR, domain);
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
static void
|
||||
#ifdef HAVE_ATEXIT
|
||||
saveDefaultsChanges(void)
|
||||
|
||||
Reference in New Issue
Block a user