comparison toys/posix/dirname.c @ 694:786841fdb1e0

Reindent to two spaces per level. Remove vi: directives that haven't worked right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style. The actual code should be the same afterward, this is just cosmetic refactoring.
author Rob Landley <rob@landley.net>
date Tue, 13 Nov 2012 17:14:08 -0600
parents 2986aa63a021
children aafd2f28245a
comparison
equal deleted inserted replaced
693:4a5a250e0633 694:786841fdb1e0
1 /* vi: set sw=4 ts=4: 1 /* dirname.c - show directory portion of path
2 *
3 * dirname.c - show directory portion of path
4 * 2 *
5 * Copyright 2011 Rob Landley <rob@landley.net> 3 * Copyright 2011 Rob Landley <rob@landley.net>
6 * 4 *
7 * See http://opengroup.org/onlinepubs/9699919799/utilities/dirname.html 5 * See http://opengroup.org/onlinepubs/9699919799/utilities/dirname.html
8 6
9 USE_DIRNAME(NEWTOY(dirname, "<1", TOYFLAG_USR|TOYFLAG_BIN)) 7 USE_DIRNAME(NEWTOY(dirname, "<1", TOYFLAG_USR|TOYFLAG_BIN))
10 8
11 config DIRNAME 9 config DIRNAME
12 bool "dirname" 10 bool "dirname"
13 default y 11 default y
14 help 12 help
15 usage: dirname PATH 13 usage: dirname PATH
16 14
17 Show directory portion of path. 15 Show directory portion of path.
18 */ 16 */
19 17
20 #include "toys.h" 18 #include "toys.h"
21 19
22 void dirname_main(void) 20 void dirname_main(void)
23 { 21 {
24 puts(dirname(*toys.optargs)); 22 puts(dirname(*toys.optargs));
25 } 23 }