~ubuntu-branches/ubuntu/precise/mame/precise-proposed

« back to all changes in this revision

Viewing changes to src/emu/ioprocs.h

  • Committer: Bazaar Package Importer
  • Author(s): Cesare Falco
  • Date: 2010-08-01 23:18:31 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100801231831-9dj2qbsynutixsoe
Tags: 0.139-0ubuntu1
* New upstream release (LP: #612070)
* debian/contrib/manpages: removed, accepted upstream
* debian/patches/:
  - deprecated_gtk_macros: removed, fixed upstream
  - missing_newline.patch: removed, fixed upstream
  - typos.patch: removed, fixed upstream
* debian/rules: new variables SYMLEVEL and DUMPSYM
* mame-tools: ldplayer removed, possibly for good (FTBFS upstream)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*********************************************************************
 
2
 
 
3
    ioprocs.h
 
4
 
 
5
    File IO abstraction layer
 
6
 
 
7
*********************************************************************/
 
8
 
 
9
#ifndef IOPROCS_H
 
10
#define IOPROCS_H
 
11
 
 
12
#include <stdlib.h>
 
13
#include "emu.h"
 
14
 
 
15
 
 
16
 
 
17
/***************************************************************************
 
18
 
 
19
    Type definitions
 
20
 
 
21
***************************************************************************/
 
22
 
 
23
struct io_procs
 
24
{
 
25
        void (*closeproc)(void *file);
 
26
        int (*seekproc)(void *file, INT64 offset, int whence);
 
27
        size_t (*readproc)(void *file, void *buffer, size_t length);
 
28
        size_t (*writeproc)(void *file, const void *buffer, size_t length);
 
29
        UINT64 (*filesizeproc)(void *file);
 
30
};
 
31
 
 
32
 
 
33
 
 
34
struct io_generic
 
35
{
 
36
        const struct io_procs *procs;
 
37
        void *file;
 
38
        UINT8 filler;
 
39
};
 
40
 
 
41
 
 
42
/***************************************************************************
 
43
 
 
44
    Globals
 
45
 
 
46
***************************************************************************/
 
47
 
 
48
extern const struct io_procs stdio_ioprocs;
 
49
extern const struct io_procs stdio_ioprocs_noclose;
 
50
 
 
51
 
 
52
 
 
53
/***************************************************************************
 
54
 
 
55
    Prototypes
 
56
 
 
57
***************************************************************************/
 
58
 
 
59
 
 
60
 
 
61
void io_generic_close(struct io_generic *generic);
 
62
void io_generic_read(struct io_generic *generic, void *buffer, UINT64 offset, size_t length);
 
63
void io_generic_write(struct io_generic *generic, const void *buffer, UINT64 offset, size_t length);
 
64
void io_generic_write_filler(struct io_generic *generic, UINT8 filler, UINT64 offset, size_t length);
 
65
UINT64 io_generic_size(struct io_generic *generic);
 
66
 
 
67
 
 
68
 
 
69
#endif /* IOPROCS_H */