mirror of
https://github.com/zeldaret/tp
synced 2026-09-07 11:11:53 -04:00
589cc12296
* wip * bunch of MSL_C files thanks to pikmin2 decomp for their work * format / asm * progress * fix * fix remove-asm to work with C files * init / start
45 lines
906 B
C
45 lines
906 B
C
//
|
|
// Generated By: dol2asm
|
|
// Translation Unit: MSL_Common/Src/wchar_io
|
|
//
|
|
|
|
#include "MSL_C/MSL_Common/Src/wchar_io.h"
|
|
#include "MSL_C/MSL_Common/Src/ansi_files.h"
|
|
#include "dol2asm.h"
|
|
#include "dolphin/types.h"
|
|
|
|
//
|
|
// Forward References:
|
|
//
|
|
|
|
int fwide(FILE* file, int mode);
|
|
|
|
//
|
|
// External References:
|
|
//
|
|
|
|
//
|
|
// Declarations:
|
|
//
|
|
|
|
/* 80369114-8036919C 363A54 0088+00 0/0 5/5 0/0 .text fwide */
|
|
int fwide(FILE* file, int mode) {
|
|
if (file == NULL || file->file_mode.file_kind == CLOSED_FILE) {
|
|
return 0;
|
|
}
|
|
|
|
switch (file->file_mode.file_orientation) {
|
|
case UNORIENTED:
|
|
if (mode > 0) {
|
|
file->file_mode.file_orientation = WIDE_ORIENTED;
|
|
} else if (mode < 0) {
|
|
file->file_mode.file_orientation = CHAR_ORIENTED;
|
|
}
|
|
return mode;
|
|
case WIDE_ORIENTED:
|
|
return 1;
|
|
case CHAR_ORIENTED:
|
|
return -1;
|
|
}
|
|
}
|