Short: Converts C ".h" files to Blitz Author: lombi@iprimus.com.au (Lorence Lombardo) Uploader: lombi iprimus com au (Lorence Lombardo) Type: dev/blitz Version: 121019 Architecture: m68k-amigaos c2b v121019 (C) 2009-2012 Lorence Lombardo. c2b requires a 68020 or greater to run. What the @#$% is c2b ? c2b converts C ".h" files into Blitz compatible files. The result is not always perfect and some hand modifications might need to be made. Usage:- c2b [output_file] Why would we need c2b when we have "OpenBlitz" ? "OpenBlitz" is no longer in developement nor is it open source. IMHO c2b is currently more advanced and has the potential for further developement. I also think its nice to have a choice. Known things to be done by hand:- 1. "NEWTYPE" commands within "NEWTYPE" commands will need to be delt with. 2. "NEWTYPE" commands with a ".union_#?" or ".struct_#?" will need to have their variable names adjusted. Tip:- If the correct name is not on the right hand side of "End NEWTYPE" then it might be just underneath it. 3. Macro structures need to be delt with. 4. In line 751 of "xadmaster.h", I'm not quite sure how that should be represented. ie.:- BOOL (* xc_RecogData)(); But I think that should be not'd within your own code. 5. It is possible that I am over using the "*" which does effect the size of the NEWTYPE. 6. For NEWTYPE's having a name at the top and bottom, so far I have found that the name on the bottom is usually the most correct. 7. Its not possible to have more than one dimension in array's within NEWTYPE's directly. But perhaps this can be substituted with a NEWTYPE array within a NEWTYPE array. 8. INT64 will use the ".d" type but will have a correct comment. You will need to do a creative work around for this. Some experimental code has been added for ".c" files also, which can be of some assistance in starting a port. However, this has only had limited testing. If you feel that the ".c" source conversion did not turn out as well as it should of then it is recommended that you run it through "indent" from the aminet before c2b. Personally I like indent version 1.9.1 from here:- http://aminet.net/package/dev/gg/indent-bin The latest version of indent can be found here:- http://aminet.net/package/dev/gg/indent-2.2.9-bin-m68k eg. indent non-compliant.c -o compliant.c -gnu However, none of the provided examples required this. Considerations for the future:- 1. Support for macro structures. 2. I have not encountered binary in C at this stage and I'm not sure how it is represented in C at this stage. If you feel that I have left out any variable type or find any bugs, then please let me know. NB: ie. Bugs other than those mentioned. ;) Suggestions are welcome also. Working examples of c2b's usage can be found here:- http://aminet.net/search?query=Blitz_ Feeling bored ? :) Why not check out this URL ? http://home.iprimus.com.au/lombi/1/homepage.htm