Deleted Added
full compact
cchar.c (76810) cchar.c (90111)
1/*-
2 * Copyright (c) 1991, 1993, 1994
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

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

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static char sccsid[] = "@(#)cchar.c 8.5 (Berkeley) 4/2/94";
37#endif
38static const char rcsid[] =
1/*-
2 * Copyright (c) 1991, 1993, 1994
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

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

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static char sccsid[] = "@(#)cchar.c 8.5 (Berkeley) 4/2/94";
37#endif
38static const char rcsid[] =
39 "$FreeBSD: head/bin/stty/cchar.c 76810 2001-05-18 11:04:19Z kris $";
39 "$FreeBSD: head/bin/stty/cchar.c 90111 2002-02-02 06:50:57Z imp $";
40#endif /* not lint */
41
42#include <sys/types.h>
43
44#include <err.h>
45#include <limits.h>
46#include <stddef.h>
47#include <stdlib.h>
48#include <string.h>
49
50#include "stty.h"
51#include "extern.h"
52
40#endif /* not lint */
41
42#include <sys/types.h>
43
44#include <err.h>
45#include <limits.h>
46#include <stddef.h>
47#include <stdlib.h>
48#include <string.h>
49
50#include "stty.h"
51#include "extern.h"
52
53static int c_cchar __P((const void *, const void *));
53static int c_cchar(const void *, const void *);
54
55/*
56 * Special control characters.
57 *
58 * Cchars1 are the standard names, cchars2 are the old aliases.
59 * The first are displayed, but both are recognized on the
60 * command line.
61 */

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

85struct cchar cchars2[] = {
86 { "brk", VEOL, CEOL },
87 { "flush", VDISCARD, CDISCARD },
88 { "rprnt", VREPRINT, CREPRINT },
89 { NULL, 0, 0 },
90};
91
92static int
54
55/*
56 * Special control characters.
57 *
58 * Cchars1 are the standard names, cchars2 are the old aliases.
59 * The first are displayed, but both are recognized on the
60 * command line.
61 */

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

85struct cchar cchars2[] = {
86 { "brk", VEOL, CEOL },
87 { "flush", VDISCARD, CDISCARD },
88 { "rprnt", VREPRINT, CREPRINT },
89 { NULL, 0, 0 },
90};
91
92static int
93c_cchar(a, b)
94 const void *a, *b;
93c_cchar(const void *a, const void *b)
95{
96
97 return (strcmp(((const struct cchar *)a)->name, ((const struct cchar *)b)->name));
98}
99
100int
94{
95
96 return (strcmp(((const struct cchar *)a)->name, ((const struct cchar *)b)->name));
97}
98
99int
101csearch(argvp, ip)
102 char ***argvp;
103 struct info *ip;
100csearch(char ***argvp, struct info *ip)
104{
105 struct cchar *cp, tmp;
106 long val;
107 char *arg, *ep, *name;
108
109 name = **argvp;
110
111 tmp.name = name;

--- 36 unchanged lines hidden ---
101{
102 struct cchar *cp, tmp;
103 long val;
104 char *arg, *ep, *name;
105
106 name = **argvp;
107
108 tmp.name = name;

--- 36 unchanged lines hidden ---