This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Override fscanf memory allocation function?
- From: Ian Pilcher <arequipeno at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Tue, 14 Jan 2014 10:06:54 -0600
- Subject: Override fscanf memory allocation function?
- Authentication-results: sourceware.org; auth=none
Is it possible to override the memory allocation function used by scanf
and friends when the 'm' flag is used with a string conversion?
I am writing a library, and I would like to allow the application to
specify the memory management functions used by the library.
My library uses fscanf to read files line-by-line:
fscanf(in, "%m[^\n]", &line)
Thanks!
--
========================================================================
Ian Pilcher arequipeno@gmail.com
Sent from the cloud -- where it's already tomorrow
========================================================================