Lines Matching refs:section
111 bus_desktop_file_section_free (BusDesktopFileSection *section) in bus_desktop_file_section_free() argument
115 for (i = 0; i < section->n_lines; i++) in bus_desktop_file_section_free()
116 bus_desktop_file_line_free (§ion->lines[i]); in bus_desktop_file_section_free()
118 dbus_free (section->lines); in bus_desktop_file_section_free()
119 dbus_free (section->section_name); in bus_desktop_file_section_free()
135 grow_lines_in_section (BusDesktopFileSection *section) in grow_lines_in_section() argument
141 if (section->n_allocated_lines == 0) in grow_lines_in_section()
144 new_n_lines = section->n_allocated_lines*2; in grow_lines_in_section()
146 lines = dbus_realloc (section->lines, in grow_lines_in_section()
152 section->lines = lines; in grow_lines_in_section()
153 section->n_allocated_lines = new_n_lines; in grow_lines_in_section()
307 BusDesktopFileSection *section; in open_section() local
309 section = new_section (parser->desktop_file, name); in open_section()
310 if (section == NULL) in open_section()
314 _dbus_assert (&parser->desktop_file->sections[parser->current_section] == section); in open_section()
316 return section; in open_section()
322 BusDesktopFileSection *section; in new_line() local
325 section = &parser->desktop_file->sections[parser->current_section]; in new_line()
327 if (section->n_allocated_lines == section->n_lines) in new_line()
329 if (!grow_lines_in_section (section)) in new_line()
333 line = §ion->lines[section->n_lines++]; in new_line()
709 BusDesktopFileSection *section; in lookup_section() local
717 section = &desktop_file->sections[i]; in lookup_section()
719 if (strcmp (section->section_name, section_name) == 0) in lookup_section()
720 return section; in lookup_section()
728 BusDesktopFileSection *section, in lookup_line() argument
734 for (i = 0; i < section->n_lines; i++) in lookup_line()
736 line = §ion->lines[i]; in lookup_line()
751 BusDesktopFileSection *section; in bus_desktop_file_get_raw() local
756 section = lookup_section (desktop_file, section_name); in bus_desktop_file_get_raw()
758 if (!section) in bus_desktop_file_get_raw()
762 section, in bus_desktop_file_get_raw()
775 const char *section, in bus_desktop_file_get_string() argument
786 if (!bus_desktop_file_get_raw (desktop_file, section, keyname, &raw)) in bus_desktop_file_get_string()