Remove device names from LPT table
This commit is contained in:
38
src/lpt.c
38
src/lpt.c
@@ -17,33 +17,31 @@
|
||||
lpt_port_t lpt_ports[3];
|
||||
|
||||
|
||||
static const struct
|
||||
{
|
||||
const char *name;
|
||||
const char *internal_name;
|
||||
const lpt_device_t *device;
|
||||
} lpt_devices[] =
|
||||
{
|
||||
{"None", "none", NULL},
|
||||
{"Disney Sound Source", "dss", &dss_device},
|
||||
{"LPT DAC / Covox Speech Thing", "lpt_dac", &lpt_dac_device},
|
||||
{"Stereo LPT DAC", "lpt_dac_stereo", &lpt_dac_stereo_device},
|
||||
{"Generic Text Printer", "text_prt", &lpt_prt_text_device},
|
||||
{"Generic ESC/P Dot-Matrix", "dot_matrix", &lpt_prt_escp_device},
|
||||
{"Generic PostScript Printer", "postscript", &lpt_prt_ps_device},
|
||||
{"PLIP Network", "plip", &lpt_plip_device},
|
||||
{"Protection Dongle for Savage Quest","dongle_savquest",&lpt_hasp_savquest_device},
|
||||
{"", "", NULL}
|
||||
static const struct {
|
||||
const char *internal_name;
|
||||
const lpt_device_t *device;
|
||||
} lpt_devices[] = {
|
||||
{"none", NULL},
|
||||
{"dss", &dss_device},
|
||||
{"lpt_dac", &lpt_dac_device},
|
||||
{"lpt_dac_stereo", &lpt_dac_stereo_device},
|
||||
{"text_prt", &lpt_prt_text_device},
|
||||
{"dot_matrix", &lpt_prt_escp_device},
|
||||
{"postscript", &lpt_prt_ps_device},
|
||||
{"plip", &lpt_plip_device},
|
||||
{"dongle_savquest", &lpt_hasp_savquest_device},
|
||||
{"", NULL}
|
||||
};
|
||||
|
||||
|
||||
char *
|
||||
lpt_device_get_name(int id)
|
||||
{
|
||||
if (strlen((char *) lpt_devices[id].name) == 0)
|
||||
if (strlen((char *) lpt_devices[id].internal_name) == 0)
|
||||
return NULL;
|
||||
|
||||
return (char *) lpt_devices[id].name;
|
||||
if (!lpt_devices[id].device)
|
||||
return "None";
|
||||
return (char *) lpt_devices[id].device->name;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -492,7 +492,7 @@ plip_close(void *priv)
|
||||
|
||||
|
||||
const lpt_device_t lpt_plip_device = {
|
||||
.name = "Parallel Line Internet Protocol (LPT)",
|
||||
.name = "Parallel Line Internet Protocol",
|
||||
.init = plip_lpt_init,
|
||||
.close = plip_close,
|
||||
.write_data = plip_write_data,
|
||||
@@ -502,10 +502,9 @@ const lpt_device_t lpt_plip_device = {
|
||||
.read_ctrl = NULL
|
||||
};
|
||||
|
||||
const device_t plip_device =
|
||||
{
|
||||
"Parallel Line Internet Protocol",
|
||||
DEVICE_LPT, 0,
|
||||
plip_net_init, NULL,
|
||||
NULL, { NULL }, NULL, NULL
|
||||
const device_t plip_device = {
|
||||
"Parallel Line Internet Protocol",
|
||||
DEVICE_LPT, 0,
|
||||
plip_net_init, NULL,
|
||||
NULL, { NULL }, NULL, NULL
|
||||
};
|
||||
|
@@ -2143,7 +2143,7 @@ escp_close(void *priv)
|
||||
|
||||
|
||||
const lpt_device_t lpt_prt_escp_device = {
|
||||
"EPSON ESC/P compatible printer",
|
||||
"Generic ESC/P Dot-Matrix",
|
||||
escp_init,
|
||||
escp_close,
|
||||
write_data,
|
||||
|
@@ -389,7 +389,7 @@ ps_close(void *p)
|
||||
|
||||
|
||||
const lpt_device_t lpt_prt_ps_device = {
|
||||
.name = "Generic PostScript printer",
|
||||
.name = "Generic PostScript Printer",
|
||||
.init = ps_init,
|
||||
.close = ps_close,
|
||||
.write_data = ps_write_data,
|
||||
|
@@ -483,7 +483,7 @@ prnt_close(void *priv)
|
||||
|
||||
|
||||
const lpt_device_t lpt_prt_text_device = {
|
||||
"Generic TEXT printer",
|
||||
"Generic Text Printer",
|
||||
prnt_init,
|
||||
prnt_close,
|
||||
write_data,
|
||||
|
Reference in New Issue
Block a user