2070,7 → 2070,7 |
@%halfline%size 400,400%xrange -10,10%yrange -10,10%halfline -5,5,0,0,red%halfline -5,-5,0,0,blue |
*/ |
for(i=0; i<13;i++){double_data[i]=0;} |
|
|
for(i=0;i<5;i++){ |
switch(i){ |
case 0: double_data[0]= get_real(infile,0);break; /* x-values */ |
4129,11 → 4129,6 |
reply_format = (int) get_real(infile,1); |
reply_precision = precision; |
break; |
|
case RESET: |
no_reset=FALSE; |
reset(); |
break; |
|
case ROUNDRECT: |
/* |
6323,7 → 6318,6 |
return; |
} |
|
|
void reset(){ |
if(no_reset == FALSE){ /* 8/5/2020 */ |
use_filled = FALSE; |
6397,7 → 6391,7 |
/* need to remover newline from svg-string on freebsd */ |
char *pch = strstr(buffer, "\n"); |
while(pch != NULL){ |
strcpy(pch, " "); |
strncpy(pch, " ", 1); |
pch = strstr(buffer, "\n"); |
} |
string_length = 1 + snprintf(NULL,0,"%s",buffer); |
6687,7 → 6681,7 |
} |
|
int count_substring(char* string, char* substring) { |
int i, l1, l2; |
int i, j, l1, l2; |
int count = 0; |
l1 = strlen(string); |
l2 = strlen(substring); |
6994,7 → 6988,6 |
*obabel="obabel", |
*chemtex="chemtex", |
*noreset="noreset", |
*reset="reset", |
*killreset="killreset", |
*arrowarc="arrowarc", |
*arcarrow="arcarrow", |
7018,15 → 7011,15 |
if (c == EOF) {finished=1;return 0;} |
|
temp[i]='\0'; |
if(strstr(temp,"dash") !=0 && strlen(temp) > 4 ){ |
int p; |
if(strstr(temp,"dash") !=0 && strlen(temp) > 4 && strstr(temp,"dashtype") == 0 ){ |
/* 4/2024 adapt to Flydraw's dashing syntax for all objects with prefix "dash" */ |
use_dashed = TRUE;int idx=0; |
for(p = 4; p < strlen(temp); p++){temp[idx] = temp[p];idx++;} |
for(int p = 4; p < strlen(temp); p++){temp[idx] = temp[p];idx++;} |
input_type = (char*)my_newmem(idx); snprintf(input_type,idx+1,"%s",temp); |
}else{ |
input_type=(char*)my_newmem(strlen(temp)); |
snprintf(input_type,sizeof(temp),"%s",temp); |
} |
input_type=(char*)my_newmem(strlen(temp)); |
snprintf(input_type,sizeof(temp),"%s",temp); |
|
/* fprintf(stdout,"input_type = %s<br/>",input_type);*/ |
if( strcmp(input_type, size) == 0 ){ |
free(input_type); |
7349,7 → 7342,7 |
return FONTFAMILY; |
} |
if( strcmp(input_type, polyline) == 0 || strcmp(input_type, dpolyline) == 0 || strcmp(input_type, path) == 0 || strcmp(input_type, brokenline) == 0 ){ |
if(strcmp(input_type, dpolyline) == 0 ){use_dashed = TRUE;} |
if(strcmp(input_type, dpolyline) == 0 ){use_dashed = TRUE;} |
free(input_type); |
return POLYLINE; |
} |
7981,13 → 7974,8 |
return CHEMTEX; |
} |
if( strcmp(input_type, noreset) == 0 || strcmp(input_type, killreset) == 0 ){ |
free(input_type); |
return NORESET; |
} |
if( strcmp(input_type, reset) == 0 ){ |
free(input_type); |
return RESET; |
} |
if( strcmp(input_type, duplicates) == 0 || strcmp(input_type, allowdups) == 0 ){ |
free(input_type); |
return ALLOW_DUPLICATES; |