• Home
  • Raw
  • Download

Lines Matching refs:ent

54 	struct subst_entry	*ent = 0;  in add_subst()  local
56 ent = (struct subst_entry *) malloc(sizeof(struct subst_entry)); in add_subst()
57 if (!ent) in add_subst()
59 ent->name = (char *) malloc(strlen(name)+1); in add_subst()
60 if (!ent->name) in add_subst()
62 ent->value = (char *) malloc(strlen(value)+1); in add_subst()
63 if (!ent->value) in add_subst()
65 strcpy(ent->name, name); in add_subst()
66 strcpy(ent->value, value); in add_subst()
67 ent->next = subst_table; in add_subst()
68 subst_table = ent; in add_subst()
71 if (ent) { in add_subst()
72 free(ent->name); in add_subst()
73 free(ent); in add_subst()
80 struct subst_entry *ent; in fetch_subst_entry() local
82 for (ent = subst_table; ent; ent = ent->next) { in fetch_subst_entry()
83 if (strcmp(name, ent->name) == 0) in fetch_subst_entry()
86 return ent; in fetch_subst_entry()
138 struct subst_entry *ent; in substitute_line() local
167 ent = fetch_subst_entry(replace_name); in substitute_line()
168 if (!ent) { in substitute_line()
176 replace_name, ent->value); in substitute_line()
179 replace_string(ptr, end_ptr, ent->value); in substitute_line()
180 if ((ent->value[0] == '@') && in substitute_line()
181 (strlen(replace_name) == strlen(ent->value)-2) && in substitute_line()
182 !strncmp(replace_name, ent->value+1, in substitute_line()
183 strlen(ent->value)-2)) in substitute_line()
185 ptr += strlen(ent->value); in substitute_line()
209 ent = fetch_subst_entry(replace_name); in substitute_line()
210 if (!ent) { in substitute_line()
216 replace_name, ent->value); in substitute_line()
219 replace_string(ptr, end_ptr, ent->value); in substitute_line()