Deleted Added
full compact
getttyent.c (20383) getttyent.c (21189)
1/*
2 * Copyright (c) 1989, 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

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

105 p = skip(p);
106 if (!*(tty.ty_type = p))
107 tty.ty_type = NULL;
108 else
109 p = skip(p);
110 }
111 tty.ty_status = 0;
112 tty.ty_window = NULL;
1/*
2 * Copyright (c) 1989, 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

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

105 p = skip(p);
106 if (!*(tty.ty_type = p))
107 tty.ty_type = NULL;
108 else
109 p = skip(p);
110 }
111 tty.ty_status = 0;
112 tty.ty_window = NULL;
113 tty.ty_group = _TTYS_NOGROUP;
113
114#define scmp(e) !strncmp(p, e, sizeof(e) - 1) && isspace(p[sizeof(e) - 1])
115#define vcmp(e) !strncmp(p, e, sizeof(e) - 1) && p[sizeof(e) - 1] == '='
116 for (; *p; p = skip(p)) {
117 if (scmp(_TTYS_OFF))
118 tty.ty_status &= ~TTY_ON;
119 else if (scmp(_TTYS_ON))
120 tty.ty_status |= TTY_ON;
121 else if (scmp(_TTYS_SECURE))
122 tty.ty_status |= TTY_SECURE;
123 else if (vcmp(_TTYS_WINDOW))
124 tty.ty_window = value(p);
114
115#define scmp(e) !strncmp(p, e, sizeof(e) - 1) && isspace(p[sizeof(e) - 1])
116#define vcmp(e) !strncmp(p, e, sizeof(e) - 1) && p[sizeof(e) - 1] == '='
117 for (; *p; p = skip(p)) {
118 if (scmp(_TTYS_OFF))
119 tty.ty_status &= ~TTY_ON;
120 else if (scmp(_TTYS_ON))
121 tty.ty_status |= TTY_ON;
122 else if (scmp(_TTYS_SECURE))
123 tty.ty_status |= TTY_SECURE;
124 else if (vcmp(_TTYS_WINDOW))
125 tty.ty_window = value(p);
126 else if (vcmp(_TTYS_GROUP))
127 tty.ty_group = value(p);
125 else
126 break;
127 }
128
129 if (zapchar == '#' || *p == '#')
130 while ((c = *++p) == ' ' || c == '\t')
131 ;
132 tty.ty_comment = p;

--- 88 unchanged lines hidden ---
128 else
129 break;
130 }
131
132 if (zapchar == '#' || *p == '#')
133 while ((c = *++p) == ' ' || c == '\t')
134 ;
135 tty.ty_comment = p;

--- 88 unchanged lines hidden ---