SCCS-vsn: usr.bin/rdist/main.c 4.15
-static char *sccsid = "@(#)main.c 4.14 (Berkeley) 85/02/04";
+static char *sccsid = "@(#)main.c 4.15 (Berkeley) 85/05/16";
* Remote distribution program.
*/
* Remote distribution program.
*/
-char *distfile = "distfile";
char tmpfile[] = "/tmp/rdistXXXXXX";
char *tmpname = &tmpfile[5];
char tmpfile[] = "/tmp/rdistXXXXXX";
char *tmpname = &tmpfile[5];
if (cmdargs)
docmdargs(argc, argv);
else {
if (cmdargs)
docmdargs(argc, argv);
else {
- if (fin == NULL && (fin = fopen(distfile, "r")) == NULL) {
- perror(distfile);
- exit(1);
+ if (fin == NULL) {
+ if(distfile == NULL) {
+ if((fin = fopen("distfile","r")) == NULL)
+ fin = fopen("Distfile", "r");
+ } else
+ fin = fopen(distfile, "r");
+ if(fin == NULL) {
+ perror(distfile ? distfile : "distfile");
+ exit(1);
+ }
}
yyparse();
if (nerrs == 0)
}
yyparse();
if (nerrs == 0)