… | |
… | |
11 | * Copyright (c) 1997 mj olesen <olesen@me.QueensU.CA> |
11 | * Copyright (c) 1997 mj olesen <olesen@me.QueensU.CA> |
12 | * - extensive modifications |
12 | * - extensive modifications |
13 | * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de> |
13 | * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de> |
14 | * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> |
14 | * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> |
15 | * - extensive modifications |
15 | * - extensive modifications |
16 | * Copyright (c) 2003-2008 Marc Lehmann <pcg@goof.com> |
16 | * Copyright (c) 2003-2010 Marc Lehmann <pcg@goof.com> |
17 | * |
17 | * |
18 | * This program is free software; you can redistribute it and/or modify |
18 | * This program is free software; you can redistribute it and/or modify |
19 | * it under the terms of the GNU General Public License as published by |
19 | * it under the terms of the GNU General Public License as published by |
20 | * the Free Software Foundation; either version 2 of the License, or |
20 | * the Free Software Foundation; either version 2 of the License, or |
21 | * (at your option) any later version. |
21 | * (at your option) any later version. |
… | |
… | |
370 | return; |
370 | return; |
371 | |
371 | |
372 | uint8_t mask = 1 << (opt & 7); |
372 | uint8_t mask = 1 << (opt & 7); |
373 | uint8_t &val = options [opt >> 3]; |
373 | uint8_t &val = options [opt >> 3]; |
374 | |
374 | |
375 | val = val & ~mask | (set ? 0 : mask); |
375 | val = val & ~mask | (set ? mask : 0); |
376 | } |
376 | } |
377 | |
377 | |
378 | /*----------------------------------------------------------------------*/ |
378 | /*----------------------------------------------------------------------*/ |
379 | /* |
379 | /* |
380 | * Exit gracefully, clearing the utmp entry and restoring tty attributes |
380 | * Exit gracefully, clearing the utmp entry and restoring tty attributes |