1 5cdb1798 2005-10-29 devnull #include "common.h"
2 5cdb1798 2005-10-29 devnull #include "send.h"
4 5cdb1798 2005-10-29 devnull #undef isspace
5 5cdb1798 2005-10-29 devnull #define isspace(c) ((c)==' ' || (c)=='\t' || (c)=='\n')
8 5cdb1798 2005-10-29 devnull * Translate the last component of the sender address. If the translation
9 5cdb1798 2005-10-29 devnull * yields the same address, replace the sender with its last component.
11 5cdb1798 2005-10-29 devnull extern void
12 5cdb1798 2005-10-29 devnull gateway(message *mp)
14 5cdb1798 2005-10-29 devnull char *base;
15 5cdb1798 2005-10-29 devnull String *s;
17 5cdb1798 2005-10-29 devnull /* first remove all systems equivalent to us */
18 5cdb1798 2005-10-29 devnull base = skipequiv(s_to_c(mp->sender));
19 5cdb1798 2005-10-29 devnull if(base != s_to_c(mp->sender)){
20 5cdb1798 2005-10-29 devnull s = mp->sender;
21 5cdb1798 2005-10-29 devnull mp->sender = s_copy(base);
22 5cdb1798 2005-10-29 devnull s_free(s);