Mercurial > hg > toybox
view toys/pwd.c @ 126:7b22987a7b47
Vladimir Oleynik pointed out that va_start() twice in the same function
isn't portable (with ppc 4xx as an example of a platform it doesn't work
on). This is why va_copy exists.
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 15 Jun 2007 15:16:46 -0400 |
parents | 7c77c6ec17ee |
children | 25447caf1b4b |
line wrap: on
line source
/* vi: set sw=4 ts=4: */ /* * pwd.c - Print working directory. */ #include "toys.h" int pwd_main(void) { char *pwd = xgetcwd(); xprintf("%s\n", pwd); if (CFG_TOYBOX_FREE) free(pwd); return 0; }