File: X.c

package info (click to toggle)
mailleds 0.93-5
  • links: PTS
  • area: main
  • in suites: potato
  • size: 152 kB
  • ctags: 109
  • sloc: ansic: 821; makefile: 107; sh: 17
file content (28 lines) | stat: -rw-r--r-- 445 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

#ifdef X_SUPPORT

#include <stdlib.h>
#include <fcntl.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <linux/kd.h>
#include "config.h"
#include "mailleds.h"

extern Display *dpy;
extern int x_leds[3];

void get_X_leds_from_kbd_leds(leds)
int leds;
{
	int i = 0;
	if (leds & LED_CAP)
		x_leds[i++] = X_CAP;
	if (leds & LED_NUM)
		x_leds[i++] = X_NUM;
	if (leds & LED_SCR)
		x_leds[i++] = X_SCR;
	x_leds[i] = 0;
}

#endif				/* X_SUPPORT */