Removed lcddriver.c (doesn't do anything, isn't in any makefiles, etc.).

Passed *every* piece of source in this project through indent. I'm setting
things up with ctags soon and am actually going to *gasp* use a nice
programming environment to continue development in. :)
This commit is contained in:
William Ferrell
2000-03-30 20:20:41 +00:00
parent 2222adcfbe
commit f5a5e9653b
88 changed files with 8207 additions and 8723 deletions
+41 -40
View File
@@ -49,10 +49,11 @@ lcd_logical_driver *lircin;
// raise(sig);
//}
void lircin_close()
void
lircin_close ()
{
lirc_freeconfig(config);
lirc_deinit();
lirc_freeconfig (config);
lirc_deinit ();
}
@@ -61,33 +62,34 @@ void lircin_close()
//
// Return 0 for "nothing available".
//
char lircin_getkey()
char
lircin_getkey ()
{
char key;
char *ir,*cmd;
if (!(ir = lirc_nextir()))
{
return 0;
} else
{
if (!(cmd = lirc_ir2char(config,ir))) return 0;
printf("lirc: \"%s\"\n", cmd);
sscanf(cmd,"%c",&key);
printf("\n%c\n",key);
free(ir);
return key;
}
char key;
char *ir, *cmd;
return 0;
if (!(ir = lirc_nextir ())) {
return 0;
} else {
if (!(cmd = lirc_ir2char (config, ir)))
return 0;
printf ("lirc: \"%s\"\n", cmd);
sscanf (cmd, "%c", &key);
printf ("\n%c\n", key);
free (ir);
return key;
}
return 0;
}
////////////////////////////////////////////////////////////
// init() should set up any device-specific stuff, and
// point all the function pointers.
int lircin_init(struct lcd_logical_driver *driver, char *args)
int
lircin_init (struct lcd_logical_driver *driver, char *args)
{
/* assign funktions */
@@ -99,24 +101,23 @@ int lircin_init(struct lcd_logical_driver *driver, char *args)
/* open socket to lirc */
if (-1 == (fd = lirc_init("lcdd",1))) {
fprintf(stderr,"no infrared remote support available\n");
return -1;
}
if (0 != lirc_readconfig(NULL,&config,NULL)) {
lirc_deinit();
return -1;
}
fcntl(fd,F_SETFL,O_NONBLOCK);
fcntl(fd,F_SETFD,FD_CLOEXEC);
if (-1 == (fd = lirc_init ("lcdd", 1))) {
fprintf (stderr, "no infrared remote support available\n");
return -1;
}
if (0 != lirc_readconfig (NULL, &config, NULL)) {
lirc_deinit ();
return -1;
}
fcntl (fd, F_SETFL, O_NONBLOCK);
fcntl (fd, F_SETFD, FD_CLOEXEC);
/* socket shouldn block lcdd */
fcntl(fd,F_SETFL,O_NONBLOCK);
fcntl(fd,F_SETFD,FD_CLOEXEC);
return 1; // 200 is arbitrary. (must be 1 or more)
}
fcntl (fd, F_SETFL, O_NONBLOCK);
fcntl (fd, F_SETFD, FD_CLOEXEC);
return 1; // 200 is arbitrary. (must be 1 or more)
}