pspp-dev
[Top][All Lists]
Advanced

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

exporting a model


From: Jason Stover
Subject: exporting a model
Date: Wed, 14 Dec 2005 03:30:46 +0000
User-agent: Mutt/1.4.2.1i

I'm writing a subcommand that will let the user save a regression model
as a C function. So far, I have written this:

        static void
        subcommand_export (int export, pspp_linreg_cache *c)
        {
          FILE *fp;
  
         if (export)
            {
              assert (c != NULL);
              assert (model_file != NULL);
              fp = fopen (model_file->filename, "w");
              fprintf (fp, "double linreg_thingy %f %f %f\n", c->blah, c->blah, 
c->blah);
              fclose (fp);
            }
        }

But model_file is a struct file_handle, which is defined in
file-handle-def.c, not file-handle-def.h.  Otherwise, this approach
has been smooth.

Could the definition of struct file_handle be moved to 
file-handle-def.h? Or should I take a different approach?

-Jason

-- 
address@hidden
SDF Public Access UNIX System - http://sdf.lonestar.org




reply via email to

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