diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-03-05 17:28:45 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-03-05 17:28:45 +0000 |
commit | d8b0da33376a2f17eceac986f9c4986607a6ffe9 (patch) | |
tree | 846dd2c145248788040a0d6590b8fd7f0eef36fc /dmake | |
parent | 1f29ee2f7696c1634728f6f06c4167439f050ed4 (diff) |
INTEGRATION: CWS dmake412_DEV300 (1.11.2); FILE MERGED
2008/02/07 19:50:01 vq 1.11.2.2: #i83940# Make the result of $(mktmp ..) aware of the .WINPATH setting.
2007/11/11 00:03:32 vq 1.11.2.1: #i83523# Rename macro PVOID to DMPVOID to avoid problems when including
windows.h.
Diffstat (limited to 'dmake')
-rw-r--r-- | dmake/function.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/dmake/function.c b/dmake/function.c index 6c498bda9..cf6937e02 100644 --- a/dmake/function.c +++ b/dmake/function.c @@ -1,6 +1,6 @@ /* $RCSfile: function.c,v $ --- $Revision: 1.11 $ --- last change: $Author: ihi $ $Date: 2007-10-15 15:39:11 $ +-- $Revision: 1.12 $ +-- last change: $Author: kz $ $Date: 2008-03-05 18:28:45 $ -- -- SYNOPSIS -- GNU style functions for dmake. @@ -41,7 +41,7 @@ static char *_exec_assign ANSI((char *)); static char *_exec_foreach ANSI((char *, char *, char *)); static char *_exec_andor ANSI((char *, int)); static char *_exec_not ANSI((char *)); -static int _mystrcmp ANSI((const PVOID, const PVOID)); +static int _mystrcmp ANSI((const DMPVOID, const DMPVOID)); PUBLIC char * @@ -367,18 +367,26 @@ char *data; Link_temp( Current_target, tmpfile, tmpname ); /* Don't free tmpname if it is used. It is stored in a FILELIST - * member in Link_temp(). */ + * member in Link_temp() and freed by Unlink_temp_files(). */ } else FREE(tmpname); } + /* If file expanded to a non empty value tmpfile is already opened, + * otherwise open it now. */ if( !tmpfile ) tmpfile = Start_temp( "", Current_target, &tmpname ); /* If the text parameter is given return its expanded value * instead of the used filename. */ - if( !text || !*text ) text = tmpname; + if( !text || !*text ) { + /* tmpname is freed by Unlink_temp_files(). */ + text = DmStrDup(DO_WINPATH(tmpname)); + } + else { + text = Expand(text); + } data = Expand(data); @@ -386,7 +394,7 @@ char *data; Close_temp( Current_target, tmpfile ); FREE(data); - return( Expand(text) ); + return( text ); } @@ -500,8 +508,8 @@ char *args; static int _mystrcmp( p, q ) -const PVOID p; -const PVOID q; +const DMPVOID p; +const DMPVOID q; { return(strcmp(*((const char **)p),*((const char **)q))); } |