+ Changed protocol to 0.3 because we now accept both -foo and foo

as argument introducers.  in 0.4-pre10, these were changed
   from foo to -foo and this broke many clients.  This change
   should fix that and be backward/forward compatible.
 + Added a noop function to the protocol.  This is useful for writing
   shell script clients of LCDproc.
 + Changed the shared sock_send_string function to NOT send the
   ending NUL ('\0') byte with the string.  This was confusing
   in Perl clients which saw NUL's as the first character of
   each reply.  WARNING: The LCDPROC client depended on this
   behavior, your client may too.  Use the newline instead.
   See the code in clients/lcdproc/main.c (look for "switch(buf[i])")
   to see one way to handle this.  This should allow new clients
   to connect to old servers and vice-versa.
 + Messed with include structure in .c files.  It should no longer
   be necessary to specify ../.. to get to shared code headers.
   Also, since we are using automake, the global config.h can be
   found with just #include "config.h" as it's location is included
   in a -I to the compilers.  As a result "make distcheck" now works.
This commit is contained in:
ppokorny
2001-05-25 03:14:27 +00:00
parent 211a3a4b04
commit 00cc9fca23
48 changed files with 222 additions and 223 deletions
+8 -6
View File
@@ -5,15 +5,17 @@
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "lcd.h"
#include "CFontz.h"
#include "drv_base.h"
#include "../render.h"
#include "../../shared/debug.h"
#include "../../shared/str.h"
#include "../../config.h"
#include "render.h"
#include "shared/debug.h"
#include "shared/str.h"
static int custom = 0;
typedef enum {
+5
View File
@@ -14,3 +14,8 @@ EXTRA_libLCDdrivers_a_SOURCES = MtxOrb.c MtxOrb.h text.c text.h \
glk.c glk.h glkproto.c glkproto.h
libLCDdrivers_a_DEPENDENCIES = @DRIVERS@
libLCDdrivers_a_LIBADD = @DRIVERS@
# NOTE: $(srcdir)/.. is to get .h files from the server directory
# $(top_srcdir) is to get .h files from shared/...
# These are necessary because a VPATH build has split source and build
# directories and these files are in the VPATH'd source area.
INCLUDES = -I$(srcdir)/.. -I$(top_srcdir)
+7 -4
View File
@@ -5,13 +5,16 @@
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "lcd.h"
#include "MtxOrb.h"
#include "drv_base.h"
#include "../../shared/debug.h"
#include "../../shared/str.h"
#include "../../config.h"
#include "shared/debug.h"
#include "shared/str.h"
static int custom = 0;
static enum {MTXORB_LCD, MTXORB_LKD, MTXORB_VFD, MTXORB_VKD} MtxOrb_type;
+1 -2
View File
@@ -10,7 +10,7 @@
#include <termios.h>
#include <fcntl.h>
#include <string.h>
#include <sys/errno.h>
#include <errno.h>
#include <sys/types.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -26,7 +26,6 @@
# endif
#endif
#ifdef SOLARIS
# include <errno.h>
# include <strings.h>
#endif
#include "lcd.h"
+1 -1
View File
@@ -15,7 +15,7 @@
#include <curses.h>
#endif
#include "../../shared/str.h"
#include "shared/str.h"
#include "lcd.h"
#include "curses_drv.h"
+4 -8
View File
@@ -355,18 +355,13 @@ int glk_contrast(int contrast)
//
void glk_backlight(int on)
{
/*
if(on)
{
if(on) {
// printf("Backlight ON\n");
glkputl( PortFD, GLKCommand, 0x42, 0, EOF );
}
else
{
} else {
// printf("Backlight OFF\n");
glkputl( PortFD, GLKCommand, 0x46, EOF );
}
*/
}
//////////////////////////////////////////////////////////////////////
@@ -638,7 +633,7 @@ char glk_getkey()
msec_diff = (now.tv_sec - lastkey.tv_sec) * 1000 ;
msec_diff += (now.tv_usec - lastkey.tv_usec) / 1000 ;
// printf( "KEY %c down for %d msec\n", key, msec_diff );
if( msec_diff > 2000 ) {
if( msec_diff > 1000 ) {
/* Generate repeat event */
c = key | 0x20 ; /* Upper case to lower case */
++lastkey.tv_sec ; /* HACK HACK. repeat at 1 sec intervals */
@@ -656,6 +651,7 @@ char glk_getkey()
case 'L' : c = 'D' ; break ; /* Menu/Exit */
case 'U' : c = 'E' ; break ; /* Up */
case 'K' : c = 'F' ; break ; /* Down */
case 'v' : c = 'N' ; break ;
case 'p' : c = 'O' ; break ;
case 'q' : c = 'P' ; break ;
+6 -8
View File
@@ -81,14 +81,12 @@ GLKDisplay *
* framing errors incase the module transmits back
* to back with only one stop bit.
*/
#ifndef IRIX
#ifndef SOLARIS
cfmakeraw( &new ); /* Sets CS8 */
#endif
#endif
new.c_iflag |= IGNPAR ; /* Ignore framing/parity errors */
new.c_cflag &= ~(CBAUD | CRTSCTS ) ;
new.c_cflag |= speed | CREAD | CLOCAL | CSTOPB ;
new.c_iflag &= ~( IGNBRK | BRKINT | PARMRK | IGNPAR | ISTRIP
| INLCR | IGNCR | ICRNL | IXON );
new.c_oflag &= ~OPOST;
new.c_lflag &= ~( ECHO | ECHONL | ICANON | ISIG | IEXTEN );
new.c_cflag &= ~( CBAUD | CSIZE | PARENB | CRTSCTS );
new.c_cflag |= speed | CS8 | CREAD | CLOCAL | CSTOPB ;
new.c_cc[VMIN] = 0 ;
new.c_cc[VTIME] = GLK_TIMEOUT ;
+1 -1
View File
@@ -39,7 +39,7 @@
#include "hd44780-4bit.h"
#include "port.h"
#include "../../shared/str.h"
#include "shared/str.h"
#include <sys/perm.h>
#include <stdio.h>
#include <string.h>
+1 -1
View File
@@ -35,7 +35,7 @@
#include "hd44780-winamp.h"
#include "port.h"
#include "../../shared/str.h"
#include "shared/str.h"
#include <sys/perm.h>
#include <stdio.h>
#include <string.h>
+1 -1
View File
@@ -66,7 +66,7 @@
# include <time.h>
#endif
#include "../../shared/str.h"
#include "shared/str.h"
#include "lcd.h"
#include "hd44780.h"
+2 -2
View File
@@ -17,8 +17,8 @@
#define __u32 unsigned int
#define __u8 unsigned char
#include "../../shared/debug.h"
#include "../../shared/str.h"
#include "shared/debug.h"
#include "shared/str.h"
#define NAME_LENGTH 128
+2 -2
View File
@@ -10,8 +10,8 @@
#include <linux/joystick.h>
#include "../../shared/debug.h"
#include "../../shared/str.h"
#include "shared/debug.h"
#include "shared/str.h"
#define NAME_LENGTH 128
+11 -10
View File
@@ -5,22 +5,23 @@
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
#include <curses.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "../../shared/str.h"
#ifdef HAVE_NCURSES_H
# include <ncurses.h>
#else
# include <curses.h>
#endif
#include "shared/str.h"
#include "shared/debug.h"
#include "lcd.h"
#include "lb216.h"
#include "drv_base.h"
#include "../render.h"
#include "../../shared/debug.h"
#include "../../config.h"
#include "render.h"
static int custom=0;
typedef enum {
+1 -1
View File
@@ -10,7 +10,7 @@
#include "config.h"
#endif
#include "../../shared/LL.h"
#include "shared/LL.h"
#include "lcd.h"
+2 -2
View File
@@ -17,8 +17,8 @@
#define __u32 unsigned int
#define __u8 unsigned char
#include "../../shared/debug.h"
#include "../../shared/str.h"
#include "shared/debug.h"
#include "shared/str.h"
#define NAME_LENGTH 128
+1 -1
View File
@@ -26,7 +26,7 @@
#include <vga.h>
#include <vgagl.h>
#include "../../shared/str.h"
#include "shared/str.h"
#include "lcd.h"
#include "svgalib_drv.h"
+2 -2
View File
@@ -15,8 +15,8 @@
#include "wirz-sli.h"
#include "drv_base.h"
#include "../../shared/debug.h"
#include "../../shared/str.h"
#include "shared/debug.h"
#include "shared/str.h"
static int custom = 0;
typedef enum {