I've been reading up on the differences between strcpy/cat, strncpy/cat, and strlcpy/cat. I know that afkmud uses mudstrlcpy/cat, my questions, I guess, since I can't see the source to the strlcpy/cat, is: Whats the difference? Is it just offered in the code to support a larger base, in case the OS doesn't support the function, or is there an actual difference?
Also, do people know if there are any general problems with:
#define strcpy(src, dest) strlcpy((src), (dest), sizeof((src)))
I want to save the time, if I can, and I know its sloppy, but I don't have the time to change the hunders or thousands of calls by hand, heh. Only problem I can see is that src might be a pointer, and thus sizeof(src) will return 4, but strcpy shouldn't work with pointers, right? Just wanna check, kinda tired.