C
Casper Bang
I am using an older C library (Flex scanner) which requires that a variable
is set as a pointer to a file:
#define FILE _iobuf
FILE* hFile;
It works great but I would like to add a wrapper so I can parse a string in
memmory as well. Presently I do that by saving the string in a temp file and
then making the original call to the library with the filehandle. This is
slow and clumsy so I was wondering if there's some way of converting a
string to an appropiate stream (or _iobuf whatever that is)?
Thanks in advance,
Casper
is set as a pointer to a file:
#define FILE _iobuf
FILE* hFile;
It works great but I would like to add a wrapper so I can parse a string in
memmory as well. Presently I do that by saving the string in a temp file and
then making the original call to the library with the filehandle. This is
slow and clumsy so I was wondering if there's some way of converting a
string to an appropiate stream (or _iobuf whatever that is)?
Thanks in advance,
Casper