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
00055 int ini_comment_build_wl(struct ini_comment *ic,
00056 const char *line,
00057 uint32_t length);
00058
00071 int ini_comment_insert(struct ini_comment *ic,
00072 uint32_t idx,
00073 const char *line);
00074
00075
00076 int ini_comment_append(struct ini_comment *ic,
00077 const char *line);
00078
00079
00080 int ini_comment_remove(struct ini_comment *ic,
00081 uint32_t idx);
00082
00083
00084 int ini_comment_clear(struct ini_comment *ic,
00085 uint32_t idx);
00086
00087
00088 int ini_comment_replace(struct ini_comment *ic,
00089 uint32_t idx,
00090 const char *line);
00091
00092
00093 int ini_comment_reset(struct ini_comment *ic);
00094
00095
00096 int ini_comment_get_numlines(struct ini_comment *ic,
00097 uint32_t *num);
00098
00099
00100 int ini_comment_get_line(struct ini_comment *ic,
00101 uint32_t idx,
00102 char **line,
00103 uint32_t *line_len);
00104
00105
00106 int ini_comment_swap(struct ini_comment *ic,
00107 uint32_t idx1,
00108 uint32_t idx2);
00109
00110
00111
00112 void ini_comment_print(struct ini_comment *ic, FILE *file);
00113
00114
00115 #endif