Hello,
I was taking a look at some of the toolbox sources today. I am curious
about a detail in GDSaveGamma(). The size of the allocated handle is
calculated as:
gamma->gChanCnt * gamma->gDataCnt (*2 if gamma->gDataWidth>8) +
sizeof(GammaTbl) + gamma->gFormulaSize
Isn't this calculation 2 bytes too large? If you look at the definition
of the struct GammaTbl, its last member is:
short gFormulaData[1];
So, sizeof(GammaTbl) already includes 2 bytes of the formula or gamma
data; and the allocated handle could be 2 bytes shorter than the above calculation.
This observation (if correct) in no way qualifies as a bug. I just
mention it because I'm curious to know if I'm missing something...
-Peter
--
Peter April
VPixx Technologies Inc.
Phone: 450-922-1635
Fax: 450-922-5173
Email: peter@...
Web: http://www.vpixx.com
I was taking a look at some of the toolbox sources today. I am curious
about a detail in GDSaveGamma(). The size of the allocated handle is
calculated as:
gamma->gChanCnt * gamma->gDataCnt (*2 if gamma->gDataWidth>8) +
sizeof(GammaTbl) + gamma->gFormulaSize
Isn't this calculation 2 bytes too large? If you look at the definition
of the struct GammaTbl, its last member is:
short gFormulaData[1];
So, sizeof(GammaTbl) already includes 2 bytes of the formula or gamma
data; and the allocated handle could be 2 bytes shorter than the above calculation.
This observation (if correct) in no way qualifies as a bug. I just
mention it because I'm curious to know if I'm missing something...
-Peter
--
Peter April
VPixx Technologies Inc.
Phone: 450-922-1635
Fax: 450-922-5173
Email: peter@...
Web: http://www.vpixx.com