| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | JBA Guidelines |
Hello Jonathan!
Replying to a message of Jonathan de Boyne Pollard to Ed Becker:
ZZ>>
>> Guidelines, even with it's built in
>> char support, does not seem to want to put nulls in strings
>> that have been pulled from an entry field.
ZZ>>
JdBP> When you cast a STRING to `char *' for passing to C code it should
JdBP> be automatically NUL terminated. Do you have an example where it
JdBP> isn't ?
CHAR test[80];
test = EntryField.Text
With Guidelines, test will pad the remaining bytes with hex 20 (spaces.) I have to:
short temp;
temp = Len(Trim(test));
C: test[temp] = '0';
It *should* terminate it NULL, but Guidelines doesn't. This caused me
hours of aggravation trying to figure out the above simple workaround.
I don't remember if it handles all STRINGS like that, or just when it's
pulled from an EntryField.
I *could* be doing something wrong, but when I pull it up in IPMD and click
on the string, sure enough, the string is padded with hex 20 and no NULL in
sight.
Ed Becker
1:3618/7{at}fidonet
--- FleetStreet 1.03 NR
* Origin: The Land Of Mordor/2 - (904) 532-0471 (1:3618/7)SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809 @PATH: 3618/7 5 12 3615/50 396/1 270/101 105/103 42 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.