--- ray/src/px/pvalue.c 2024/09/11 23:21:01 2.44 +++ ray/src/px/pvalue.c 2025/06/03 21:31:51 2.46 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: pvalue.c,v 2.44 2024/09/11 23:21:01 greg Exp $"; +static const char RCSid[] = "$Id: pvalue.c,v 2.46 2025/06/03 21:31:51 greg Exp $"; #endif /* * pvalue.c - program to print pixel values. @@ -44,8 +44,6 @@ int rord[4]; /* reverse ordering */ COLOR exposure = WHTCOLOR; -char *progname; - FILE *fin; FILE *fin2 = NULL, *fin3 = NULL; /* for other color channels */ @@ -98,7 +96,7 @@ main( double d, expval = 1.0; int i; - progname = argv[0]; + fixargv0(argv[0]); /* sets global progname */ mybright = &rgb_bright; /* default */ picres.rt = PIXSTANDARD; @@ -361,7 +359,9 @@ unkopt: printargs(i, argv, stdout); if ((expval < .99) | (expval > 1.01)) fputexpos(expval, stdout); - if (NCSAMP == 1) { + if (!header & (putprim != ALL)) { + NCSAMP = 1; /* no header, so trust user */ + } else if (NCSAMP == 1) { if (putprim == ALL) putprim = BRIGHT; } else {