5 #include <WINGs/WUtil.h>
8 * gcc -D{$os} -I ../../WINGs ${includes...} -Wall -Wextra -g -ggdb3 -c -o ${plat}.o ${plat}.c
9 * gcc -I ../../WINGs ${includes...} -g -ggdb3 -c -o test.o test.c
10 * gcc -g -ggdb3 -o test ${plat}.o ../../WINGs/.libs/libWUtil.a test.o
12 * $ ./test 1 2 'foo bar' "`date`" `date`
17 * arg[4] = [Sat Mar 20 18:36:22 CET 2010]
27 Bool
GetCommandForPid(int pid
, char ***argv
, int *argc
);
28 extern char *__progname
;
30 int main(int argc
, char **argv
) {
36 printf("Usage: %s arg arg arg ...\n", __progname
);
40 if (GetCommandForPid(getpid(), &nargv
, &nargc
) == False
) {
41 printf("GetCommandForPid() failed\n");
43 printf("nargv = %d\n", nargc
);
44 for(i
= 0; i
< nargc
; i
++)
45 printf("arg[%d] = [%s]\n", i
, nargv
[i
]);