about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-09-01 14:59:54 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-09-01 14:59:54 +0200
commit0987f649bf6b3061de76d90fac532c320218a319 (patch)
tree27b3b047151cfbc2bcfe11060b2e737b076f1121
parent49ef0e30a43a6224d401127d2fbede1edfacd2b9 (diff)
downloadredo-c-0987f649bf6b3061de76d90fac532c320218a319.tar.gz
redo-c-0987f649bf6b3061de76d90fac532c320218a319.tar.xz
redo-c-0987f649bf6b3061de76d90fac532c320218a319.zip
cleanup
-rw-r--r--redo.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/redo.c b/redo.c
index 4c9cbea..02d66b6 100644
--- a/redo.c
+++ b/redo.c
@@ -7,8 +7,6 @@ current bugs:
   dependency-loop: unlimited recursion
     need locks
 
-  exts: prepend ./? --- execl should be good enough
-
   test job server properly
 */
 
@@ -212,6 +210,7 @@ dir/base.a.b
        will look for dir/base.a.b.do,
        dir/default.a.b.do, dir/default.b.do, dir/default.do,
        default.a.b.do, default.b.do, and default.do.
+
 this function assumes no / in target
 */
 static char *
@@ -236,7 +235,7 @@ find_dofile(char *target)
 		ost = st;
 
 		if (stat(updir, &st) < 0)
-			return 0;;
+			return 0;
 		if (ost.st_dev == st.st_dev && ost.st_ino == st.st_ino)
 			break;  // reached root dir, .. = .
 
@@ -426,7 +425,7 @@ remove_job(struct job *job)
 	else {
 		struct job *j = jobhead;
 		while (j->next != job)
-				j = j->next;
+			j = j->next;
 		j->next = j->next->next;
 	}
 }
@@ -737,9 +736,7 @@ main(int argc, char *argv[])
 	else
 		program = argv[0];
 
-	// XXX argument parsing: -k -jN -x/-v -f -C
-
-        while ((opt = getopt(argc, argv, "+kj:xfC:")) != -1) {
+        while ((opt = getopt(argc, argv, "+kxfj:C:")) != -1) {
                 switch (opt) {
                 case 'k':
                         kflag = 1;
@@ -763,7 +760,7 @@ main(int argc, char *argv[])
 			}
 			break;
                 default:
-			fprintf(stderr, "usage: %s [-kfx] [-jN] [-Cdir] [TARGETS]\n", program);
+			fprintf(stderr, "usage: %s [-kfx] [-jN] [-Cdir] [TARGETS...]\n", program);
                         exit(1);
                 }
         }