retire 64-bit conversion functions
[minix3.git] / lib / libsys / fkey_ctl.c
bloba3c28a41b64b27b09d0397a68ecb836d4d16e16c
1 #include "sysutil.h"
3 /*===========================================================================*
4 * fkey_ctl *
5 *===========================================================================*/
6 int fkey_ctl(request, fkeys, sfkeys)
7 int request; /* request to perform */
8 int *fkeys; /* bit masks for F1-F12 keys */
9 int *sfkeys; /* bit masks for Shift F1-F12 keys */
11 /* Send a message to the TTY server to request notifications for function
12 * key presses or to disable notifications. Enabling succeeds unless the key
13 * is already bound to another process. Disabling only succeeds if the key is
14 * bound to the current process.
15 */
16 message m;
17 int s;
18 m.FKEY_REQUEST = request;
19 m.FKEY_FKEYS = (fkeys) ? *fkeys : 0;
20 m.FKEY_SFKEYS = (sfkeys) ? *sfkeys : 0;
21 s = _taskcall(TTY_PROC_NR, TTY_FKEY_CONTROL, &m);
22 if (fkeys) *fkeys = m.FKEY_FKEYS;
23 if (sfkeys) *sfkeys = m.FKEY_SFKEYS;
24 return(s);