Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
1.1 KiB

/*****************************************************************************
*
* io.c
*
*****************************************************************************/
#include "m4.h"
/*****************************************************************************
*
* WriteHfPvCb
*
* Write bytes to a stream or die.
*
*****************************************************************************/
void STDCALL
WriteHfPvCb(HF hf, PCVOID pv, CB cb)
{
CB cbRc = cbWriteHfPvCb(hf, pv, cb);
/* Don't Die() if we couldn't write to hfErr or we will recurse to death */
if (cb != cbRc && hf != hfErr) {
Die("error writing");
}
}
#ifdef POSIX
/*****************************************************************************
*
* GetTempFileName
*
*****************************************************************************/
UINT
GetTempFileName(PCSTR pszPath, PCSTR pszPrefix, UINT uiUnique, PTCH ptchBuf)
{
sprintf(ptchBuf, "%s/%sXXXXXX", pszPath, pszPrefix);
return (UINT)mktemp(ptchBuf);
}
#endif