--- ray/src/util/rtcontrib.c 2005/05/28 22:27:54 1.6 +++ ray/src/util/rtcontrib.c 2005/06/01 16:11:01 1.9 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rtcontrib.c,v 1.6 2005/05/28 22:27:54 greg Exp $"; +static const char RCSid[] = "$Id: rtcontrib.c,v 1.9 2005/06/01 16:11:01 greg Exp $"; #endif /* * Gather rtrace output to compute contributions from particular sources @@ -7,6 +7,7 @@ static const char RCSid[] = "$Id: rtcontrib.c,v 1.6 20 #include "standard.h" #include +#include #include "platform.h" #include "rtprocess.h" #include "selcall.h" @@ -67,8 +68,8 @@ struct rtproc { /* rtrace command and defaults */ char *rtargv[256] = { "rtrace", "-dj", ".5", "-dr", "3", - "-ab", "1", "-ad", "128", }; -int rtargc = 9; + "-ab", "1", "-ad", "128", "-lr", "-10", }; +int rtargc = 11; /* overriding rtrace options */ char *myrtopts[] = { "-o~~TmWdp", "-h-", "-x", "1", "-y", "0", "-dt", "0", "-as", "0", "-aa", "0", NULL }; @@ -201,8 +202,17 @@ main(int argc, char *argv[]) break; case 'f': /* file or i/o format */ if (!argv[i][2]) { + char *fpath; if (i >= argc-1) break; - fcompile(argv[++i]); + fpath = getpath(argv[++i], + getrlibpath(), R_OK); + if (fpath == NULL) { + sprintf(errmsg, + "cannot find file '%s'", + argv[i]); + error(USER, errmsg); + } + fcompile(fpath); continue; } setformat(argv[i]+2);