clarification: get_info() returns const char *

This commit is contained in:
marschap
2006-04-12 08:12:13 +00:00
parent e558530d02
commit 587085a292
19 changed files with 24 additions and 23 deletions
+4 -4
View File
@@ -143,7 +143,7 @@ API_VERSION in the code.
//// Informational functions
// get a string describing the driver and it's features
char * (*get_info) (Driver *drvthis);
const char * (*get_info) (Driver *drvthis);
@@ -305,7 +305,7 @@ int (*get_brightness) (Driver *drvthis, int state);
// Many displays do not support software setting of contrast.
void (*set_brightness) (Driver *drvthis, int state, int int brightness);
// Sets the contrast to the given value. Values should be 0 to 255.
// Sets the contrast to the given value. Values should be 0 to 1000.
// Many displays do not support software setting of contrast.
// Use -1 to get the current value returned.
@@ -319,12 +319,12 @@ void (*output) (Driver *drvthis, int state);
// output, which can be controlled by calling this function. See the
// 'output' command in the 'widget language'.
char *(*get_key) (Driver *drvthis);
const char *(*get_key) (Driver *drvthis);
// Checks if a key has been pressed on the device.
// Returns NULL for "no key pressed", or a string describing the pressd key.
// These characters should match the keypad-layout.
char *(*get_info) (Driver *drvthis);
const char *(*get_info) (Driver *drvthis);
// Returns a string describing the driver and its features.
+2 -2
View File
@@ -158,7 +158,7 @@ API_VERSION in the code.
//// Informational functions
// get a string describing the driver and it's features
char * (*get_info) (Driver *drvthis);
const char * (*get_info) (Driver *drvthis);
@@ -590,7 +590,7 @@ typedef struct my_driver_private {
<funcsynopsis>
<funcprototype>
<funcdef>char *<function>(*get_info)</function></funcdef>
<funcdef>const char *<function>(*get_info)</function></funcdef>
<paramdef>Driver *<parameter>drvthis</parameter></paramdef>
</funcprototype>
</funcsynopsis>
+2 -1
View File
@@ -303,7 +303,8 @@ info_func (Client * c, int argc, char **argv)
}
memset(str, '\0', sizeof(str));
snprintf (str, sizeof(str)-1, (char*) drivers_get_info());
snprintf (str, sizeof(str)-1, "%s\n", drivers_get_info());
str[sizeof(str)-1] = '\0';
sock_send_string (c->sock, str);
+1 -1
View File
@@ -141,7 +141,7 @@ drivers_unload_all()
}
char *
const char *
drivers_get_info()
{
Driver *drv;
+1 -1
View File
@@ -41,7 +41,7 @@ drivers_load_driver( char * name );
int
drivers_unload_all();
char *
const char *
drivers_get_info();
void
+1 -1
View File
@@ -1554,7 +1554,7 @@ CFontzPacket_output(Driver *drvthis, int state)
/*
* Provide some info about this driver
*/
MODULE_EXPORT char *
MODULE_EXPORT const char *
CFontzPacket_get_info(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
+1 -1
View File
@@ -44,6 +44,6 @@ MODULE_EXPORT int CFontzPacket_get_brightness (Driver *drvthis, int state);
MODULE_EXPORT void CFontzPacket_set_brightness (Driver *drvthis, int state, int promille);
MODULE_EXPORT void CFontzPacket_backlight (Driver *drvthis, int on);
MODULE_EXPORT void CFontzPacket_output (Driver *drvthis, int state);
MODULE_EXPORT char *CFontzPacket_get_info (Driver *drvthis);
MODULE_EXPORT const char *CFontzPacket_get_info (Driver *drvthis);
#endif /* CFONTZPACKET_H */
+1 -1
View File
@@ -1230,7 +1230,7 @@ IOWarrior_output(Driver *drvthis, int on)
/*********************************************************************
* API: provides some info about this driver
*/
MODULE_EXPORT char *
MODULE_EXPORT const char *
IOWarrior_get_info (Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
+1 -1
View File
@@ -132,7 +132,7 @@ MODULE_EXPORT void IOWarrior_num(Driver *drvthis, int x, int num);
MODULE_EXPORT void IOWarrior_set_char(Driver *drvthis, int n, char *dat);
MODULE_EXPORT int IOWarrior_icon(Driver *drvthis, int x, int y, int icon);
MODULE_EXPORT void IOWarrior_output(Driver *drvthis, int on);
MODULE_EXPORT char *IOWarrior_get_info(Driver *drvthis);
MODULE_EXPORT const char *IOWarrior_get_info(Driver *drvthis);
#endif /* IOWARRIOR_H */
+1 -1
View File
@@ -830,7 +830,7 @@ MtxOrb_cursorblink (Driver *drvthis, int on)
/******************************
* Returns string with general information about the display
*/
MODULE_EXPORT char *
MODULE_EXPORT const char *
MtxOrb_get_info (Driver *drvthis)
{
char in = 0;
+1 -1
View File
@@ -20,7 +20,7 @@ MODULE_EXPORT void MtxOrb_backlight (Driver *drvthis, int on);
MODULE_EXPORT void MtxOrb_output (Driver *drvthis, int on);
MODULE_EXPORT const char * MtxOrb_get_key (Driver *drvthis);
MODULE_EXPORT char * MtxOrb_get_info (Driver *drvthis);
MODULE_EXPORT const char * MtxOrb_get_info (Driver *drvthis);
MODULE_EXPORT void MtxOrb_num (Driver *drvthis, int x, int num);
+1 -1
View File
@@ -301,7 +301,7 @@ glcdlib_icon (Driver *drvthis, int x, int y, int icon)
/////////////////////////////////////////////////////////////////
// provides some info about this driver
//
MODULE_EXPORT char *
MODULE_EXPORT const char *
glcdlib_get_info (Driver *drvthis)
{
glcdlibPD * pPD = drvthis->private_data;
+1 -1
View File
@@ -41,7 +41,7 @@ MODULE_EXPORT int glcdlib_icon (Driver *drvthis, int x, int y, int icon);
MODULE_EXPORT int glcdlib_cellwidth (Driver *drvthis);
MODULE_EXPORT int glcdlib_cellheight (Driver *drvthis);
MODULE_EXPORT int glcdlib_get_free_chars (Driver *drvthis);
MODULE_EXPORT char * glcdlib_get_info (Driver *drvthis);
MODULE_EXPORT const char * glcdlib_get_info (Driver *drvthis);
MODULE_EXPORT int glcdlib_get_brightness(Driver *drvthis, int state);
MODULE_EXPORT void glcdlib_set_brightness(Driver *drvthis, int state, int promille);
MODULE_EXPORT void glcdlib_set_char (Driver *drvthis, int n, char *dat);
+1 -1
View File
@@ -139,7 +139,7 @@ MODULE_EXPORT int imon_init (Driver *drvthis)
/**
* provides some info about this driver
*/
MODULE_EXPORT char * imon_get_info (Driver *drvthis)
MODULE_EXPORT const char * imon_get_info (Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
strcpy(p->info, "Soundgraph/Ahanix/Silverstone/Uneed/Accent iMON IR/VFD driver");
+1 -1
View File
@@ -37,7 +37,7 @@ MODULE_EXPORT void imon_clear (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_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT char *imon_get_info (Driver *drvthis);
MODULE_EXPORT const char *imon_get_info (Driver *drvthis);
MODULE_EXPORT void imon_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
MODULE_EXPORT void imon_hbar (Driver *drvthis, int x, int y, int len, int promille, int options);
+1 -1
View File
@@ -164,7 +164,7 @@ typedef struct lcd_logical_driver {
void (*output) (struct lcd_logical_driver* drvthis, int state);
/* informational functions */
char * (*get_info) (struct lcd_logical_driver* drvthis);
const char * (*get_info) (struct lcd_logical_driver* drvthis);
/******** Variables in server core available for drivers ********/
+1 -1
View File
@@ -495,7 +495,7 @@ MODULE_EXPORT const char *pylcd_get_key (Driver *drvthis)
/* Returns a string. Server cannot modify this string. */
/*
MODULE_EXPORT char *mydriver_get_info (){return NULL;};
MODULE_EXPORT const char *mydriver_get_info (){return NULL;};
*/
+1 -1
View File
@@ -1184,7 +1184,7 @@ serialVFD_get_brightness(Driver *drvthis, int state)
/////////////////////////////////////////////////////////////////
// provides some info about this driver
//
MODULE_EXPORT char *
MODULE_EXPORT const char *
serialVFD_get_info (Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
+1 -1
View File
@@ -66,5 +66,5 @@ MODULE_EXPORT void serialVFD_set_brightness (Driver *drvthis, int state, int pro
MODULE_EXPORT void serialVFD_output (Driver *drvthis, int state);
MODULE_EXPORT void serialVFD_num (Driver * drvthis, int x, int num);
MODULE_EXPORT int serialVFD_get_free_chars (Driver *drvthis);
MODULE_EXPORT char * serialVFD_get_info( Driver *drvthis );
MODULE_EXPORT const char * serialVFD_get_info( Driver *drvthis );
#endif