- メインページ
- モジュール
- データ構造
- ファイル
- ディレクトリ

- ファイル一覧
- グローバル

# fileio.h

説明を見る。

    00001 #include "dxlibp.h"
    00002 #include <malloc.h>
    00003 #include <stdio.h>
    00004
    00005 //macros ---
    00006
    00007 //stream
    00008 #define STREAM_SEEKTYPE_SET                         (PSP_SEEK_SET)
    00009 #define STREAM_SEEKTYPE_END                         (PSP_SEEK_END)
    00010 #define STREAM_SEEKTYPE_CUR                         (PSP_SEEK_CUR)
    00011
    00012 //#define STTELL( st )                              ((st)->ReadShred.Tell( (st)->DataPoint ))
    00013 //#define STSEEK( st, pos, type )                       ((st)->ReadShred.Seek( (st)->DataPoint, (pos), (type) ))
    00014 //#define STREAD( buf, length, num, st )                ((st)->ReadShred.Read( (buf), (length), (num), (st)->DataPoint ))
    00015 //#define STWRITE( buf, length, num, st )               ((st)->ReadShred.Write( (buf), (length), (num), (st)->DataPoint ))
    00016 //#define STEOF( st )                                   ((st)->ReadShred.Eof( (st)->DataPoint ))
    00017 //#define STCLOSE( st )                             ((st)->ReadShred.Close( (st)->DataPoint ))
    00018
    00019
    00020 //structures ----
    00021
    00022 typedef struct DXPFILEIOHANDLE__
    00023 {
    00024     unsigned used : 1;
    00025     unsigned onmemory : 1;
    00026
    00027     char filename[DXP_BUILDOPTION_FILENAMELENGTH_MAX];
    00028
    00029     u32 pos;
    00030     u32 size;
    00031
    00032     union
    00033     {
    00034         SceUID fd;
    00035         void *dat;
    00036     };
    00037 }DXPFILEIOHANDLE;
    00038
    00039 typedef struct DXPFILEIODATA__
    00040 {
    00041     unsigned init : 1;
    00042     unsigned sleep : 1;
    00043     DXPFILEIOHANDLE handleArray[DXP_BUILDOPTION_FILEHANDLE_MAX];
    00044 }DXPFILEIODATA;
    00045 //variables ----
    00046
    00047 extern DXPFILEIODATA dxpFileioData;
    00048
    00049 //local functions ----
    00050
    00051
    00052
    00053 void dxpFileioInit();
    00054 int dxpFileioReopen(int handle);