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