[MPlayer-dev-eng] [PATCH] new subopt type for malloced string
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Jan 19 18:12:20 CET 2005
Hi,
On Sun, Jan 16, 2005 at 02:35:46PM +0100, Reimar Döffinger wrote:
> The attached patch moves some duplicated code to subopt_parser.c, by
> providing a new opt type, malloced, zero terminated string.
> You need to free it, and you must initialize it either to NULL or a
> malloced buffer (e.g. via strdup).
> I'd also like to extend the documentation of the test function to make
> it say: "it may also modify the argument within the limits that apply to
> initializing variables and modifying them after the parsing".
> The last part is because strarg_t.str may not be modified, and for the
> OPT_ARG_MSTRZ arg it must still point to a malloced buffer.
Applied.
Greetings,
Reimar Döffinger
More information about the MPlayer-dev-eng
mailing list