mirror of
https://github.com/bstansell/conserver.git
synced 2024-12-18 20:37:56 +00:00
Merge pull request #68 from bzfbd/bz_subst
conserver.cf: devicesubst add 'b' for baud rate
This commit is contained in:
commit
0ed802ea6f
@ -540,6 +540,10 @@ value
|
||||
.PP
|
||||
Numeric Replacement
|
||||
.TP
|
||||
.B b
|
||||
.B baud
|
||||
value
|
||||
.TP
|
||||
.B p
|
||||
config
|
||||
.B port
|
||||
|
@ -987,6 +987,13 @@ SubstValue(char c, char **s, int *i)
|
||||
(*s) = pCE->replstring;
|
||||
}
|
||||
retval = 1;
|
||||
} else if (c == 'b') {
|
||||
if (pCE->baud == NULL || pCE->baud->acrate == (char *)0) {
|
||||
(*s) = empty;
|
||||
} else {
|
||||
(*s) = pCE->baud->acrate;
|
||||
}
|
||||
retval = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1013,6 +1020,7 @@ SubstToken(char c)
|
||||
return ISNUMBER;
|
||||
case 'h':
|
||||
case 'c':
|
||||
case 'b':
|
||||
case 'r':
|
||||
substTokenCount[(unsigned)c]++;
|
||||
return ISSTRING;
|
||||
|
Loading…
Reference in New Issue
Block a user