1689 |
#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ |
#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ |
1690 |
/* the *only* case possible without |
/* the *only* case possible without |
1691 |
* SUPPORT_OLD_INFO_FORMAT_STRINGS |
* SUPPORT_OLD_INFO_FORMAT_STRINGS |
1692 |
* - !onearg */ |
* - !onearg |
1693 |
if (!inquotes) |
*/ |
1694 |
|
/* Avoid adding an empty argument for NULL data. |
1695 |
|
*/ |
1696 |
|
if (!inquotes && b->data) |
1697 |
{ |
{ |
1698 |
doff = d - buf; |
doff = d - buf; |
1699 |
expand_string (&buf, &length, doff + 1); |
expand_string (&buf, &length, doff + 1); |
1700 |
d = buf + doff; |
d = buf + doff; |
1701 |
*d++ = '"'; |
*d++ = '"'; |
1702 |
} |
} |
1703 |
outstr = cmdlineescape (inquotes ? inquotes : '"', b->data); |
if (b->data) |
1704 |
|
outstr = cmdlineescape (inquotes ? inquotes |
1705 |
|
: '"', |
1706 |
|
b->data); |
1707 |
|
else |
1708 |
|
outstr = xstrdup (""); |
1709 |
#ifdef SUPPORT_OLD_INFO_FMT_STRINGS |
#ifdef SUPPORT_OLD_INFO_FMT_STRINGS |
1710 |
} /* onearg */ |
} /* onearg */ |
1711 |
#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ |
#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ |
1719 |
{ |
{ |
1720 |
free(outstr); |
free(outstr); |
1721 |
#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ |
#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */ |
1722 |
if (!inquotes) |
if (!inquotes && b->data) |
1723 |
{ |
{ |
1724 |
doff = d - buf; |
doff = d - buf; |
1725 |
expand_string (&buf, &length, doff + 1); |
expand_string (&buf, &length, doff + 1); |