]>
diplodocus.org Git - nmh/blob - sbr/context_del.c
d08e717fe9bb8a4d22acdb31cc4f14df5b389c54
2 * context_del.c -- delete an entry from the context/profile list
4 * This code is Copyright (c) 2002, by the authors of nmh. See the
5 * COPYRIGHT file in the root directory of the nmh distribution for
6 * complete copyright information.
13 * Delete a key/value pair from the context/profile list.
14 * Return 0 if key is found, else return 1.
18 context_del (char *key
)
22 for (np
= m_defs
, pp
= NULL
; np
; pp
= np
, np
= np
->n_next
) {
23 if (!strcasecmp (np
->n_name
? np
->n_name
: "", key
? key
: "")) {
25 inform("bug: context_del(key=\"%s\"), continuing...", np
->n_name
);
27 pp
->n_next
= np
->n_next
;
31 mh_xfree(np
->n_field
);