• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/postfix-255/postfix/src/bounce/

Lines Matching refs:tp

210     BOUNCE_TEMPLATE *tp;
212 tp = (BOUNCE_TEMPLATE *) mymalloc(sizeof(*tp));
213 *tp = *prototype;
214 return (tp);
219 void bounce_template_free(BOUNCE_TEMPLATE *tp)
221 if (tp->buffer) {
222 myfree(tp->buffer);
223 myfree((char *) tp->origin);
225 myfree((char *) tp);
230 static void bounce_template_reset(BOUNCE_TEMPLATE *tp)
232 myfree(tp->buffer);
233 myfree((char *) tp->origin);
234 *tp = *(tp->prototype);
239 void bounce_template_load(BOUNCE_TEMPLATE *tp, const char *origin,
246 if (tp->buffer)
247 bounce_template_reset(tp);
254 tp->flags |= BOUNCE_TMPL_FLAG_NEW_BUFFER;
255 tp->buffer = mystrdup(buffer);
256 tp->origin = mystrdup(origin);
262 static void bounce_template_parse_buffer(BOUNCE_TEMPLATE *tp)
264 char *tval = tp->buffer;
275 if ((tp->flags & BOUNCE_TMPL_FLAG_NEW_BUFFER) == 0)
277 tp->flags &= ~BOUNCE_TMPL_FLAG_NEW_BUFFER;
283 bounce_template_reset(tp); \
299 tp->origin, cp, tp->class);
305 tp->origin, cp, tp->class);
309 tp->mime_charset = hval;
311 tp->from = hval;
313 tp->subject = hval;
315 if (tp->postmaster_subject == 0) {
318 tp->origin, cp, tp->class);
321 tp->postmaster_subject = hval;
325 tp->origin, cp, tp->class);
338 tp->origin, tp->class);
349 if (strcasecmp(tp->mime_charset, "us-ascii") == 0) {
351 tp->origin, tp->class);
356 tp->mime_encoding = MAIL_ATTR_ENC_8BIT;
375 tp->message_text = (const char **) cpp;
383 BOUNCE_TEMPLATE *tp = (BOUNCE_TEMPLATE *) context;
402 tp->origin, result, tp->class, key);
404 "in %s template", bd->suffix, key, tp->class);
409 tp->origin, tp->class, key);
411 "in %s template", bd->suffix, key, tp->class);
421 tp->origin,
431 BOUNCE_TEMPLATE *tp,
435 if (tp->flags & BOUNCE_TMPL_FLAG_NEW_BUFFER)
436 bounce_template_parse_buffer(tp);
438 out_fn(fp, "From: %s", tp->from);
439 out_fn(fp, "Subject: %s", tp->postmaster_subject && postmaster_copy ?
440 tp->postmaster_subject : tp->subject);
447 BOUNCE_TEMPLATE *tp)
454 if (tp->flags & BOUNCE_TMPL_FLAG_NEW_BUFFER)
455 bounce_template_parse_buffer(tp);
457 for (cpp = tp->message_text; *cpp; cpp++) {
459 bounce_template_lookup, (char *) tp);
462 tp->origin, tp->class, *cpp);
465 tp->origin, tp->class, *cpp);
473 void bounce_template_dump(VSTREAM *fp, BOUNCE_TEMPLATE *tp)
477 if (tp->flags & BOUNCE_TMPL_FLAG_NEW_BUFFER)
478 bounce_template_parse_buffer(tp);
480 vstream_fprintf(fp, "Charset: %s\n", tp->mime_charset);
481 vstream_fprintf(fp, "From: %s\n", tp->from);
482 vstream_fprintf(fp, "Subject: %s\n", tp->subject);
483 if (tp->postmaster_subject)
485 tp->postmaster_subject);
487 for (cpp = tp->message_text; *cpp; cpp++)