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

ccl.h

Go to the documentation of this file.
00001 /*
00002  *  $Id: ccl.h,v 1.7 2004/04/15 17:53:26 sbooth Exp $
00003  *
00004  *  Copyright (C) 2004 Stephen F. Booth
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 #ifndef CCL_H
00022 #define CCL_H
00023 
00024 #if HAVE_CONFIG_H
00025 #  include <config.h>
00026 #endif
00027 
00028 #include "ccl/bst.h"
00029 
00035 struct ccl_pair_t
00036 {
00038   char *key;
00040   char *value;
00041 };
00042 
00052 struct ccl_t
00053 {
00055   char comment_char;
00057   char sep_char;
00059   char str_char;
00060 
00061 
00062   /* ========== Implementation details below, subject to change */
00063 
00064   /* The parsed file data, stored as a binary tree*/
00065   struct bst_table *table;
00066 
00067   /* The table traverser */
00068   struct bst_traverser traverser;
00069 
00070   /* Currently traversing? */
00071   int iterating;
00072 };
00073 typedef struct ccl_t ccl_t;
00074 
00086 int
00087 ccl_parse(struct ccl_t *data, 
00088           const char *path);
00089 
00096 void 
00097 ccl_release(struct ccl_t *data);
00098 
00111 const char* 
00112 ccl_get(const struct ccl_t *data, 
00113         const char *key);
00114 
00126 const struct ccl_pair_t* 
00127 ccl_iterate(struct ccl_t *data);
00128 
00136 void 
00137 ccl_reset(struct ccl_t *data);
00138 
00139 
00140 #endif /* ! CCL_H */
00141 
00142 

Generated on Fri Feb 25 15:09:15 2005 for ccl by  doxygen 1.4.1