From 706074a5bb120f78f4fd8bc40c6814f14e17e530 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 15 Aug 1996 01:23:29 +0000 Subject: update from main archive 960814 --- manual/examples/strdupa.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 manual/examples/strdupa.c (limited to 'manual/examples') diff --git a/manual/examples/strdupa.c b/manual/examples/strdupa.c new file mode 100644 index 0000000000..7d6ef39947 --- /dev/null +++ b/manual/examples/strdupa.c @@ -0,0 +1,19 @@ +#include +#include +#include + +const char path[] = _PATH_STDPATH; + +int +main (void) +{ + char *wr_path = strdupa (path); + char *cp = strtok (wr_path, ":"); + + while (cp != NULL) + { + puts (cp); + cp = strtok (NULL, ":"); + } + return 0; +} -- cgit v1.2.3