view toys/pwd.c @ 25:eb46bb5626cb

New option parsing infrastructure (doesn't use getopt). Hook it up to existing applets. Still a bit buggy, but bits of it work.
author Rob Landley <rob@landley.net>
date Sun, 19 Nov 2006 02:49:22 -0500
parents 6475d6c46066
children fb56ba93afa3
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();

	puts(pwd);
	if (CFG_TOYS_FREE) free(pwd);

	return 0;
}