add stellarium emulation

This commit is contained in:
eddyem
2018-09-11 21:34:31 +03:00
parent b73587a5e4
commit bb5b4c4222
22 changed files with 2366 additions and 53 deletions

View File

@@ -49,7 +49,7 @@ myoption cmdlnopts[] = {
*/
glob_pars *parce_args(int argc, char **argv){
int i;
memset(&G, sizeof(glob_pars), 0); // clear all
memset(&G, 0, sizeof(glob_pars)); // clear all
// format of help: "Usage: progname [args]\n"
change_helpstring("Usage: %s [args]\n\n\tWhere args are:\n");
// parse arguments

View File

@@ -89,15 +89,18 @@ int main(int argc, char **argv){
while((iptr = strstr(iptr, "$Comp\n"))){
DBG("%dth component: ", ++i);
iptr = strstr(iptr, "\nL ");
if(!iptr) break; iptr += 3;
if(!iptr) break;
iptr += 3;
if(sscanf(iptr, "%s %s\n", comp, val) != 2) continue;
DBG("component %s with label %s\n", comp, val);
iptr = strstr(iptr, "\nU ");
if(!iptr) break; iptr += 3;
if(!iptr) break;
iptr += 3;
if(sscanf(iptr, "%d %d %s\n",&N1,&N2,comp) != 3) continue;
DBG("N1 = %d; N2 = %d; comp label: %s\n",N1,N2,comp);
iptr = strstr(iptr, "\nF"); // go to line "F 0"
if(!iptr) break; iptr++;
if(!iptr) break;
iptr++;
// printout all what was before:
oldptr = printdata(oldptr, iptr);
for(j = 0; j < L; j++){