1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-16 14:15:46 +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:
Tamas TEVESZ
2010-03-18 23:14:23 +01:00
committed by Carlos R. Mafra
parent 9dadfe7a68
commit 118a93808a
13 changed files with 198 additions and 378 deletions

View File

@@ -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)