Add trigonometry functions for calculations on MCU

This commit is contained in:
eddyem
2016-06-20 14:40:26 +03:00
parent be1cbe0956
commit d826925162
6 changed files with 276 additions and 2 deletions

View File

@@ -233,7 +233,7 @@ void parseargs(int *argc, char ***argv, myoption *options){
loptr->flag = opts->flag;
loptr->val = opts->val;
// fill short options if they are:
if(!opts->flag){
if(!opts->flag && opts->val){
#ifdef EBUG
shortlist[i] = (char) opts->val;
#endif
@@ -396,7 +396,7 @@ void showhelp(int oindex, myoption *options){
qsort(opts, N, sizeof(myoption), argsort);
do{
int p = sprintf(buf, " "); // a little indent
if(!opts->flag) // .val is short argument
if(!opts->flag && opts->val) // .val is short argument
p += snprintf(buf+p, bufsz-p, "-%c, ", opts->val);
p += snprintf(buf+p, bufsz-p, "--%s", opts->name);
if(opts->has_arg == 1) // required argument