Lines Matching refs:ln
71 void inifile_line_free(line_type *ln) in inifile_line_free() argument
73 inifile_key_free(&ln->key); in inifile_line_free()
74 inifile_val_free(&ln->val); in inifile_line_free()
75 ln->pos = 0; in inifile_line_free()
164 static int inifile_read(inifile *dba, line_type *ln) { in inifile_read() argument
168 inifile_val_free(&ln->val); in inifile_read()
178 inifile_key_free(&ln->key); in inifile_read()
179 ln->key.group = etrim(fline+1); in inifile_read()
180 ln->key.name = estrdup(""); in inifile_read()
181 ln->pos = php_stream_tell(dba->fp); in inifile_read()
193 if (!ln->key.group) { in inifile_read()
194 ln->key.group = estrdup(""); in inifile_read()
196 if (ln->key.name) { in inifile_read()
197 efree(ln->key.name); in inifile_read()
199 ln->key.name = etrim(fline); in inifile_read()
200 ln->val.value = etrim(pos+1); in inifile_read()
201 ln->pos = php_stream_tell(dba->fp); in inifile_read()
214 inifile_line_free(ln); in inifile_read()
242 line_type ln = {{NULL,NULL},{NULL},0}; in inifile_fetch() local
249 ln.key.group = estrdup(dba->next.key.group); in inifile_fetch()
259 while(inifile_read(dba, &ln)) { in inifile_fetch()
260 if (!(res=inifile_key_cmp(&ln.key, key))) { in inifile_fetch()
262 val.value = estrdup(ln.val.value ? ln.val.value : ""); in inifile_fetch()
265 dba->next = ln; in inifile_fetch()
277 inifile_line_free(&ln); in inifile_fetch()
279 return ln.val; in inifile_fetch()
293 line_type ln = {{NULL,NULL},{NULL},0}; in inifile_nextkey() local
297 ln.key.group = estrdup(dba->curr.key.group ? dba->curr.key.group : ""); in inifile_nextkey()
298 inifile_read(dba, &ln); in inifile_nextkey()
300 dba->curr = ln; in inifile_nextkey()
301 return ln.key.group || ln.key.name; in inifile_nextkey()
333 line_type ln = {{NULL,NULL},{NULL},0}; in inifile_find_group() local
336 while(inifile_read(dba, &ln)) { in inifile_find_group()
337 if ((res=inifile_key_cmp(&ln.key, key)) < 2) { in inifile_find_group()
343 inifile_line_free(&ln); in inifile_find_group()
362 line_type ln = {{NULL,NULL},{NULL},0}; in inifile_next_group() local
365 ln.key.group = estrdup(key->group); in inifile_next_group()
366 while(inifile_read(dba, &ln)) { in inifile_next_group()
367 if (inifile_key_cmp(&ln.key, key) == 2) { in inifile_next_group()
373 inifile_line_free(&ln); in inifile_next_group()
413 line_type ln = {{NULL,NULL},{NULL},0}; in inifile_filter() local
417 while(inifile_read(from, &ln)) { in inifile_filter()
418 switch(inifile_key_cmp(&ln.key, key)) { in inifile_filter()
450 inifile_line_free(&ln); in inifile_filter()