58 lines
1.7 KiB
Plaintext
58 lines
1.7 KiB
Plaintext
*** util/Sys.h.orig Sat Feb 14 02:47:52 1998
|
|
--- util/Sys.h Mon Nov 9 15:58:16 1998
|
|
***************
|
|
*** 126,131 ****
|
|
--- 126,133 ----
|
|
static int mkstemp(char* templ) { return ::mkstemp(templ); }
|
|
static FILE* fopen(const char* filename, const char* mode)
|
|
{ return ::fopen(filename, mode); }
|
|
+ static FILE* fdopen(int fd, const char* mode)
|
|
+ { return ::fdopen(fd, mode); }
|
|
|
|
static int getOpenMax();
|
|
};
|
|
*** util/TextFmt.c++.orig Sat Feb 14 02:47:30 1998
|
|
--- util/TextFmt.c++ Mon Nov 9 16:28:13 1998
|
|
***************
|
|
*** 47,52 ****
|
|
--- 47,53 ----
|
|
#if HAS_MMAP
|
|
#include <sys/mman.h>
|
|
#endif
|
|
+ #include <paths.h>
|
|
|
|
#define LUNIT (72*20) // local coord system is .05 scale
|
|
#define ICVT(x) ((TextCoord)((x)*LUNIT)) // scale inches to local coordinates
|
|
***************
|
|
*** 240,251 ****
|
|
output = o;
|
|
pageHeight = ICVT(physPageHeight);
|
|
pageWidth = ICVT(physPageWidth);
|
|
|
|
/*
|
|
* Open the file w+ so that we can reread the temp file.
|
|
*/
|
|
! tempfile = tmpnam(NULL);
|
|
! tf = Sys::fopen(tempfile, "w+");
|
|
if (tf == NULL)
|
|
fatal("%s: Cannot open temporary file: %s",
|
|
(const char*) tempfile, strerror(errno));
|
|
--- 241,257 ----
|
|
output = o;
|
|
pageHeight = ICVT(physPageHeight);
|
|
pageWidth = ICVT(physPageWidth);
|
|
+ int fd;
|
|
|
|
/*
|
|
* Open the file w+ so that we can reread the temp file.
|
|
*/
|
|
! tempfile = _PATH_TMP ".hylafax.XXXXXXXXXXXX";
|
|
! fd = Sys::mkstemp(tempfile);
|
|
! if (fd == -1)
|
|
! fatal("%s: Cannot open temporary file: %s",
|
|
! (const char*) tempfile, strerror(errno));
|
|
! tf = Sys::fdopen(fd, "w+");
|
|
if (tf == NULL)
|
|
fatal("%s: Cannot open temporary file: %s",
|
|
(const char*) tempfile, strerror(errno));
|