Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Commit

Permalink
Added error message to gendaymtx with -5 option used without argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregungory committed Sep 2, 2015
1 parent a2e4a07 commit 86a1aad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gen/gendaymtx.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static const char RCSid[] = "$Id: gendaymtx.c,v 2.20 2015/08/01 23:27:04 greg Exp $";
static const char RCSid[] = "$Id: gendaymtx.c,v 2.21 2015/09/02 22:52:04 greg Exp $";
#endif
/*
* gendaymtx.c
Expand Down Expand Up @@ -395,6 +395,11 @@ main(int argc, char *argv[])
case '5': /* 5-phase calculation */
nsuns = 1;
fixed_sun_sa = PI/360.*atof(argv[++i]);
if (fixed_sun_sa <= 0) {
fprintf(stderr, "%s: missing solar disk size argument for '-5' option\n",
argv[0]);
exit(1);
}
fixed_sun_sa *= fixed_sun_sa*PI;
break;
default:
Expand Down

0 comments on commit 86a1aad

Please sign in to comment.