summaryrefslogtreecommitdiff
path: root/profile/printcal.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-08-23 12:17:05 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-08-23 12:17:05 +0200
commitc0b89ac5bfb90835ef01573267020e42d4fe070c (patch)
tree733c16852d964d84b7565af4bdaff0bcca901b88 /profile/printcal.c
parent094535c010320967639e8e86f974d878e80baa72 (diff)
Imported Upstream version 1.8.0upstream/1.8.0
Diffstat (limited to 'profile/printcal.c')
-rwxr-xr-x[-rw-r--r--]profile/printcal.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/profile/printcal.c b/profile/printcal.c
index 38ceb9b..9bbcb41 100644..100755
--- a/profile/printcal.c
+++ b/profile/printcal.c
@@ -641,7 +641,7 @@ int main(int argc, char *argv[]) {
#endif // NEVER
/* Process the arguments */
- mfa = 2; /* Minimum final arguments */
+ mfa = 1; /* Minimum final arguments */
for(fa = 1;fa < argc;fa++) {
nfa = fa; /* skip to nfa if next argument is used */
@@ -683,6 +683,7 @@ int main(int argc, char *argv[]) {
recal = 0;
verify = 0;
imitate = 0;
+ mfa = 1;
}
else if (argv[fa][1] == 'r') {
@@ -690,6 +691,7 @@ int main(int argc, char *argv[]) {
recal = 1; /* Recalibrate */
verify = 0;
imitate = 0;
+ mfa = 2;
}
else if (argv[fa][1] == 'e') {
@@ -697,6 +699,7 @@ int main(int argc, char *argv[]) {
recal = 0;
verify = 1; /* Verify */
imitate = 0;
+ mfa = 2;
}
else if (argv[fa][1] == 'I') {
@@ -704,6 +707,7 @@ int main(int argc, char *argv[]) {
recal = 0;
verify = 0;
imitate = 1; /* Imitation target */
+ mfa = 1;
}
else if (argv[fa][1] == 'd')
@@ -714,36 +718,36 @@ int main(int argc, char *argv[]) {
/* Smoothing modfider */
else if (argv[fa][1] == 's') {
- fa = nfa;
if (na == NULL) usage("Expect argument to smoothing flag -s");
+ fa = nfa;
xsmooth = atof(na);
}
/* Manufacturer description string */
else if (argv[fa][1] == 'A') {
- fa = nfa;
if (na == NULL) usage("Expect argument to manufacturer description flag -A");
+ fa = nfa;
xpi.deviceMfgDesc = na;
}
/* Model description string */
else if (argv[fa][1] == 'M') {
- fa = nfa;
if (na == NULL) usage("Expect argument to model description flag -M");
+ fa = nfa;
xpi.modelDesc = na;
}
/* Profile Description */
else if (argv[fa][1] == 'D') {
- fa = nfa;
if (na == NULL) usage("Expect argument to profile description flag -D");
+ fa = nfa;
xpi.profDesc = na;
}
/* Copyright string */
else if (argv[fa][1] == 'C') {
- fa = nfa;
if (na == NULL) usage("Expect argument to copyright flag -C");
+ fa = nfa;
xpi.copyright = na;
}
@@ -755,9 +759,9 @@ int main(int argc, char *argv[]) {
char fch = argv[fa][1];
int chan = -1;
double val = -1.0;
- fa = nfa;
if (na == NULL)
usage("Expect channel flag after flag -%c",argv[fa][1]);
+ fa = nfa;
switch (na[0]) {
case 'c': case 'r': case '0':
chan = 0;