2 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
6 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
7 /* All Rights Reserved */
10 * Copyright (c) 1980 Regents of the University of California.
11 * All rights reserved. The Berkeley software License Agreement
12 * specifies the terms and conditions for redistribution.
18 #define punctuat(c) (c == '.' || c == '?' || c == '!' || \
19 c == ',' || c == ';' || c == ':')
22 static char buff
[BUFSIZ
];
36 if (strlen(buff
) > BUFSIZ
)
37 err(gettext("one buff too big (%d)!"), BUFSIZ
);
47 for (p
= buff
; *p
; p
++)
50 if (postpunct
&& punctuat(lch
))
52 else /* pre-punctuation */
72 for (p
= buff
; *p
; p
++)
80 if (strlen(buff
) > BUFSIZ
)
81 err(gettext("output buff too long (%d)"), BUFSIZ
);