aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-01-18 10:27:56 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-01-18 10:34:42 +0100
commit4f83229c9b7ff9d267968a85f8f7c5ef3d18e11d (patch)
tree34ad9034843cbe7df1f0858f51f626495232de46
parent46bb435f530a72dc3e140e1dc506ad4c60969a06 (diff)
downloadfbida-4f83229c9b7ff9d267968a85f8f7c5ef3d18e11d.tar.gz
drop lirc support
-rw-r--r--GNUmakefile7
-rw-r--r--fbi.c28
-rw-r--r--lirc.c61
-rw-r--r--lirc.h2
4 files changed, 2 insertions, 96 deletions
diff --git a/GNUmakefile b/GNUmakefile
index c17ece6..8b4ea0e 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -77,7 +77,6 @@ JPEG_VER := $(call ac_jpeg_ver)
#HAVE_GLIBC := $(call ac_func,fopencookie)
#HAVE_LIBSANE := $(call ac_lib,sane_init,sane)
#HAVE_LIBCURL := $(call ac_lib,curl_easy_init,curl)
-#HAVE_LIBLIRC := $(call ac_lib,lirc_init,lirc_client)
endef
# transposing
@@ -107,22 +106,20 @@ ifeq ($(HAVE_CAIRO_GL),yes)
endif
includes = CAIRO_GL
-libraries = PCD GIF CURL SANE LIRC
+libraries = PCD GIF CURL SANE
ida_libs = PCD GIF WEBP CURL SANE
-fbi_libs = PCD GIF WEBP CURL LIRC
+fbi_libs = PCD GIF WEBP CURL
PCD_LDLIBS := -lpcd
GIF_LDLIBS := -lgif
SANE_LDLIBS := -lsane
CURL_LDLIBS := -lcurl
-LIRC_LDLIBS := -llirc_client
WEBP_OBJS := rd/read-webp.o
PCD_OBJS := rd/read-pcd.o
GIF_OBJS := rd/read-gif.o
SANE_OBJS := sane.o
CURL_OBJS := curl.o
-LIRC_OBJS := lirc.o
# common objs
OBJS_READER := readers.o rd/read-ppm.o rd/read-bmp.o rd/read-jpeg.o \
diff --git a/fbi.c b/fbi.c
index 712e236..8abb864 100644
--- a/fbi.c
+++ b/fbi.c
@@ -32,11 +32,6 @@
#include <libexif/exif-data.h>
-#ifdef HAVE_LIBLIRC
-# include "lirc/lirc_client.h"
-# include "lirc.h"
-#endif
-
#include "readers.h"
#include "vt.h"
#include "kbd.h"
@@ -60,9 +55,6 @@
/* ---------------------------------------------------------------------- */
-/* lirc fd */
-int lirc = -1;
-
/* variables for read_image */
int32_t lut_red[256], lut_green[256], lut_blue[256];
int pcd_res = 3;
@@ -846,12 +838,6 @@ svga_show(struct flist *f, struct flist *prev,
FD_ZERO(&set);
FD_SET(0, &set);
fdmax = 1;
-#ifdef HAVE_LIBLIRC
- if (-1 != lirc) {
- FD_SET(lirc,&set);
- fdmax = lirc+1;
- }
-#endif
limit.tv_sec = timeout;
limit.tv_usec = 0;
rc = select(fdmax, &set, NULL, NULL,
@@ -871,17 +857,6 @@ svga_show(struct flist *f, struct flist *prev,
}
key[rc] = 0;
}
-#ifdef HAVE_LIBLIRC
- if (lirc != -1 && FD_ISSET(lirc,&set)) {
- /* lirc input */
- if (-1 == lirc_fbi_havedata(&rc,key)) {
- fprintf(stderr,"lirc: connection lost\n");
- close(lirc);
- lirc = -1;
- }
- key[rc] = 0;
- }
-#endif
keycode = kbd_parse(key, &keymod);
switch (keycode) {
case KEY_SPACE:
@@ -1379,9 +1354,6 @@ int main(int argc, char *argv[])
#endif
setlocale(LC_ALL,"");
-#ifdef HAVE_LIBLIRC
- lirc = lirc_fbi_init();
-#endif
fbi_read_config(".fbirc");
cfg_parse_cmdline(&argc,argv,fbi_cmd);
cfg_parse_cmdline(&argc,argv,fbi_cfg);
diff --git a/lirc.c b/lirc.c
deleted file mode 100644
index 04dfe7f..0000000
--- a/lirc.c
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <pthread.h>
-
-#include <lirc/lirc_client.h>
-#include "lirc.h"
-
-/*-----------------------------------------------------------------------*/
-
-static int debug = 0;
-static struct lirc_config *config = NULL;
-
-int lirc_fbi_init()
-{
- int fd;
- if (-1 == (fd = lirc_init("fbi",debug))) {
- if (debug)
- fprintf(stderr,"lirc: no infrared remote support available\n");
- return -1;
- }
- if (0 != lirc_readconfig(NULL,&config,NULL)) {
- config = NULL;
- }
- if (debug)
- fprintf(stderr, "lirc: ~/.lircrc file %sfound\n",
- config ? "" : "not ");
-
- fcntl(fd,F_SETFL,O_NONBLOCK);
- fcntl(fd,F_SETFD,FD_CLOEXEC);
- if (debug)
- fprintf(stderr,"lirc: init ok\n");
-
- return fd;
-}
-
-int lirc_fbi_havedata(int* rc, char key[11])
-{
- char *code,*cmd;
- int ret=-1;
-
- while (lirc_nextcode(&code) == 0 && code != NULL) {
- ret = 0;
- if (config) {
- /* use ~/.lircrc */
- while (lirc_code2char(config,code,&cmd)==0 && cmd != NULL) {
- memset(key,0,11);
- strncpy(key,cmd,10);
- *rc = strlen(cmd);
- if (debug)
- fprintf(stderr,"lirc: cmd \"%s\"\n", cmd);
- }
- }
- free(code);
- }
- return ret;
-}
diff --git a/lirc.h b/lirc.h
deleted file mode 100644
index 19c60bb..0000000
--- a/lirc.h
+++ /dev/null
@@ -1,2 +0,0 @@
-int lirc_fbi_init(void);
-int lirc_fbi_havedata(int* rc, char key[11]);