+2004-03-14 Bruno Haible <bruno@clisp.org>
+
+ * format-lisp.c (parse_upto): Add integer restriction for the dispatch
+ argument in ~[...~].
+
2004-03-02 Bruno Haible <bruno@clisp.org>
* read-csharp.c (msgdomain_read_csharp): Extend the lang -> frobbedlang
}
else
{
+ int arg_position;
int union_position;
struct format_arg_list *union_list;
bool last_alternative;
return false;
/* If there was no first parameter, an argument is consumed. */
+ arg_position = -1;
if (!(paramcount >= 1 && params[0].type != PT_NIL))
if (position >= 0)
- add_req_type_constraint (&list, position++, FAT_OBJECT);
+ {
+ arg_position = position;
+ add_req_type_constraint (&list, position++, FAT_OBJECT);
+ }
*formatp = format;
*escapep = escape;
&sub_separator, spec, ']', !last_alternative,
invalid_reason))
return false;
+ /* If this alternative is chosen, the argument arg_position
+ is an integer, namely the index of this alternative. */
+ if (!last_alternative && arg_position >= 0)
+ add_req_type_constraint (&sub_list, arg_position,
+ FAT_INTEGER);
if (sub_list != NULL)
{
if (union_position == -2)
+2004-03-14 Bruno Haible <bruno@clisp.org>
+
+ * format-lisp-2: Add one more test for ~[...~].
+
2004-01-30 Bruno Haible <bruno@clisp.org>
* format-c-5-prg.c (main): Return with exit code 77 when the requested
# Valid: case conversion is optional, and it doesn't catch ~^
msgid "abc~(~D~^ ~D~)def~C"
msgstr "xyz~D~^ ~Duvw~C"
-# Valid: synoymous conditionals
+# Valid: synonymous conditionals
msgid "abc~@[~D~]def~C"
msgstr "xyz~:[~;~:*~D~]~C"
+# Valid: synonymous conditionals
+msgid "abc~Ddef"
+msgstr "abc~[null~;eins~:;~:*~D~]def"
# Valid: conditionals are optional and don't catch ~^
msgid "abc~:[~;~]~^~D~C"
msgstr "xyz~:[uvw~^~R~;~:*~S~^~D~]~C"