> -----Original Message----- > From: uracolix [mailto:uraco...@quantentunnel.de] > Sent: Friday, July 20, 2012 3:21 PM > To: Weddington, Eric > Cc: Axel Wachtler; avrdude-dev@nongnu.org > Subject: Re: [avrdude-dev] code restructuring - using C99 or not? > > Hallo Hannes, Eric, > > On 20.07.2012 19:02, Hannes Weisbach wrote: > >> > >> Now I want to encapsulate the fprintf(stderr, ...) statments by > >> a macro, lets say PRINTF. > > Me too. Although I opted for a function in avrftdi (again, not yet > committed). > > The reason of my refactoring is to have a shared lib that can be used > e.g. in Python. To do a direct fprintf in a library is not a good > idea. I added a hook where the application can register a callback > function which is in the style of vfprintf. In avrdude main.c then the > final fprintf is done ... and if I want to do it Python, the messages > can easily go to a Tkinter window after registering the python callback.
Ah! Ok, that makes sense. > > What advantages does it bring, other than shorter typing? > > Beside shorter typing, a macro is a method where you can > decouple things, well it might be regarded as german overengineering, > but thats why I was asking. LOL! Well, I'll leave it up to Joerg for the overall design issues. He has a much better view of that for avrdude than I. I just wanted to make sure that the "german overengineering" was not done just for its own sake. ;-) Let me know when "pydude" is ready. :-) Eric _______________________________________________ avrdude-dev mailing list avrdude-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/avrdude-dev