----- Original Message ----- From: Gerhard Fiedler To: Microcontroller discussion list - Public. Sent: Friday, December 17, 2004 10:39 AM Subject: Re: [PIC] splint or similar with typical PIC C programs? > Mark Rages wrote: > > > On Thu, 16 Dec 2004 18:37:12 -0200, Gerhard Fiedler > > wrote: > >> > >> Since at least Paul seems to be using a similar tool for some time, maybe > >> there's a solution -- other than not using 0b01 type constants. I asked on > >> the HiTech forum, and the responses were to use a custom pre-preprocessor > >> to rewrite the binary constants, or to not use them at all. > > > > splint is open source. Why not fix the tool? > > Duh... :) I didn't think of that. I'll see what I can do. > > But I've also read that it isn't terribly helpful with embedded systems. > I'd like to get some first-hand experience accounts... Does it help? > (Before I see that on my own sources, I'd have to get rid of all the binary > constants :) > > Gerhard Hi Gerhard, It should be trivial to change the splint to accept your binary constants. Look at the parser and find where it is identifying HEX constants. These will have a 0x or 0X prefix, if you are lucky it will use strtol or strtoul to convert the string to binary and there should be a radix or base variable setup somewhere to 8, 10 and 16. Clone the code for '0x' and replace it with '0b' and setup the radix to 2. Hope this helps. Regards Sergio Masci http://www.xcprod.com/titan/XCSB - optimising PIC compiler FREE for personal non-commercial use _______________________________________________ http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist