Mail Archives: djgpp/1993/01/12/12:59:40
I'm suprised to see most of you C pros leaning towards the src,dst
convention. Notice the dst,src convention in the C string functions:
STRING(3) C LIBRARY FUNCTIONS STRING(3)
...
char *strcat(s1, s2)
char *s1, *s2;
char *strcpy(s1, s2)
char *s1, *s2;
...
strcat() appends a copy of string s2 to the end of string
s1. strncat() appends at most n characters. Each returns a
pointer to the null-terminated result.
strcpy() copies string s2 to s1 until the null character has
been copied. strncpy() copies string s2 to s1 until either
the null character has been copied or n characters have been
copied. If the length of s2 is less than n, strncpy() pads
s1 with null characters. If the length of s2 is n or
greater, s1 will not be null-terminated. Both functions
return s1.
...
Sun Release 4.1 Last change: 6 October 1987 3
These things just depend on the inclination of whoever had the
late-night inspiration to make the design decision and the stamina to
convince his/her colleagues :-)
eweitzman AT esri DOT com (I sure hope Sun doesn't mind the man page quotation.)
- Raw text -