mirror of
https://github.com/libretro/beetle-psx-libretro.git
synced 2024-11-27 19:00:35 +00:00
Remove unused trio functions
This commit is contained in:
parent
4ea672708c
commit
517d8a47eb
@ -78,20 +78,6 @@ void FileWrapper::write(const void *data, uint64_t count)
|
||||
fwrite(data, 1, count, fp);
|
||||
}
|
||||
|
||||
int FileWrapper::scanf(const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
va_start(ap, format);
|
||||
|
||||
ret = trio_vfscanf(fp, format, ap);
|
||||
|
||||
va_end(ap);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void FileWrapper::put_char(int c)
|
||||
{
|
||||
fputc(c, fp);
|
||||
|
@ -15,8 +15,6 @@ class FileWrapper
|
||||
|
||||
void write(const void *data, uint64_t count);
|
||||
|
||||
int scanf(const char *format, ...) MDFN_FORMATSTR(scanf, 2, 3);
|
||||
|
||||
void put_char(int c);
|
||||
|
||||
void put_string(const char *str);
|
||||
|
@ -136,11 +136,11 @@ void PS_GPU::DrawLine(line_point *points)
|
||||
// Sign extension is not necessary here for x and y, due to the maximum values that ClipX1 and ClipY1 can contain.
|
||||
const int32_t x = (cur_point.x >> LINE_XY_FRACTBITS) & 2047;
|
||||
const int32_t y = (cur_point.y >> LINE_XY_FRACTBITS) & 2047;
|
||||
uint16_t pix = 0x8000;
|
||||
|
||||
if(!LineSkipTest(this, y))
|
||||
{
|
||||
uint8_t r, g, b;
|
||||
uint16_t pix = 0x8000;
|
||||
|
||||
if(goraud)
|
||||
{
|
||||
|
@ -2965,30 +2965,6 @@ TRIO_ARGS6((destination, destinationSize, OutStream, format, arglist, argarray),
|
||||
/*************************************************************************
|
||||
* TrioOutStreamFile
|
||||
*/
|
||||
#if TRIO_FEATURE_FILE || TRIO_FEATURE_STDIO
|
||||
TRIO_PRIVATE void
|
||||
TrioOutStreamFile
|
||||
TRIO_ARGS2((self, output),
|
||||
trio_class_t *self,
|
||||
int output)
|
||||
{
|
||||
FILE *file;
|
||||
|
||||
assert(VALID(self));
|
||||
assert(VALID(self->location));
|
||||
|
||||
file = (FILE *)self->location;
|
||||
self->processed++;
|
||||
if (fputc(output, file) == EOF)
|
||||
{
|
||||
self->error = TRIO_ERROR_RETURN(TRIO_EOF, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
self->actually.committed++;
|
||||
}
|
||||
}
|
||||
#endif /* TRIO_FEATURE_FILE || TRIO_FEATURE_STDIO */
|
||||
|
||||
/*************************************************************************
|
||||
* TrioOutStreamCustom
|
||||
@ -3073,162 +3049,6 @@ TRIO_ARGS2((self, output),
|
||||
#if defined(TRIO_DOCUMENTATION)
|
||||
# include "doc/doc_printf.h"
|
||||
#endif
|
||||
/** @addtogroup Printf
|
||||
@{
|
||||
*/
|
||||
|
||||
/*************************************************************************
|
||||
* printf
|
||||
*/
|
||||
|
||||
/**
|
||||
Print to standard output stream.
|
||||
|
||||
@param format Formatting string.
|
||||
@param ... Arguments.
|
||||
@return Number of printed characters.
|
||||
*/
|
||||
#if TRIO_FEATURE_STDIO
|
||||
TRIO_PUBLIC int
|
||||
trio_printf
|
||||
TRIO_VARGS2((format, va_alist),
|
||||
TRIO_CONST char *format,
|
||||
TRIO_VA_DECL)
|
||||
{
|
||||
int status;
|
||||
va_list args;
|
||||
|
||||
assert(VALID(format));
|
||||
|
||||
TRIO_VA_START(args, format);
|
||||
status = TrioFormat(stdout, 0, TrioOutStreamFile, format, args, NULL);
|
||||
TRIO_VA_END(args);
|
||||
return status;
|
||||
}
|
||||
#endif /* TRIO_FEATURE_STDIO */
|
||||
|
||||
/**
|
||||
Print to standard output stream.
|
||||
|
||||
@param format Formatting string.
|
||||
@param args Arguments.
|
||||
@return Number of printed characters.
|
||||
*/
|
||||
#if TRIO_FEATURE_STDIO
|
||||
TRIO_PUBLIC int
|
||||
trio_vprintf
|
||||
TRIO_ARGS2((format, args),
|
||||
TRIO_CONST char *format,
|
||||
va_list args)
|
||||
{
|
||||
assert(VALID(format));
|
||||
|
||||
return TrioFormat(stdout, 0, TrioOutStreamFile, format, args, NULL);
|
||||
}
|
||||
#endif /* TRIO_FEATURE_STDIO */
|
||||
|
||||
/**
|
||||
Print to standard output stream.
|
||||
|
||||
@param format Formatting string.
|
||||
@param args Arguments.
|
||||
@return Number of printed characters.
|
||||
*/
|
||||
#if TRIO_FEATURE_STDIO
|
||||
TRIO_PUBLIC int
|
||||
trio_printfv
|
||||
TRIO_ARGS2((format, args),
|
||||
TRIO_CONST char *format,
|
||||
trio_pointer_t * args)
|
||||
{
|
||||
static va_list unused;
|
||||
|
||||
assert(VALID(format));
|
||||
|
||||
return TrioFormat(stdout, 0, TrioOutStreamFile, format, unused, args);
|
||||
}
|
||||
#endif /* TRIO_FEATURE_STDIO */
|
||||
|
||||
/*************************************************************************
|
||||
* fprintf
|
||||
*/
|
||||
|
||||
/**
|
||||
Print to file.
|
||||
|
||||
@param file File pointer.
|
||||
@param format Formatting string.
|
||||
@param ... Arguments.
|
||||
@return Number of printed characters.
|
||||
*/
|
||||
#if TRIO_FEATURE_FILE
|
||||
TRIO_PUBLIC int
|
||||
trio_fprintf
|
||||
TRIO_VARGS3((file, format, va_alist),
|
||||
FILE *file,
|
||||
TRIO_CONST char *format,
|
||||
TRIO_VA_DECL)
|
||||
{
|
||||
int status;
|
||||
va_list args;
|
||||
|
||||
assert(VALID(file));
|
||||
assert(VALID(format));
|
||||
|
||||
TRIO_VA_START(args, format);
|
||||
status = TrioFormat(file, 0, TrioOutStreamFile, format, args, NULL);
|
||||
TRIO_VA_END(args);
|
||||
return status;
|
||||
}
|
||||
#endif /* TRIO_FEATURE_FILE */
|
||||
|
||||
/**
|
||||
Print to file.
|
||||
|
||||
@param file File pointer.
|
||||
@param format Formatting string.
|
||||
@param args Arguments.
|
||||
@return Number of printed characters.
|
||||
*/
|
||||
#if TRIO_FEATURE_FILE
|
||||
TRIO_PUBLIC int
|
||||
trio_vfprintf
|
||||
TRIO_ARGS3((file, format, args),
|
||||
FILE *file,
|
||||
TRIO_CONST char *format,
|
||||
va_list args)
|
||||
{
|
||||
assert(VALID(file));
|
||||
assert(VALID(format));
|
||||
|
||||
return TrioFormat(file, 0, TrioOutStreamFile, format, args, NULL);
|
||||
}
|
||||
#endif /* TRIO_FEATURE_FILE */
|
||||
|
||||
/**
|
||||
Print to file.
|
||||
|
||||
@param file File pointer.
|
||||
@param format Formatting string.
|
||||
@param args Arguments.
|
||||
@return Number of printed characters.
|
||||
*/
|
||||
#if TRIO_FEATURE_FILE
|
||||
TRIO_PUBLIC int
|
||||
trio_fprintfv
|
||||
TRIO_ARGS3((file, format, args),
|
||||
FILE *file,
|
||||
TRIO_CONST char *format,
|
||||
trio_pointer_t * args)
|
||||
{
|
||||
static va_list unused;
|
||||
|
||||
assert(VALID(file));
|
||||
assert(VALID(format));
|
||||
|
||||
return TrioFormat(file, 0, TrioOutStreamFile, format, unused, args);
|
||||
}
|
||||
#endif /* TRIO_FEATURE_FILE */
|
||||
|
||||
/*************************************************************************
|
||||
* dprintf
|
||||
@ -4628,69 +4448,6 @@ TRIO_ARGS7((source, sourceSize, InStream, UndoStream, format, arglist, argarray)
|
||||
return status;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* TrioInStreamFile
|
||||
*/
|
||||
#if TRIO_FEATURE_FILE || TRIO_FEATURE_STDIO
|
||||
TRIO_PRIVATE void
|
||||
TrioInStreamFile
|
||||
TRIO_ARGS2((self, intPointer),
|
||||
trio_class_t *self,
|
||||
int *intPointer)
|
||||
{
|
||||
FILE *file = (FILE *)self->location;
|
||||
|
||||
assert(VALID(self));
|
||||
assert(VALID(file));
|
||||
|
||||
self->actually.cached = 0;
|
||||
|
||||
/* The initial value of self->current is zero */
|
||||
if (self->current == EOF)
|
||||
{
|
||||
self->error = (ferror(file))
|
||||
? TRIO_ERROR_RETURN(TRIO_ERRNO, 0)
|
||||
: TRIO_ERROR_RETURN(TRIO_EOF, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
self->processed++;
|
||||
self->actually.cached++;
|
||||
}
|
||||
|
||||
self->current = fgetc(file);
|
||||
|
||||
if (VALID(intPointer))
|
||||
{
|
||||
*intPointer = self->current;
|
||||
}
|
||||
}
|
||||
#endif /* TRIO_FEATURE_FILE || TRIO_FEATURE_STDIO */
|
||||
|
||||
/*************************************************************************
|
||||
* TrioUndoStreamFile
|
||||
*/
|
||||
#if TRIO_FEATURE_FILE || TRIO_FEATURE_STDIO
|
||||
TRIO_PRIVATE void
|
||||
TrioUndoStreamFile
|
||||
TRIO_ARGS1((self),
|
||||
trio_class_t *self)
|
||||
{
|
||||
FILE *file = (FILE *)self->location;
|
||||
|
||||
assert(VALID(self));
|
||||
assert(VALID(file));
|
||||
|
||||
if (self->actually.cached > 0)
|
||||
{
|
||||
assert(self->actually.cached == 1);
|
||||
|
||||
self->current = ungetc(self->current, file);
|
||||
self->actually.cached = 0;
|
||||
}
|
||||
}
|
||||
#endif /* TRIO_FEATURE_FILE || TRIO_FEATURE_STDIO */
|
||||
|
||||
/*************************************************************************
|
||||
* TrioInStreamCustom
|
||||
*/
|
||||
@ -4747,181 +4504,6 @@ TRIO_ARGS2((self, intPointer),
|
||||
* scanf
|
||||
*/
|
||||
|
||||
/**
|
||||
Scan characters from standard input stream.
|
||||
|
||||
@param format Formatting string.
|
||||
@param ... Arguments.
|
||||
@return Number of scanned characters.
|
||||
*/
|
||||
#if TRIO_FEATURE_STDIO
|
||||
TRIO_PUBLIC int
|
||||
trio_scanf
|
||||
TRIO_VARGS2((format, va_alist),
|
||||
TRIO_CONST char *format,
|
||||
TRIO_VA_DECL)
|
||||
{
|
||||
int status;
|
||||
va_list args;
|
||||
|
||||
assert(VALID(format));
|
||||
|
||||
TRIO_VA_START(args, format);
|
||||
status = TrioScan((trio_pointer_t)stdin, 0,
|
||||
TrioInStreamFile,
|
||||
TrioUndoStreamFile,
|
||||
format, args, NULL);
|
||||
TRIO_VA_END(args);
|
||||
return status;
|
||||
}
|
||||
#endif /* TRIO_FEATURE_STDIO */
|
||||
|
||||
/**
|
||||
Scan characters from standard input stream.
|
||||
|
||||
@param format Formatting string.
|
||||
@param args Arguments.
|
||||
@return Number of scanned characters.
|
||||
*/
|
||||
#if TRIO_FEATURE_STDIO
|
||||
TRIO_PUBLIC int
|
||||
trio_vscanf
|
||||
TRIO_ARGS2((format, args),
|
||||
TRIO_CONST char *format,
|
||||
va_list args)
|
||||
{
|
||||
assert(VALID(format));
|
||||
|
||||
return TrioScan((trio_pointer_t)stdin, 0,
|
||||
TrioInStreamFile,
|
||||
TrioUndoStreamFile,
|
||||
format, args, NULL);
|
||||
}
|
||||
#endif /* TRIO_FEATURE_STDIO */
|
||||
|
||||
/**
|
||||
Scan characters from standard input stream.
|
||||
|
||||
@param format Formatting string.
|
||||
@param args Arguments.
|
||||
@return Number of scanned characters.
|
||||
*/
|
||||
#if TRIO_FEATURE_STDIO
|
||||
TRIO_PUBLIC int
|
||||
trio_scanfv
|
||||
TRIO_ARGS2((format, args),
|
||||
TRIO_CONST char *format,
|
||||
trio_pointer_t *args)
|
||||
{
|
||||
static va_list unused;
|
||||
|
||||
assert(VALID(format));
|
||||
|
||||
return TrioScan((trio_pointer_t)stdin, 0,
|
||||
TrioInStreamFile,
|
||||
TrioUndoStreamFile,
|
||||
format, unused, args);
|
||||
}
|
||||
#endif /* TRIO_FEATURE_STDIO */
|
||||
|
||||
/*************************************************************************
|
||||
* fscanf
|
||||
*/
|
||||
|
||||
/**
|
||||
Scan characters from file.
|
||||
|
||||
@param file File pointer.
|
||||
@param format Formatting string.
|
||||
@param ... Arguments.
|
||||
@return Number of scanned characters.
|
||||
*/
|
||||
#if TRIO_FEATURE_FILE
|
||||
TRIO_PUBLIC int
|
||||
trio_fscanf
|
||||
TRIO_VARGS3((file, format, va_alist),
|
||||
FILE *file,
|
||||
TRIO_CONST char *format,
|
||||
TRIO_VA_DECL)
|
||||
{
|
||||
int status;
|
||||
va_list args;
|
||||
|
||||
assert(VALID(file));
|
||||
assert(VALID(format));
|
||||
|
||||
TRIO_VA_START(args, format);
|
||||
status = TrioScan((trio_pointer_t)file, 0,
|
||||
TrioInStreamFile,
|
||||
TrioUndoStreamFile,
|
||||
format, args, NULL);
|
||||
TRIO_VA_END(args);
|
||||
return status;
|
||||
}
|
||||
#endif /* TRIO_FEATURE_FILE */
|
||||
|
||||
/**
|
||||
Scan characters from file.
|
||||
|
||||
@param file File pointer.
|
||||
@param format Formatting string.
|
||||
@param args Arguments.
|
||||
@return Number of scanned characters.
|
||||
*/
|
||||
#if TRIO_FEATURE_FILE
|
||||
TRIO_PUBLIC int
|
||||
trio_vfscanf
|
||||
TRIO_ARGS3((file, format, args),
|
||||
FILE *file,
|
||||
TRIO_CONST char *format,
|
||||
va_list args)
|
||||
{
|
||||
assert(VALID(file));
|
||||
assert(VALID(format));
|
||||
|
||||
return TrioScan((trio_pointer_t)file, 0,
|
||||
TrioInStreamFile,
|
||||
TrioUndoStreamFile,
|
||||
format, args, NULL);
|
||||
}
|
||||
#endif /* TRIO_FEATURE_FILE */
|
||||
|
||||
/**
|
||||
Scan characters from file.
|
||||
|
||||
@param file File pointer.
|
||||
@param format Formatting string.
|
||||
@param args Arguments.
|
||||
@return Number of scanned characters.
|
||||
*/
|
||||
#if TRIO_FEATURE_FILE
|
||||
TRIO_PUBLIC int
|
||||
trio_fscanfv
|
||||
TRIO_ARGS3((file, format, args),
|
||||
FILE *file,
|
||||
TRIO_CONST char *format,
|
||||
trio_pointer_t *args)
|
||||
{
|
||||
static va_list unused;
|
||||
|
||||
assert(VALID(file));
|
||||
assert(VALID(format));
|
||||
|
||||
return TrioScan((trio_pointer_t)file, 0,
|
||||
TrioInStreamFile,
|
||||
TrioUndoStreamFile,
|
||||
format, unused, args);
|
||||
}
|
||||
#endif /* TRIO_FEATURE_FILE */
|
||||
|
||||
/*************************************************************************
|
||||
* dscanf
|
||||
*/
|
||||
|
||||
/*************************************************************************
|
||||
* cscanf
|
||||
*/
|
||||
|
||||
/*************************************************************************
|
||||
* sscanf
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user