"\nOptions:\n\t-R\tchange files and directories recursively.\n";
-static int fileAction(const char *fileName, struct stat *statbuf)
+static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
{
switch (whichApp) {
case CHGRP_APP:
char *p;
const char *appUsage;
- whichApp =
- (strcmp(*argv, "chown") == 0)?
+ whichApp = (strcmp(*argv, "chown") == 0)?
CHOWN_APP : (strcmp(*argv, "chmod") == 0)?
CHMOD_APP : CHGRP_APP;
- appUsage =
- (whichApp == CHOWN_APP)?
+ appUsage = (whichApp == CHOWN_APP)?
chown_usage : (whichApp == CHMOD_APP) ? chmod_usage : chgrp_usage;
if (argc < 2)
fatalError( "%s: too few arguments\n", invocationName);
}
while (argc-- > 1) {
- if (recursiveAction
- (*(++argv), recursiveFlag, TRUE, FALSE, fileAction,
- fileAction) == FALSE)
+ if (recursiveAction (*(++argv), recursiveFlag, TRUE, FALSE,
+ fileAction, fileAction, NULL) == FALSE)
exit(FALSE);
}
exit(TRUE);