printcommand env var parsing will need add'l work.
This commit is contained in:
parent
cdb3659086
commit
34b41a3f31
2 changed files with 18 additions and 5 deletions
|
|
@ -70,11 +70,14 @@ $Id$
|
||||||
|
|
||||||
* System-Related Improvements:
|
* System-Related Improvements:
|
||||||
----------------------------
|
----------------------------
|
||||||
* 'savedir', 'datadir', 'printcommand' and 'altprintcommand' options in
|
* 'savedir' and 'datadir' paths given in configuration files
|
||||||
configuration files (e.g., ~/.tuxpaintrc) now expand environment
|
(e.g., ~/.tuxpaintrc) now have any environment variables and tildes
|
||||||
variables and tildes (e.g., "~" for $HOME, or "~username" for 'username's
|
(e.g., "~" for $HOME, or "~username" for 'username's home directory)
|
||||||
home directory) on Linux. (Using 'wordexp()')
|
expanded.
|
||||||
NOTE: Environment variable expansion not yet supported on other platforms.
|
NOTE: Environment variable expansion via 'wordexp()' -- currently
|
||||||
|
Linux-only.
|
||||||
|
NOTE: 'printcommand' and 'altprintcommand' options not currently parsed
|
||||||
|
for env. vars.
|
||||||
|
|
||||||
* Build System Improvements
|
* Build System Improvements
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
|
||||||
|
|
@ -16021,6 +16021,8 @@ static void parse_options(FILE * fi)
|
||||||
#if !defined(WIN32) && !defined(__APPLE__) && !defined(__BEOS__)
|
#if !defined(WIN32) && !defined(__APPLE__) && !defined(__BEOS__)
|
||||||
else if (strstr(str, "printcommand=") == str)
|
else if (strstr(str, "printcommand=") == str)
|
||||||
{
|
{
|
||||||
|
/* FIXME: This would need to be done one argument (space-delim'd) at a time */
|
||||||
|
/*
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
wordexp_t result;
|
wordexp_t result;
|
||||||
char * dir = strdup(str + 13);
|
char * dir = strdup(str + 13);
|
||||||
|
|
@ -16031,11 +16033,16 @@ static void parse_options(FILE * fi)
|
||||||
printcommand = strdup(result.we_wordv[0]);
|
printcommand = strdup(result.we_wordv[0]);
|
||||||
wordfree(&result);
|
wordfree(&result);
|
||||||
#else
|
#else
|
||||||
|
*/
|
||||||
printcommand = strdup(str + 13);
|
printcommand = strdup(str + 13);
|
||||||
|
/*
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
else if (strstr(str, "altprintcommand=") == str)
|
else if (strstr(str, "altprintcommand=") == str)
|
||||||
{
|
{
|
||||||
|
/* FIXME: This would need to be done one argument (space-delim'd) at a time */
|
||||||
|
/*
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
wordexp_t result;
|
wordexp_t result;
|
||||||
char * dir = strdup(str + 16);
|
char * dir = strdup(str + 16);
|
||||||
|
|
@ -16046,8 +16053,11 @@ static void parse_options(FILE * fi)
|
||||||
altprintcommand = strdup(result.we_wordv[0]);
|
altprintcommand = strdup(result.we_wordv[0]);
|
||||||
wordfree(&result);
|
wordfree(&result);
|
||||||
#else
|
#else
|
||||||
|
*/
|
||||||
altprintcommand = strdup(str + 16);
|
altprintcommand = strdup(str + 16);
|
||||||
|
/*
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else if (strcmp(str, "saveover=yes") == 0)
|
else if (strcmp(str, "saveover=yes") == 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue