mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
Add buildvfs_fopen_write_text
Long-term we will need to replace all uses of "\n" in string literals printed to disk. git-svn-id: https://svn.eduke32.com/eduke32@7394 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
381517ffa0
commit
6ba0b64de6
3 changed files with 4 additions and 2 deletions
|
@ -16,6 +16,7 @@ using buildvfs_FILE = PHYSFS_File *;
|
|||
#define buildvfs_fwrite(p, s, n, fp) PHYSFS_writeBytes((fp), (p), (s)*(n))
|
||||
#define buildvfs_fopen_read(fn) PHYSFS_openRead(fn)
|
||||
#define buildvfs_fopen_write(fn) PHYSFS_openWrite(fn)
|
||||
#define buildvfs_fopen_write_text(fn) PHYSFS_openWrite(fn)
|
||||
#define buildvfs_fopen_append(fn) PHYSFS_openAppend(fn)
|
||||
static inline int buildvfs_fgetc(buildvfs_FILE fp)
|
||||
{
|
||||
|
@ -86,6 +87,7 @@ using buildvfs_FILE = FILE *;
|
|||
#define buildvfs_fwrite(p, s, n, fp) fwrite((p), (s), (n), (fp))
|
||||
#define buildvfs_fopen_read(fn) fopen((fn), "rb")
|
||||
#define buildvfs_fopen_write(fn) fopen((fn), "wb")
|
||||
#define buildvfs_fopen_write_text(fn) fopen((fn), "w")
|
||||
#define buildvfs_fopen_append(fn) fopen((fn), "ab")
|
||||
#define buildvfs_fgetc(fp) fgetc(fp)
|
||||
#define buildvfs_fputc(c, fp) fputc((c), (fp))
|
||||
|
|
|
@ -764,7 +764,7 @@ void OSD_SetLogFile(const char *fn)
|
|||
if (!fn)
|
||||
return;
|
||||
|
||||
osdlog = buildvfs_fopen_write(fn);
|
||||
osdlog = buildvfs_fopen_write_text(fn);
|
||||
|
||||
if (osdlog)
|
||||
{
|
||||
|
|
|
@ -481,7 +481,7 @@ void SCRIPT_Save(int32_t scripthandle, char const * filename)
|
|||
if (!filename) return;
|
||||
if (!SC(scripthandle)) return;
|
||||
|
||||
fp = buildvfs_fopen_write(filename);
|
||||
fp = buildvfs_fopen_write_text(filename);
|
||||
if (!fp) return;
|
||||
|
||||
numsect = SCRIPT_NumberSections(scripthandle);
|
||||
|
|
Loading…
Reference in a new issue