Kaydet (Commit) 7e0d741a authored tarafından Kurt Zenker's avatar Kurt Zenker

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.
üst acb382e2
/* $RCSfile: function.c,v $ /* $RCSfile: function.c,v $
-- $Revision: 1.11 $ -- $Revision: 1.12 $
-- last change: $Author: ihi $ $Date: 2007-10-15 15:39:11 $ -- last change: $Author: kz $ $Date: 2008-03-05 18:28:45 $
-- --
-- SYNOPSIS -- SYNOPSIS
-- GNU style functions for dmake. -- GNU style functions for dmake.
...@@ -41,7 +41,7 @@ static char *_exec_assign ANSI((char *)); ...@@ -41,7 +41,7 @@ static char *_exec_assign ANSI((char *));
static char *_exec_foreach ANSI((char *, char *, char *)); static char *_exec_foreach ANSI((char *, char *, char *));
static char *_exec_andor ANSI((char *, int)); static char *_exec_andor ANSI((char *, int));
static char *_exec_not ANSI((char *)); static char *_exec_not ANSI((char *));
static int _mystrcmp ANSI((const PVOID, const PVOID)); static int _mystrcmp ANSI((const DMPVOID, const DMPVOID));
PUBLIC char * PUBLIC char *
...@@ -367,18 +367,26 @@ char *data; ...@@ -367,18 +367,26 @@ char *data;
Link_temp( Current_target, tmpfile, tmpname ); Link_temp( Current_target, tmpfile, tmpname );
/* Don't free tmpname if it is used. It is stored in a FILELIST /* 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 else
FREE(tmpname); FREE(tmpname);
} }
/* If file expanded to a non empty value tmpfile is already opened,
* otherwise open it now. */
if( !tmpfile ) if( !tmpfile )
tmpfile = Start_temp( "", Current_target, &tmpname ); tmpfile = Start_temp( "", Current_target, &tmpname );
/* If the text parameter is given return its expanded value /* If the text parameter is given return its expanded value
* instead of the used filename. */ * 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); data = Expand(data);
...@@ -386,7 +394,7 @@ char *data; ...@@ -386,7 +394,7 @@ char *data;
Close_temp( Current_target, tmpfile ); Close_temp( Current_target, tmpfile );
FREE(data); FREE(data);
return( Expand(text) ); return( text );
} }
...@@ -500,8 +508,8 @@ char *args; ...@@ -500,8 +508,8 @@ char *args;
static int static int
_mystrcmp( p, q ) _mystrcmp( p, q )
const PVOID p; const DMPVOID p;
const PVOID q; const DMPVOID q;
{ {
return(strcmp(*((const char **)p),*((const char **)q))); return(strcmp(*((const char **)p),*((const char **)q)));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment