slang-users mailing list

[2007 Date Index] [2007 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] C Structure help ...


Ok, I am back working on my SLAG modules after a years  worth of off time
on it ...

I have an Appgen  structure like this:


/*
***************************************************************
  The Appgen Structure
***************************************************************
*/

typedef struct
{

  DB * di_apgn;           /* OUR Appgen DB Structure Pointer */
  int di_size;            /* -1 means recompute */
  char *file_name;        /* What is OUR file name for this instance? */
  char *rec_key;          /* Appgen has a key size limit of 132 */
  int is_locked;          /* IS the file locked ? */
  int Attribute;          /* What is the LAST Attribute we dealt with? */
  int Sub_Val;            /* WHat is the LAST Multi Value ? */
  int MV_CNT;             /* Keep up with our Looping on MV's */

  char *MV_BUFFER ;       /* On AppGen MV Extract, this is WHERE   */
                          /* We keep up with the returned malloc   */
                          /* IT is OUR duty to keep with it since  */
                          /* Appgen just allocates it and pushes   */
                          /* the MV string onto it ....            */

} APGN_Type

I need to know how Do I pass that back and forth to/from  the Slang/SLAG program.

I already have done this with python where the Python example is like:

import appgen
APGN_FILE = appgen.open("MyFile", "r")
(APGN_FILE becomes a APGN_Type inside of Python)

When I need to read the file in Python, is simply do a :
APGN_FILE.readrec("PROG.NAME",0)
(Where PROG.NAME is the record key}

How do I go about doing this ?


Thanks ...

--
Ben Duncan - Business Network Solutions, Inc. 336 Elton Road Jackson MS, 39212
"Never attribute to malice, that which can be adequately explained by stupidity"
       - Hanlon's Razor



[2007 date index] [2007 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]