Deleted Added
full compact
modes.c (76810) modes.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[] = "@(#)modes.c 8.3 (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[] = "@(#)modes.c 8.3 (Berkeley) 4/2/94";
37#endif
38static const char rcsid[] =
39 "$FreeBSD: head/bin/stty/modes.c 76810 2001-05-18 11:04:19Z kris $";
39 "$FreeBSD: head/bin/stty/modes.c 90111 2002-02-02 06:50:57Z imp $";
40#endif /* not lint */
41
42#include <sys/types.h>
43#include <stddef.h>
44#include <string.h>
45#include "stty.h"
46
40#endif /* not lint */
41
42#include <sys/types.h>
43#include <stddef.h>
44#include <string.h>
45#include "stty.h"
46
47int msearch __P((char ***, struct info *));
47int msearch(char ***, struct info *);
48
49struct modes {
50 const char *name;
51 long set;
52 long unset;
53};
54
55/*

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

204 { "onlret", ONLRET, 0 },
205 { "-onlret", 0, ONLRET },
206 { NULL, 0, 0 },
207};
208
209#define CHK(s) (*name == s[0] && !strcmp(name, s))
210
211int
48
49struct modes {
50 const char *name;
51 long set;
52 long unset;
53};
54
55/*

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

204 { "onlret", ONLRET, 0 },
205 { "-onlret", 0, ONLRET },
206 { NULL, 0, 0 },
207};
208
209#define CHK(s) (*name == s[0] && !strcmp(name, s))
210
211int
212msearch(argvp, ip)
213 char ***argvp;
214 struct info *ip;
212msearch(char ***argvp, struct info *ip)
215{
216 struct modes *mp;
217 char *name;
218
219 name = **argvp;
220
221 for (mp = cmodes; mp->name; ++mp)
222 if (CHK(mp->name)) {

--- 28 unchanged lines hidden ---
213{
214 struct modes *mp;
215 char *name;
216
217 name = **argvp;
218
219 for (mp = cmodes; mp->name; ++mp)
220 if (CHK(mp->name)) {

--- 28 unchanged lines hidden ---