[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Passing arguments instead of an input file

From: Michael Hennebry
Subject: Re: [Help-glpk] Passing arguments instead of an input file
Date: Fri, 13 Jun 2008 08:10:53 -0500 (CDT)

On Fri, 13 Jun 2008, Tor Myklebust wrote:

> On Thu, 12 Jun 2008, Michael Hennebry wrote:
> > Can you use a pipe?
> > Edit lpx_read_model to use standard input and pipe the information to it.
> >
> > You might play games with the FILE struct.
> > Edit lpx_read_model to edit the FILE struct after it opens a file,
> > any file that will open for input.
> > I think that you would only need to change three entries, but I'm not sure.
> >
> > If lpx_read_model does all its own IO,
> > you could just provide it with alternative functions that use your string.
> > E.g. globally replace fscanf with fscanf_str.
> > You might get the same effect with #defines.
> What's wrong with fmemopen()?

Just that I hadn't heard of it.
If he has it, it still requires editing lpx_read_model, but otherwise is ideal.

If he doesn't want to edit lpx_read_model and can make a named pipe,
that would work also.

Michael   address@hidden
"Those parts of the system that you can hit with a hammer (not advised)
are called Hardware;  those program instructions that you can only
curse at are called Software."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]