Function
Initializes MisInput
#include <mis/Input.h>
void misInputInit( MisInput *input_ptr )
Initializes MisInput
MisInput
Reads only the number of bytes specified by byte_count from MisInput to buffer_ptr
#include <mis/Input.h>
u32 misInputRead( MisInput *input_ptr, const u32 byte_count,
void *buffer_ptr )
Reads only the number of bytes specified by byte_count from misInput to buffer_ptr. If an error occurs
during this operation, the read stops at that point. The number of bytes actually read will be returned.
Reads 1 byte from MisInput and returns it as s8
#include <mis/Input.h>
s8 misInputGetSChar( MisInput *input_ptr )
Reads 1 byte from MisInput and returns it as s8. If an error occurs during this operation, the read stops
at that point and the return value is unspecified.
Reads 1 byte from MisInput and returns it as u8
#include <mis/Input.h>
u8 misInputGetUChar( MisInput *input_ptr )
Reads 1 byte from MisInput and returns it as u8. If an error occurs during this operation, the read stops
at that point and the return value is unspecified.
Reads 2 bytes from MisInput and returns it as s16
#include <mis/Input.h>
s16 misInputGetSShort( MisInput *input_ptr )
Reads 2 bytes from MisInput and returns it as s16. If an error occurs during this operation, the read
stops at that point and the return value is unspecified.
Reads 2 bytes from MisInput and returns it as u16
#include <mis/Input.h>
u16 misInputGetUShort( MisInput *input_ptr )
Reads 2 bytes from MisInput and returns it as u16. If an error occurs during this operation, the read
stops at that point and the return value is unspecified.
Reads 4 bytes from MisInput and returns it as s32
#include <mis/Input.h>
s32 misInputGetSLong( MisInput *input_ptr )
Reads 4 bytes from MisInput and returns it as s32. If an error occurs during this operation, the read
stops at that point and the return value is unspecified.
Reads 4 bytes from MisInput and returns it as u32
#include <mis/Input.h>
u32 misInputGetULong( MisInput *input_ptr )
Reads 4 bytes from misInput and returns it as u32. If an error occurs during this operation, the read
stops at that point and the return value is unspecified.
Reads 4 bytes from MisInput and returns it as float
#include <mis/Input.h>
float misInputGetFloat( MisInput *input_ptr )
Reads 4 bytes from MisInput and returns it as float. If an error occurs during this operation, the read
stops at that point and the return value is unspecified.
Gets and returns 1 byte from MisInput
#include <mis/Input.h>
_misInputGet( MisInput *input_ptr )
Gets and returns 1 byte from misInput. If an error occurs, MIS_INPUT_GET_ERROR (this value will
always be negative) is returned.
Closes an open MisInput
#include <mis/Input.h>
_misInputClose( MisInput *input_ptr )
Closes an open misInput. If successful, a 0 [zero] is returned. If it fails, a value other than 0 [zero] is
returned.
Destroys MisInput
#include <mis/Input.h>
_misInputDestroy( MisInput *input_ptr )
Destroys MisInput. This can also be used on the objects of a class derived from MisInput.
Sets the status of MisInput
#include <mis/Input.h>
_misInputSetStatus( MisInput *input_ptr, int status )
Sets the status of MisInput. This must not be used by normal applications.
Clears the status of MisInput
#include <mis/Input.h>
_misInputClearStatus( MisInput *input_ptr, int status )
Clears the status of MisInput. This must not be used by normal applications.
Returns a value other than 0 [zero] if MisInput is open
#include <mis/Input.h>
_misInputIsOpened( MisInput *input_ptr )
Returns a value other than 0 [zero] if MisInput is open.
Returns a value other than 0 [zero] if MisInput has reached EOF
#include <mis/Input.h>
_misInputIsEof( MisInput *input_ptr )
Returns a value other than 0 [zero] if MisInput has reached EOF.
Returns a value other than 0 [zero] if an error other than EOF has occurred with MisInput
#include <mis/Input.h>
_misInputIsFailure( MisInput *input_ptr )
Returns a value other than 0 [zero] if an error other than EOF has occurred with MisInput
Returns an error status bit
#include <mis/Input.h>
_misInputGetErrorStatus(input_ptr)
Returns an error status bit. Currently, MIS_INPUT_STATUS_EOF_BIT and
MIS_INPUT_STATUS_FAILURE_BIT are available.
#include <mis/Input.h>
typedef struct _MisInput
{
u8 status;
MisInputGetFunc get;
MisInputCloseFunc close;
MisInputDestroyFunc destroy;
} MisInput;