Andreas Schulz wrote:
>>>> In the documentation for get_key_name, it may be worth mentioning that
>>>> valid index values start at 1
> 
> anything wrong with "index starting at 1 for '1'st entry"?

All arrays have their 1st entry at 0. That's how CS works. :)

I would say, start at 0.

> I currently don't see any use for being able to handle multiple files in 
> parallel - maybe sequential, in case someone comes up with a concordance 
> daemon lurking 24/7 in the background - but parallel? Multiple parallel 
> connections to Logitech, or collecting a bunch of downloaded files and
> procesing them in parallel? It's all still driven by the software on the
> Logitech servers, anyway...

I'm inclined to agree...

> Well, concordance could do that as well, so what about:
>   char **get_keynames(uint8_t *data, uint32_t size);
>   void destroy_keynames(char **names);
> and be done with the XML data in one call?

I don't think we need the call to destory() in this case. In this case
you're handed back an array of strings, which C knows how to deal with,
and any C-to-high-level language should be able to handle as well. For
example, in SWIG-to-perl I'd just allocate a scalar array, copy the
data, and then nuke the char**. There are other alternatives that SWIG
provides as well.

IMO, we only need the destroy() if they're opaque or non-C data. In this
case it's not a token is data that the user is expected to do something
with - data the user actually requested.

-- 
Phil Dibowitz                             [EMAIL PROTECTED]
Open Source software and tech docs        Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"Never write it in C if you can do it in 'awk';
 Never do it in 'awk' if 'sed' can handle it;
 Never use 'sed' when 'tr' can do the job;
 Never invoke 'tr' when 'cat' is sufficient;
 Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming


Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
concordance-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/concordance-devel

Reply via email to