[fpc-pascal] RE: Comedi Lib Header translation, was: h2pas enum error

Hartmut Eilers hartmut at eilers.net
Thu May 20 11:21:47 CEST 2010


Sorry for coming back on this so late, but I was busy with other projects:

>>While trying to translate comedi.h with:

>>h2pas  -e -D -p -w -u comedi  -l comedi -o comedi.pas comedi.h

>>I get the messages:
>>at line 495 error : syntax error
>>at line 498 error : syntax error
>>Internal error 1 in line 498

>> comedi.h:
>>
>>     494
>>     495 static inline unsigned NI_USUAL_PFI_SELECT(unsigned pfi_channel)
>>     496 {
>>     497         if(pfi_channel < 10)
>>     498                 return 0x1 + pfi_channel;
>>     499         else
>>     500                 return 0xb + pfi_channel;
>>     501 }
>>
>>
>> is the inline the problem ?

>If it is you can resolve it using the C preprocessor using a command
>line similar to this one:

>cpp --no-stdinc comedi.h > comedi.cpped.h

>Afterwards try h2pas again.

I tried the above mentioned fix with the following result:

hartmut at canis:~/src/OpenMSR/PhysMach/comedi $ cpp --no-stdinc comedi.h
> comedi.cpped.h
cc1: error: unrecognized command line option "-fno-stdinc"

This commandline option is not recognized by the compiler, hmmm.

Could anybody lend me a hand with the translation of the comedi header files ?
Any hints are highly appreciated. Are there other tools I can use ?
Hints on other
docs / examples ?

Thanks in advance for your help
Hartmut


-- 
Hartmut Eilers                          <hartmut at eilers.net>
http://www.openmsr.org/            http://www.eilers.net



More information about the fpc-pascal mailing list