om

om - the most recently modified file in a directory
git clone git://git.larryhynes.net/om
Log | Files | Refs | README | LICENSE

commit fff614f04d1944253741033658eb13e727bd0542
parent 4d541fdfe028a08ac6164c1a0fa7da57e42978b4
Author: Larry Hynes <larry@larryhynes.com>
Date:   Thu, 13 Jul 2017 01:12:40 +0100

Add prototypes

Diffstat:
om.c | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/om.c b/om.c @@ -9,17 +9,22 @@ #include "compat.h" +char *strp(void); +void om(void); +int main(int, char *[]); +void prnt(char *, char *); + char *dir; char buf[PATH_MAX]; char res[NAME_MAX]; -int r; +int r = 0; /* * Check for, and remove, a trailing slash on the directory, * unless the directory is '/'. */ char -*strp() +*strp(void) { if (strcmp(dir, "/") != 0) { size_t len = strlen(dir); @@ -32,7 +37,7 @@ char } void -om() +om(void) { DIR *dirp; struct dirent *ent;