¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Potential macro gotchas in SDT.h #programming


 

Ian:

I wasn't too worried about the macro expansion as I knew it would be additive at most.

There is a github page, but it's private to the Beta only right now until the final version of the software is released.

Jack, W8TEE


On Saturday, September 23, 2023 at 04:54:15 PM EDT, ian007 via groups.io <ian007@...> wrote:


Jack (W8TEE):

Taking a gander at the source code, I noticed several potential macro gotchas in SDT.h (SDTVer049.1).? For example:
#define INCREMENT_X? ? ? ? ? ?WATERFALL_RIGHT_X + 25
should be
#define INCREMENT_X? ? ? ? ? ?(WATERFALL_RIGHT_X + 25)

Without parentheses around the sum, if someone tries multiplying or dividing, by anything other than unity, an erroneous result will ensue (divide by zero notwithstanding).? Attached is a diff file with the corrections to the other macros, which are not that many.? Hopefully, these changes won't break anything ;)

Also, is there a better way to submit changes, like a github project page, to make submitting and merging changes easier?

Cheers,

Ian


--
Jack, W8TEE

Join [email protected] to automatically receive all group messages.