parent
4babf7f529
commit
d12ae2a3f3
1 changed files with 11 additions and 6 deletions
17
scp.c
17
scp.c
|
@ -4095,7 +4095,7 @@ return ap;
|
||||||
|
|
||||||
Token "%0" represents the command file name.
|
Token "%0" represents the command file name.
|
||||||
|
|
||||||
The input sequence "\%" represents a literal "%", and "\\" represents a
|
The input sequence "%%" represents a literal "%", and "\\" represents a
|
||||||
literal "\". All other character combinations are rendered literally.
|
literal "\". All other character combinations are rendered literally.
|
||||||
|
|
||||||
Omitted parameters result in null-string substitutions.
|
Omitted parameters result in null-string substitutions.
|
||||||
|
@ -4202,11 +4202,16 @@ for (; *ip && (op < oend); ) {
|
||||||
++ip;
|
++ip;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
get_glyph_nc (ip, gbuf, '%'); /* get the literal name */
|
if (*ip == '\0') { /* is this a bare % at end of line? */
|
||||||
ap = _sim_get_env_special (gbuf, rbuf, sizeof (rbuf));
|
*op++ = '%'; /* leave it there as a literal percent sign */
|
||||||
ip += strlen (gbuf);
|
}
|
||||||
if (*ip == '%')
|
else {
|
||||||
++ip;
|
get_glyph_nc (ip, gbuf, '%'); /* get the literal name */
|
||||||
|
ap = _sim_get_env_special (gbuf, rbuf, sizeof (rbuf));
|
||||||
|
ip += strlen (gbuf);
|
||||||
|
if (*ip == '%')
|
||||||
|
++ip;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ap) { /* non-null arg? */
|
if (ap) { /* non-null arg? */
|
||||||
|
|
Loading…
Add table
Reference in a new issue