7 /* neutralize characters before they can explode
9 /* #include <stringops.h>
11 /* char *neuter(buffer, bad, replacement)
16 /* neuter() replaces bad characters in its input
17 /* by the given replacement.
21 /* The null-terminated input string.
23 /* The null-terminated bad character string.
25 /* Replacement value for characters in \fIbuffer\fR that do not
26 /* pass the bad character test.
30 /* The Secure Mailer license must be distributed with this software.
33 /* IBM T.J. Watson Research
35 /* Yorktown Heights, NY 10598, USA
43 /* Utility library. */
45 #include <stringops.h>
47 /* neuter - neutralize bad characters */
49 char *neuter(char *string
, const char *bad
, int replacement
)
54 for (cp
= string
; (ch
= *(unsigned char *) cp
) != 0; cp
++)
55 if (strchr(bad
, ch
) != 0)