mirror of
https://github.com/vivier/EMILE.git
synced 2025-01-22 00:32:15 +00:00
smarter --gestaltid
This commit is contained in:
parent
b5c3418abf
commit
8efc25ca70
@ -59,7 +59,8 @@ int emile_second_set_output(int fd, unsigned int enable_mask,
|
||||
if (parity1 != -1)
|
||||
header.serial1_parity = parity1;
|
||||
|
||||
header.gestaltID = gestaltid; /* 0 means unset ... */
|
||||
if (gestaltid != -1)
|
||||
header.gestaltID = gestaltid; /* 0 means unset ... */
|
||||
|
||||
ret = lseek(fd, location, SEEK_SET);
|
||||
if (ret == -1)
|
||||
|
@ -211,14 +211,13 @@ int main(int argc, char** argv)
|
||||
int c;
|
||||
unsigned int enable_mask = 0;
|
||||
unsigned int disable_mask = 0;
|
||||
unsigned int setgestaltid = 0;
|
||||
unsigned int last = 0;
|
||||
int width = 0, height = 0 , depth = 0;
|
||||
unsigned int bitrate0 = 0, bitrate1 = 0;
|
||||
int datasize0 = -1, datasize1 = -1;
|
||||
int stopbits0 = -1, stopbits1 = -1;
|
||||
int parity0 = -1, parity1 = -1;
|
||||
int gestaltid = 0;
|
||||
int gestaltid = -1;
|
||||
|
||||
while(1)
|
||||
{
|
||||
@ -234,7 +233,6 @@ int main(int argc, char** argv)
|
||||
return 0;
|
||||
case ARG_GESTALTID:
|
||||
gestaltid = atol(optarg);
|
||||
setgestaltid = 1;
|
||||
break;
|
||||
case ARG_NODISPLAY:
|
||||
disable_mask |= STDOUT_VGA;
|
||||
@ -352,7 +350,7 @@ int main(int argc, char** argv)
|
||||
fprintf(stderr, "Cannot enable and disable at same time\n");
|
||||
return 2;
|
||||
}
|
||||
if ( (enable_mask == 0) && (disable_mask == 0) && !setgestaltid)
|
||||
if ( (enable_mask == 0) && (disable_mask == 0) && (gestaltid == -1))
|
||||
{
|
||||
display_output(image);
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user