Deleted Added
full compact
comsat.c (29432) comsat.c (29433)
1/*
2 * Copyright (c) 1980, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
1/*
2 * Copyright (c) 1980, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 16 unchanged lines hidden (view full) ---

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * $Id: comsat.c,v 1.8 1997/02/22 14:21:23 peter Exp $
33 * $Id: comsat.c,v 1.9 1997/09/15 00:27:49 ache Exp $
34 */
35
36#ifndef lint
37static char copyright[] =
38"@(#) Copyright (c) 1980, 1993\n\
39 The Regents of the University of California. All rights reserved.\n";
40#endif /* not lint */
41

--- 249 unchanged lines hidden (view full) ---

291 }
292 /* strip weird stuff so can't trojan horse stupid terminals */
293 for (cp = line; (ch = *cp) && ch != '\n'; ++cp, --charcnt) {
294 /* disable upper controls and enable all other
295 8bit codes due to lack of locale knowledge
296 */
297 if (((ch & 0x80) && ch < 0xA0) ||
298 (!(ch & 0x80) && !isprint(ch) &&
34 */
35
36#ifndef lint
37static char copyright[] =
38"@(#) Copyright (c) 1980, 1993\n\
39 The Regents of the University of California. All rights reserved.\n";
40#endif /* not lint */
41

--- 249 unchanged lines hidden (view full) ---

291 }
292 /* strip weird stuff so can't trojan horse stupid terminals */
293 for (cp = line; (ch = *cp) && ch != '\n'; ++cp, --charcnt) {
294 /* disable upper controls and enable all other
295 8bit codes due to lack of locale knowledge
296 */
297 if (((ch & 0x80) && ch < 0xA0) ||
298 (!(ch & 0x80) && !isprint(ch) &&
299 !isspace(ch) && ch != '\007')
299 !isspace(ch) && ch != '\a' && ch != '\b')
300 ) {
301 if (ch & 0x80) {
302 ch &= ~0x80;
303 (void)fputs("M-", tp);
304 }
305 if (iscntrl(ch)) {
306 ch ^= 0x40;
307 (void)fputc('^', tp);
308 }
309 }
310 (void)fputc(ch, tp);
311 }
312 (void)fputs(cr, tp);
313 --linecnt;
314 }
315 (void)fprintf(tp, "----%s\n", cr);
316 (void)fclose(fi);
317}
300 ) {
301 if (ch & 0x80) {
302 ch &= ~0x80;
303 (void)fputs("M-", tp);
304 }
305 if (iscntrl(ch)) {
306 ch ^= 0x40;
307 (void)fputc('^', tp);
308 }
309 }
310 (void)fputc(ch, tp);
311 }
312 (void)fputs(cr, tp);
313 --linecnt;
314 }
315 (void)fprintf(tp, "----%s\n", cr);
316 (void)fclose(fi);
317}