The d's
by Tim Ryness · in Torque Game Engine · 08/13/2004 (8:58 pm) · 5 replies
I have looked all over, but I can't seem to figure out where the d's are defined, or are they part of a lib someplace are they macros'.... you may be wondering the in the world I'm talking abou, so here they are.
I won't list them all, but here are is a block of some:
extern char* dStrcat(char *dst, const char *src);
extern char* dStrncat(char* dst, const char* src, dsize_t len);
extern char* dStrcatl(char *dst, dsize_t dstSize, ...);
extern int dStrcmp(const char *str1, const char *str2);
extern int dStricmp(const char *str1, const char *str2);
extern int dStrncmp(const char *str1, const char *str2, dsize_t len);
extern int dStrnicmp(const char *str1, const char *str2, dsize_t len);
extern char* dStrcpy(char *dst, const char *src);
extern char* dStrcpyl(char *dst, dsize_t dstSize, ...);
extern char* dStrncpy(char *dst, const char *src, dsize_t len);
extern dsize_t dStrlen(const char *str);
extern char* dStrupr(char *str);
extern char* dStrlwr(char *str);
extern char* dStrchr(char *str, int c);
extern const char* dStrchr(const char *str, int c);
extern char* dStrrchr(char *str, int c);
extern const char* dStrrchr(const char *str, int c);
extern dsize_t dStrspn(const char *str, const char *set);
extern dsize_t dStrcspn(const char *str, const char *set);
I recognize them of course without the dS, and rather just the s, but I can't for the life of me
figure out where they exist. I get a bunch of link error's reguarding them, I'm not sure what I'm missing.
Any help would be greatly appreciated.
I won't list them all, but here are is a block of some:
extern char* dStrcat(char *dst, const char *src);
extern char* dStrncat(char* dst, const char* src, dsize_t len);
extern char* dStrcatl(char *dst, dsize_t dstSize, ...);
extern int dStrcmp(const char *str1, const char *str2);
extern int dStricmp(const char *str1, const char *str2);
extern int dStrncmp(const char *str1, const char *str2, dsize_t len);
extern int dStrnicmp(const char *str1, const char *str2, dsize_t len);
extern char* dStrcpy(char *dst, const char *src);
extern char* dStrcpyl(char *dst, dsize_t dstSize, ...);
extern char* dStrncpy(char *dst, const char *src, dsize_t len);
extern dsize_t dStrlen(const char *str);
extern char* dStrupr(char *str);
extern char* dStrlwr(char *str);
extern char* dStrchr(char *str, int c);
extern const char* dStrchr(const char *str, int c);
extern char* dStrrchr(char *str, int c);
extern const char* dStrrchr(const char *str, int c);
extern dsize_t dStrspn(const char *str, const char *set);
extern dsize_t dStrcspn(const char *str, const char *set);
I recognize them of course without the dS, and rather just the s, but I can't for the life of me
figure out where they exist. I get a bunch of link error's reguarding them, I'm not sure what I'm missing.
Any help would be greatly appreciated.
About the author
#2
Thanks for you help!
08/13/2004 (11:04 pm)
Thanks so much, you helped me realize that I'm stupid :) Created a new project and forgot a few files ... duh! Thanks for you help!
#3
04/14/2006 (2:11 pm)
I was wondering what "d" in these functions means and/or how it came to be?
#4
04/14/2006 (2:30 pm)
It stands for the "d"ynamix version of the underlying function--and it means that if you use these versions of the functions, they are guaranteed to work exactly the same on each platform. Note that they are not guaranteed to work exactly the same as the underlying function itself for the cases where each platform may implement them differently, but proper use of these functions will guarantee that you will maintain cross-platform for your project.
#5
04/15/2006 (10:57 am)
Ahhh... if I had thought about it more I probably could have figured that out. Thanks so much for the insight Stephen.
Torque Owner Redacted