Function


misInputInit

Initializes MisInput

Syntax

#include <mis/Input.h>
void misInputInit( MisInput *input_ptr )

Description

Initializes MisInput

See Also

MisInput

misInputRead

Reads only the number of bytes specified by byte_count from MisInput to buffer_ptr

Syntax

#include <mis/Input.h>
u32 misInputRead( MisInput *input_ptr, const u32 byte_count,
                  void *buffer_ptr )

Description

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.

misInputGetSChar

Reads 1 byte from MisInput and returns it as s8

Syntax

#include <mis/Input.h>
s8 misInputGetSChar( MisInput *input_ptr )

Description

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.

misInputGetUChar

Reads 1 byte from MisInput and returns it as u8

Syntax

#include <mis/Input.h>
u8 misInputGetUChar( MisInput *input_ptr )

Description

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.

misInputGetSShort

Reads 2 bytes from MisInput and returns it as s16

Syntax

#include <mis/Input.h>
s16 misInputGetSShort( MisInput *input_ptr )

Description

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.

misInputGetUShort

Reads 2 bytes from MisInput and returns it as u16

Syntax

#include <mis/Input.h>
u16 misInputGetUShort( MisInput *input_ptr )

Description

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.

misInputGetSLong

Reads 4 bytes from MisInput and returns it as s32

Syntax

#include <mis/Input.h>
s32 misInputGetSLong( MisInput *input_ptr )

Description

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.

misInputGetULong

Reads 4 bytes from MisInput and returns it as u32

Syntax

#include <mis/Input.h>
u32 misInputGetULong( MisInput *input_ptr )

Description

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.

misInputGetFloat

Reads 4 bytes from MisInput and returns it as float

Syntax

#include <mis/Input.h>
float misInputGetFloat( MisInput *input_ptr )

Description

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.

Macro



_misInputGet

Gets and returns 1 byte from MisInput

Syntax

#include <mis/Input.h>
_misInputGet( MisInput *input_ptr )

Description

Gets and returns 1 byte from misInput. If an error occurs, MIS_INPUT_GET_ERROR (this value will always be negative) is returned.

_misInputClose

Closes an open MisInput

Syntax

#include <mis/Input.h>
_misInputClose( MisInput *input_ptr )

Description

Closes an open misInput. If successful, a 0 [zero] is returned. If it fails, a value other than 0 [zero] is returned.

_misInputDestroy

Destroys MisInput

Syntax

#include <mis/Input.h>
_misInputDestroy( MisInput *input_ptr )

Description

Destroys MisInput. This can also be used on the objects of a class derived from MisInput.

_misInputSetStatus

Sets the status of MisInput

Syntax

#include <mis/Input.h>
_misInputSetStatus( MisInput *input_ptr, int status )

Description

Sets the status of MisInput. This must not be used by normal applications.

_misInputClearStatus

Clears the status of MisInput

Syntax

#include <mis/Input.h>
_misInputClearStatus( MisInput *input_ptr, int status )

Description

Clears the status of MisInput. This must not be used by normal applications.

_misInputIsOpened

Returns a value other than 0 [zero] if MisInput is open

Syntax

#include <mis/Input.h>
_misInputIsOpened( MisInput *input_ptr )

Description

Returns a value other than 0 [zero] if MisInput is open.

_misInputIsEof

Returns a value other than 0 [zero] if MisInput has reached EOF

Syntax

#include <mis/Input.h>
_misInputIsEof( MisInput *input_ptr )

Description

Returns a value other than 0 [zero] if MisInput has reached EOF.

_misInputIsFailure

Returns a value other than 0 [zero] if an error other than EOF has occurred with MisInput

Syntax

#include <mis/Input.h>
_misInputIsFailure( MisInput *input_ptr )

Description

Returns a value other than 0 [zero] if an error other than EOF has occurred with MisInput

_misInputGetErrorStatus

Returns an error status bit

Syntax

#include <mis/Input.h>
_misInputGetErrorStatus(input_ptr)

Description

Returns an error status bit. Currently, MIS_INPUT_STATUS_EOF_BIT and MIS_INPUT_STATUS_FAILURE_BIT are available.

Structure



MisInput

#include <mis/Input.h>

typedef struct _MisInput
{
    u8                  status;
    MisInputGetFunc     get;
    MisInputCloseFunc   close;
    MisInputDestroyFunc destroy;
} MisInput;