ARPDAS_QNX6 1.0
mlf.h
Go to the documentation of this file.
00001 #ifndef MLF_H_INCLUDED
00002 #define MLF_H_INCLUDED
00003 #include <stdio.h>
00004 #include <limits.h>
00005 #include <fcntl.h>
00006 
00007 typedef struct {
00008   int index;
00009   char *s;
00010 } mlf_elt_t;
00011 
00012 typedef struct {
00013   mlf_elt_t *flvl;
00014   int n_levels;
00015   int n_files;
00016   char fpath[PATH_MAX];
00017   const char *fsuffix;
00018   int flags;
00019   unsigned long index;
00020 } mlf_def_t;
00021 #define MLF_INC_FIRST 1
00022 #define MLF_WRITING 2
00023 #define MLF_INITIALIZE 4
00024 #define MLF_MAX_LEVELS 10
00025 
00026 typedef struct {
00027   mlf_def_t *mlf;
00028   int *ntup;
00029   const char *base;
00030   const char *suffix;
00031 } mlf_ntup_t;
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036 
00037 FILE *mlf_next_file( mlf_def_t *mlf );
00038 int mlf_next_fd( mlf_def_t *mlf );
00039 int mlf_next_dir( mlf_def_t *mlf );
00040 mlf_def_t *mlf_init( int n_levels, int n_files, int writing,
00041         const char *fbase, const char *fsuffix, const char *config );
00042 mlf_ntup_t *mlf_convert_fname( mlf_def_t *mlf, const char *fbase, const char *fname );
00043 void mlf_free_mlfn( mlf_ntup_t *mlfn );
00044 void mlf_set_ntup( mlf_def_t *mlf, mlf_ntup_t *mlfn );
00045 int mlf_compare( mlf_def_t *mlf, mlf_ntup_t *mlfn );
00046 void mlf_set_index( mlf_def_t * mlf, unsigned long index );
00047 
00048 #ifdef __cplusplus
00049 };
00050 #endif
00051 
00052 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines