Lines Matching refs:attr

328 handle_match (ParsingContext * pc, const char **attr)  in handle_match()  argument
336 for (num_attrib = 0; attr[num_attrib] != NULL; num_attrib++); in handle_match()
341 if (strcmp (attr[0], "key") != 0) in handle_match()
343 key = attr[1]; in handle_match()
364 if (strcmp (attr[2], "string") == 0) { in handle_match()
369 value = attr[3]; in handle_match()
383 } else if (strcmp (attr[2], "int") == 0) { in handle_match()
387 value = strtol (attr[3], NULL, 0); in handle_match()
402 } else if (strcmp (attr[2], "uint64") == 0) { in handle_match()
406 value = strtoull (attr[3], NULL, 0); in handle_match()
421 } else if (strcmp (attr[2], "bool") == 0) { in handle_match()
426 if (strcmp (attr[3], "false") == 0) in handle_match()
428 else if (strcmp (attr[3], "true") == 0) in handle_match()
445 } else if (strcmp (attr[2], "exists") == 0) { in handle_match()
448 if (strcmp (attr[3], "false") == 0) in handle_match()
462 } else if (strcmp (attr[2], "empty") == 0) { in handle_match()
468 if (strcmp (attr[3], "false") == 0) in handle_match()
500 } else if (strcmp (attr[2], "is_ascii") == 0) { in handle_match()
506 if (strcmp (attr[3], "false") == 0) in handle_match()
531 } else if (strcmp (attr[2], "is_absolute_path") == 0) { in handle_match()
536 if (strcmp (attr[3], "false") == 0) in handle_match()
563 } else if (strcmp (attr[2], "contains") == 0) { in handle_match()
567 needle = attr[3]; in handle_match()
597 } else if (strcmp (attr[2], "contains_ncase") == 0) { in handle_match()
601 needle = attr[3]; in handle_match()
635 } else if (strcmp (attr[2], "compare_lt") == 0) { in handle_match()
637 if (!match_compare_property (d, prop_to_check, attr[3], &result)) { in handle_match()
642 } else if (strcmp (attr[2], "compare_le") == 0) { in handle_match()
644 if (!match_compare_property (d, prop_to_check, attr[3], &result)) in handle_match()
648 } else if (strcmp (attr[2], "compare_gt") == 0) { in handle_match()
650 if (!match_compare_property (d, prop_to_check, attr[3], &result)) in handle_match()
654 } else if (strcmp (attr[2], "compare_ge") == 0) { in handle_match()
656 if (!match_compare_property (d, prop_to_check, attr[3], &result)) in handle_match()
672 handle_merge (ParsingContext * pc, const char **attr) in handle_merge() argument
679 for (num_attrib = 0; attr[num_attrib] != NULL; num_attrib++) { in handle_merge()
686 if (strcmp (attr[0], "key") != 0) in handle_merge()
688 strncpy (pc->merge_key, attr[1], MAX_KEY_SIZE); in handle_merge()
690 if (strcmp (attr[2], "type") != 0) in handle_merge()
693 if (strcmp (attr[3], "string") == 0) { in handle_merge()
697 } else if (strcmp (attr[3], "bool") == 0) { in handle_merge()
701 } else if (strcmp (attr[3], "int") == 0) { in handle_merge()
705 } else if (strcmp (attr[3], "uint64") == 0) { in handle_merge()
709 } else if (strcmp (attr[3], "double") == 0) { in handle_merge()
713 } else if (strcmp (attr[3], "strlist") == 0) { in handle_merge()
717 } else if (strcmp (attr[3], "copy_property") == 0) { in handle_merge()
732 handle_append_prepend (ParsingContext * pc, const char **attr) in handle_append_prepend() argument
738 for (num_attrib = 0; attr[num_attrib] != NULL; num_attrib++) { in handle_append_prepend()
745 if (strcmp (attr[0], "key") != 0) in handle_append_prepend()
747 strncpy (pc->merge_key, attr[1], MAX_KEY_SIZE); in handle_append_prepend()
749 if (strcmp (attr[2], "type") != 0) in handle_append_prepend()
752 if (strcmp (attr[3], "string") == 0) { in handle_append_prepend()
756 } else if (strcmp (attr[3], "strlist") == 0) { in handle_append_prepend()
760 } else if (strcmp (attr[3], "copy_property") == 0) { in handle_append_prepend()
776 handle_spawn (ParsingContext * pc, const char **attr) in handle_spawn() argument
782 for (num_attrib = 0; attr[num_attrib] != NULL; num_attrib++) { in handle_spawn()
789 if (strcmp (attr[0], "udi") != 0) in handle_spawn()
792 strncpy (pc->merge_key, attr[1], MAX_KEY_SIZE); in handle_spawn()
804 handle_remove (ParsingContext * pc, const char **attr) in handle_remove() argument
810 for (num_attrib = 0; attr[num_attrib] != NULL; num_attrib++) { in handle_remove()
817 if (strcmp (attr[0], "key") != 0) in handle_remove()
819 strncpy (pc->merge_key, attr[1], MAX_KEY_SIZE); in handle_remove()
822 if (strcmp (attr[2], "type") != 0) in handle_remove()
825 if (strcmp (attr[3], "strlist") == 0) { in handle_remove()
846 handle_clear (ParsingContext * pc, const char **attr) in handle_clear() argument
852 for (num_attrib = 0; attr[num_attrib] != NULL; num_attrib++) { in handle_clear()
859 if (strcmp (attr[0], "key") != 0) in handle_clear()
863 if (strcmp (attr[3], "strlist") != 0) in handle_clear()
866 strncpy (pc->merge_key, attr[1], MAX_KEY_SIZE); in handle_clear()
892 start (ParsingContext * pc, const char *el, const char **attr) in start() argument
929 if (!handle_match (pc, attr)) { in start()
948 handle_merge (pc, attr); in start()
965 handle_append_prepend (pc, attr); in start()
982 handle_append_prepend (pc, attr); in start()
999 handle_remove (pc, attr); in start()
1016 handle_clear (pc, attr); in start()
1052 handle_spawn (pc, attr); in start()