- Subject: Re: [slang-users] USIng the LIST inside of C ...
 
- From: Ben Duncan <linux4ms@xxxxxxx>
 
- Date: Mon, 11 Jun 2007 07:40:46 -0500
 
Thanks ... would something MORE abbreviated like the following Work?
Sample:
/*
   Abbreviated C source for get_multivalues
*/
void get_multivalues (int Attribute)
{
  int idx, MV_CNT ;
  char *Buffer;
  /* Gimme a COUNT of Multi values in EACH attribute ... */
  MV_CNT = db_stat( dp->di_apgn, Attribute, -1 ) ;
  (void) SLang_start_arg_list ();
  for (idx = 1 ; idx <= MV_CNT ; idx++ )
    {
       Buffer = str_extract ( dp->di_apgn, Attribute, idx ); 
       (void) SLang_push_string (Buffer)
       free ( Buffer );
    }
  (void) SLang_end_arg_list ();
}
---------------------------------------------------------------------
% SLANG Code Base:
% Gimme ALL the MV strings on Attribute 33 ...
get_mutlivalues( 33 ) ;
MyList = __pop_args (_NARGS);
davis@xxxxxxxxxxxxx wrote:
I have not yet created an API to access the slang interpreter list
functions from C.  Until then, you can should be able to call the
interpreter from C and have it create the list for you.  Consider this
slang function:
<SNIP>
--
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]