silence compiler warnings
This commit is contained in:
@@ -55,7 +55,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DEBUG
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@@ -1125,6 +1125,16 @@ char checkbox_gray[CELLWIDTH*CELLHEIGHT] = {
|
|||||||
1, 0, 1, 0, 1,
|
1, 0, 1, 0, 1,
|
||||||
1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1,
|
||||||
0, 0, 0, 0, 0 };
|
0, 0, 0, 0, 0 };
|
||||||
|
char block_filled[CELLWIDTH*CELLHEIGHT] = {
|
||||||
|
1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1 };
|
||||||
|
/*
|
||||||
char selector_left[CELLWIDTH*CELLHEIGHT] = {
|
char selector_left[CELLWIDTH*CELLHEIGHT] = {
|
||||||
0, 1, 0, 0, 0,
|
0, 1, 0, 0, 0,
|
||||||
0, 1, 1, 0, 0,
|
0, 1, 1, 0, 0,
|
||||||
@@ -1152,15 +1162,7 @@ char ellipsis[CELLWIDTH*CELLHEIGHT] = {
|
|||||||
0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0,
|
||||||
1, 0, 1, 0, 1,
|
1, 0, 1, 0, 1,
|
||||||
0, 0, 0, 0, 0 };
|
0, 0, 0, 0, 0 };
|
||||||
char block_filled[CELLWIDTH*CELLHEIGHT] = {
|
*/
|
||||||
1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1 };
|
|
||||||
|
|
||||||
/* Yes we know, this is a VERY BAD implementation */
|
/* Yes we know, this is a VERY BAD implementation */
|
||||||
switch (icon) {
|
switch (icon) {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ hd_init_bwct_usb (Driver *drvthis)
|
|||||||
PrivateData *p = (PrivateData*) drvthis->private_data;
|
PrivateData *p = (PrivateData*) drvthis->private_data;
|
||||||
struct usb_bus *busses;
|
struct usb_bus *busses;
|
||||||
struct usb_bus *bus;
|
struct usb_bus *bus;
|
||||||
char device_manufacturer[LCD_MAX_WIDTH+1] = "";
|
//char device_manufacturer[LCD_MAX_WIDTH+1] = "";
|
||||||
char device_serial[LCD_MAX_WIDTH+1] = DEFAULT_SERIALNO;
|
char device_serial[LCD_MAX_WIDTH+1] = DEFAULT_SERIALNO;
|
||||||
char serial[LCD_MAX_WIDTH+1] = DEFAULT_SERIALNO;
|
char serial[LCD_MAX_WIDTH+1] = DEFAULT_SERIALNO;
|
||||||
int contrast = -1; /* illegal contrast value (to detect errors) */
|
int contrast = -1; /* illegal contrast value (to detect errors) */
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ HD44780_init (Driver * drvthis)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Allocate framebuffer
|
// Allocate framebuffer
|
||||||
p->framebuf = (unsigned char *) malloc(p->width * p->height);
|
p->framebuf = (char *) malloc(p->width * p->height);
|
||||||
if (p->framebuf == NULL) {
|
if (p->framebuf == NULL) {
|
||||||
report(RPT_ERR, "%s: unable to allocate framebuffer", drvthis->name);
|
report(RPT_ERR, "%s: unable to allocate framebuffer", drvthis->name);
|
||||||
//HD44780_close();
|
//HD44780_close();
|
||||||
@@ -236,7 +236,7 @@ HD44780_init (Driver * drvthis)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Allocate and clear the buffer for incremental updates
|
// Allocate and clear the buffer for incremental updates
|
||||||
p->lcd_contents = (unsigned char *) malloc (p->width * p->height);
|
p->lcd_contents = (char *) malloc (p->width * p->height);
|
||||||
if (p->lcd_contents == NULL) {
|
if (p->lcd_contents == NULL) {
|
||||||
report(RPT_ERR, "%s: unable to allocate framebuffer backing store", drvthis->name);
|
report(RPT_ERR, "%s: unable to allocate framebuffer backing store", drvthis->name);
|
||||||
return -1;
|
return -1;
|
||||||
@@ -244,8 +244,8 @@ HD44780_init (Driver * drvthis)
|
|||||||
memset(p->lcd_contents, 0, p->width * p->height);
|
memset(p->lcd_contents, 0, p->width * p->height);
|
||||||
|
|
||||||
// Allocate and clear the buffer for defineable characters
|
// Allocate and clear the buffer for defineable characters
|
||||||
p->cc_buf = (unsigned char *) malloc(NUM_CCs * p->cellheight);
|
p->cc_buf = (char *) malloc(NUM_CCs * p->cellheight);
|
||||||
p->cc_dirty = (unsigned char *) malloc(NUM_CCs);
|
p->cc_dirty = (char *) malloc(NUM_CCs);
|
||||||
if (!p->cc_buf || !p->cc_dirty) {
|
if (!p->cc_buf || !p->cc_dirty) {
|
||||||
report(RPT_ERR, "%s: error mallocing", drvthis->name);
|
report(RPT_ERR, "%s: error mallocing", drvthis->name);
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -57,8 +57,6 @@ static key_t getkey (register char *p);
|
|||||||
static struct sembuf semaphore_wait = { SEM_WAIT };
|
static struct sembuf semaphore_wait = { SEM_WAIT };
|
||||||
static struct sembuf semaphore_signal = { SEM_SIGNAL };
|
static struct sembuf semaphore_signal = { SEM_SIGNAL };
|
||||||
|
|
||||||
static char rcsId[] = "$Id$";
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* getkey returns the key for the semaphore
|
* getkey returns the key for the semaphore
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ MODULE_EXPORT char *symbol_prefix = "sed1330_";
|
|||||||
|
|
||||||
// Local functions
|
// Local functions
|
||||||
//void uPause (int usecs);
|
//void uPause (int usecs);
|
||||||
void sed1330_command( PrivateData * p, char command, int datacount, char * data );
|
void sed1330_command( PrivateData * p, char command, int datacount, unsigned char * data );
|
||||||
void sed1330_rect( PrivateData * p, int x1, int y1, int x2, int y2, char pattern );
|
void sed1330_rect( PrivateData * p, int x1, int y1, int x2, int y2, char pattern );
|
||||||
void sed1330_line ( PrivateData * p, int x1, int y1, int x2, int y2, char pattern );
|
void sed1330_line ( PrivateData * p, int x1, int y1, int x2, int y2, char pattern );
|
||||||
inline void sed1330_set_pixel( PrivateData * p, int x, int y, int value );
|
inline void sed1330_set_pixel( PrivateData * p, int x, int y, int value );
|
||||||
@@ -316,7 +316,7 @@ sed1330_init( Driver * drvthis )
|
|||||||
{
|
{
|
||||||
char * s;
|
char * s;
|
||||||
PrivateData * p;
|
PrivateData * p;
|
||||||
char data[8];
|
unsigned char data[8];
|
||||||
|
|
||||||
debug(RPT_DEBUG, "%s( %p )", __FUNCTION__, drvthis);
|
debug(RPT_DEBUG, "%s( %p )", __FUNCTION__, drvthis);
|
||||||
|
|
||||||
@@ -526,15 +526,15 @@ sed1330_init( Driver * drvthis )
|
|||||||
sed1330_command(p, CMD_SYSTEM_SET, 8, data);
|
sed1330_command(p, CMD_SYSTEM_SET, 8, data);
|
||||||
|
|
||||||
// TODO: The memory locations need to be calculated !
|
// TODO: The memory locations need to be calculated !
|
||||||
sed1330_command(p, CMD_SCROLL, 6, ((char[6]) {SCR1_L,SCR1_H,0xC7,SCR2_L,SCR2_H,0xC7})); // screen1 and screen2 memory locations
|
sed1330_command(p, CMD_SCROLL, 6, ((unsigned char[6]) {SCR1_L,SCR1_H,0xC7,SCR2_L,SCR2_H,0xC7})); // screen1 and screen2 memory locations
|
||||||
|
|
||||||
data[0] = p->cellwidth-1;
|
data[0] = p->cellwidth-1;
|
||||||
data[1] = 7;
|
data[1] = 7;
|
||||||
sed1330_command(p, CMD_CSR_FORM, 2, data); // set cursor size
|
sed1330_command(p, CMD_CSR_FORM, 2, data); // set cursor size
|
||||||
|
|
||||||
sed1330_command(p, CMD_HDOT_SCR, 1, ((char[1]) {0x00})); // horizontal pixel shift=0
|
sed1330_command(p, CMD_HDOT_SCR, 1, ((unsigned char[1]) {0x00})); // horizontal pixel shift=0
|
||||||
sed1330_command(p, CMD_OVLAY, 1, ((char[1]) {0x01})); // XOR mode, screen1 text, screen3 text (screen2 and screen4 are always graph)
|
sed1330_command(p, CMD_OVLAY, 1, ((unsigned char[1]) {0x01})); // XOR mode, screen1 text, screen3 text (screen2 and screen4 are always graph)
|
||||||
sed1330_command(p, CMD_DISP_DIS, 1, ((char[1]) {0x14})); // display off,set cursor off, screen1 on, screen2 on, screen3 off
|
sed1330_command(p, CMD_DISP_DIS, 1, ((unsigned char[1]) {0x14})); // display off,set cursor off, screen1 on, screen2 on, screen3 off
|
||||||
sed1330_command(p, CMD_CSR_DIR_R, 0, NULL); // cursor move right
|
sed1330_command(p, CMD_CSR_DIR_R, 0, NULL); // cursor move right
|
||||||
|
|
||||||
sed1330_flush(drvthis); // Clear the contents of the LCD
|
sed1330_flush(drvthis); // Clear the contents of the LCD
|
||||||
@@ -551,7 +551,7 @@ sed1330_init( Driver * drvthis )
|
|||||||
// INTERNAL
|
// INTERNAL
|
||||||
//
|
//
|
||||||
void
|
void
|
||||||
sed1330_command( PrivateData * p, char command, int datacount, char * data )
|
sed1330_command( PrivateData * p, char command, int datacount, unsigned char * data )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int port = p->port;
|
int port = p->port;
|
||||||
@@ -709,7 +709,7 @@ sed1330_flush( Driver * drvthis )
|
|||||||
{
|
{
|
||||||
PrivateData * p = drvthis->private_data;
|
PrivateData * p = drvthis->private_data;
|
||||||
unsigned int pos, start_pos, nr_equal, fblen, len, cursor_pos;
|
unsigned int pos, start_pos, nr_equal, fblen, len, cursor_pos;
|
||||||
char csrloc[2];
|
unsigned char csrloc[2];
|
||||||
|
|
||||||
debug(RPT_DEBUG, "%s()", __FUNCTION__);
|
debug(RPT_DEBUG, "%s()", __FUNCTION__);
|
||||||
|
|
||||||
|
|||||||
@@ -836,7 +836,7 @@ unsigned char fontmap[256][8] = {
|
|||||||
|
|
||||||
//FIXME: make big chars use less memory
|
//FIXME: make big chars use less memory
|
||||||
|
|
||||||
unsigned char *fontbignum[10][24] = {
|
char *fontbignum[10][24] = {
|
||||||
{
|
{
|
||||||
"++++++++++++++++++",
|
"++++++++++++++++++",
|
||||||
"++++++++++++++++++",
|
"++++++++++++++++++",
|
||||||
@@ -1089,7 +1089,7 @@ unsigned char *fontbignum[10][24] = {
|
|||||||
"++++++++++++++++++"}
|
"++++++++++++++++++"}
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned char *fontbigdp[] = {
|
char *fontbigdp[] = {
|
||||||
"++++++",
|
"++++++",
|
||||||
"++++++",
|
"++++++",
|
||||||
"++++++",
|
"++++++",
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ MODULE_EXPORT char *symbol_prefix = "serialVFD_";
|
|||||||
/* Internal functions */
|
/* Internal functions */
|
||||||
static void serialVFD_init_vbar (Driver *drvthis);
|
static void serialVFD_init_vbar (Driver *drvthis);
|
||||||
static void serialVFD_init_hbar (Driver *drvthis);
|
static void serialVFD_init_hbar (Driver *drvthis);
|
||||||
static void serialVFD_draw_frame (Driver *drvthis, char *dat);
|
static void serialVFD_draw_frame (Driver *drvthis, unsigned char *dat);
|
||||||
static void serialVFD_put_brightness (Driver *drvthis);
|
static void serialVFD_put_brightness (Driver *drvthis);
|
||||||
static void serialVFD_put_char (Driver *drvthis, int n);
|
static void serialVFD_put_char (Driver *drvthis, int n);
|
||||||
|
|
||||||
@@ -756,7 +756,7 @@ serialVFD_put_char (Driver *drvthis, int n)
|
|||||||
// Input is a character array, sized serialVFD->width*serialVFD->height
|
// Input is a character array, sized serialVFD->width*serialVFD->height
|
||||||
//
|
//
|
||||||
static void
|
static void
|
||||||
serialVFD_draw_frame (Driver *drvthis, char *dat)
|
serialVFD_draw_frame (Driver *drvthis, unsigned char *dat)
|
||||||
{
|
{
|
||||||
PrivateData *p = drvthis->private_data;
|
PrivateData *p = drvthis->private_data;
|
||||||
int i, j, last_chr = -10;
|
int i, j, last_chr = -10;
|
||||||
@@ -805,7 +805,7 @@ serialVFD_draw_frame (Driver *drvthis, char *dat)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dat[i] >= 0 && dat[i] <= 30) {// custom character
|
if (dat[i] <= 30) {// custom character
|
||||||
if (p->display_type == 1) {// KD Rev 2.1 only
|
if (p->display_type == 1) {// KD Rev 2.1 only
|
||||||
write(p->fd, "\x1A\xDB", 2); // substitute and select character to overwrite(237)
|
write(p->fd, "\x1A\xDB", 2); // substitute and select character to overwrite(237)
|
||||||
write(p->fd, &p->custom_char[(int)dat[i]][0], 7);// overwrite selected character
|
write(p->fd, &p->custom_char[(int)dat[i]][0], 7);// overwrite selected character
|
||||||
@@ -815,7 +815,7 @@ serialVFD_draw_frame (Driver *drvthis, char *dat)
|
|||||||
write(p->fd, &p->usr_chr_mapping[(int)dat[i]], 1);
|
write(p->fd, &p->usr_chr_mapping[(int)dat[i]], 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (dat[i] < 0 && (p->ISO_8859_1 != 0)) { // ISO_8859_1 translation for 129 ... 255
|
else if (dat[i] > 127 && (p->ISO_8859_1 != 0)) { // ISO_8859_1 translation for 129 ... 255
|
||||||
write(p->fd, &p->charmap[dat[i] + 128], 1);
|
write(p->fd, &p->charmap[dat[i] + 128], 1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -473,16 +473,10 @@ svga_string (Driver *drvthis, int x, int y, char string[])
|
|||||||
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 (i = 0; string[i] != '\0'; i++) {
|
||||||
unsigned char *c = &string[i];
|
char *c = &string[i];
|
||||||
|
|
||||||
switch (*c) {
|
if ((unsigned char) *c == 255) // TODO: Is this still necessary ?
|
||||||
case '\0':
|
*c = '#';
|
||||||
*c = icon_char;
|
|
||||||
break;
|
|
||||||
case 255:
|
|
||||||
*c = '#';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
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, i, string);
|
||||||
}
|
}
|
||||||
@@ -500,7 +494,7 @@ svga_chr (Driver *drvthis, int x, int y, char c)
|
|||||||
|
|
||||||
debug(RPT_DEBUG, "%s(%p, %d, %d, \'%c\')", __FUNCTION__, drvthis, x, y, c);
|
debug(RPT_DEBUG, "%s(%p, %d, %d, \'%c\')", __FUNCTION__, drvthis, x, y, c);
|
||||||
|
|
||||||
switch ((unsigned char) c) {
|
switch ((unsigned char) c) { // TODO: is this still necessary ?
|
||||||
case '\0':
|
case '\0':
|
||||||
c = icon_char;
|
c = icon_char;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ t6963_num (Driver *drvthis, int x, int num)
|
|||||||
// Changes the font data of character n.
|
// Changes the font data of character n.
|
||||||
//
|
//
|
||||||
void
|
void
|
||||||
t6963_set_nchar (Driver *drvthis, int n, char *dat, int num)
|
t6963_set_nchar (Driver *drvthis, int n, unsigned char *dat, int num)
|
||||||
{
|
{
|
||||||
PrivateData *p = drvthis->private_data;
|
PrivateData *p = drvthis->private_data;
|
||||||
int row, col;
|
int row, col;
|
||||||
@@ -382,7 +382,7 @@ t6963_set_nchar (Driver *drvthis, int n, char *dat, int num)
|
|||||||
MODULE_EXPORT void
|
MODULE_EXPORT void
|
||||||
t6963_set_char (Driver *drvthis, int n, char *dat)
|
t6963_set_char (Driver *drvthis, int n, char *dat)
|
||||||
{
|
{
|
||||||
t6963_set_nchar(drvthis, n, dat, 1);
|
t6963_set_nchar(drvthis, n, (unsigned char *) dat, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ MODULE_EXPORT void t6963_set_char (Driver *drvthis, int n, char *dat);
|
|||||||
|
|
||||||
|
|
||||||
void t6963_graphic_clear (Driver *drvthis, int x1, int y1, int x2, int y2);
|
void t6963_graphic_clear (Driver *drvthis, int x1, int y1, int x2, int y2);
|
||||||
void t6963_set_nchar (Driver *drvthis, int n, char *dat, int num);
|
void t6963_set_nchar (Driver *drvthis, int n, unsigned char *dat, int num);
|
||||||
|
|
||||||
void t6963_low_set_control(Driver *drvthis, char wr, char ce, char cd, char rd);
|
void t6963_low_set_control(Driver *drvthis, char wr, char ce, char cd, char rd);
|
||||||
void t6963_low_dsp_ready(Driver *drvthis);
|
void t6963_low_dsp_ready(Driver *drvthis);
|
||||||
|
|||||||
+1
-1
@@ -549,7 +549,7 @@ MenuItem * menu_get_item_for_successor_check(Menu *menu)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuResult menu_process_input(Menu *menu, MenuToken token, char * key, bool extended)
|
MenuResult menu_process_input(Menu *menu, MenuToken token, const char * key, bool extended)
|
||||||
{
|
{
|
||||||
MenuItem *subitem;
|
MenuItem *subitem;
|
||||||
debug (RPT_DEBUG, "%s( menu=[%s], token=%d, key=\"%s\" )", __FUNCTION__,
|
debug (RPT_DEBUG, "%s( menu=[%s], token=%d, key=\"%s\" )", __FUNCTION__,
|
||||||
|
|||||||
+1
-1
@@ -123,7 +123,7 @@ MenuItem * menu_get_item_for_successor_check(Menu *menu);
|
|||||||
* key is only used if token is MENUTOKEN_OTHER.
|
* key is only used if token is MENUTOKEN_OTHER.
|
||||||
* DO NOT CALL THIS FUNCTION, CALL menuitem_process_input INSTEAD !
|
* DO NOT CALL THIS FUNCTION, CALL menuitem_process_input INSTEAD !
|
||||||
*/
|
*/
|
||||||
MenuResult menu_process_input (Menu *menu, MenuToken token, char * key, bool extended);
|
MenuResult menu_process_input (Menu *menu, MenuToken token, const char * key, bool extended);
|
||||||
|
|
||||||
/** positions current item pointer on subitem subitem_id. */
|
/** positions current item pointer on subitem subitem_id. */
|
||||||
void menu_select_subitem(Menu *menu, char * subitem_id);
|
void menu_select_subitem(Menu *menu, char * subitem_id);
|
||||||
|
|||||||
+11
-11
@@ -57,10 +57,10 @@ void menuitem_update_screen_numeric (MenuItem *item, Screen *s);
|
|||||||
void menuitem_update_screen_alpha (MenuItem *item, Screen *s);
|
void menuitem_update_screen_alpha (MenuItem *item, Screen *s);
|
||||||
void menuitem_update_screen_ip (MenuItem *item, Screen *s);
|
void menuitem_update_screen_ip (MenuItem *item, Screen *s);
|
||||||
|
|
||||||
MenuResult menuitem_process_input_slider (MenuItem *item, MenuToken token, char * key, bool extended);
|
MenuResult menuitem_process_input_slider (MenuItem *item, MenuToken token, const char * key, bool extended);
|
||||||
MenuResult menuitem_process_input_numeric (MenuItem *item, MenuToken token, char * key, bool extended);
|
MenuResult menuitem_process_input_numeric (MenuItem *item, MenuToken token, const char * key, bool extended);
|
||||||
MenuResult menuitem_process_input_alpha (MenuItem *item, MenuToken token, char * key, bool extended);
|
MenuResult menuitem_process_input_alpha (MenuItem *item, MenuToken token, const char * key, bool extended);
|
||||||
MenuResult menuitem_process_input_ip (MenuItem *item, MenuToken token, char * key, bool extended);
|
MenuResult menuitem_process_input_ip (MenuItem *item, MenuToken token, const char * key, bool extended);
|
||||||
|
|
||||||
|
|
||||||
/* information about string representation of IP addresses */
|
/* information about string representation of IP addresses */
|
||||||
@@ -181,7 +181,7 @@ void (*update_screen_table[NUM_ITEMTYPES] ) (MenuItem *item, Screen *s) =
|
|||||||
menuitem_update_screen_ip
|
menuitem_update_screen_ip
|
||||||
};
|
};
|
||||||
|
|
||||||
MenuResult (*process_input_table[NUM_ITEMTYPES] ) (MenuItem *item, MenuToken token, char *key, bool extended) =
|
MenuResult (*process_input_table[NUM_ITEMTYPES] ) (MenuItem *item, MenuToken token, const char *key, bool extended) =
|
||||||
{
|
{
|
||||||
menu_process_input,
|
menu_process_input,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -954,9 +954,9 @@ void menuitem_update_screen_ip (MenuItem *item, Screen *s)
|
|||||||
|
|
||||||
/******** MENU SCREEN INPUT HANDLING FUNCTIONS ********/
|
/******** MENU SCREEN INPUT HANDLING FUNCTIONS ********/
|
||||||
|
|
||||||
MenuResult menuitem_process_input (MenuItem *item, MenuToken token, char * key, bool extended)
|
MenuResult menuitem_process_input (MenuItem *item, MenuToken token, const char * key, bool extended)
|
||||||
{
|
{
|
||||||
MenuResult (*process_input) (MenuItem *item, MenuToken token, char * key, bool extended);
|
MenuResult (*process_input) (MenuItem *item, MenuToken token, const char * key, bool extended);
|
||||||
|
|
||||||
debug (RPT_DEBUG, "%s( item=[%s], token=%d, key=\"%s\" )", __FUNCTION__,
|
debug (RPT_DEBUG, "%s( item=[%s], token=%d, key=\"%s\" )", __FUNCTION__,
|
||||||
((item != NULL) ? item->id : "(null)"), token, key);
|
((item != NULL) ? item->id : "(null)"), token, key);
|
||||||
@@ -974,7 +974,7 @@ MenuResult menuitem_process_input (MenuItem *item, MenuToken token, char * key,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuResult menuitem_process_input_slider (MenuItem *item, MenuToken token, char * key, bool extended)
|
MenuResult menuitem_process_input_slider (MenuItem *item, MenuToken token, const char * key, bool extended)
|
||||||
{
|
{
|
||||||
debug (RPT_DEBUG, "%s( item=[%s], token=%d, key=\"%s\" )", __FUNCTION__,
|
debug (RPT_DEBUG, "%s( item=[%s], token=%d, key=\"%s\" )", __FUNCTION__,
|
||||||
((item != NULL) ? item->id : "(null)"), token, key);
|
((item != NULL) ? item->id : "(null)"), token, key);
|
||||||
@@ -1011,7 +1011,7 @@ MenuResult menuitem_process_input_slider (MenuItem *item, MenuToken token, char
|
|||||||
return MENURESULT_ERROR;
|
return MENURESULT_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuResult menuitem_process_input_numeric (MenuItem *item, MenuToken token, char * key, bool extended)
|
MenuResult menuitem_process_input_numeric (MenuItem *item, MenuToken token, const char * key, bool extended)
|
||||||
{
|
{
|
||||||
char buf1[MAX_NUMERIC_LEN];
|
char buf1[MAX_NUMERIC_LEN];
|
||||||
char buf2[MAX_NUMERIC_LEN];
|
char buf2[MAX_NUMERIC_LEN];
|
||||||
@@ -1168,7 +1168,7 @@ MenuResult menuitem_process_input_numeric (MenuItem *item, MenuToken token, char
|
|||||||
return MENURESULT_ERROR;
|
return MENURESULT_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuResult menuitem_process_input_alpha (MenuItem *item, MenuToken token, char * key, bool extended)
|
MenuResult menuitem_process_input_alpha (MenuItem *item, MenuToken token, const char * key, bool extended)
|
||||||
{
|
{
|
||||||
char * p;
|
char * p;
|
||||||
static char * chars = NULL;
|
static char * chars = NULL;
|
||||||
@@ -1317,7 +1317,7 @@ MenuResult menuitem_process_input_alpha (MenuItem *item, MenuToken token, char *
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MenuResult menuitem_process_input_ip (MenuItem *item, MenuToken token, char * key, bool extended)
|
MenuResult menuitem_process_input_ip (MenuItem *item, MenuToken token, const char * key, bool extended)
|
||||||
{
|
{
|
||||||
/* To make life easy... */
|
/* To make life easy... */
|
||||||
char *str = item->data.ip.edit_str;
|
char *str = item->data.ip.edit_str;
|
||||||
|
|||||||
+1
-1
@@ -310,7 +310,7 @@ void menuitem_update_screen (MenuItem *item, Screen *s);
|
|||||||
/** Does something with the given input.
|
/** Does something with the given input.
|
||||||
* key is only used if token is MENUTOKEN_OTHER.
|
* key is only used if token is MENUTOKEN_OTHER.
|
||||||
*/
|
*/
|
||||||
MenuResult menuitem_process_input (MenuItem *item, MenuToken token, char * key, bool extended);
|
MenuResult menuitem_process_input (MenuItem *item, MenuToken token, const char * key, bool extended);
|
||||||
|
|
||||||
/** returns the Client that owns the MenuItem. item must not be null */
|
/** returns the Client that owns the MenuItem. item must not be null */
|
||||||
Client * menuitem_get_client(MenuItem * item);
|
Client * menuitem_get_client(MenuItem * item);
|
||||||
|
|||||||
+1
-1
@@ -300,7 +300,7 @@ sock_poll_clients ()
|
|||||||
/* Connection request on original socket. */
|
/* Connection request on original socket. */
|
||||||
Client* c;
|
Client* c;
|
||||||
int new_sock;
|
int new_sock;
|
||||||
size_t size = sizeof(clientname);
|
socklen_t size = sizeof(clientname);
|
||||||
new_sock = accept (listening_fd, (struct sockaddr *) &clientname, &size);
|
new_sock = accept (listening_fd, (struct sockaddr *) &clientname, &size);
|
||||||
#ifdef WINSOCK2
|
#ifdef WINSOCK2
|
||||||
if (new_sock == INVALID_SOCKET)
|
if (new_sock == INVALID_SOCKET)
|
||||||
|
|||||||
Reference in New Issue
Block a user