view toys/dirname.c @ 222:cf3b2b8a371b

Release notice.
author Rob Landley <rob@landley.net>
date Wed, 02 Jan 2008 01:40:09 -0600
parents 25447caf1b4b
children d4176f3f3835
line wrap: on
line source

/* vi: set sw=4 ts=4: */
/* dirname.c - print directory portion of path, or "." if none.
 *
 * See http://www.opengroup.org/onlinepubs/009695399/utilities/dirname.html
 */

#include "toys.h"
#include <libgen.h>

void dirname_main(void)
{
	puts(dirname(*toys.optargs));
}