view toys/pwd.c @ 64:67ee3a0b76e1

In bunzip replace setjmp/longjmp handling with error_exit(), replace string based handling of a 6-byte header with with two 24-bit integer reads. Use xmalloc() and xzalloc().
author Rob Landley <rob@landley.net>
date Thu, 18 Jan 2007 22:00:12 -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;
}