Wkunneke
Active Member
In the process of upgrading to 8.10 and I've got a custom C bsfn that is misbehaving. Before getting too far into this please note that while I have more years of coding experience than I care to admit to, I do NOT consider myself a veteran C coder!
A number of things were changed automatically by the upgrade process that I've found, most of them directly related to changes in double byte, unicode strings. The following line of code:
strncpy (szLetterName, lpDS->szNameObject, sizeof (szLetterName));
was replaced with:
jdeStrncpy (szLetterName, lpDS->szNameObject, DIM (szLetterName));
The changes to strncopy make sense. I can also understand the need for a change to sizeof, but I'm unfamiliar with DIM so I don't understand why it was used as a replacement to the sizeof call. In other languages, DIM tends to be used to actively dimension or size an array. Is it being used to passively get the size of the varchar szLetterName as opposed to SETTING the size of szLetterName? Since this bsfn is not working, this was one line of code changed that I didn't understand, therefore it was something that immediately caught my attention. Thanks in advance,
A number of things were changed automatically by the upgrade process that I've found, most of them directly related to changes in double byte, unicode strings. The following line of code:
strncpy (szLetterName, lpDS->szNameObject, sizeof (szLetterName));
was replaced with:
jdeStrncpy (szLetterName, lpDS->szNameObject, DIM (szLetterName));
The changes to strncopy make sense. I can also understand the need for a change to sizeof, but I'm unfamiliar with DIM so I don't understand why it was used as a replacement to the sizeof call. In other languages, DIM tends to be used to actively dimension or size an array. Is it being used to passively get the size of the varchar szLetterName as opposed to SETTING the size of szLetterName? Since this bsfn is not working, this was one line of code changed that I didn't understand, therefore it was something that immediately caught my attention. Thanks in advance,