00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef INI_COMMENT_H
00023 #define INI_COMMENT_H
00024
00025 #include <stdint.h>
00026 #include <stdio.h>
00027
00028 #ifndef EOK
00029 #define EOK 0
00030 #endif
00031
00032 struct ini_comment;
00033
00037 int ini_comment_create(struct ini_comment **ic);
00038
00042 void ini_comment_destroy(struct ini_comment *ic);
00043
00048 int ini_comment_build(struct ini_comment *ic,
00049 const char *line);
00050
00063 int ini_comment_insert(struct ini_comment *ic,
00064 uint32_t idx,
00065 const char *line);
00066
00067
00068 int ini_comment_append(struct ini_comment *ic,
00069 const char *line);
00070
00071
00072 int ini_comment_remove(struct ini_comment *ic,
00073 uint32_t idx);
00074
00075
00076 int ini_comment_clear(struct ini_comment *ic,
00077 uint32_t idx);
00078
00079
00080 int ini_comment_replace(struct ini_comment *ic,
00081 uint32_t idx,
00082 const char *line);
00083
00084
00085 int ini_comment_reset(struct ini_comment *ic);
00086
00087
00088 int ini_comment_get_numlines(struct ini_comment *ic,
00089 uint32_t *num);
00090
00091
00092 int ini_comment_get_line(struct ini_comment *ic,
00093 uint32_t idx,
00094 char **line);
00095
00096
00097 int ini_comment_swap(struct ini_comment *ic,
00098 uint32_t idx1,
00099 uint32_t idx2);
00100
00101
00102
00103 void ini_comment_print(struct ini_comment *ic, FILE *file);
00104
00105
00106 #endif