Lines Matching refs:ent

37 	struct subst_entry	*ent = 0;  in add_subst()  local
39 ent = (struct subst_entry *) malloc(sizeof(struct subst_entry)); in add_subst()
40 if (!ent) in add_subst()
42 ent->name = (char *) malloc(strlen(name)+1); in add_subst()
43 if (!ent->name) in add_subst()
45 ent->value = (char *) malloc(strlen(value)+1); in add_subst()
46 if (!ent->value) in add_subst()
48 strcpy(ent->name, name); in add_subst()
49 strcpy(ent->value, value); in add_subst()
50 ent->next = subst_table; in add_subst()
51 subst_table = ent; in add_subst()
54 if (ent) { in add_subst()
55 free(ent->name); in add_subst()
56 free(ent); in add_subst()
63 struct subst_entry *ent; in fetch_subst_entry() local
65 for (ent = subst_table; ent; ent = ent->next) { in fetch_subst_entry()
66 if (strcmp(name, ent->name) == 0) in fetch_subst_entry()
69 return ent; in fetch_subst_entry()
121 struct subst_entry *ent; in substitute_line() local
150 ent = fetch_subst_entry(replace_name); in substitute_line()
151 if (!ent) { in substitute_line()
159 replace_name, ent->value); in substitute_line()
162 replace_string(ptr, end_ptr, ent->value); in substitute_line()
163 if ((ent->value[0] == '@') && in substitute_line()
164 (strlen(replace_name) == strlen(ent->value)-2) && in substitute_line()
165 !strncmp(replace_name, ent->value+1, in substitute_line()
166 strlen(ent->value)-2)) in substitute_line()
168 ptr += strlen(ent->value); in substitute_line()
192 ent = fetch_subst_entry(replace_name); in substitute_line()
193 if (!ent) { in substitute_line()
199 replace_name, ent->value); in substitute_line()
202 replace_string(ptr, end_ptr, ent->value); in substitute_line()