Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add comments

  • Loading branch information...
commit 092259e455da54e39b2908b33aa35e9ae4531968 1 parent 6e3401a
@sschober authored
Showing with 12 additions and 4 deletions.
  1. +12 −4 kqwait.c
View
16 kqwait.c
@@ -191,12 +191,20 @@ int main(int argc, char** argv){
if( DEBUG ) printDirInfo( diAfter );
if( DEBUG ) printDirInfo( diIntersect );
if( diIntersect->count > 0 )
- fprintf(stdout, "%s %s/%s\n",
- ( (NULL != ndip->di && NULL != diAfter &&
- (ndip->di->count > diAfter->count)) ||
+ fprintf(stdout, "%s %s%s%s\n",
+ (
+ // dir was non empty before and is non empty after
+ (NULL != ndip->di && NULL != diAfter &&
+ // some thing has gone, iff #entries decreased
+ (ndip->di->count > diAfter->count))
+ ||
+ // dir was non empty before and is empty after
+ // -> something is gone
(NULL != ndip->di && NULL == diAfter)
- ) ? "-" : "+",
+ ) ? "-" : "+",
ndip->path,
+ // if path does not end with '/' insert one
+ ('/' == ndip->path[strlen(ndip->path)-1]) ? "" : "/",
diIntersect->entries[0]);
}
else
Please sign in to comment.
Something went wrong with that request. Please try again.