Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

inputfiles.h

00001 /*
00002  *      This program is free software; you can redistribute it and/or
00003  *      modify it under the terms of the GNU General Public License
00004  *      as published by the Free Software Foundation; either version
00005  *      2 of the License, or (at your option) any later version.
00006  *
00007  *  Copyright 2001 Michael Klein <michael(dot)klein(at)puffin(dot)lb(dot)shuttle(dot)de>
00008 */
00009 
00010 /* $Id: inputfiles.h,v 1.3 2006/02/24 12:01:01 trikalio Exp $ */
00011 
00012 #ifndef INPUTFILES_H
00013 #define INPUTFILES_H
00014 
00015 #include <stdio.h>
00016 
00017 #include "opencbm.h"
00018 #include "cbmcopy.h"
00019 
00020 #ifdef __cplusplus
00021 extern "C" {
00022 #endif
00023 
00024 typedef struct {
00025     int (*probe)(FILE *, const char *, cbmcopy_message_cb);
00026 
00027     int (*read)(FILE *,               /* guess what               */
00028                 const char *,         /* OS filename              */
00029                 int,                  /* archive entry (0-based)  */
00030                 char *,               /* CBM name                 */
00031                 char *,               /* CBM filetype             */
00032                 unsigned char **,     /* malloc'd file data       */
00033                 size_t *,             /* CBM filesize             */
00034                 cbmcopy_message_cb);  /* guess what               */
00035 } input_reader;
00036 
00037 #define DECLARE_INPUT_READER(x) \
00038     input_reader cbmwrite_ ## x = {probe, read}
00039 
00040 #ifdef __cplusplus
00041 }
00042 #endif
00043 
00044 #endif

Generated on Sun Apr 30 18:45:52 2006 for opencbm by  doxygen 1.4.2