Some of the confusion about the file command-vocabulary is that it only
exists in the Linux source code,  not the PowerSDR source code.

Regards,

John g0orx/n6lyt



Frank Brickle wrote On 02/20/06 00:13,:
> Jim Lux wrote:
> 
> 
>>>update.[ch]. The list of commands is in command-vocabulary.
> 
> 
>>I think we need a bit more help here, Frank.  Is there a list of 
>>commands and their syntax, anywhere?
> 
> 
> It's in the file "command-vocabulary."
> 
> 
>> A bit of explanation of how 
>>do_update works might also be useful. What parses the commands into 
>>substrings?
> 
> 
> See split.c. It works by close analogy with the "split" functions in 
> perl and awk. The first thing that happens to an update string is for it 
> to be broken into a list of tokens using split().
> 
> 
>>thunk.c/thunk.h has no comments other than that it will be kicked up a 
>>notch with gperf, but it kind of looks like some sort of parser. Or, at 
>>least, it uses things called CTE (= Command Table Entry?) and CTB (=?)
> 
> 
> "Thunk" is a term commonly used to refer to a class of functions of a 
> fixed number of arguments, which can be invoked anonymously through 
> pointers. For example the "cmp" argument to qsort() is a "thunk."
> 
> The routines in thunk.[ch] do nothing but (1) install a (string, 
> function-pointer) pair into a table and (2) look up in a table the 
> function pointer associated with a string, if any.
> 
> 
>>Are the various command execution routines structured like c main 
>>progams with (int argc, char *argv[]) kind of parameters?
> 
> 
> All of the update routines expect a pair of arguments (int n, char **p) 
> exactly analogous to (argc, argv). A command string immediately gets 
> split into constituent tokens and is passed in the split form to the 
> update routine named in p[0]. The number of tokens is 'n'.
> 
> The substitution of (n, p) for (argc, argv) is also conventional, in 
> order to distinguish it from the arguments to a main() function. A 
> main() has an optional third argument, **envp, which points to the list 
> of environment strings.
> 
> 73
> Frank
> AB2KT
> 
> _______________________________________________
> FlexRadio mailing list
> FlexRadio@flex-radio.biz
> http://mail.flex-radio.biz/mailman/listinfo/flexradio_flex-radio.biz
> Archive Link: http://mail.flex-radio.biz/pipermail/flexradio_flex-radio.biz/
> FlexRadio Homepage: http://www.flex-radio.com

-- 
  John Melton
  SunIT CTO
  x21708 (+44 1252 421708)


Reply via email to