1 |
< |
/* Copyright (c) 1995 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1996 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
348 |
|
if (ac < 2) |
349 |
|
return(MG_EARGC); |
350 |
|
/* construct output file name */ |
351 |
< |
if ((op = strrchr(av[1], '/')) == NULL) |
351 |
> |
if ((op = strrchr(av[1], '/')) != NULL) |
352 |
> |
op++; |
353 |
> |
else |
354 |
|
op = av[1]; |
355 |
|
(void)strcpy(fname, op); |
356 |
|
if ((op = strrchr(fname, '.')) == NULL) |
541 |
|
return(mname); |
542 |
|
} |
543 |
|
/* check for plastic */ |
544 |
< |
if (c_cmaterial->rs < .1 && (c_cmaterial->rs < .01 || |
543 |
< |
c_isgrey(&c_cmaterial->rs_c))) { |
544 |
> |
if (c_cmaterial->rs < .1) { |
545 |
|
cvtcolor(radrgb, &c_cmaterial->rd_c, |
546 |
|
c_cmaterial->rd/(1.-c_cmaterial->rs)); |
547 |
|
fprintf(matfp, "\nvoid plastic %s\n0\n0\n", mname); |