* coding style harmonization in servers/

- explicitely declare void arguments
  - make a few string args const
* better support for shorter displays in server screen
* make target to create top level tag file
This commit is contained in:
marschap
2007-04-02 21:29:53 +00:00
parent a63ae89eb7
commit 6a1511bb72
100 changed files with 2180 additions and 2170 deletions
+4
View File
@@ -22,4 +22,8 @@ install-html-userguide:
dox: dox:
$(MAKE) -C docs $@ $(MAKE) -C docs $@
topleveltags:
$(CTAGS) --format=1 -f - --languages=C --c-kinds=f --recurse=yes server shared clients \
| perl -p -e 's/^([^\t]+)\t[^\t]+\/([^\t\/]+)\t(.*)$/$1\t$2\t$3/' > tags
## EOF ## EOF
+1 -1
View File
@@ -999,7 +999,7 @@ diff --exclude='*.wanjet' --exclude='.??*' --exclude=config.h --exclude='*.orig'
+ * and every screen add... + * and every screen add...
+ */ + */
+ if( s == server_screen ) { + if( s == server_screen ) {
+ update_server_screen (timer); + update_server_screen();
+ } + }
+ render_screen (s, timer); + render_screen (s, timer);
+ +
+5 -5
View File
@@ -29,7 +29,7 @@ LinkedList *clientlist = NULL;
/* Initialize and kill client list...*/ /* Initialize and kill client list...*/
int int
clients_init () clients_init(void)
{ {
debug(RPT_DEBUG, "%s()", __FUNCTION__); debug(RPT_DEBUG, "%s()", __FUNCTION__);
@@ -43,7 +43,7 @@ clients_init ()
} }
int int
clients_shutdown () clients_shutdown(void)
{ {
Client *c; Client *c;
@@ -92,19 +92,19 @@ clients_remove_client (Client *c)
} }
Client * Client *
clients_getfirst () clients_getfirst(void)
{ {
return (Client *) LL_GetFirst(clientlist); return (Client *) LL_GetFirst(clientlist);
} }
Client * Client *
clients_getnext () clients_getnext(void)
{ {
return (Client *) LL_GetNext(clientlist); return (Client *) LL_GetNext(clientlist);
} }
int int
clients_client_count () clients_client_count(void)
{ {
return LL_Length(clientlist); return LL_Length(clientlist);
} }
+5 -5
View File
@@ -18,17 +18,17 @@
/* extern LinkedList *clientlist; Not needed outside ? */ /* extern LinkedList *clientlist; Not needed outside ? */
/* Initialize and kill client list...*/ /* Initialize and kill client list...*/
int clients_init (); int clients_init(void);
int clients_shutdown (); int clients_shutdown(void);
/* Add/remove clients (return -1 for error) */ /* Add/remove clients (return -1 for error) */
int clients_add_client(Client *c); int clients_add_client(Client *c);
int clients_remove_client(Client *c); int clients_remove_client(Client *c);
/* List functions */ /* List functions */
Client * clients_getfirst (); Client *clients_getfirst(void);
Client * clients_getnext (); Client *clients_getnext(void);
int clients_client_count (); int clients_client_count(void);
/* Search for a client with a particular filedescriptor...*/ /* Search for a client with a particular filedescriptor...*/
Client * clients_find_client_by_sock(int sock); Client * clients_find_client_by_sock(int sock);
+7 -7
View File
@@ -41,7 +41,7 @@
typedef struct driver_symbols { typedef struct driver_symbols {
char *name; const char *name;
short offset; /* offset in Driver structure */ short offset; /* offset in Driver structure */
short required; short required;
} DriverSymbols; } DriverSymbols;
@@ -83,13 +83,13 @@ DriverSymbols driver_symbols[] = {
/* Functions for the driver */ /* Functions for the driver */
static int request_display_width(); static int request_display_width(void);
static int request_display_height(); static int request_display_height(void);
static int driver_store_private_ptr(Driver *driver, void *private_data); static int driver_store_private_ptr(Driver *driver, void *private_data);
Driver * Driver *
driver_load( char * name, char * filename ) driver_load(const char *name, const char *filename)
{ {
Driver *driver = NULL; Driver *driver = NULL;
int res; int res;
@@ -324,7 +324,7 @@ driver_store_private_ptr(Driver * driver, void * private_data)
static int static int
request_display_width() request_display_width(void)
{ {
if (!display_props) if (!display_props)
return 0; return 0;
@@ -332,7 +332,7 @@ request_display_width()
} }
static int static int
request_display_height() request_display_height(void)
{ {
if (!display_props) if (!display_props)
return 0; return 0;
@@ -484,7 +484,7 @@ void
driver_alt_icon(Driver *drv, int x, int y, int icon) driver_alt_icon(Driver *drv, int x, int y, int icon)
{ {
char ch1 = '?'; char ch1 = '?';
char ch2 = 0; char ch2 = '\0';
debug(RPT_DEBUG, "%s(drv=[%.40s], x=%d, y=%d, icon=ICON_%s)", __FUNCTION__, drv->name, x, y, widget_icon_to_iconname(icon)); debug(RPT_DEBUG, "%s(drv=[%.40s], x=%d, y=%d, icon=ICON_%s)", __FUNCTION__, drv->name, x, y, widget_icon_to_iconname(icon));
+1 -1
View File
@@ -21,7 +21,7 @@
#endif #endif
Driver * Driver *
driver_load( char * name, char * filename ); driver_load(const char *name, const char *filename);
int int
driver_unload(Driver *driver); driver_unload(Driver *driver);
+7 -7
View File
@@ -49,7 +49,7 @@ DisplayProps * display_props = NULL;
* 2: ok, driver is an output driver that needs to run in the foreground. * 2: ok, driver is an output driver that needs to run in the foreground.
*/ */
int int
drivers_load_driver( char * name ) drivers_load_driver(const char *name)
{ {
Driver *driver; Driver *driver;
const char *s; const char *s;
@@ -140,7 +140,7 @@ drivers_load_driver( char * name )
* \return 0. * \return 0.
*/ */
int int
drivers_unload_all() drivers_unload_all(void)
{ {
Driver *driver; Driver *driver;
@@ -160,7 +160,7 @@ drivers_unload_all()
* or ""(empty string) if no driver has a get_info() function. * or ""(empty string) if no driver has a get_info() function.
*/ */
const char * const char *
drivers_get_info() drivers_get_info(void)
{ {
Driver *drv; Driver *drv;
@@ -180,7 +180,7 @@ drivers_get_info()
* Call clear() function of all loaded drivers that have a clear() function defined. * Call clear() function of all loaded drivers that have a clear() function defined.
*/ */
void void
drivers_clear() drivers_clear(void)
{ {
Driver *drv; Driver *drv;
@@ -198,7 +198,7 @@ drivers_clear()
* Call flush() function of all loaded drivers that have a flush() function defined. * Call flush() function of all loaded drivers that have a flush() function defined.
*/ */
void void
drivers_flush() drivers_flush(void)
{ {
Driver *drv; Driver *drv;
@@ -212,7 +212,7 @@ drivers_flush()
void void
drivers_string( int x, int y, char * string ) drivers_string(int x, int y, const char *string)
{ {
Driver *drv; Driver *drv;
@@ -375,7 +375,7 @@ drivers_output( int state )
const char * const char *
drivers_get_key() drivers_get_key(void)
{ {
/* Find the first input keystroke, if any */ /* Find the first input keystroke, if any */
Driver *drv; Driver *drv;
+10 -10
View File
@@ -30,22 +30,22 @@ extern DisplayProps * display_props;
int int
drivers_load_driver( char * name ); drivers_load_driver(const char *name);
int int
drivers_unload_all(); drivers_unload_all(void);
const char * const char *
drivers_get_info(); drivers_get_info(void);
void void
drivers_clear(); drivers_clear(void);
void void
drivers_flush(); drivers_flush(void);
void void
drivers_string( int x, int y, char * string ); drivers_string(int x, int y, const char *string);
void void
drivers_chr(int x, int y, char c); drivers_chr(int x, int y, char c);
@@ -69,7 +69,7 @@ void
drivers_set_char(char ch, char *dat); drivers_set_char(char ch, char *dat);
int int
drivers_get_contrast(); drivers_get_contrast(void);
void void
drivers_set_contrast(int contrast); drivers_set_contrast(int contrast);
@@ -84,18 +84,18 @@ void
drivers_output(int state); drivers_output(int state);
const char * const char *
drivers_get_key(); drivers_get_key(void);
/* Please don't read this list except using the following functions */ /* Please don't read this list except using the following functions */
extern LinkedList *loaded_drivers; extern LinkedList *loaded_drivers;
static inline Driver * drivers_getfirst () static inline Driver *drivers_getfirst(void)
{ {
return LL_GetFirst(loaded_drivers); return LL_GetFirst(loaded_drivers);
} }
static inline Driver * drivers_getnext () static inline Driver *drivers_getnext(void)
{ {
return LL_GetNext(loaded_drivers); return LL_GetNext(loaded_drivers);
} }
+1 -1
View File
@@ -1057,7 +1057,7 @@ CFontz633_hardware_clear (Driver *drvthis)
* \param string String that gets written. * \param string String that gets written.
*/ */
MODULE_EXPORT void MODULE_EXPORT void
CFontz633_string (Driver *drvthis, int x, int y, char string[]) CFontz633_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -27,7 +27,7 @@ MODULE_EXPORT int CFontz633_cellwidth (Driver *drvthis);
MODULE_EXPORT int CFontz633_cellheight (Driver *drvthis); MODULE_EXPORT int CFontz633_cellheight (Driver *drvthis);
MODULE_EXPORT void CFontz633_clear (Driver *drvthis); MODULE_EXPORT void CFontz633_clear (Driver *drvthis);
MODULE_EXPORT void CFontz633_flush (Driver *drvthis); MODULE_EXPORT void CFontz633_flush (Driver *drvthis);
MODULE_EXPORT void CFontz633_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void CFontz633_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void CFontz633_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void CFontz633_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT const char *CFontz633_get_key (Driver *drvthis); MODULE_EXPORT const char *CFontz633_get_key (Driver *drvthis);
+1 -1
View File
@@ -1286,7 +1286,7 @@ CFontzPacket_hardware_clear (Driver *drvthis)
* \param string String that gets written. * \param string String that gets written.
*/ */
MODULE_EXPORT void MODULE_EXPORT void
CFontzPacket_string (Driver *drvthis, int x, int y, char string[]) CFontzPacket_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -27,7 +27,7 @@ MODULE_EXPORT int CFontzPacket_cellwidth (Driver *drvthis);
MODULE_EXPORT int CFontzPacket_cellheight (Driver *drvthis); MODULE_EXPORT int CFontzPacket_cellheight (Driver *drvthis);
MODULE_EXPORT void CFontzPacket_clear (Driver *drvthis); MODULE_EXPORT void CFontzPacket_clear (Driver *drvthis);
MODULE_EXPORT void CFontzPacket_flush (Driver *drvthis); MODULE_EXPORT void CFontzPacket_flush (Driver *drvthis);
MODULE_EXPORT void CFontzPacket_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void CFontzPacket_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void CFontzPacket_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void CFontzPacket_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT const char *CFontzPacket_get_key (Driver *drvthis); MODULE_EXPORT const char *CFontzPacket_get_key (Driver *drvthis);
+1 -1
View File
@@ -1232,7 +1232,7 @@ CwLnx_clear(Driver *drvthis)
* \param string String that gets written. * \param string String that gets written.
*/ */
MODULE_EXPORT void MODULE_EXPORT void
CwLnx_string(Driver *drvthis, int x, int y, char *string) CwLnx_string(Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
+1 -1
View File
@@ -58,7 +58,7 @@ MODULE_EXPORT int CwLnx_cellwidth(Driver *drvthis);
MODULE_EXPORT int CwLnx_cellheight(Driver *drvthis); MODULE_EXPORT int CwLnx_cellheight(Driver *drvthis);
MODULE_EXPORT void CwLnx_clear(Driver *drvthis); MODULE_EXPORT void CwLnx_clear(Driver *drvthis);
MODULE_EXPORT void CwLnx_flush(Driver *drvthis); MODULE_EXPORT void CwLnx_flush(Driver *drvthis);
MODULE_EXPORT void CwLnx_string(Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void CwLnx_string(Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void CwLnx_chr(Driver *drvthis, int x, int y, char c); MODULE_EXPORT void CwLnx_chr(Driver *drvthis, int x, int y, char c);
MODULE_EXPORT const char *CwLnx_get_key(Driver *drvthis); MODULE_EXPORT const char *CwLnx_get_key(Driver *drvthis);
+1 -1
View File
@@ -433,7 +433,7 @@ EyeboxOne_height (Driver *drvthis)
* Display a string at x,y * Display a string at x,y
*/ */
MODULE_EXPORT void MODULE_EXPORT void
EyeboxOne_string (Driver *drvthis, int x, int y, char *string) EyeboxOne_string (Driver *drvthis, int x, int y, const char string[])
{ {
int offset, siz; int offset, siz;
int bar,level; int bar,level;
+1 -1
View File
@@ -9,7 +9,7 @@ MODULE_EXPORT int EyeboxOne_width (Driver *drvthis);
MODULE_EXPORT int EyeboxOne_height (Driver *drvthis); MODULE_EXPORT int EyeboxOne_height (Driver *drvthis);
MODULE_EXPORT void EyeboxOne_clear (Driver *drvthis); MODULE_EXPORT void EyeboxOne_clear (Driver *drvthis);
MODULE_EXPORT void EyeboxOne_flush (Driver *drvthis); MODULE_EXPORT void EyeboxOne_flush (Driver *drvthis);
MODULE_EXPORT void EyeboxOne_string (Driver *drvthis, int x, int y, char *string); MODULE_EXPORT void EyeboxOne_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void EyeboxOne_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void EyeboxOne_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void EyeboxOne_set_char (Driver *drvthis, int n, char *dat); MODULE_EXPORT void EyeboxOne_set_char (Driver *drvthis, int n, char *dat);
+1 -1
View File
@@ -629,7 +629,7 @@ PrivateData *p = drvthis->private_data;
* \param string String that gets written. * \param string String that gets written.
*/ */
MODULE_EXPORT void MODULE_EXPORT void
IOWarrior_string(Driver *drvthis, int x, int y, char *string) IOWarrior_string(Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -127,7 +127,7 @@ MODULE_EXPORT int IOWarrior_cellheight(Driver *drvthis);
MODULE_EXPORT int IOWarrior_cellwidth(Driver *drvthis); MODULE_EXPORT int IOWarrior_cellwidth(Driver *drvthis);
MODULE_EXPORT void IOWarrior_clear(Driver *drvthis); MODULE_EXPORT void IOWarrior_clear(Driver *drvthis);
MODULE_EXPORT void IOWarrior_chr(Driver *drvthis, int x, int y, char c); MODULE_EXPORT void IOWarrior_chr(Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void IOWarrior_string(Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void IOWarrior_string(Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void IOWarrior_flush(Driver *drvthis); MODULE_EXPORT void IOWarrior_flush(Driver *drvthis);
MODULE_EXPORT void IOWarrior_backlight(Driver *drvthis, int on); MODULE_EXPORT void IOWarrior_backlight(Driver *drvthis, int on);
MODULE_EXPORT void IOWarrior_vbar(Driver *drvthis, int x, int y, int len, int promille, int options); MODULE_EXPORT void IOWarrior_vbar(Driver *drvthis, int x, int y, int len, int promille, int options);
+1 -1
View File
@@ -571,7 +571,7 @@ MD8800_clear (Driver *drvthis)
// upper-left is (1,1), and the lower right should be (20,4). // upper-left is (1,1), and the lower right should be (20,4).
// //
MODULE_EXPORT void MODULE_EXPORT void
MD8800_string (Driver *drvthis, int x, int y, char string[]) MD8800_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -38,7 +38,7 @@ MODULE_EXPORT int MD8800_cellwidth (Driver *drvthis);
MODULE_EXPORT int MD8800_cellheight (Driver *drvthis); MODULE_EXPORT int MD8800_cellheight (Driver *drvthis);
MODULE_EXPORT void MD8800_clear (Driver *drvthis); MODULE_EXPORT void MD8800_clear (Driver *drvthis);
MODULE_EXPORT void MD8800_flush (Driver *drvthis); MODULE_EXPORT void MD8800_flush (Driver *drvthis);
MODULE_EXPORT void MD8800_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void MD8800_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void MD8800_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void MD8800_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void MD8800_output (Driver *drvthis, int on); MODULE_EXPORT void MD8800_output (Driver *drvthis, int on);
MODULE_EXPORT const char * MD8800_get_info(Driver *drvthis); MODULE_EXPORT const char * MD8800_get_info(Driver *drvthis);
+1 -1
View File
@@ -508,7 +508,7 @@ MtxcOrb_cellheight (Driver *drvthis)
* \param string String that gets written. * \param string String that gets written.
*/ */
MODULE_EXPORT void MODULE_EXPORT void
MtxOrb_string (Driver *drvthis, int x, int y, char string[]) MtxOrb_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -24,7 +24,7 @@ MODULE_EXPORT int MtxOrb_cellwidth (Driver *drvthis);
MODULE_EXPORT int MtxOrb_cellheight (Driver *drvthis); MODULE_EXPORT int MtxOrb_cellheight (Driver *drvthis);
MODULE_EXPORT void MtxOrb_clear (Driver *drvthis); MODULE_EXPORT void MtxOrb_clear (Driver *drvthis);
MODULE_EXPORT void MtxOrb_flush (Driver *drvthis); MODULE_EXPORT void MtxOrb_flush (Driver *drvthis);
MODULE_EXPORT void MtxOrb_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void MtxOrb_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void MtxOrb_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void MtxOrb_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT const char * MtxOrb_get_key (Driver *drvthis); MODULE_EXPORT const char * MtxOrb_get_key (Driver *drvthis);
+1 -1
View File
@@ -688,7 +688,7 @@ NoritakeVFD_clear (Driver *drvthis)
// upper-left is (1,1), and the lower right should be (20,4). // upper-left is (1,1), and the lower right should be (20,4).
// //
MODULE_EXPORT void MODULE_EXPORT void
NoritakeVFD_string (Driver *drvthis, int x, int y, char string[]) NoritakeVFD_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -38,7 +38,7 @@ MODULE_EXPORT int NoritakeVFD_cellwidth (Driver *drvthis);
MODULE_EXPORT int NoritakeVFD_cellheight (Driver *drvthis); MODULE_EXPORT int NoritakeVFD_cellheight (Driver *drvthis);
MODULE_EXPORT void NoritakeVFD_clear (Driver *drvthis); MODULE_EXPORT void NoritakeVFD_clear (Driver *drvthis);
MODULE_EXPORT void NoritakeVFD_flush (Driver *drvthis); MODULE_EXPORT void NoritakeVFD_flush (Driver *drvthis);
MODULE_EXPORT void NoritakeVFD_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void NoritakeVFD_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void NoritakeVFD_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void NoritakeVFD_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void NoritakeVFD_vbar (Driver *drvthis, int x, int y, int len, int promille, int options); MODULE_EXPORT void NoritakeVFD_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
+1 -1
View File
@@ -279,7 +279,7 @@ bayrad_flush(Driver * drvthis)
// upper-left is (1,1), and the lower right should be (20,4). // upper-left is (1,1), and the lower right should be (20,4).
// //
MODULE_EXPORT void MODULE_EXPORT void
bayrad_string(Driver * drvthis, int x, int y, char string[]) bayrad_string(Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -18,7 +18,7 @@ MODULE_EXPORT int bayrad_cellwidth(Driver * drvthis);
MODULE_EXPORT int bayrad_cellheight(Driver *drvthis); MODULE_EXPORT int bayrad_cellheight(Driver *drvthis);
MODULE_EXPORT void bayrad_clear(Driver *drvthis); MODULE_EXPORT void bayrad_clear(Driver *drvthis);
MODULE_EXPORT void bayrad_flush(Driver *drvthis); MODULE_EXPORT void bayrad_flush(Driver *drvthis);
MODULE_EXPORT void bayrad_string(Driver * drvthis, int x, int y, char string[]); MODULE_EXPORT void bayrad_string(Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void bayrad_chr(Driver *drvthis, int x, int y, char c); MODULE_EXPORT void bayrad_chr(Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void bayrad_vbar(Driver *drvthis, int x, int y, int len, int promille, int options); MODULE_EXPORT void bayrad_vbar(Driver *drvthis, int x, int y, int len, int promille, int options);
+1 -1
View File
@@ -430,7 +430,7 @@ curses_backlight (Driver *drvthis, int on)
// upper-left is (1,1), and the lower right should be (20,4). // upper-left is (1,1), and the lower right should be (20,4).
// //
MODULE_EXPORT void MODULE_EXPORT void
curses_string (Driver *drvthis, int x, int y, char *string) curses_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
+1 -1
View File
@@ -9,7 +9,7 @@ MODULE_EXPORT int curses_width (Driver *drvthis);
MODULE_EXPORT int curses_height (Driver *drvthis); MODULE_EXPORT int curses_height (Driver *drvthis);
MODULE_EXPORT void curses_clear (Driver *drvthis); MODULE_EXPORT void curses_clear (Driver *drvthis);
MODULE_EXPORT void curses_flush (Driver *drvthis); MODULE_EXPORT void curses_flush (Driver *drvthis);
MODULE_EXPORT void curses_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void curses_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void curses_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void curses_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void curses_vbar (Driver *drvthis, int x, int y, int len, int promille, int options); MODULE_EXPORT void curses_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
+1 -1
View File
@@ -137,7 +137,7 @@ debug_flush (Driver *drvthis)
// upper-left is (1,1), and the lower right should be (20,4). // upper-left is (1,1), and the lower right should be (20,4).
// //
MODULE_EXPORT void MODULE_EXPORT void
debug_string (Driver *drvthis, int x, int y, char string[]) debug_string (Driver *drvthis, int x, int y, const char string[])
{ {
int i; int i;
+1 -1
View File
@@ -9,7 +9,7 @@ MODULE_EXPORT int debug_width (Driver *drvthis);
MODULE_EXPORT int debug_height (Driver *drvthis); MODULE_EXPORT int debug_height (Driver *drvthis);
MODULE_EXPORT void debug_clear (Driver *drvthis); MODULE_EXPORT void debug_clear (Driver *drvthis);
MODULE_EXPORT void debug_flush (Driver *drvthis); MODULE_EXPORT void debug_flush (Driver *drvthis);
MODULE_EXPORT void debug_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void debug_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void debug_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void debug_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void debug_vbar (Driver *drvthis, int x, int y, int len, int promille, int options); MODULE_EXPORT void debug_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
+1 -1
View File
@@ -282,7 +282,7 @@ EA65_clear (Driver * drvthis)
// upper-left is (1,1), and the lower right should be (9,1). // upper-left is (1,1), and the lower right should be (9,1).
// //
MODULE_EXPORT void MODULE_EXPORT void
EA65_string (Driver * drvthis, int x, int y, char string[]) EA65_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = (PrivateData *) drvthis->private_data; PrivateData *p = (PrivateData *) drvthis->private_data;
+1 -1
View File
@@ -12,7 +12,7 @@ MODULE_EXPORT int EA65_width (Driver * drvthis);
MODULE_EXPORT int EA65_height (Driver *drvthis); MODULE_EXPORT int EA65_height (Driver *drvthis);
MODULE_EXPORT void EA65_clear (Driver *drvthis); MODULE_EXPORT void EA65_clear (Driver *drvthis);
MODULE_EXPORT void EA65_flush (Driver *drvthis); MODULE_EXPORT void EA65_flush (Driver *drvthis);
MODULE_EXPORT void EA65_string (Driver * drvthis, int x, int y, char string[]); MODULE_EXPORT void EA65_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void EA65_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void EA65_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void EA65_brightness (Driver *drvthis, int promille); MODULE_EXPORT void EA65_brightness (Driver *drvthis, int promille);
+1 -1
View File
@@ -200,7 +200,7 @@ MODULE_EXPORT void g15_chr (Driver *drvthis, int x, int y, char c)
// Prints a string on the lcd display, at position (x,y). The // Prints a string on the lcd display, at position (x,y). The
// upper-left is (1,1), and the lower right should be (20,5). // upper-left is (1,1), and the lower right should be (20,5).
// //
MODULE_EXPORT void g15_string (Driver *drvthis, int x, int y, char string[]) MODULE_EXPORT void g15_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -80,7 +80,7 @@ MODULE_EXPORT int g15_cellwidth (Driver *drvthis);
MODULE_EXPORT int g15_cellheight (Driver *drvthis); MODULE_EXPORT int g15_cellheight (Driver *drvthis);
MODULE_EXPORT void g15_clear (Driver *drvthis); MODULE_EXPORT void g15_clear (Driver *drvthis);
MODULE_EXPORT void g15_flush (Driver *drvthis); MODULE_EXPORT void g15_flush (Driver *drvthis);
MODULE_EXPORT void g15_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void g15_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void g15_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void g15_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT int g15_icon (Driver *drvthis, int x, int y, int icon); MODULE_EXPORT int g15_icon (Driver *drvthis, int x, int y, int icon);
MODULE_EXPORT void g15_hbar(Driver *drvthis, int x, int y, int len, int promille, int options); MODULE_EXPORT void g15_hbar(Driver *drvthis, int x, int y, int len, int promille, int options);
+1 -1
View File
@@ -262,7 +262,7 @@ glcdlib_flush (Driver *drvthis)
// upper-left is (1,1), and the lower right should be (20,6). // upper-left is (1,1), and the lower right should be (20,6).
// //
MODULE_EXPORT void MODULE_EXPORT void
glcdlib_string (Driver *drvthis, int x, int y, char string[]) glcdlib_string (Driver *drvthis, int x, int y, const char string[])
{ {
debug(RPT_DEBUG, "String out"); debug(RPT_DEBUG, "String out");
y--; y--;
+1 -1
View File
@@ -35,7 +35,7 @@ MODULE_EXPORT int glcdlib_width (Driver *drvthis);
MODULE_EXPORT int glcdlib_height (Driver *drvthis); MODULE_EXPORT int glcdlib_height (Driver *drvthis);
MODULE_EXPORT void glcdlib_clear (Driver *drvthis); MODULE_EXPORT void glcdlib_clear (Driver *drvthis);
MODULE_EXPORT void glcdlib_flush (Driver *drvthis); MODULE_EXPORT void glcdlib_flush (Driver *drvthis);
MODULE_EXPORT void glcdlib_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void glcdlib_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void glcdlib_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void glcdlib_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT int glcdlib_icon (Driver *drvthis, int x, int y, int icon); MODULE_EXPORT int glcdlib_icon (Driver *drvthis, int x, int y, int icon);
MODULE_EXPORT int glcdlib_cellwidth (Driver *drvthis); MODULE_EXPORT int glcdlib_cellwidth (Driver *drvthis);
+2 -2
View File
@@ -393,10 +393,10 @@ glk_flush(Driver *drvthis)
// upper-left is (1,1), and the lower right should be (20,4). // upper-left is (1,1), and the lower right should be (20,4).
// //
MODULE_EXPORT void MODULE_EXPORT void
glk_string(Driver *drvthis, int x, int y, char string[]) glk_string(Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
char *s; const char *s;
debug(RPT_DEBUG, "glk_string(%d, %d, \"%s\")", x, y, string); debug(RPT_DEBUG, "glk_string(%d, %d, \"%s\")", x, y, string);
+1 -1
View File
@@ -11,7 +11,7 @@ MODULE_EXPORT int glk_cellwidth(Driver *drvthis);
MODULE_EXPORT int glk_cellheight(Driver *drvthis); MODULE_EXPORT int glk_cellheight(Driver *drvthis);
MODULE_EXPORT void glk_clear(Driver *drvthis); MODULE_EXPORT void glk_clear(Driver *drvthis);
MODULE_EXPORT void glk_flush(Driver *drvthis); MODULE_EXPORT void glk_flush(Driver *drvthis);
MODULE_EXPORT void glk_string(Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void glk_string(Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void glk_chr(Driver *drvthis, int x, int y, char c); MODULE_EXPORT void glk_chr(Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void glk_old_vbar(Driver *drvthis, int x, int len); MODULE_EXPORT void glk_old_vbar(Driver *drvthis, int x, int len);
+1 -1
View File
@@ -606,7 +606,7 @@ HD44780_chr (Driver *drvthis, int x, int y, char ch)
// Place a string in the framebuffer // Place a string in the framebuffer
// //
MODULE_EXPORT void MODULE_EXPORT void
HD44780_string (Driver *drvthis, int x, int y, char *string) HD44780_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = (PrivateData *) drvthis->private_data; PrivateData *p = (PrivateData *) drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -26,7 +26,7 @@ MODULE_EXPORT int HD44780_cellwidth (Driver *drvthis);
MODULE_EXPORT int HD44780_cellheight (Driver *drvthis); MODULE_EXPORT int HD44780_cellheight (Driver *drvthis);
MODULE_EXPORT void HD44780_clear (Driver *drvthis); MODULE_EXPORT void HD44780_clear (Driver *drvthis);
MODULE_EXPORT void HD44780_flush (Driver *drvthis); MODULE_EXPORT void HD44780_flush (Driver *drvthis);
MODULE_EXPORT void HD44780_string (Driver *drvthis, int x, int y, char *s); MODULE_EXPORT void HD44780_string (Driver *drvthis, int x, int y, const char s[]);
MODULE_EXPORT void HD44780_chr (Driver *drvthis, int x, int y, char ch); MODULE_EXPORT void HD44780_chr (Driver *drvthis, int x, int y, char ch);
MODULE_EXPORT void HD44780_vbar (Driver *drvthis, int x, int y, int len, int promille, int options); MODULE_EXPORT void HD44780_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
+1 -1
View File
@@ -245,7 +245,7 @@ MODULE_EXPORT void imon_flush (Driver *drvthis)
* \param y Vertical character position (row). * \param y Vertical character position (row).
* \param string String that gets written. * \param string String that gets written.
*/ */
MODULE_EXPORT void imon_string (Driver *drvthis, int x, int y, char string[]) MODULE_EXPORT void imon_string (Driver *drvthis, int x, int y, const char string[])
{ {
int i; int i;
+1 -1
View File
@@ -36,7 +36,7 @@ MODULE_EXPORT int imon_cellwidth (Driver *drvthis);
MODULE_EXPORT int imon_cellheight (Driver *drvthis); MODULE_EXPORT int imon_cellheight (Driver *drvthis);
MODULE_EXPORT void imon_clear (Driver *drvthis); MODULE_EXPORT void imon_clear (Driver *drvthis);
MODULE_EXPORT void imon_flush (Driver *drvthis); MODULE_EXPORT void imon_flush (Driver *drvthis);
MODULE_EXPORT void imon_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void imon_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void imon_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void imon_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT int imon_icon (Driver *drvthis, int x, int y, int icon); MODULE_EXPORT int imon_icon (Driver *drvthis, int x, int y, int icon);
MODULE_EXPORT const char *imon_get_info (Driver *drvthis); MODULE_EXPORT const char *imon_get_info (Driver *drvthis);
+1 -1
View File
@@ -352,7 +352,7 @@ static void LB216_reboot(Driver * drvthis)
MODULE_EXPORT void MODULE_EXPORT void
LB216_string (Driver * drvthis, int x, int y, char string[]) LB216_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -11,7 +11,7 @@ MODULE_EXPORT int LB216_cellwidth (Driver *drvthis);
MODULE_EXPORT int LB216_cellheight (Driver *drvthis); MODULE_EXPORT int LB216_cellheight (Driver *drvthis);
MODULE_EXPORT void LB216_clear (Driver *drvthis); MODULE_EXPORT void LB216_clear (Driver *drvthis);
MODULE_EXPORT void LB216_flush(Driver *drvthis); MODULE_EXPORT void LB216_flush(Driver *drvthis);
MODULE_EXPORT void LB216_string (Driver * drvthis, int x, int y, char string[]); MODULE_EXPORT void LB216_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void LB216_chr(Driver *drvthis, int x, int y, char c) ; MODULE_EXPORT void LB216_chr(Driver *drvthis, int x, int y, char c) ;
MODULE_EXPORT void LB216_old_vbar(Driver *drvthis, int x, int len); MODULE_EXPORT void LB216_old_vbar(Driver *drvthis, int x, int len);
+1 -1
View File
@@ -135,7 +135,7 @@ typedef struct lcd_logical_driver {
int (*height) (struct lcd_logical_driver *drvthis); int (*height) (struct lcd_logical_driver *drvthis);
void (*clear) (struct lcd_logical_driver *drvthis); void (*clear) (struct lcd_logical_driver *drvthis);
void (*flush) (struct lcd_logical_driver *drvthis); void (*flush) (struct lcd_logical_driver *drvthis);
void (*string) (struct lcd_logical_driver* drvthis, int x, int y, char *str); void (*string) (struct lcd_logical_driver *drvthis, int x, int y, const char *str);
void (*chr) (struct lcd_logical_driver *drvthis, int x, int y, char c); void (*chr) (struct lcd_logical_driver *drvthis, int x, int y, char c);
/* essential input functions (necessary for all input drivers) */ /* essential input functions (necessary for all input drivers) */
+1 -1
View File
@@ -339,7 +339,7 @@ lcdm001_chr (Driver *drvthis, int x, int y, char c)
// upper-left is (1,1), and the lower right should be (20,4). // upper-left is (1,1), and the lower right should be (20,4).
// //
MODULE_EXPORT void MODULE_EXPORT void
lcdm001_string (Driver *drvthis, int x, int y, char *string) lcdm001_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -39,7 +39,7 @@ MODULE_EXPORT int lcdm001_width (Driver *drvthis);
MODULE_EXPORT int lcdm001_height (Driver *drvthis); MODULE_EXPORT int lcdm001_height (Driver *drvthis);
MODULE_EXPORT void lcdm001_clear (Driver *drvthis); MODULE_EXPORT void lcdm001_clear (Driver *drvthis);
MODULE_EXPORT void lcdm001_flush (Driver *drvthis); MODULE_EXPORT void lcdm001_flush (Driver *drvthis);
MODULE_EXPORT void lcdm001_string (Driver *drvthis, int x, int y, char *string); MODULE_EXPORT void lcdm001_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void lcdm001_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void lcdm001_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void lcdm001_old_vbar (Driver *drvthis, int x, int len); MODULE_EXPORT void lcdm001_old_vbar (Driver *drvthis, int x, int len);
+1 -1
View File
@@ -384,7 +384,7 @@ ms6931_clear (Driver *drvthis)
// upper-left is (1,1), and the lower right should be (16,2). // upper-left is (1,1), and the lower right should be (16,2).
// //
MODULE_EXPORT void MODULE_EXPORT void
ms6931_string (Driver *drvthis, int x, int y, char string[]) ms6931_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -45,7 +45,7 @@ MODULE_EXPORT void ms6931_backlight (Driver *drvthis, int on);
MODULE_EXPORT void ms6931_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void ms6931_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void ms6931_clear (Driver *drvthis); MODULE_EXPORT void ms6931_clear (Driver *drvthis);
MODULE_EXPORT void ms6931_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void ms6931_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT const char *ms6931_get_key (Driver *drvthis); MODULE_EXPORT const char *ms6931_get_key (Driver *drvthis);
MODULE_EXPORT void ms6931_hbar (Driver *drvthis, int x, int y, int len, int promille, int pattern); MODULE_EXPORT void ms6931_hbar (Driver *drvthis, int x, int y, int len, int promille, int pattern);
MODULE_EXPORT void ms6931_heartbeat (Driver *drvthis, int state); MODULE_EXPORT void ms6931_heartbeat (Driver *drvthis, int state);
+1 -1
View File
@@ -418,7 +418,7 @@ MTC_S16209X_reboot (Driver * drvthis)
#endif // CAN_REBOOT_LCD #endif // CAN_REBOOT_LCD
MODULE_EXPORT void MODULE_EXPORT void
MTC_S16209X_string (Driver * drvthis, int x, int y, char string[]) MTC_S16209X_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -48,7 +48,7 @@ MODULE_EXPORT int MTC_S16209X_cellwidth (Driver *drvthis);
MODULE_EXPORT int MTC_S16209X_cellheight (Driver *drvthis); MODULE_EXPORT int MTC_S16209X_cellheight (Driver *drvthis);
MODULE_EXPORT void MTC_S16209X_clear (Driver *drvthis); MODULE_EXPORT void MTC_S16209X_clear (Driver *drvthis);
MODULE_EXPORT void MTC_S16209X_flush(Driver *drvthis); MODULE_EXPORT void MTC_S16209X_flush(Driver *drvthis);
MODULE_EXPORT void MTC_S16209X_string (Driver * drvthis, int x, int y, char string[]); MODULE_EXPORT void MTC_S16209X_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void MTC_S16209X_chr(Driver *drvthis, int x, int y, char c) ; MODULE_EXPORT void MTC_S16209X_chr(Driver *drvthis, int x, int y, char c) ;
MODULE_EXPORT void MTC_S16209X_vbar(Driver *drvthis, int x, int y, int len, int promille, int options); MODULE_EXPORT void MTC_S16209X_vbar(Driver *drvthis, int x, int y, int len, int promille, int options);
+1 -1
View File
@@ -301,7 +301,7 @@ sed1520_flush (Driver *drvthis)
// upper-left is (1,1), and the lower right should be (20,4). // upper-left is (1,1), and the lower right should be (20,4).
// //
MODULE_EXPORT void MODULE_EXPORT void
sed1520_string (Driver *drvthis, int x, int y, char string[]) sed1520_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -11,7 +11,7 @@ MODULE_EXPORT int sed1520_cellwidth (Driver *drvthis);
MODULE_EXPORT int sed1520_cellheight (Driver *drvthis); MODULE_EXPORT int sed1520_cellheight (Driver *drvthis);
MODULE_EXPORT void sed1520_clear (Driver *drvthis); MODULE_EXPORT void sed1520_clear (Driver *drvthis);
MODULE_EXPORT void sed1520_flush (Driver *drvthis); MODULE_EXPORT void sed1520_flush (Driver *drvthis);
MODULE_EXPORT void sed1520_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void sed1520_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void sed1520_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void sed1520_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void sed1520_old_vbar (Driver *drvthis, int x, int len); MODULE_EXPORT void sed1520_old_vbar (Driver *drvthis, int x, int len);
+1 -1
View File
@@ -462,7 +462,7 @@ MtxcOrb_cellheight (Driver *drvthis)
* \param string String that gets written. * \param string String that gets written.
*/ */
MODULE_EXPORT void MODULE_EXPORT void
serialPOS_string (Driver *drvthis, int x, int y, char string[]) serialPOS_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -20,7 +20,7 @@ MODULE_EXPORT int serialPOS_cellwidth (Driver *drvthis);
MODULE_EXPORT int serialPOS_cellheight (Driver *drvthis); MODULE_EXPORT int serialPOS_cellheight (Driver *drvthis);
MODULE_EXPORT void serialPOS_clear (Driver *drvthis); MODULE_EXPORT void serialPOS_clear (Driver *drvthis);
MODULE_EXPORT void serialPOS_flush (Driver *drvthis); MODULE_EXPORT void serialPOS_flush (Driver *drvthis);
MODULE_EXPORT void serialPOS_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void serialPOS_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void serialPOS_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void serialPOS_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT const char * serialPOS_get_key (Driver *drvthis); MODULE_EXPORT const char * serialPOS_get_key (Driver *drvthis);
+3 -2
View File
@@ -453,7 +453,8 @@ serialVFD_flush (Driver *drvthis)
* on the screen, don't put it there again * on the screen, don't put it there again
*/ */
if(p->framebuf[i] != p->backingstore[i] || (p->framebuf[i] <=30 && custom_char_changed[(int)p->framebuf[i]])) { if ((p->framebuf[i] != p->backingstore[i]) ||
((p->framebuf[i] <= 30) && (custom_char_changed[(int)p->framebuf[i]]))) {
if (last_chr < i-1) { // if not last char written cursor has to be moved. if (last_chr < i-1) { // if not last char written cursor has to be moved.
if (last_chr < i-2-p->hw_cmd[mv_cursor][0]) { if (last_chr < i-2-p->hw_cmd[mv_cursor][0]) {
Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[mv_cursor][1],\ Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[mv_cursor][1],\
@@ -637,7 +638,7 @@ serialVFD_clear (Driver *drvthis)
// upper-left is (1,1), and the lower right should be (20,4). // upper-left is (1,1), and the lower right should be (20,4).
// //
MODULE_EXPORT void MODULE_EXPORT void
serialVFD_string (Driver *drvthis, int x, int y, char string[]) serialVFD_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -54,7 +54,7 @@ MODULE_EXPORT int serialVFD_cellwidth (Driver *drvthis);
MODULE_EXPORT int serialVFD_cellheight (Driver *drvthis); MODULE_EXPORT int serialVFD_cellheight (Driver *drvthis);
MODULE_EXPORT void serialVFD_clear (Driver *drvthis); MODULE_EXPORT void serialVFD_clear (Driver *drvthis);
MODULE_EXPORT void serialVFD_flush (Driver *drvthis); MODULE_EXPORT void serialVFD_flush (Driver *drvthis);
MODULE_EXPORT void serialVFD_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void serialVFD_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void serialVFD_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void serialVFD_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void serialVFD_vbar (Driver *drvthis, int x, int y, int len, int promille, int options); MODULE_EXPORT void serialVFD_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
+25 -25
View File
@@ -41,8 +41,7 @@ void serialVFD_load_Futaba (Driver *drvthis);
void serialVFD_load_display_data(Driver *drvthis) void serialVFD_load_display_data(Driver *drvthis)
{ {
PrivateData *p = (PrivateData*) drvthis->private_data; PrivateData *p = (PrivateData*) drvthis->private_data;
switch (p->display_type) switch (p->display_type) {
{
case 0: case 0:
serialVFD_load_NEC_FIPC(drvthis); serialVFD_load_NEC_FIPC(drvthis);
break; break;
@@ -59,7 +58,6 @@ void serialVFD_load_display_data(Driver *drvthis)
} }
void void
serialVFD_load_NEC_FIPC (Driver *drvthis) serialVFD_load_NEC_FIPC (Driver *drvthis)
{ //nec_fipc { //nec_fipc
@@ -87,8 +85,8 @@ serialVFD_load_NEC_FIPC (Driver *drvthis)
{2 ,0x14, 0x11}, // init {2 ,0x14, 0x11}, // init
{1 ,0x1A}, // set user char {1 ,0x1A}, // set user char
{1 ,0x09}}; // tab {1 ,0x09}}; // tab
for (tmp=0;tmp < (10) ;tmp++) for (tmp = 0; tmp < 10; tmp++)
for (w=0;w < (4) ;w++) for (w = 0; w < 4; w++)
p->hw_cmd[tmp][w] = hw_cmd[tmp][w]; p->hw_cmd[tmp][w] = hw_cmd[tmp][w];
// Translates ISO 8859-1 to display charset. // Translates ISO 8859-1 to display charset.
@@ -112,13 +110,13 @@ serialVFD_load_NEC_FIPC (Driver *drvthis)
'a', 'a', 'a', 'a', 0xA5, 'a', 'a', 'c', 'a', 'a', 'a', 'a', 0xA5, 'a', 'a', 'c',
'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i',
'o', 'n', 'o', 'o', 'o', 'o', 0xA6, 0x8E, 'o', 'n', 'o', 'o', 'o', 'o', 0xA6, 0x8E,
'0', 'u', 'u', 'u', 0xA7, 'y', 'p', 'y' '0', 'u', 'u', 'u', 0xA7, 'y', 'p', 'y' };
};
for (tmp = 0; tmp < 128; tmp++) for (tmp = 0; tmp < 128; tmp++)
p->charmap[tmp] = charmap[tmp]; p->charmap[tmp] = charmap[tmp];
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...} // {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
const int usr_chr_dot_assignment[57]={7, 1, 2, 3, 4, 5, 0, 0, 0, const int usr_chr_dot_assignment[57] = { 7,
1, 2, 3, 4, 5, 0, 0, 0,
6, 7, 8, 9,10, 0, 0, 0, 6, 7, 8, 9,10, 0, 0, 0,
11,12,13,14,15, 0, 0, 0, 11,12,13,14,15, 0, 0, 0,
16,17,18,19,20, 0, 0, 0, 16,17,18,19,20, 0, 0, 0,
@@ -137,6 +135,7 @@ serialVFD_load_NEC_FIPC (Driver *drvthis)
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp]; p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
} }
void void
serialVFD_load_KD (Driver *drvthis) serialVFD_load_KD (Driver *drvthis)
{ //KD Rev2.1 { //KD Rev2.1
@@ -164,8 +163,8 @@ serialVFD_load_KD (Driver *drvthis)
{2 ,0x14, 0x11}, // init {2 ,0x14, 0x11}, // init
{1 ,0x1A}, // set user char {1 ,0x1A}, // set user char
{1 ,0x09}}; // tab {1 ,0x09}}; // tab
for (tmp=0;tmp < (10) ;tmp++) for (tmp = 0; tmp < 10; tmp++)
for (w=0;w < (4) ;w++) for (w = 0; w < 4; w++)
p->hw_cmd[tmp][w] = hw_cmd[tmp][w]; p->hw_cmd[tmp][w] = hw_cmd[tmp][w];
const unsigned char charmap[] = { const unsigned char charmap[] = {
@@ -188,14 +187,13 @@ serialVFD_load_KD (Driver *drvthis)
0xD2, 0xC2, 0xC4, 'a', 0xA5, 0xC1, 0xC5, 0xC3, 0xD2, 0xC2, 0xC4, 'a', 0xA5, 0xC1, 0xC5, 0xC3,
0xC7, 0xC6, 0xC8, 0xD4, 0xCC, 0xCB, 0xCD, 0xCA, 0xC7, 0xC6, 0xC8, 0xD4, 0xCC, 0xCB, 0xCD, 0xCA,
'o', 0xCF, 0xD1, 0xD0, 0xCE, 'o', 0xA6, 0xBB, 'o', 0xCF, 0xD1, 0xD0, 0xCE, 'o', 0xA6, 0xBB,
0xD0, 0xD7, 0xD6, 0xD8, 0xA7, 'y', 'p', 'y' 0xD0, 0xD7, 0xD6, 0xD8, 0xA7, 'y', 'p', 'y' };
};
for (tmp = 0; tmp < 128; tmp++) for (tmp = 0; tmp < 128; tmp++)
p->charmap[tmp] = charmap[tmp]; p->charmap[tmp] = charmap[tmp];
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...} // {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
const int usr_chr_dot_assignment[57]={7, 1, 2, 3, 4, 5, 0, 0, 0, const int usr_chr_dot_assignment[57] = { 7,
1, 2, 3, 4, 5, 0, 0, 0,
6, 7, 8, 9,10, 0, 0, 0, 6, 7, 8, 9,10, 0, 0, 0,
11,12,13,14,15, 0, 0, 0, 11,12,13,14,15, 0, 0, 0,
16,17,18,19,20, 0, 0, 0, 16,17,18,19,20, 0, 0, 0,
@@ -214,6 +212,7 @@ serialVFD_load_KD (Driver *drvthis)
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp]; p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
} }
void void
serialVFD_load_Noritake (Driver *drvthis) serialVFD_load_Noritake (Driver *drvthis)
{ //Noritake { //Noritake
@@ -241,8 +240,8 @@ serialVFD_load_Noritake (Driver *drvthis)
{2 ,0x14, 0x11}, // init {2 ,0x14, 0x11}, // init
{2 ,0x1B, 0x43}, // set user char {2 ,0x1B, 0x43}, // set user char
{1 ,0x09}}; // tab {1 ,0x09}}; // tab
for (tmp=0;tmp < (10) ;tmp++) for (tmp = 0; tmp < 10; tmp++)
for (w=0;w < (4) ;w++) for (w = 0; w < 4; w++)
p->hw_cmd[tmp][w] = hw_cmd[tmp][w]; p->hw_cmd[tmp][w] = hw_cmd[tmp][w];
// no charmap needed // no charmap needed
@@ -250,7 +249,8 @@ serialVFD_load_Noritake (Driver *drvthis)
p->charmap[tmp] = tmp; p->charmap[tmp] = tmp;
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...} // {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
const int usr_chr_dot_assignment[57]={5, 1, 2, 3, 4, 5, 6, 7, 8, const int usr_chr_dot_assignment[57] = { 5,
1, 2, 3, 4, 5, 6, 7, 8,
9,10,11,12,13,14,15,16, 9,10,11,12,13,14,15,16,
17,18,19,20,21,22,23,24, 17,18,19,20,21,22,23,24,
25,26,27,28,29,30,31,32, 25,26,27,28,29,30,31,32,
@@ -267,6 +267,8 @@ serialVFD_load_Noritake (Driver *drvthis)
for (tmp = 0; tmp < 31; tmp++) for (tmp = 0; tmp < 31; tmp++)
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp]; p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
} }
void void
serialVFD_load_Futaba (Driver *drvthis) serialVFD_load_Futaba (Driver *drvthis)
{ //Futaba { //Futaba
@@ -294,8 +296,8 @@ serialVFD_load_Futaba (Driver *drvthis)
{2 ,0x11,0x14}, // init {2 ,0x11,0x14}, // init
{1 ,0x03}, // set user char {1 ,0x03}, // set user char
{1 ,0x09}}; // tab {1 ,0x09}}; // tab
for (tmp=0;tmp < (10) ;tmp++) for (tmp = 0; tmp < 10; tmp++)
for (w=0;w < (4) ;w++) for (w = 0; w < 4; w++)
p->hw_cmd[tmp][w] = hw_cmd[tmp][w]; p->hw_cmd[tmp][w] = hw_cmd[tmp][w];
// Translates ISO 8859-1 to display charset. // Translates ISO 8859-1 to display charset.
@@ -319,14 +321,13 @@ serialVFD_load_Futaba (Driver *drvthis)
0x85, 0xA0, 0x83, 'a', 0x84, 0x86, 0x91, 0x87, 0x85, 0xA0, 0x83, 'a', 0x84, 0x86, 0x91, 0x87,
0x8A, 0x82, 0x88, 0x89, 0x8D, 0xA1, 0x8C, 0x8B, 0x8A, 0x82, 0x88, 0x89, 0x8D, 0xA1, 0x8C, 0x8B,
'o', 0xA4, 0x95, 0xA9, 0x93, 'o', 0x94, '/', 'o', 0xA4, 0x95, 0xA9, 0x93, 'o', 0x94, '/',
'0', 0x97, 0xA3, 0x96, 0x81, 'y', 'p', 0x89 '0', 0x97, 0xA3, 0x96, 0x81, 'y', 'p', 0x89 };
};
for (tmp = 0; tmp < 128; tmp++) for (tmp = 0; tmp < 128; tmp++)
p->charmap[tmp] = charmap[tmp]; p->charmap[tmp] = charmap[tmp];
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...} // {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
const int usr_chr_dot_assignment[57]={5, 8, 7, 6, 5, 4, 3, 2, 1, const int usr_chr_dot_assignment[57] = { 5,
8, 7, 6, 5, 4, 3, 2, 1,
16,15,14,13,12,11,10, 9, 16,15,14,13,12,11,10, 9,
24,23,22,21,20,19,18,17, 24,23,22,21,20,19,18,17,
32,31,30,29,28,27,26,25, 32,31,30,29,28,27,26,25,
@@ -337,8 +338,7 @@ serialVFD_load_Futaba (Driver *drvthis)
// Where to place the usercharacters (0..30) in the asciicode. // Where to place the usercharacters (0..30) in the asciicode.
// Also used to map standardcharacters in the usercharacterspace(0..30) // Also used to map standardcharacters in the usercharacterspace(0..30)
// (useful for displays with less then 30 usercharacters and predefined bars) // (useful for displays with less then 30 usercharacters and predefined bars)
const unsigned int usr_chr_mapping[31]= const unsigned int usr_chr_mapping[31] = { 0xCD, 0xCE, 0xCF };
{0xCD, 0xCE, 0xCF};
for (tmp = 0; tmp < 31; tmp++) for (tmp = 0; tmp < 31; tmp++)
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp]; p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
} }
+1 -1
View File
@@ -513,7 +513,7 @@ stv5730_flush (Driver *drvthis)
// upper-left is (1,1), and the lower right should be (28,11). // upper-left is (1,1), and the lower right should be (28,11).
// //
MODULE_EXPORT void MODULE_EXPORT void
stv5730_string (Driver *drvthis, int x, int y, char string[]) stv5730_string (Driver *drvthis, int x, int y, const char string[])
{ {
//PrivateData *p = drvthis->private_data; //PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -11,7 +11,7 @@ MODULE_EXPORT int stv5730_cellwidth (Driver *drvthis);
MODULE_EXPORT int stv5730_cellheight (Driver *drvthis); MODULE_EXPORT int stv5730_cellheight (Driver *drvthis);
MODULE_EXPORT void stv5730_clear (Driver *drvthis); MODULE_EXPORT void stv5730_clear (Driver *drvthis);
MODULE_EXPORT void stv5730_flush (Driver *drvthis); MODULE_EXPORT void stv5730_flush (Driver *drvthis);
MODULE_EXPORT void stv5730_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void stv5730_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void stv5730_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void stv5730_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void stv5730_old_vbar (Driver *drvthis, int x, int len); MODULE_EXPORT void stv5730_old_vbar (Driver *drvthis, int x, int len);
MODULE_EXPORT void stv5730_old_hbar (Driver *drvthis, int x, int y, int len); MODULE_EXPORT void stv5730_old_hbar (Driver *drvthis, int x, int y, int len);
+8 -7
View File
@@ -465,20 +465,21 @@ svga_flush (Driver *drvthis)
* upper-left is (1,1), and the lower right should be (p->width,p->height). * upper-left is (1,1), and the lower right should be (p->width,p->height).
*/ */
MODULE_EXPORT void MODULE_EXPORT void
svga_string (Driver *drvthis, int x, int y, char string[]) svga_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; char *buffer = strdup(string);
char *ptr;
debug(RPT_DEBUG, "%s(%p, %d, %d, \"%s\")", __FUNCTION__, drvthis, x, y, string); debug(RPT_DEBUG, "%s(%p, %d, %d, \"%s\")", __FUNCTION__, drvthis, x, y, string);
for (i = 0; string[i] != '\0'; i++) { for (ptr = buffer; *ptr != '\0'; ptr++) {
char *c = &string[i];
if ((unsigned char) *c == 255) // TODO: Is this still necessary ? if ((unsigned char) *ptr == 255) // TODO: Is this still necessary ?
*c = '#'; *ptr = '#';
} }
gl_writen(x * p->cellwidth + p->xoffs, y * p->cellheight + p->yoffs, i, string); gl_writen(x * p->cellwidth + p->xoffs, y * p->cellheight + p->yoffs, (ptr - buffer), buffer);
free(buffer);
} }
+1 -1
View File
@@ -34,7 +34,7 @@ MODULE_EXPORT int svga_cellwidth (Driver *drvthis);
MODULE_EXPORT int svga_cellheight (Driver *drvthis); MODULE_EXPORT int svga_cellheight (Driver *drvthis);
MODULE_EXPORT void svga_clear (Driver *drvthis); MODULE_EXPORT void svga_clear (Driver *drvthis);
MODULE_EXPORT void svga_flush (Driver *drvthis); MODULE_EXPORT void svga_flush (Driver *drvthis);
MODULE_EXPORT void svga_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void svga_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void svga_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void svga_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void svga_vbar (Driver *drvthis, int x, int y, int len, int promille, int pattern); MODULE_EXPORT void svga_vbar (Driver *drvthis, int x, int y, int len, int promille, int pattern);
+1 -1
View File
@@ -312,7 +312,7 @@ t6963_flush (Driver *drvthis)
// upper-left is (1,1), and the lower right should be (20,6). // upper-left is (1,1), and the lower right should be (20,6).
// //
MODULE_EXPORT void MODULE_EXPORT void
t6963_string (Driver *drvthis, int x, int y, char string[]) t6963_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
+1 -1
View File
@@ -118,7 +118,7 @@ MODULE_EXPORT int t6963_width (Driver *drvthis);
MODULE_EXPORT int t6963_height (Driver *drvthis); MODULE_EXPORT int t6963_height (Driver *drvthis);
MODULE_EXPORT void t6963_clear (Driver *drvthis); MODULE_EXPORT void t6963_clear (Driver *drvthis);
MODULE_EXPORT void t6963_flush (Driver *drvthis); MODULE_EXPORT void t6963_flush (Driver *drvthis);
MODULE_EXPORT void t6963_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void t6963_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void t6963_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void t6963_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void t6963_vbar (Driver *drvthis, int x, int y, int len, int promille, int options); MODULE_EXPORT void t6963_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
+1 -1
View File
@@ -185,7 +185,7 @@ text_flush (Driver *drvthis)
// upper-left is (1,1), and the lower right should be (20,4). // upper-left is (1,1), and the lower right should be (20,4).
// //
MODULE_EXPORT void MODULE_EXPORT void
text_string (Driver *drvthis, int x, int y, char string[]) text_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -9,7 +9,7 @@ MODULE_EXPORT int text_width (Driver *drvthis);
MODULE_EXPORT int text_height (Driver *drvthis); MODULE_EXPORT int text_height (Driver *drvthis);
MODULE_EXPORT void text_clear (Driver *drvthis); MODULE_EXPORT void text_clear (Driver *drvthis);
MODULE_EXPORT void text_flush (Driver *drvthis); MODULE_EXPORT void text_flush (Driver *drvthis);
MODULE_EXPORT void text_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void text_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void text_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void text_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void text_set_contrast (Driver *drvthis, int promille); MODULE_EXPORT void text_set_contrast (Driver *drvthis, int promille);
MODULE_EXPORT void text_backlight (Driver *drvthis, int on); MODULE_EXPORT void text_backlight (Driver *drvthis, int on);
+1 -1
View File
@@ -706,7 +706,7 @@ tyan_lcdm_clear (Driver * drvthis)
* upper-left is (1,1), and the lower right should be (16,2). * upper-left is (1,1), and the lower right should be (16,2).
*/ */
MODULE_EXPORT void MODULE_EXPORT void
tyan_lcdm_string (Driver * drvthis, int x, int y, char string[]) tyan_lcdm_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -92,7 +92,7 @@ MODULE_EXPORT int tyan_lcdm_cellwidth (Driver * drvthis);
MODULE_EXPORT int tyan_lcdm_cellheight (Driver *drvthis); MODULE_EXPORT int tyan_lcdm_cellheight (Driver *drvthis);
MODULE_EXPORT void tyan_lcdm_clear (Driver *drvthis); MODULE_EXPORT void tyan_lcdm_clear (Driver *drvthis);
MODULE_EXPORT void tyan_lcdm_flush (Driver *drvthis); MODULE_EXPORT void tyan_lcdm_flush (Driver *drvthis);
MODULE_EXPORT void tyan_lcdm_string (Driver * drvthis, int x, int y, char string[]); MODULE_EXPORT void tyan_lcdm_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void tyan_lcdm_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void tyan_lcdm_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void tyan_lcdm_vbar (Driver *drvthis, int x, int y, int len, int promille, int options); MODULE_EXPORT void tyan_lcdm_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
+4 -4
View File
@@ -456,7 +456,7 @@ ula200_ftdi_rawdata(Driver *drvthis, unsigned char flags, unsigned char ch)
// Displays a string // Displays a string
// //
static int static int
ula200_ftdi_string(Driver *drvthis, unsigned char *string, int len) ula200_ftdi_string(Driver *drvthis, const unsigned char *string, int len)
{ {
//PrivateData *p = (PrivateData *) drvthis->private_data; //PrivateData *p = (PrivateData *) drvthis->private_data;
unsigned char buffer[128]; unsigned char buffer[128];
@@ -798,7 +798,7 @@ ula200_chr (Driver *drvthis, int x, int y, char ch)
// Place a string in the framebuffer // Place a string in the framebuffer
// //
MODULE_EXPORT void MODULE_EXPORT void
ula200_string (Driver *drvthis, int x, int y, char *s) ula200_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = (PrivateData *) drvthis->private_data; PrivateData *p = (PrivateData *) drvthis->private_data;
int i; int i;
@@ -806,11 +806,11 @@ ula200_string (Driver *drvthis, int x, int y, char *s)
x --; // Convert 1-based coords to 0-based x --; // Convert 1-based coords to 0-based
y --; y --;
for (i = 0; s[i]; i++) { for (i = 0; string[i] != '\0'; i++) {
// Check for buffer overflows... // Check for buffer overflows...
if ((y * p->width) + x + i > (p->width * p->height)) if ((y * p->width) + x + i > (p->width * p->height))
break; break;
p->framebuf[(y*p->width) + x + i] = s[i]; p->framebuf[(y*p->width) + x + i] = string[i];
} }
} }
+1 -1
View File
@@ -33,7 +33,7 @@ MODULE_EXPORT void ula200_close (Driver *drvthis);
MODULE_EXPORT int ula200_width (Driver *drvthis); MODULE_EXPORT int ula200_width (Driver *drvthis);
MODULE_EXPORT int ula200_height (Driver *drvthis); MODULE_EXPORT int ula200_height (Driver *drvthis);
MODULE_EXPORT void ula200_clear (Driver *drvthis); MODULE_EXPORT void ula200_clear (Driver *drvthis);
MODULE_EXPORT void ula200_string (Driver * drvthis, int x, int y, char string[]); MODULE_EXPORT void ula200_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void ula200_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void ula200_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void ula200_set_char (Driver *drvthis, int n, char *dat); MODULE_EXPORT void ula200_set_char (Driver *drvthis, int n, char *dat);
MODULE_EXPORT void ula200_backlight (Driver *drvthis, int on); MODULE_EXPORT void ula200_backlight (Driver *drvthis, int on);
+1 -1
View File
@@ -261,7 +261,7 @@ sli_clear (Driver *drvthis)
// upper-left is (1,1), and the lower right should be (20,4). // upper-left is (1,1), and the lower right should be (20,4).
// //
MODULE_EXPORT void MODULE_EXPORT void
sli_string (Driver *drvthis, int x, int y, char string[]) sli_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -17,7 +17,7 @@ MODULE_EXPORT int sli_cellwidth (Driver *drvthis);
MODULE_EXPORT int sli_cellheight (Driver *drvthis); MODULE_EXPORT int sli_cellheight (Driver *drvthis);
MODULE_EXPORT void sli_clear (Driver *drvthis); MODULE_EXPORT void sli_clear (Driver *drvthis);
MODULE_EXPORT void sli_flush (Driver *drvthis); MODULE_EXPORT void sli_flush (Driver *drvthis);
MODULE_EXPORT void sli_string (Driver *drvthis, int x, int y, char *string); MODULE_EXPORT void sli_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void sli_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void sli_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void sli_vbar (Driver *drvthis, int x, int y, int len, int promille, int options); MODULE_EXPORT void sli_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
+1 -1
View File
@@ -265,7 +265,7 @@ xosdlib_drv_flush (Driver *drvthis)
* upper-left is (1,1), and the lower right should be (p->width,p->height). * upper-left is (1,1), and the lower right should be (p->width,p->height).
*/ */
MODULE_EXPORT void MODULE_EXPORT void
xosdlib_drv_string (Driver *drvthis, int x, int y, char string[]) xosdlib_drv_string (Driver *drvthis, int x, int y, const char string[])
{ {
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i; int i;
+1 -1
View File
@@ -40,7 +40,7 @@ MODULE_EXPORT int xosdlib_drv_width (Driver *drvthis);
MODULE_EXPORT int xosdlib_drv_height (Driver *drvthis); MODULE_EXPORT int xosdlib_drv_height (Driver *drvthis);
MODULE_EXPORT void xosdlib_drv_clear (Driver *drvthis); MODULE_EXPORT void xosdlib_drv_clear (Driver *drvthis);
MODULE_EXPORT void xosdlib_drv_flush (Driver *drvthis); MODULE_EXPORT void xosdlib_drv_flush (Driver *drvthis);
MODULE_EXPORT void xosdlib_drv_string (Driver *drvthis, int x, int y, char string[]); MODULE_EXPORT void xosdlib_drv_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void xosdlib_drv_chr (Driver *drvthis, int x, int y, char c); MODULE_EXPORT void xosdlib_drv_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void xosdlib_drv_vbar (Driver *drvthis, int x, int y, int len, int promille, int pattern); MODULE_EXPORT void xosdlib_drv_vbar (Driver *drvthis, int x, int y, int len, int promille, int pattern);
+2 -2
View File
@@ -45,7 +45,7 @@ void input_send_to_client (Client * c, const char * key);
void input_internal_key(const char *key); void input_internal_key(const char *key);
int input_init() int input_init(void)
{ {
debug(RPT_DEBUG, "%s()", __FUNCTION__); debug(RPT_DEBUG, "%s()", __FUNCTION__);
@@ -82,7 +82,7 @@ int input_shutdown()
int int
handle_input () handle_input(void)
{ {
const char *key; const char *key;
Screen *current_screen; Screen *current_screen;
+3 -3
View File
@@ -16,7 +16,7 @@
#include <stdlib.h> #include <stdlib.h>
/* Accepts and uses keypad input while displaying screens... */ /* Accepts and uses keypad input while displaying screens... */
int handle_input (); int handle_input(void);
#ifndef bool #ifndef bool
# define bool short # define bool short
@@ -31,10 +31,10 @@ typedef struct KeyReservation {
} KeyReservation; } KeyReservation;
int input_init(); int input_init(void);
/* Init the input handling system */ /* Init the input handling system */
int input_shutdown(); int input_shutdown(void);
/* Shut it down */ /* Shut it down */
int input_reserve_key(const char *key, bool exclusive, Client *client); int input_reserve_key(const char *key, bool exclusive, Client *client);
+2 -2
View File
@@ -864,7 +864,7 @@ do_mainloop(void)
* and every screen add... * and every screen add...
*/ */
if (s == server_screen) { if (s == server_screen) {
update_server_screen (timer); update_server_screen();
} }
render_screen(s, timer); render_screen(s, timer);
@@ -981,7 +981,7 @@ output_GPL_notice(void)
*/ */
fprintf(stderr, "LCDd %s, LCDproc Protocol %s\n", VERSION, PROTOCOL_VERSION); fprintf(stderr, "LCDd %s, LCDproc Protocol %s\n", VERSION, PROTOCOL_VERSION);
fprintf(stderr, "Part of the LCDproc suite\n"); fprintf(stderr, "Part of the LCDproc suite\n");
fprintf(stderr, "Copyright (C) 1998-2006 William Ferrell, Scott Scriven\n" fprintf(stderr, "Copyright (C) 1998-2007 William Ferrell, Scott Scriven\n"
" and many other contributors\n\n"); " and many other contributors\n\n");
fprintf(stderr, "This program is free software; you can redistribute it and/or\n" fprintf(stderr, "This program is free software; you can redistribute it and/or\n"
+18 -17
View File
@@ -57,20 +57,20 @@ Menu * custom_main_menu = NULL;
Menu *screens_menu = NULL; Menu *screens_menu = NULL;
/* Local prototypes */ /* Local prototypes */
static void handle_quit(); static void handle_quit(void);
static void handle_close(); static void handle_close(void);
static void handle_none(); static void handle_none(void);
static void handle_enter(); static void handle_enter(void);
static void handle_successor(); static void handle_successor(void);
void menuscreen_switch_item(MenuItem *new_menuitem); void menuscreen_switch_item(MenuItem *new_menuitem);
void menuscreen_create_menu (); void menuscreen_create_menu(void);
Menu* menuscreen_get_main (); Menu *menuscreen_get_main(void);
MenuEventFunc(heartbeat_handler); MenuEventFunc(heartbeat_handler);
MenuEventFunc(backlight_handler); MenuEventFunc(backlight_handler);
MenuEventFunc(contrast_handler); MenuEventFunc(contrast_handler);
MenuEventFunc(brightness_handler); MenuEventFunc(brightness_handler);
int menuscreens_init() int menuscreens_init(void)
{ {
const char *tmp; const char *tmp;
@@ -117,7 +117,7 @@ int menuscreens_init()
} }
int menuscreens_shutdown() int menuscreens_shutdown(void)
{ {
debug(RPT_DEBUG, "%s()", __FUNCTION__); debug(RPT_DEBUG, "%s()", __FUNCTION__);
@@ -236,13 +236,13 @@ void menuscreen_switch_item (MenuItem * new_menuitem)
return; return;
} }
static void handle_quit() static void handle_quit(void)
{ {
debug(RPT_DEBUG, "%s: Closing menu screen", __FUNCTION__); debug(RPT_DEBUG, "%s: Closing menu screen", __FUNCTION__);
menuscreen_switch_item(NULL); menuscreen_switch_item(NULL);
} }
static void handle_close() static void handle_close(void)
{ {
debug(RPT_DEBUG, "%s: Closing item", __FUNCTION__); debug(RPT_DEBUG, "%s: Closing item", __FUNCTION__);
menuscreen_switch_item( menuscreen_switch_item(
@@ -251,7 +251,7 @@ static void handle_close()
: active_menuitem->parent); : active_menuitem->parent);
} }
static void handle_none() static void handle_none(void)
{ {
debug(RPT_DEBUG, "%s: Staying in item", __FUNCTION__); debug(RPT_DEBUG, "%s: Staying in item", __FUNCTION__);
if (active_menuitem) if (active_menuitem)
@@ -267,13 +267,13 @@ static void handle_none()
* own screen. The menuitem_process_input function should do * own screen. The menuitem_process_input function should do
* things like toggling checkboxes ! * things like toggling checkboxes !
*/ */
static void handle_enter() static void handle_enter(void)
{ {
debug(RPT_DEBUG, "%s: Entering subitem", __FUNCTION__); debug(RPT_DEBUG, "%s: Entering subitem", __FUNCTION__);
menuscreen_switch_item(menu_get_current_item(active_menuitem)); menuscreen_switch_item(menu_get_current_item(active_menuitem));
} }
static void handle_predecessor() static void handle_predecessor(void)
{ {
MenuItem* item = (active_menuitem->type == MENUITEM_MENU) MenuItem* item = (active_menuitem->type == MENUITEM_MENU)
? menu_get_item_for_predecessor_check(active_menuitem) ? menu_get_item_for_predecessor_check(active_menuitem)
@@ -314,7 +314,7 @@ static void handle_predecessor()
} }
} }
static void handle_successor() static void handle_successor(void)
{ {
MenuItem* item = (active_menuitem->type == MENUITEM_MENU) MenuItem* item = (active_menuitem->type == MENUITEM_MENU)
? menu_get_item_for_successor_check(active_menuitem) ? menu_get_item_for_successor_check(active_menuitem)
@@ -422,7 +422,7 @@ void menuscreen_key_handler (const char *key)
} }
} }
void menuscreen_create_menu () void menuscreen_create_menu(void)
{ {
Menu *options_menu; Menu *options_menu;
Menu *driver_menu; Menu *driver_menu;
@@ -569,6 +569,7 @@ MenuEventFunc (contrast_handler)
if (event == MENUEVENT_MINUS || event == MENUEVENT_PLUS) { if (event == MENUEVENT_MINUS || event == MENUEVENT_PLUS) {
/* Determine the driver */ /* Determine the driver */
Driver *driver = item->parent->data.menu.association; Driver *driver = item->parent->data.menu.association;
if (driver != NULL) { if (driver != NULL) {
driver->set_contrast(driver, item->data.slider.value); driver->set_contrast(driver, item->data.slider.value);
report(RPT_INFO, "Menu: set contrast of [%.40s] to %d", report(RPT_INFO, "Menu: set contrast of [%.40s] to %d",
@@ -679,7 +680,7 @@ menuscreen_set_main (Menu * menu)
} }
Menu * Menu *
menuscreen_get_main() menuscreen_get_main(void)
{ {
return custom_main_menu ? custom_main_menu : main_menu; return custom_main_menu ? custom_main_menu : main_menu;
} }
+2 -2
View File
@@ -23,9 +23,9 @@
extern Screen *menuscreen; extern Screen *menuscreen;
extern Menu *main_menu; extern Menu *main_menu;
int menuscreens_init(); int menuscreens_init(void);
int menuscreens_shutdown(); int menuscreens_shutdown(void);
/** This function indicates to the input part whether this key was the /** This function indicates to the input part whether this key was the
* reserved menu key. * reserved menu key.
+1 -1
View File
@@ -215,7 +215,7 @@ static int parse_message (const char *str, Client *c)
int int
parse_all_client_messages () parse_all_client_messages(void)
{ {
Client *c; Client *c;
+1 -1
View File
@@ -13,6 +13,6 @@
#define PARSE_H #define PARSE_H
// This should be pretty self-explanatory... // This should be pretty self-explanatory...
int parse_all_client_messages (); int parse_all_client_messages(void);
#endif #endif
+6 -6
View File
@@ -35,7 +35,7 @@ long int current_screen_start_time = 0;
int int
screenlist_init () screenlist_init(void)
{ {
report(RPT_DEBUG, "%s()", __FUNCTION__); report(RPT_DEBUG, "%s()", __FUNCTION__);
@@ -49,7 +49,7 @@ screenlist_init ()
int int
screenlist_shutdown () screenlist_shutdown(void)
{ {
report(RPT_DEBUG, "%s()", __FUNCTION__); report(RPT_DEBUG, "%s()", __FUNCTION__);
@@ -96,7 +96,7 @@ screenlist_remove (Screen * s)
void void
screenlist_process () screenlist_process(void)
{ {
Screen *s; Screen *s;
Screen *f; Screen *f;
@@ -204,14 +204,14 @@ screenlist_switch (Screen * s)
Screen * Screen *
screenlist_current () screenlist_current(void)
{ {
return current_screen; return current_screen;
} }
int int
screenlist_goto_next () screenlist_goto_next(void)
{ {
Screen *s; Screen *s;
@@ -235,7 +235,7 @@ screenlist_goto_next ()
int int
screenlist_goto_prev () screenlist_goto_prev(void)
{ {
Screen *s; Screen *s;
+6 -6
View File
@@ -25,10 +25,10 @@
/*extern int screenlist_action;*/ /*extern int screenlist_action;*/
extern bool autorotate; extern bool autorotate;
int screenlist_init (); int screenlist_init(void);
/* Initializes the screenlist. */ /* Initializes the screenlist. */
int screenlist_shutdown (); int screenlist_shutdown(void);
/* Shuts down the screenlist. */ /* Shuts down the screenlist. */
int screenlist_add(Screen *s); int screenlist_add(Screen *s);
@@ -37,7 +37,7 @@ int screenlist_add (Screen * s);
int screenlist_remove(Screen *s); int screenlist_remove(Screen *s);
/* Removes a screen from the screenlist. */ /* Removes a screen from the screenlist. */
void screenlist_process (); void screenlist_process(void);
/* Processes the screenlist. Decides if we need to switch to an other /* Processes the screenlist. Decides if we need to switch to an other
* screen. */ * screen. */
@@ -45,13 +45,13 @@ void screenlist_switch (Screen * s);
/* Switches to an other screen in the proper way. Informs clients of /* Switches to an other screen in the proper way. Informs clients of
* the switch. ALWAYS USE THIS FUNCTION TO SWITCH SCREENS. */ * the switch. ALWAYS USE THIS FUNCTION TO SWITCH SCREENS. */
Screen *screenlist_current (); Screen *screenlist_current(void);
/* Returns the currently active screen. */ /* Returns the currently active screen. */
int screenlist_goto_next (); int screenlist_goto_next(void);
/* Moves on to the next screen. */ /* Moves on to the next screen. */
int screenlist_goto_prev (); int screenlist_goto_prev(void);
/* Moves on to the previous screen. */ /* Moves on to the previous screen. */
#endif #endif
+14 -11
View File
@@ -35,13 +35,15 @@
#define UNSET_INT -1 #define UNSET_INT -1
#define MAX_SERVERSCREEN_WIDTH 40
Screen *server_screen; Screen *server_screen;
int rotate_server_screen = UNSET_INT; int rotate_server_screen = UNSET_INT;
#define MAX_SERVERSCREEN_WIDTH 40
int int
server_screen_init () server_screen_init(void)
{ {
Widget *w; Widget *w;
int line; int line;
@@ -81,7 +83,7 @@ server_screen_init ()
w->type = WID_TITLE; w->type = WID_TITLE;
strncpy(w->text, "LCDproc Server", MAX_SERVERSCREEN_WIDTH); strncpy(w->text, "LCDproc Server", MAX_SERVERSCREEN_WIDTH);
} else { } else {
w->text[0] = 0; w->text[0] = '\0';
} }
} }
@@ -94,9 +96,10 @@ server_screen_init ()
} }
int int
server_screen_shutdown () server_screen_shutdown(void)
{ {
if (!server_screen) return -1; if (!server_screen)
return -1;
screenlist_remove(server_screen); screenlist_remove(server_screen);
screen_destroy(server_screen); screen_destroy(server_screen);
@@ -104,7 +107,7 @@ server_screen_shutdown ()
} }
int int
update_server_screen () update_server_screen(void)
{ {
Client *c; Client *c;
Widget *w; Widget *w;
@@ -116,7 +119,7 @@ update_server_screen ()
/* ... and screens */ /* ... and screens */
num_screens = 0; num_screens = 0;
for (c = clients_getfirst (); c; c = clients_getnext () ) { for (c = clients_getfirst(); c != NULL; c = clients_getnext()) {
num_screens += client_screen_count(c); num_screens += client_screen_count(c);
} }
@@ -130,17 +133,17 @@ update_server_screen ()
"Screens: %i", num_screens); "Screens: %i", num_screens);
} else { } else {
w = screen_find_widget(server_screen, "line2"); w = screen_find_widget(server_screen, "line2");
/*if (display_props->width >= 20)*/
snprintf(w->text, MAX_SERVERSCREEN_WIDTH, snprintf(w->text, MAX_SERVERSCREEN_WIDTH,
"Cli: %i Scr: %i", ((display_props->width >= 16)
? "Cli: %i Scr: %i"
: "C: %i S: %i"),
num_clients, num_screens); num_clients, num_screens);
/*else * 16x2 size */
} }
return 0; return 0;
} }
int int
goodbye_screen() goodbye_screen(void)
{ {
if (!display_props) if (!display_props)
return 0; return 0;
+4 -4
View File
@@ -18,9 +18,9 @@ extern Screen * server_screen;
extern int rotate_server_screen; extern int rotate_server_screen;
int server_screen_init (); int server_screen_init(void);
int server_screen_shutdown (); int server_screen_shutdown(void);
int update_server_screen (); int update_server_screen(void);
int goodbye_screen (); int goodbye_screen(void);
#endif #endif
+2 -2
View File
@@ -158,7 +158,7 @@ This code gets the send and receive buffer sizes.
int int
sock_shutdown () sock_shutdown(void)
{ {
int retVal = 0; int retVal = 0;
@@ -266,7 +266,7 @@ sock_create_inet_socket (char * addr, unsigned int port)
/* Service all clients with input pending...*/ /* Service all clients with input pending...*/
int int
sock_poll_clients () sock_poll_clients(void)
{ {
int err; int err;
struct sockaddr_in clientname; struct sockaddr_in clientname;
+2 -2
View File
@@ -19,9 +19,9 @@ typedef struct sockaddr_in sockaddr_in;
/* Server functions...*/ /* Server functions...*/
int sock_init(char* bind_addr, int bind_port); int sock_init(char* bind_addr, int bind_port);
int sock_shutdown(); int sock_shutdown(void);
int sock_create_inet_socket(char* bind_addr, unsigned int port); int sock_create_inet_socket(char* bind_addr, unsigned int port);
int sock_poll_clients(); int sock_poll_clients(void);
int verify_ipv4(const char *addr); int verify_ipv4(const char *addr);
int verify_ipv6(const char *addr); int verify_ipv6(const char *addr);