Mail Archives: djgpp-workers/2004/12/31/10:16:02
Hello.
I almost committed this without checking here first because it's so
obvious. I hope you don't disagree.
RCS file: /cvs/djgpp/djgpp/src/libc/ansi/string/strtok.txh,v
retrieving revision 1.3
diff -p -u -r1.3 strtok.txh
--- djgpp/src/libc/ansi/string/strtok.txh 29 Jan 2003 12:31:53 -0000
1.3
+++ djgpp/src/libc/ansi/string/strtok.txh 31 Dec 2004 14:53:39 -0000
@@ -27,14 +27,19 @@ A pointer to the token, or @code{NULL} i
@subheading Example
@example
-main()
+#include <stdio.h>
+#include <string.h>
+
+int main(void)
@{
- char *buf = "Hello there, stranger";
+ char buf[] = "Hello there, stranger";
char *tok;
for (tok = strtok(buf, " ,");
tok;
tok=strtok(0, " ,"))
printf("tok = `%s'\n", tok);
+
+ return 0;
@}
tok = `Hello'
Right,
MartinS
- Raw text -