OpenCBM
inputfiles.h
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version
5  * 2 of the License, or (at your option) any later version.
6  *
7  * Copyright 2001 Michael Klein <michael(dot)klein(at)puffin(dot)lb(dot)shuttle(dot)de>
8 */
9 
10 #ifndef INPUTFILES_H
11 #define INPUTFILES_H
12 
13 #include <stdio.h>
14 
15 #include "opencbm.h"
16 #include "cbmcopy.h"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 typedef struct {
23  int (*probe)(FILE *, const char *, cbmcopy_message_cb);
24 
25  int (*read)(FILE *, /* guess what */
26  const char *, /* OS filename */
27  int, /* archive entry (0-based) */
28  char *, /* CBM name */
29  char *, /* CBM filetype */
30  unsigned char **, /* malloc'd file data */
31  size_t *, /* CBM filesize */
32  cbmcopy_message_cb); /* guess what */
33 } input_reader;
34 
35 #define DECLARE_INPUT_READER(x) \
36  input_reader cbmwrite_ ## x = {probe, read}
37 
38 #ifdef __cplusplus
39 }
40 #endif
41 
42 #endif
DLL interface for accessing the driver.