Re: [AD] Reading config strings var="val" |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Thu, 3 Feb 2000, Shawn Hargreaves wrote:
> Stepan Roh <sroh7497@xxxxxxxxxx> writes:
> > I did an enhancement to src/config.c:get_config_string() to be able to
> > use var="val" syntax in config files.
>
> I'm not so sure that this is a good idea: the config string reading
> already handles strings containing spaces,
Yes, that's true, but I wanted to have LEADING spaces. For example
" 8bpp".
> stripping out the quotes might not be such a great idea if the user is
> actually wanting to read a string with quotes around it! (I can
> imagine that happening with the translation messages, for instance).
That's possible, but with small probability.
BTW, in my patch there was a bug :
- if (p->data && (ugetc (p->data) == '"') && (ugetat (p->data, -1) == '"')) {
+ if (p->data && (ugetc (p->data) == '"') && (ugetat (p->data, -1) == '"') && (ugetat (p->data, 1) != 0)) {
Stepan Roh
P.S.: I'm not subscribed to conductors list, but in next few minutes I
will be.