Lines Matching refs:ln
73 void inifile_line_free(line_type *ln) in inifile_line_free() argument
75 inifile_key_free(&ln->key); in inifile_line_free()
76 inifile_val_free(&ln->val); in inifile_line_free()
77 ln->pos = 0; in inifile_line_free()
167 static int inifile_read(inifile *dba, line_type *ln) { in inifile_read() argument
171 inifile_val_free(&ln->val); in inifile_read()
181 inifile_key_free(&ln->key); in inifile_read()
182 ln->key.group = etrim(fline+1); in inifile_read()
183 ln->key.name = estrdup(""); in inifile_read()
184 ln->pos = php_stream_tell(dba->fp); in inifile_read()
196 if (!ln->key.group) { in inifile_read()
197 ln->key.group = estrdup(""); in inifile_read()
199 if (ln->key.name) { in inifile_read()
200 efree(ln->key.name); in inifile_read()
202 ln->key.name = etrim(fline); in inifile_read()
203 ln->val.value = etrim(pos+1); in inifile_read()
204 ln->pos = php_stream_tell(dba->fp); in inifile_read()
217 inifile_line_free(ln); in inifile_read()
246 line_type ln = {{NULL,NULL},{NULL}}; in inifile_fetch() local
253 ln.key.group = estrdup(dba->next.key.group); in inifile_fetch()
263 while(inifile_read(dba, &ln)) { in inifile_fetch()
264 if (!(res=inifile_key_cmp(&ln.key, key))) { in inifile_fetch()
266 val.value = estrdup(ln.val.value ? ln.val.value : ""); in inifile_fetch()
269 dba->next = ln; in inifile_fetch()
281 inifile_line_free(&ln); in inifile_fetch()
283 return ln.val; in inifile_fetch()
299 line_type ln = {{NULL,NULL},{NULL}}; in inifile_nextkey() local
303 ln.key.group = estrdup(dba->curr.key.group ? dba->curr.key.group : ""); in inifile_nextkey()
304 inifile_read(dba, &ln); in inifile_nextkey()
306 dba->curr = ln; in inifile_nextkey()
307 return ln.key.group || ln.key.name; in inifile_nextkey()
340 line_type ln = {{NULL,NULL},{NULL}}; in inifile_find_group() local
343 while(inifile_read(dba, &ln)) { in inifile_find_group()
344 if ((res=inifile_key_cmp(&ln.key, key)) < 2) { in inifile_find_group()
350 inifile_line_free(&ln); in inifile_find_group()
369 line_type ln = {{NULL,NULL},{NULL}}; in inifile_next_group() local
372 ln.key.group = estrdup(key->group); in inifile_next_group()
373 while(inifile_read(dba, &ln)) { in inifile_next_group()
374 if (inifile_key_cmp(&ln.key, key) == 2) { in inifile_next_group()
380 inifile_line_free(&ln); in inifile_next_group()
421 line_type ln = {{NULL,NULL},{NULL}}; in inifile_filter() local
425 while(inifile_read(from, &ln)) { in inifile_filter()
426 switch(inifile_key_cmp(&ln.key, key)) { in inifile_filter()
458 inifile_line_free(&ln); in inifile_filter()