1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
/* gap_val_file.h
*
* This module handles GAP key/value paramterfiles.
*/
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* revision history:
* version 2.1.0a; 2007/05/07 hof: created (splitted of generic key/value parts gap_vin)
*/
#ifndef _GAP_VAL_FILE_H
#define _GAP_VAL_FILE_H
#include "libgimp/gimp.h"
typedef struct GapValTextFileLines {
char *line;
gint32 line_nr;
void *next;
} GapValTextFileLines;
typedef enum
{
GAP_VAL_DUMMY
, GAP_VAL_GINT32
, GAP_VAL_GINT64
, GAP_VAL_GDOUBLE
, GAP_VAL_STRING
, GAP_VAL_GBOOLEAN
, GAP_VAL_G32BOOLEAN
} GapValDataType;
typedef struct GapValKeyList
{
char keyword[50];
char comment[80];
gint32 len;
gpointer val_ptr;
GapValDataType dataype;
gboolean done_flag;
void *next;
} GapValKeyList;
GapValTextFileLines * gap_val_load_textfile(const char *filename);
void gap_val_free_textfile_lines(GapValTextFileLines *txf_ptr_root);
GapValKeyList* gap_val_new_keylist(void);
void gap_val_free_keylist(GapValKeyList *keylist);
void gap_val_set_keyword(GapValKeyList *keylist
, const gchar *keyword
, gpointer val_ptr
, GapValDataType dataype
, gint32 len
, const gchar *comment
);
int gap_val_rewrite_file(GapValKeyList *keylist
, const char *filename
, const char *hdr_text
, const char *term_str
);
int gap_val_scann_filevalues(GapValKeyList *keylist, const char *filename);
#endif
|