Move PHYSFSX_putc to the one file that uses it
This commit is contained in:
parent
c1c028362e
commit
93589368c9
|
@ -216,16 +216,6 @@ static inline int PHYSFSX_puts_literal(PHYSFS_file *file, const char (&s)[len])
|
|||
}
|
||||
#define PHYSFSX_puts(A1,S,...) (PHYSFSX_puts(A1,S, _dxx_call_puts_parameter2(1, ## __VA_ARGS__, strlen(S))))
|
||||
|
||||
static inline int PHYSFSX_putc(PHYSFS_file *file, int c)
|
||||
{
|
||||
unsigned char ch = (unsigned char)c;
|
||||
|
||||
if (PHYSFS_write(file, &ch, 1, 1) < 1)
|
||||
return -1;
|
||||
else
|
||||
return (int)c;
|
||||
}
|
||||
|
||||
static inline int PHYSFSX_fgetc(PHYSFS_file *const fp)
|
||||
{
|
||||
unsigned char c;
|
||||
|
|
|
@ -380,6 +380,14 @@ int pcx_encode_line(const uint8_t *inBuff, uint_fast32_t inLen, PHYSFS_file *fp)
|
|||
return total;
|
||||
}
|
||||
|
||||
static inline int PHYSFSX_putc(PHYSFS_File *file, uint8_t ch)
|
||||
{
|
||||
if (PHYSFS_write(file, &ch, 1, 1) < 1)
|
||||
return -1;
|
||||
else
|
||||
return ch;
|
||||
}
|
||||
|
||||
// subroutine for writing an encoded byte pair
|
||||
// returns count of bytes written, 0 if error
|
||||
int pcx_encode_byte(ubyte byt, ubyte cnt, PHYSFS_file *fid)
|
||||
|
|
Loading…
Reference in a new issue