* New version 2.21.999
[alpine.git] / alpine / talk.h
blob3ff07e748239c96088c2b1f846fa90ca7007083f
1 /*
2 * $Id: talk.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2013-2018 Eduardo Chappa
6 * Copyright 2006 University of Washington
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #ifndef PITH_TALK_INCLUDED
18 #define PITH_TALK_INCLUDED
22 * Macros to aid hack to turn off talk permission.
23 * Bit 020 is usually used to turn off talk permission, we turn off
24 * 002 also for good measure, since some mesg commands seem to do that.
26 #define TALK_BIT 020 /* mode bits */
27 #define GM_BIT 002
28 #define TMD_CLEAR 0 /* functions */
29 #define TMD_SET 1
30 #define TMD_RESET 2
31 #define allow_talk(p) tty_chmod((p), TALK_BIT, TMD_SET)
32 #define disallow_talk(p) tty_chmod((p), TALK_BIT|GM_BIT, TMD_CLEAR)
35 /* exported protoypes */
38 #endif /* PITH_TALK_INCLUDED */