- } else if (havebstr("remove_attach_button")) {
- /* now thats st00pit. need to find it by name. */
- void *vAtt;
- StrBuf *WhichAttachment;
- HashPos *at;
- long len;
- const char *key;
-
- WhichAttachment = NewStrBufDup(sbstr("which_attachment"));
- StrBufUnescape(WhichAttachment, 0);
- at = GetNewHashPos(WCC->attachments, 0);
- do {
- GetHashPos(WCC->attachments, at, &len, &key, &vAtt);
-
- att = (wc_mime_attachment*) vAtt;
- if ((att != NULL) &&
- (strcmp(ChrPtr(WhichAttachment),
- ChrPtr(att->FileName) ) == 0))
- {
- DeleteEntryFromHash(WCC->attachments, at);
- break;
- }
- }
- while (NextHashPos(WCC->attachments, at));
- FreeStrBuf(&WhichAttachment);
- display_enter();
- return;