Subversion Repositories wimsdev

Rev

Rev 7856 | Rev 7862 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7856 Rev 7858
Line 78... Line 78...
78
    for(i=0;i<MAX_INT;i++){int_data[i]=0;double_data[i]=0;}
78
    for(i=0;i<MAX_INT;i++){int_data[i]=0;double_data[i]=0;}
79
    int use_parametric = FALSE;/* will be reset after parametric plotting */
79
    int use_parametric = FALSE;/* will be reset after parametric plotting */
80
    int use_axis = FALSE;
80
    int use_axis = FALSE;
81
    int use_axis_numbering = FALSE;
81
    int use_axis_numbering = FALSE;
82
    int use_pan_and_zoom = FALSE;
82
    int use_pan_and_zoom = FALSE;
-
 
83
    int use_js_math = FALSE; /* if true add js-function to convert math_function --> javascript math_function */
-
 
84
    int use_js_plot = FALSE; /* if true , let js-engine plot the curve */
83
    int line_width = 1;
85
    int line_width = 1;
84
    int decimals = 2;
86
    int decimals = 2;
85
    int precision = 100; /* 10 = 1;100=2;1000=3 decimal display for mouse coordinates or grid coordinate */
87
    int precision = 100; /* 10 = 1;100=2;1000=3 decimal display for mouse coordinates or grid coordinate */
86
    int use_userdraw = FALSE; /* flag to indicate user interaction: incompatible with "drag & drop" code !! */
88
    int use_userdraw = FALSE; /* flag to indicate user interaction: incompatible with "drag & drop" code !! */
87
    int drag_type = -1;/* 0,1,2 : xy,x,y */
89
    int drag_type = -1;/* 0,1,2 : xy,x,y */
Line 222... Line 224...
222
var x_strings = null;\
224
var x_strings = null;\
223
var y_strings = null;\
225
var y_strings = null;\
224
var use_pan_and_zoom = 0;\
226
var use_pan_and_zoom = 0;\
225
var x_use_snap_to_grid = 0;\
227
var x_use_snap_to_grid = 0;\
226
var y_use_snap_to_grid = 0;\
228
var y_use_snap_to_grid = 0;\
-
 
229
var use_jsmath = 0;\
227
var xstart = 0;\
230
var xstart = 0;\
228
var ystart = 0",canvas_root_id,xsize,ysize,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id);
231
var ystart = 0",canvas_root_id,xsize,ysize,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id,canvas_root_id);
229
/* default add the drag code : nearly always used ...*/
232
/* default add the drag code : nearly always used ...*/
230
add_drag_code(js_include_file,DRAG_CANVAS,canvas_root_id);
233
add_drag_code(js_include_file,DRAG_CANVAS,canvas_root_id);
231
            break;
234
            break;
Line 1230... Line 1233...
1230
             fprintf(js_include_file,"dragstuff.addShape(new Shape(%d,%d,%d,16,%s,[%d],[%d],%d,\"%s\",%.2f,\"%s\",%.2f,%d,%d,%d,%d,%d,%.1f,\"%s\",%d,\"%s\",%d,%s));\n",click_cnt,onclick,drag_type,eval_levelcurve(xsize,ysize,fun1,xmin,xmax,ymin,ymax,plot_steps,precision,double_data[c]),line_width,line_width,line_width,stroke_color,stroke_opacity,fill_color,fill_opacity,use_filled,use_dashed,dashtype[0],dashtype[1],use_rotate,angle,flytext,font_size,font_family,use_affine,affine_matrix);
1233
             fprintf(js_include_file,"dragstuff.addShape(new Shape(%d,%d,%d,16,%s,[%d],[%d],%d,\"%s\",%.2f,\"%s\",%.2f,%d,%d,%d,%d,%d,%.1f,\"%s\",%d,\"%s\",%d,%s));\n",click_cnt,onclick,drag_type,eval_levelcurve(xsize,ysize,fun1,xmin,xmax,ymin,ymax,plot_steps,precision,double_data[c]),line_width,line_width,line_width,stroke_color,stroke_opacity,fill_color,fill_opacity,use_filled,use_dashed,dashtype[0],dashtype[1],use_rotate,angle,flytext,font_size,font_family,use_affine,affine_matrix);
1231
             click_cnt++;
1234
             click_cnt++;
1232
            }
1235
            }
1233
            reset();
1236
            reset();
1234
            break;
1237
            break;
1235
        case TRACE_JSMATH:
1238
        case TRACE_JSCURVE:
1236
        /*
1239
        /*
1237
         @trace_jsmath some_javascript_math_function
1240
         @trace_jscurve some_math_function
1238
         @will use a crosshair to trace the jsmath curve
1241
         @will use a crosshair to trace the jsmath curve
1239
         @two inputfields will display the current x/y-values (numerical evaluation by javascript)
1242
         @two inputfields will display the current x/y-values (numerical evaluation by javascript)
1240
         @default labels 'x' and 'y'<br />the commands 'xlabel some_x_axis_name' and 'ylabel some_y_axis_name' will set the label for the input fields  
1243
         @default labels 'x' and 'y'<br />the commands 'xlabel some_x_axis_name' and 'ylabel some_y_axis_name' will set the label for the input fields  
1241
         @use linewidth,strokecolor,crosshairsize to adjust the corsshair.
1244
         @use linewidth,strokecolor,crosshairsize to adjust the corsshair.
1242
         @example: trace_jsmath Math.pow(x,2)+4*x+16
-
 
1243
         @example: trace_jsmath Math.sin(Math.pow(x,Math.Pi))+Math.sqrt(x)
-
 
1244
         @no check is done on the validity of your function and/or syntax<br />use error console to debug any errors...
1245
         @the client browser will convert your math function to javascript math.<br />use parenthesis and rawmath : use 2*x in stead of 2x etc etc<br />no check is done on the validity of your function and/or syntax<br />use error console to debug any errors...
1245
        */
1246
        */
1246
            if( js_function[DRAW_CROSSHAIRS] != 1 ){ js_function[DRAW_CROSSHAIRS] = 1;}
1247
            if( js_function[DRAW_CROSSHAIRS] != 1 ){ js_function[DRAW_CROSSHAIRS] = 1;}
1247
            if( js_function[DRAW_LINES] != 1 ){ js_function[DRAW_LINES] = 1;}
1248
            if( js_function[DRAW_LINES] != 1 ){ js_function[DRAW_LINES] = 1;}
-
 
1249
            if( use_js_math == FALSE){
-
 
1250
                add_to_js_math(js_include_file);
-
 
1251
                use_js_math = TRUE;
-
 
1252
            }
1248
            add_trace_js_mouse(js_include_file,TRACE_CANVAS,canvas_root_id,stroke_color,get_string(infile,1),font_size,stroke_opacity,line_width,crosshair_size);
1253
            add_trace_js_mouse(js_include_file,TRACE_CANVAS,canvas_root_id,stroke_color,get_string(infile,1),font_size,stroke_opacity,line_width,crosshair_size);
1249
            break;
1254
            break;
1250
        case JSMATH:
1255
        case JSMATH:
1251
        /*
1256
        /*
1252
            @jsmath some_javascript_math_function
1257
            @jsmath some_math_function
1253
            @will calculate an y-value from a userinput x-value and draws a crosshair on these coordinates.
1258
            @will calculate an y-value from a userinput x-value and draws a crosshair on these coordinates.
1254
            @default labels 'x' and 'y'<br />the commands 'xlabel some_x_axis_name' and 'ylabel some_y_axis_name' will set the label for the input fields  
1259
            @default labels 'x' and 'y'<br />the commands 'xlabel some_x_axis_name' and 'ylabel some_y_axis_name' will set the label for the input fields  
1255
            @example: jsmath Math.pow(x,2)+4*x+16
1260
            @example: jsmath sin(x^2)
1256
            @example: jsmath Math.sin(Math.pow(x,Math.Pi))+Math.sqrt(x)
-
 
1257
            @no check is done on the validity of your function and/or syntax<br />use error console to debug any errors...
1261
            @the client browser will convert your math function to javascript math.<br />use parenthesis and rawmath : use 2*x in stead of 2x etc etc<br />no check is done on the validity of your function and/or syntax<br />use error console to debug any errors...
1258
        */
1262
        */
1259
            if( js_function[DRAW_CROSSHAIRS] != 1 ){ js_function[DRAW_CROSSHAIRS] = 1;}
1263
            if( js_function[DRAW_CROSSHAIRS] != 1 ){ js_function[DRAW_CROSSHAIRS] = 1;}
-
 
1264
            if( use_js_math == FALSE){
-
 
1265
                add_to_js_math(js_include_file);
-
 
1266
                use_js_math = TRUE;
-
 
1267
            }
1260
            add_calc_y(js_include_file,canvas_root_id,get_string(infile,1));
1268
            add_calc_y(js_include_file,canvas_root_id,get_string(infile,1));
1261
            break;
1269
            break;
-
 
1270
        case JSCURVE:
-
 
1271
        /*
-
 
1272
         @jscurve color,formula(x)
-
 
1273
         @your function will be plotted by the javascript engine of the client browser.
-
 
1274
         @use parenthesis and rawmath : use 2*x in stead of 2x ; use 2^(sin(x))...etc etc<br />use error console to debug any errors...
-
 
1275
         @no validity check is done by wims.
-
 
1276
         @zooming & panning are implemented :<br />use command 'zoom color' for mouse driven zooming<br />or use keyword 'setlimits' for inputfields setting xmin/xmax, ymin/ymax
-
 
1277
         @use command 'trace_jscurve formula(x)` for tracing
-
 
1278
         @use commmand 'jsmath  formula(x)` for calculating and displaying indiviual points on the curve
-
 
1279
         @can not be set draggable / onclick (yet)
-
 
1280
         @commands plotjump / plotstep are not active for 'jscurve'
-
 
1281
        */
-
 
1282
            stroke_color = get_color(infile,0);
-
 
1283
            if( use_js_math == FALSE){/* add this stuff only once...*/
-
 
1284
                add_to_js_math(js_include_file);
-
 
1285
                use_js_math = TRUE;
-
 
1286
            }
-
 
1287
            if( use_js_plot == FALSE){
-
 
1288
                use_js_plot = TRUE;
-
 
1289
                add_jsplot(js_include_file,canvas_root_id); /* this plots the function on JSPLOT_CANVAS */
-
 
1290
            }
-
 
1291
            temp = get_string_argument(infile,1);
-
 
1292
            string_length = snprintf(NULL,0,  "jsplot(%d,\"%s\",%d,\"%s\",%.2f,%d,%d,%d); ",JSPLOT_CANVAS+use_js_plot,temp,line_width,stroke_color,stroke_opacity,use_dashed,dashtype[0],dashtype[1]);
-
 
1293
            check_string_length(string_length);tmp_buffer = my_newmem(string_length+1);
-
 
1294
            snprintf(tmp_buffer,string_length,"jsplot(%d,\"%s\",%d,\"%s\",%.2f,%d,%d,%d); ",JSPLOT_CANVAS+use_js_plot,temp,line_width,stroke_color,stroke_opacity,use_dashed,dashtype[0],dashtype[1]);
-
 
1295
            add_to_buffer(tmp_buffer);
-
 
1296
            use_js_plot++; /* we need to create multiple canvasses, so we may zoom and pan ?? */
-
 
1297
 
-
 
1298
        break;
1262
        case CURVE:
1299
        case CURVE:
1263
        /*
1300
        /*
1264
         @curve color,formula(x)
1301
         @curve color,formula(x)
1265
         @plot color,formula(x)
1302
         @plot color,formula(x)
1266
         @use command trange before command curve / plot  (trange -pi,pi)<br />curve color,formula1(t),formula2(t)
1303
         @use command trange before command curve / plot  (trange -pi,pi)<br />curve color,formula1(t),formula2(t)
Line 1268... Line 1305...
1268
         @use command "plotsteps" to increase / decrease the amount of plotted points (default 150)
1305
         @use command "plotsteps" to increase / decrease the amount of plotted points (default 150)
1269
         @may be set draggable / onclick
1306
         @may be set draggable / onclick
1270
        */
1307
        */
1271
            if( use_parametric == TRUE ){ /* parametric color,fun1(t),fun2(t)*/
1308
            if( use_parametric == TRUE ){ /* parametric color,fun1(t),fun2(t)*/
1272
                use_parametric = FALSE;
1309
                use_parametric = FALSE;
1273
                stroke_color = get_color(infile,0);
1310
                stroke_color = get_color(infile,0);
1274
                char *fun1 = get_string_argument(infile,0);
1311
                char *fun1 = get_string_argument(infile,0);
1275
                char *fun2 = get_string_argument(infile,1);
1312
                char *fun2 = get_string_argument(infile,1);
1276
                if( strlen(fun1) == 0 || strlen(fun2) == 0 ){canvas_error("parametric functions are NOT OK !");}
1313
                if( strlen(fun1) == 0 || strlen(fun2) == 0 ){canvas_error("parametric functions are NOT OK !");}
1277
                fprintf(js_include_file,"dragstuff.addShape(new Shape(%d,%d,%d,%d,%s,[%d],[%d],%d,\"%s\",%.2f,\"%s\",%.2f,%d,%d,%d,%d,%d,%.1f,\"%s\",%d,\"%s\",%d,%s));\n",click_cnt,onclick,drag_type,animation_type,eval_parametric(xsize,ysize,fun1,fun2,xmin,xmax,ymin,ymax,tmin,tmax,plot_steps,precision),2*line_width,2*line_width,line_width,stroke_color,stroke_opacity,fill_color,fill_opacity,use_filled,use_dashed,dashtype[0],dashtype[1],use_rotate,angle,flytext,font_size,font_family,use_affine,affine_matrix);
1314
                fprintf(js_include_file,"dragstuff.addShape(new Shape(%d,%d,%d,%d,%s,[%d],[%d],%d,\"%s\",%.2f,\"%s\",%.2f,%d,%d,%d,%d,%d,%.1f,\"%s\",%d,\"%s\",%d,%s));\n",click_cnt,onclick,drag_type,animation_type,eval_parametric(xsize,ysize,fun1,fun2,xmin,xmax,ymin,ymax,tmin,tmax,plot_steps,precision),2*line_width,2*line_width,line_width,stroke_color,stroke_opacity,fill_color,fill_opacity,use_filled,use_dashed,dashtype[0],dashtype[1],use_rotate,angle,flytext,font_size,font_family,use_affine,affine_matrix);
1278
                click_cnt++;
1315
                click_cnt++;
Line 1302... Line 1339...
1302
            for(i = 0; i < 5 ;i++){
1339
            for(i = 0; i < 5 ;i++){
1303
                switch(i){
1340
                switch(i){
1304
                    case 0: stroke_color = get_color(infile,0);break;/* font_color == stroke_color name or hex color */
1341
                    case 0: stroke_color = get_color(infile,0);break;/* font_color == stroke_color name or hex color */
1305
                    case 1: double_data[0] = get_real(infile,0);break; /* x */
1342
                    case 1: double_data[0] = get_real(infile,0);break; /* x */
1306
                    case 2: double_data[1] = get_real(infile,0);break; /* y */
1343
                    case 2: double_data[1] = get_real(infile,0);break; /* y */
1307
                    case 3: fly_font = get_string_argument(infile,0);
1344
                    case 3: fly_font = get_string_argument(infile,0);
1308
                            if(strcmp(fly_font,"giant") == 0){
1345
                            if(strcmp(fly_font,"giant") == 0){
1309
                                font_size = (int)(font_size + 24);
1346
                                font_size = (int)(font_size + 24);
1310
                            }
1347
                            }
1311
                            else
1348
                            else
1312
                            {
1349
                            {
1313
                                if(strcmp(fly_font,"huge") == 0){
1350
                                if(strcmp(fly_font,"huge") == 0){
1314
                                    font_size = (int)(font_size + 14);
1351
                                    font_size = (int)(font_size + 14);
1315
                                }
1352
                                }
1316
                                else
1353
                                else
1317
                                {
1354
                                {
1318
                                    if(strcmp(fly_font,"large") == 0){
1355
                                    if(strcmp(fly_font,"large") == 0){
1319
                                        font_size = (int)(font_size + 6);
1356
                                        font_size = (int)(font_size + 6);
1320
                                        }
1357
                                        }
1321
                                        else
1358
                                        else
1322
                                        {
1359
                                        {
1323
                                            if(strcmp(fly_font,"small") == 0){
1360
                                            if(strcmp(fly_font,"small") == 0){
1324
                                                font_size = (int)(font_size - 4);
1361
                                                font_size = (int)(font_size - 4);
1325
                                                if(font_size<0){font_size = 8;}
1362
                                                if(font_size<0){font_size = 8;}
1326
                                        }
1363
                                        }
1327
                                    }
1364
                                    }
1328
                                }
1365
                                }
1329
                            }
1366
                            }
1330
                            break; /* font_size ! */
1367
                            break; /* font_size ! */
1331
                    case 4:
1368
                    case 4:
1332
                        temp = get_string_argument(infile,1);
1369
                        temp = get_string_argument(infile,1);
1333
                        decimals = find_number_of_digits(precision);
1370
                        decimals = find_number_of_digits(precision);
1334
                        fprintf(js_include_file,"dragstuff.addShape(new Shape(%d,%d,%d,14,[%.*f],[%.*f],[30],[30],%d,\"%s\",%.2f,\"%s\",%.2f,%d,%d,%d,%d,%d,%d,\"%s\",%d,\"%s\",%d,%s));\n",click_cnt,onclick,drag_type,decimals,double_data[0],decimals,double_data[1],line_width,stroke_color,stroke_opacity,stroke_color,stroke_opacity,0,0,0,0,0,0,temp,font_size,font_family,use_affine,affine_matrix);
1371
                        fprintf(js_include_file,"dragstuff.addShape(new Shape(%d,%d,%d,14,[%.*f],[%.*f],[30],[30],%d,\"%s\",%.2f,\"%s\",%.2f,%d,%d,%d,%d,%d,%d,\"%s\",%d,\"%s\",%d,%s));\n",click_cnt,onclick,drag_type,decimals,double_data[0],decimals,double_data[1],line_width,stroke_color,stroke_opacity,stroke_color,stroke_opacity,0,0,0,0,0,0,temp,font_size,font_family,use_affine,affine_matrix);
1335
                        click_cnt++;reset();break;
1372
                        click_cnt++;reset();break;
1336
                    default:break;
1373
                    default:break;
1337
                }
1374
                }
1338
            }
1375
            }
1339
            break;
1376
            break;
1340
        case FLY_TEXTUP:
1377
        case FLY_TEXTUP:
1341
        /*
1378
        /*
1342
         @ textup fontcolor,x,y,font,text_string
1379
         @ textup fontcolor,x,y,font,text_string
Line 1929... Line 1966...
1929
                    case 4:
1966
                    case 4:
1930
                            temp = get_string_argument(infile,1);
1967
                            temp = get_string_argument(infile,1);
1931
                            string_length = snprintf(NULL,0,  "draw_inputs(%d,%d,%d,%d,%d,%d,\"%s\",\"%s\");\n",canvas_root_id,input_cnt,int_data[0],int_data[1],int_data[2],int_data[3],input_style,temp);
1968
                            string_length = snprintf(NULL,0,  "draw_inputs(%d,%d,%d,%d,%d,%d,\"%s\",\"%s\");\n",canvas_root_id,input_cnt,int_data[0],int_data[1],int_data[2],int_data[3],input_style,temp);
1932
                            check_string_length(string_length);tmp_buffer = my_newmem(string_length+1);
1969
                            check_string_length(string_length);tmp_buffer = my_newmem(string_length+1);
1933
                            snprintf(tmp_buffer,string_length,"draw_inputs(%d,%d,%d,%d,%d,%d,\"%s\",\"%s\");\n",canvas_root_id,input_cnt,int_data[0],int_data[1],int_data[2],int_data[3],input_style,temp);
1970
                            snprintf(tmp_buffer,string_length,"draw_inputs(%d,%d,%d,%d,%d,%d,\"%s\",\"%s\");\n",canvas_root_id,input_cnt,int_data[0],int_data[1],int_data[2],int_data[3],input_style,temp);
1934
                            add_to_buffer(tmp_buffer);
1971
                            add_to_buffer(tmp_buffer);
1935
                            input_cnt++;break;
1972
                            input_cnt++;break;
1936
                    default: break;
1973
                    default: break;
1937
                }
1974
                }
1938
            }
1975
            }
1939
            if(reply_format < 1 ){reply_format = 15;}
1976
            if(reply_format < 1 ){reply_format = 15;}
1940
            reset();
1977
            reset();
1941
            break;
1978
            break;
Line 1976... Line 2013...
1976
        case SETLIMITS:
2013
        case SETLIMITS:
1977
        /*
2014
        /*
1978
            @setlimits
2015
            @setlimits
1979
            @keyword : if set, it will produce 4 inputfields for 'xmin,xmax,ymin,ymax' and an 'ok' button
2016
            @keyword : if set, it will produce 4 inputfields for 'xmin,xmax,ymin,ymax' and an 'ok' button
1980
            @may be used for inputfield based zooming / panning
2017
            @may be used for inputfield based zooming / panning
-
 
2018
            @use command xlabel / ylabel to change text from xmin to 'xlabel'min etc
1981
            @note:the input value will not be checked on validity
2019
            @note:the input value will not be checked on validity
1982
        */
2020
        */
1983
            add_setlimits(js_include_file,canvas_root_id);
2021
            add_setlimits(js_include_file,canvas_root_id);
1984
            /* add_setlimits provides 'fprintf(js_include_file,"use_pan_and_zoom = 1;");' */
2022
            /* add_setlimits provides 'fprintf(js_include_file,"use_pan_and_zoom = 1;");' */
1985
            use_pan_and_zoom = TRUE;
2023
            use_pan_and_zoom = TRUE;
Line 3295... Line 3333...
3295
  }\
3333
  }\
3296
 };\
3334
 };\
3297
};\
3335
};\
3298
this.read_canvas = read_canvas;\n\
3336
this.read_canvas = read_canvas;\n\
3299
<!-- end function 4 read_canvas() -->");
3337
<!-- end function 4 read_canvas() -->");
3300
    break;
3338
    break;
3301
    /*
3339
    /*
3302
        attention: we reset userdraw_x / userdraw_y  : because  userdraw_x = [][] userdraw_y = [][]
3340
        attention: we reset userdraw_x / userdraw_y  : because  userdraw_x = [][] userdraw_y = [][]
3303
        used for userdraw multiple paths
3341
        used for userdraw multiple paths
3304
    */
3342
    */
3305
    case 5: fprintf(js_include_file,"\
3343
    case 5: fprintf(js_include_file,"\
3306
\n<!-- begin function 5 read_canvas() -->\n\
3344
\n<!-- begin function 5 read_canvas() -->\n\
3307
function read_canvas(){\
3345
function read_canvas(){\
3308
 var p = 0;\
3346
 var p = 0;\
3309
 var reply = \"\";\
3347
 var reply = \"\";\
3310
 for(p = 0; p < userdraw_x.length;p++){\
3348
 for(p = 0; p < userdraw_x.length;p++){\
3311
  if(userdraw_x[p] != null ){\
3349
  if(userdraw_x[p] != null ){\
3312
   reply = reply + userdraw_x[p]+\"\\n\"+userdraw_y[p]+\"\\n\";\
3350
   reply = reply + userdraw_x[p]+\"\\n\"+userdraw_y[p]+\"\\n\";\
3313
  };\
3351
  };\
3314
 };\
3352
 };\
3315
 if(p == 0){alert(\"nothing drawn...\");return;};\
3353
 if(p == 0){alert(\"nothing drawn...\");return;};\
3316
 userdraw_x = [];userdraw_y = [];\
3354
 userdraw_x = [];userdraw_y = [];\
3317
 if( document.getElementById(\"canvas_input0\") || document.getElementById(\"mathml0\") ){\
3355
 if( document.getElementById(\"canvas_input0\") || document.getElementById(\"mathml0\") ){\
3318
  var p = 0;var input_reply = new Array();\
3356
  var p = 0;var input_reply = new Array();\
3319
  if( document.getElementById(\"canvas_input0\")){\
3357
  if( document.getElementById(\"canvas_input0\")){\
3320
   var t = 0;\
3358
   var t = 0;\
3321
   while(document.getElementById(\"canvas_input\"+t)){\
3359
   while(document.getElementById(\"canvas_input\"+t)){\
3322
    if( ! document.getElementById(\"canvas_input\"+t).getAttribute(\"readonly\")){\
3360
    if( ! document.getElementById(\"canvas_input\"+t).getAttribute(\"readonly\")){\
3323
     input_reply[p] = document.getElementById(\"canvas_input\"+t).value;\
3361
     input_reply[p] = document.getElementById(\"canvas_input\"+t).value;\
3324
     p++;\
3362
     p++;\
3325
    };\
3363
    };\
3326
    t++;\
3364
    t++;\
3327
   };\
3365
   };\
3328
  };\
3366
  };\
3329
  if( typeof userdraw_text != 'undefined' ){\
3367
  if( typeof userdraw_text != 'undefined' ){\
3330
   return reply +\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3368
   return reply +\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3331
  }\
3369
  }\
3332
  else\
3370
  else\
3333
  {\
3371
  {\
Line 3340... Line 3378...
3340
   return reply+\"\\n\"+userdraw_text;\
3378
   return reply+\"\\n\"+userdraw_text;\
3341
  }\
3379
  }\
3342
  else\
3380
  else\
3343
  {\
3381
  {\
3344
   return reply;\
3382
   return reply;\
3345
  }\
3383
  }\
3346
 };\
3384
 };\
3347
};\
3385
};\
3348
this.read_canvas = rdad_canvas;\n\
3386
this.read_canvas = rdad_canvas;\n\
3349
<!-- end function 5 read_canvas() -->");
3387
<!-- end function 5 read_canvas() -->");
3350
    break;
3388
    break;
3351
    /*
3389
    /*
Line 3370... Line 3408...
3370
   reply = reply + tmp_x + \"\\n\" + tmp_y +\"\\n\";\
3408
   reply = reply + tmp_x + \"\\n\" + tmp_y +\"\\n\";\
3371
  };\
3409
  };\
3372
 };\
3410
 };\
3373
 if(p == 0){alert(\"nothing drawn...\");return;};\
3411
 if(p == 0){alert(\"nothing drawn...\");return;};\
3374
 userdraw_x = [];userdraw_y = [];\
3412
 userdraw_x = [];userdraw_y = [];\
3375
 if( document.getElementById(\"canvas_input0\") ){\
3413
 if( document.getElementById(\"canvas_input0\") ){\
3376
  var p = 0;var input_reply = new Array();\
3414
  var p = 0;var input_reply = new Array();\
3377
  if( document.getElementById(\"canvas_input0\")){\
3415
  if( document.getElementById(\"canvas_input0\")){\
3378
   var t = 0;\
3416
   var t = 0;\
3379
   while(document.getElementById(\"canvas_input\"+t)){\
3417
   while(document.getElementById(\"canvas_input\"+t)){\
3380
    if( ! document.getElementById(\"canvas_input\"+t).getAttribute(\"readonly\")){\
3418
    if( ! document.getElementById(\"canvas_input\"+t).getAttribute(\"readonly\")){\
3381
     input_reply[p] = document.getElementById(\"canvas_input\"+t).value;\
3419
     input_reply[p] = document.getElementById(\"canvas_input\"+t).value;\
3382
     p++;\
3420
     p++;\
3383
    };\
3421
    };\
3384
    t++;\
3422
    t++;\
3385
   };\
3423
   };\
3386
  };\
3424
  };\
3387
  if( typeof userdraw_text != 'undefined' ){\
3425
  if( typeof userdraw_text != 'undefined' ){\
3388
   return reply +\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3426
   return reply +\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3389
  }\
3427
  }\
3390
  else\
3428
  else\
3391
  {\
3429
  {\
3392
   return reply +\"\\n\"+input_reply;\
3430
   return reply +\"\\n\"+input_reply;\
3393
  }\
3431
  }\
3394
 }\
3432
 }\
3395
 else\
3433
 else\
3396
 {\
3434
 {\
3397
  if( typeof userdraw_text != 'undefined' ){\
3435
  if( typeof userdraw_text != 'undefined' ){\
3398
   return reply +\"\\n\"+userdraw_text;\
3436
   return reply +\"\\n\"+userdraw_text;\
3399
  }\
3437
  }\
3400
  else\
3438
  else\
3401
  {\
3439
  {\
3402
   return reply;\
3440
   return reply;\
3403
  }\
3441
  }\
3404
 };\
3442
 };\
3405
};\
3443
};\
3406
this.read_canvas = read_canvas;\n\
3444
this.read_canvas = read_canvas;\n\
3407
<!-- end function 6 read_canvas() -->");
3445
<!-- end function 6 read_canvas() -->");
3408
    break;
3446
    break;
3409
    case 7: fprintf(js_include_file,"\
3447
    case 7: fprintf(js_include_file,"\
3410
\n<!-- begin function 7 read_canvas() -->\n\
3448
\n<!-- begin function 7 read_canvas() -->\n\
3411
function read_canvas(){\
3449
function read_canvas(){\
3412
 var reply = new Array();\
3450
 var reply = new Array();\
3413
 var p = 0;\
3451
 var p = 0;\
3414
 while(userdraw_x[p]){\
3452
 while(userdraw_x[p]){\
3415
  reply[p] = userdraw_x[p] +\":\" + userdraw_y[p];\
3453
  reply[p] = userdraw_x[p] +\":\" + userdraw_y[p];\
3416
  p++;\
3454
  p++;\
3417
 };\
3455
 };\
Line 3428... Line 3466...
3428
    t++;\
3466
    t++;\
3429
   };\
3467
   };\
3430
  };\
3468
  };\
3431
  if( typeof userdraw_text != 'undefined' ){\
3469
  if( typeof userdraw_text != 'undefined' ){\
3432
   return reply+\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3470
   return reply+\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3433
  }\
3471
  }\
3434
  else\
3472
  else\
3435
  {\
3473
  {\
3436
   return reply+\"\\n\"+input_reply;\
3474
   return reply+\"\\n\"+input_reply;\
3437
  }\
3475
  }\
3438
 };\
3476
 };\
Line 3455... Line 3493...
3455
function read_canvas(){\
3493
function read_canvas(){\
3456
 var reply = new Array();\
3494
 var reply = new Array();\
3457
 var p = 0;\
3495
 var p = 0;\
3458
 while(userdraw_x[p]){\
3496
 while(userdraw_x[p]){\
3459
  reply[p] = px2x(userdraw_x[p]) +\":\" + px2y(userdraw_y[p]);\
3497
  reply[p] = px2x(userdraw_x[p]) +\":\" + px2y(userdraw_y[p]);\
3460
  p++;\
3498
  p++;\
3461
 };\
3499
 };\
3462
 if(p == 0){alert(\"nothing drawn...\");return;};\
3500
 if(p == 0){alert(\"nothing drawn...\");return;};\
3463
 if( document.getElementById(\"canvas_input0\") || document.getElementById(\"mathml0\") ){\
3501
 if( document.getElementById(\"canvas_input0\") || document.getElementById(\"mathml0\") ){\
3464
  var p = 0;var input_reply = new Array();\
3502
  var p = 0;var input_reply = new Array();\
3465
  if( document.getElementById(\"canvas_input0\")){\
3503
  if( document.getElementById(\"canvas_input0\")){\
3466
   var t = 0;\
3504
   var t = 0;\
3467
   while(document.getElementById(\"canvas_input\"+t)){\
3505
   while(document.getElementById(\"canvas_input\"+t)){\
3468
    if( ! document.getElementById(\"canvas_input\"+t).getAttribute(\"readonly\")){\
3506
    if( ! document.getElementById(\"canvas_input\"+t).getAttribute(\"readonly\")){\
3469
     input_reply[p] = document.getElementById(\"canvas_input\"+t).value;\
3507
     input_reply[p] = document.getElementById(\"canvas_input\"+t).value;\
3470
     p++;\
3508
     p++;\
3471
    };\
3509
    };\
3472
    t++;\
3510
    t++;\
3473
   };\
3511
   };\
3474
  };\
3512
  };\
3475
  if( typeof userdraw_text != 'undefined' ){\
3513
  if( typeof userdraw_text != 'undefined' ){\
3476
   return reply +\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3514
   return reply +\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3477
  }\
3515
  }\
3478
  else\
3516
  else\
3479
  {\
3517
  {\
3480
   return reply +\"\\n\"+input_reply;\
3518
   return reply +\"\\n\"+input_reply;\
3481
  }\
3519
  }\
3482
 }\
3520
 }\
3483
 else\
3521
 else\
3484
 {\
3522
 {\
3485
  if( typeof userdraw_text != 'undefined' ){\
3523
  if( typeof userdraw_text != 'undefined' ){\
3486
   return reply +\"\\n\"+userdraw_text;\
3524
   return reply +\"\\n\"+userdraw_text;\
3487
  }\
3525
  }\
3488
  else\
3526
  else\
3489
  {\
3527
  {\
3490
   return reply;\
3528
   return reply;\
3491
  }\
3529
  }\
Line 3543... Line 3581...
3543
function read_canvas(){\
3581
function read_canvas(){\
3544
 var reply = new Array();\
3582
 var reply = new Array();\
3545
 var p = 0;\
3583
 var p = 0;\
3546
 while(userdraw_x[p]){\
3584
 while(userdraw_x[p]){\
3547
  reply[p] = px2x(userdraw_x[p]) +\":\" + px2y(userdraw_y[p]) +\":\" + userdraw_radius[p];\
3585
  reply[p] = px2x(userdraw_x[p]) +\":\" + px2y(userdraw_y[p]) +\":\" + userdraw_radius[p];\
3548
  p++;\
3586
  p++;\
3549
 };\
3587
 };\
3550
 if(p == 0){alert(\"nothing drawn...\");return;};\
3588
 if(p == 0){alert(\"nothing drawn...\");return;};\
3551
 if( document.getElementById(\"canvas_input0\") ){\
3589
 if( document.getElementById(\"canvas_input0\") ){\
3552
  var p = 0;var input_reply = new Array();\
3590
  var p = 0;var input_reply = new Array();\
3553
  if( document.getElementById(\"canvas_input0\")){\
3591
  if( document.getElementById(\"canvas_input0\")){\
3554
   var t = 0;\
3592
   var t = 0;\
3555
   while(document.getElementById(\"canvas_input\"+t)){\
3593
   while(document.getElementById(\"canvas_input\"+t)){\
3556
    if( ! document.getElementById(\"canvas_input\"+t).getAttribute(\"readonly\")){\
3594
    if( ! document.getElementById(\"canvas_input\"+t).getAttribute(\"readonly\")){\
3557
     input_reply[p] = document.getElementById(\"canvas_input\"+t).value;\
3595
     input_reply[p] = document.getElementById(\"canvas_input\"+t).value;\
3558
     p++;\
3596
     p++;\
3559
    };\
3597
    };\
3560
    t++;\
3598
    t++;\
3561
   };\
3599
   };\
3562
  };\
3600
  };\
3563
  if( typeof userdraw_text != 'undefined' ){\
3601
  if( typeof userdraw_text != 'undefined' ){\
3564
   return reply +\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3602
   return reply +\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3565
  }\
3603
  }\
3566
  else\
3604
  else\
3567
  {\
3605
  {\
3568
   return reply +\"\\n\"+input_reply;\
3606
   return reply +\"\\n\"+input_reply;\
3569
  }\
3607
  }\
3570
 }\
3608
 }\
3571
 else\
3609
 else\
3572
 {\
3610
 {\
3573
  if( typeof userdraw_text != 'undefined' ){\
3611
  if( typeof userdraw_text != 'undefined' ){\
3574
   return reply +\"\\n\"+userdraw_text;\
3612
   return reply +\"\\n\"+userdraw_text;\
3575
  }\
3613
  }\
3576
  else\
3614
  else\
3577
  {\
3615
  {\
Line 3631... Line 3669...
3631
function read_canvas(){\
3669
function read_canvas(){\
3632
 var reply = \"\";\
3670
 var reply = \"\";\
3633
 var p = 0;\
3671
 var p = 0;\
3634
 for(p = 0; p< userdraw_x.lenght;p = p+2){\
3672
 for(p = 0; p< userdraw_x.lenght;p = p+2){\
3635
  if(userdraw_x[p] != null){\
3673
  if(userdraw_x[p] != null){\
3636
    reply = reply + userdraw_x[p] +\",\" + userdraw_y[p] +\",\" + userdraw_x[p+1] +\",\" + userdraw_y[p+1] +\"\\n\" ;\
3674
    reply = reply + userdraw_x[p] +\",\" + userdraw_y[p] +\",\" + userdraw_x[p+1] +\",\" + userdraw_y[p+1] +\"\\n\" ;\
3637
  };\
3675
  };\
3638
 };\
3676
 };\
3639
 if(p == 0){alert(\"nothing drawn...\");return;};\
3677
 if(p == 0){alert(\"nothing drawn...\");return;};\
3640
 if( document.getElementById(\"canvas_input0\") ){\
3678
 if( document.getElementById(\"canvas_input0\") ){\
3641
  var p = 0;var input_reply = new Array();\
3679
  var p = 0;var input_reply = new Array();\
3642
  if( document.getElementById(\"canvas_input0\")){\
3680
  if( document.getElementById(\"canvas_input0\")){\
3643
   var t = 0;\
3681
   var t = 0;\
3644
   while(document.getElementById(\"canvas_input\"+t)){\
3682
   while(document.getElementById(\"canvas_input\"+t)){\
3645
    if( ! document.getElementById(\"canvas_input\"+t).getAttribute(\"readonly\")){\
3683
    if( ! document.getElementById(\"canvas_input\"+t).getAttribute(\"readonly\")){\
3646
     input_reply[p] = document.getElementById(\"canvas_input\"+t).value;\
3684
     input_reply[p] = document.getElementById(\"canvas_input\"+t).value;\
3647
     p++;\
3685
     p++;\
3648
    };\
3686
    };\
3649
    t++;\
3687
    t++;\
3650
   };\
3688
   };\
3651
  };\
3689
  };\
3652
  if( typeof userdraw_text != 'undefined' ){\
3690
  if( typeof userdraw_text != 'undefined' ){\
3653
   return reply +\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3691
   return reply +\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3654
  }\
3692
  }\
3655
  else\
3693
  else\
3656
  {\
3694
  {\
3657
   return reply +\"\\n\"+input_reply;\
3695
   return reply +\"\\n\"+input_reply;\
3658
  }\
3696
  }\
3659
 }\
3697
 }\
3660
 else\
3698
 else\
3661
 {\
3699
 {\
3662
  if( typeof userdraw_text != 'undefined' ){\
3700
  if( typeof userdraw_text != 'undefined' ){\
3663
   return reply +\"\\n\"+userdraw_text\
3701
   return reply +\"\\n\"+userdraw_text\
3664
  }\
3702
  }\
3665
  else\
3703
  else\
3666
  {\
3704
  {\
3667
   return reply;\
3705
   return reply;\
3668
  }\
3706
  }\
3669
 };\
3707
 };\
3670
};\
3708
};\
3671
this.read_canvas = read_canvas;\n\
3709
this.read_canvas = read_canvas;\n\
3672
<!-- end function 12 read_canvas() -->");
3710
<!-- end function 12 read_canvas() -->");
3673
    break;
3711
    break;
3674
    case 13: fprintf(js_include_file,"\
3712
    case 13: fprintf(js_include_file,"\
3675
\n<!-- begin function 13 read_canvas() -->\n\
3713
\n<!-- begin function 13 read_canvas() -->\n\
3676
function read_canvas(){\
3714
function read_canvas(){\
3677
 var reply = new Array();\
3715
 var reply = new Array();\
3678
 var p = 0;var i = 0;\
3716
 var p = 0;var i = 0;\
3679
 while(userdraw_x[p]){\
3717
 while(userdraw_x[p]){\
3680
  reply[i] = px2x(userdraw_x[p]) +\":\" + px2y(userdraw_y[p]) +\":\" + px2x(userdraw_x[p+1]) +\":\" + px2y(userdraw_y[p+1]);\
3718
  reply[i] = px2x(userdraw_x[p]) +\":\" + px2y(userdraw_y[p]) +\":\" + px2x(userdraw_x[p+1]) +\":\" + px2y(userdraw_y[p+1]);\
3681
  p = p+2;i++;\
3719
  p = p+2;i++;\
3682
 };\
3720
 };\
3683
 if(p == 0){alert(\"nothing drawn...\");return;};\
3721
 if(p == 0){alert(\"nothing drawn...\");return;};\
3684
 if( document.getElementById(\"canvas_input0\") ){\
3722
 if( document.getElementById(\"canvas_input0\") ){\
Line 3693... Line 3731...
3693
    t++;\
3731
    t++;\
3694
   };\
3732
   };\
3695
  };\
3733
  };\
3696
  if( typeof userdraw_text != 'undefined' ){\
3734
  if( typeof userdraw_text != 'undefined' ){\
3697
   return reply +\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3735
   return reply +\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3698
  }\
3736
  }\
3699
  else\
3737
  else\
3700
  {\
3738
  {\
3701
   return reply +\"\\n\"+input_reply;\
3739
   return reply +\"\\n\"+input_reply;\
3702
  }\
3740
  }\
3703
 }\
3741
 }\
3704
 else\
3742
 else\
3705
 {\
3743
 {\
Line 3721... Line 3759...
3721
 var reply = new Array();\
3759
 var reply = new Array();\
3722
 var p = 0;var i = 0;\
3760
 var p = 0;var i = 0;\
3723
 while(userdraw_x[p]){\
3761
 while(userdraw_x[p]){\
3724
  reply[i] = userdraw_x[p] +\":\" + userdraw_y[p] +\":\" + userdraw_x[p+1] +\":\" + userdraw_y[p+1];\
3762
  reply[i] = userdraw_x[p] +\":\" + userdraw_y[p] +\":\" + userdraw_x[p+1] +\":\" + userdraw_y[p+1];\
3725
  p = p+2;i++;\
3763
  p = p+2;i++;\
3726
 };\
3764
 };\
3727
 if(p == 0){alert(\"nothing drawn...\");return;};\
3765
 if(p == 0){alert(\"nothing drawn...\");return;};\
3728
 if( document.getElementById(\"canvas_input0\") ){\
3766
 if( document.getElementById(\"canvas_input0\") ){\
3729
  var p = 0;var input_reply = new Array();\
3767
  var p = 0;var input_reply = new Array();\
3730
  if( document.getElementById(\"canvas_input0\")){\
3768
  if( document.getElementById(\"canvas_input0\")){\
3731
   var t = 0;\
3769
   var t = 0;\
3732
   while(document.getElementById(\"canvas_input\"+t)){\
3770
   while(document.getElementById(\"canvas_input\"+t)){\
3733
    if( ! document.getElementById(\"canvas_input\"+t).getAttribute(\"readonly\")){\
3771
    if( ! document.getElementById(\"canvas_input\"+t).getAttribute(\"readonly\")){\
3734
     input_reply[p] = document.getElementById(\"canvas_input\"+t).value;\
3772
     input_reply[p] = document.getElementById(\"canvas_input\"+t).value;\
3735
     p++;\
3773
     p++;\
3736
    };\
3774
    };\
3737
    t++;\
3775
    t++;\
3738
   };\
3776
   };\
3739
  };\
3777
  };\
3740
  if( typeof userdraw_text != 'undefined' ){\
3778
  if( typeof userdraw_text != 'undefined' ){\
3741
   return reply +\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3779
   return reply +\"\\n\"+input_reply+\"\\n\"+userdraw_text;\
3742
  }\
3780
  }\
3743
  else\
3781
  else\
3744
  {\
3782
  {\
3745
   return reply +\"\\n\"+input_reply;\
3783
   return reply +\"\\n\"+input_reply;\
3746
  }\
3784
  }\
3747
 }\
3785
 }\
3748
 else\
3786
 else\
Line 3759... Line 3797...
3759
 this.read_canvas = read_canvas;\n\
3797
 this.read_canvas = read_canvas;\n\
3760
<!-- end function 14 read_canvas() -->");
3798
<!-- end function 14 read_canvas() -->");
3761
    break;
3799
    break;
3762
    case 15: fprintf(js_include_file,"\
3800
    case 15: fprintf(js_include_file,"\
3763
\n<!-- begin function 15  read_canvas() -->\n\
3801
\n<!-- begin function 15  read_canvas() -->\n\
3764
function read_canvas(){\
3802
function read_canvas(){\
3765
 var input_reply = new Array();\
3803
 var input_reply = new Array();\
3766
 var p = 0;\
3804
 var p = 0;\
3767
 if( document.getElementById(\"canvas_input0\")){\
3805
 if( document.getElementById(\"canvas_input0\")){\
3768
  var t = 0;\
3806
  var t = 0;\
3769
  while(document.getElementById(\"canvas_input\"+t)){\
3807
  while(document.getElementById(\"canvas_input\"+t)){\
3770
   if( ! document.getElementById(\"canvas_input\"+t).getAttribute(\"readonly\")){\
3808
   if( ! document.getElementById(\"canvas_input\"+t).getAttribute(\"readonly\")){\
3771
    input_reply[p] = document.getElementById(\"canvas_input\"+t).value;\
3809
    input_reply[p] = document.getElementById(\"canvas_input\"+t).value;\
3772
    p++;\
3810
    p++;\
3773
   };\
3811
   };\
3774
   t++;\
3812
   t++;\
3775
  };\
3813
  };\
3776
 };\
3814
 };\
3777
 if( typeof userdraw_text != 'undefined' ){\
3815
 if( typeof userdraw_text != 'undefined' ){\
3778
   return input_reply +\"\\n\"+userdraw_text;\
3816
   return input_reply +\"\\n\"+userdraw_text;\
3779
 }\
3817
 }\
3780
 else\
3818
 else\
Line 3810... Line 3848...
3810
this.read_canvas = read_canvas;\n\
3848
this.read_canvas = read_canvas;\n\
3811
<!-- end function 17 read_canvas() -->");
3849
<!-- end function 17 read_canvas() -->");
3812
    break;
3850
    break;
3813
    case 18: fprintf(js_include_file,"\
3851
    case 18: fprintf(js_include_file,"\
3814
\n<!-- begin function 18 read_canvas() -->\n\
3852
\n<!-- begin function 18 read_canvas() -->\n\
3815
function read_canvas(){\
3853
function read_canvas(){\
3816
 var p = 0;\
3854
 var p = 0;\
3817
 var reply = new Array();\
3855
 var reply = new Array();\
3818
 var name;\
3856
 var name;\
3819
 var t = true;\
3857
 var t = true;\
3820
 while(t){\
3858
 while(t){\
3821
  try{ name = eval('clocks'+p);\
3859
  try{ name = eval('clocks'+p);\
3822
  reply[p] = parseInt((name.H+name.M/60+name.S/3600)%%12)+\":\"+parseInt((name.M + name.S/60)%%60)+\":\"+(name.S)%%60;p++}catch(e){t=false;};\
3860
  reply[p] = parseInt((name.H+name.M/60+name.S/3600)%%12)+\":\"+parseInt((name.M + name.S/60)%%60)+\":\"+(name.S)%%60;p++}catch(e){t=false;};\
Line 3983... Line 4021...
3983
   return reply_x+\"\\n\"+reply_y+\"\\n\"+userdraw_text;\
4021
   return reply_x+\"\\n\"+reply_y+\"\\n\"+userdraw_text;\
3984
  }\
4022
  }\
3985
  else\
4023
  else\
3986
  {\
4024
  {\
3987
   return reply_x+\"\\n\"+reply_y;\
4025
   return reply_x+\"\\n\"+reply_y;\
3988
  };\
4026
  };\
3989
 };\
4027
 };\
3990
};\
4028
};\
3991
this.read_canvas = read_canvas;\n\
4029
this.read_canvas = read_canvas;\n\
3992
<!-- end function 23 read_canvas() -->");
4030
<!-- end function 23 read_canvas() -->");
3993
    break;
4031
    break;
Line 6083... Line 6121...
6083
        *xsnaptogrid="xsnaptogrid",
6121
        *xsnaptogrid="xsnaptogrid",
6084
        *ysnaptogrid="ysnaptogrid",
6122
        *ysnaptogrid="ysnaptogrid",
6085
        *userinput_xy="userinput_xy",
6123
        *userinput_xy="userinput_xy",
6086
        *usertextarea_xy="usertextarea_xy",
6124
        *usertextarea_xy="usertextarea_xy",
6087
        *jsmath="jsmath",
6125
        *jsmath="jsmath",
6088
        *trace_jsmath="trace_jsmath",
6126
        *trace_jscurve="trace_jscurve",
6089
        *setlimits="setlimits",
6127
        *setlimits="setlimits",
-
 
6128
        *jscurve="jscurve",
-
 
6129
        *jsplot="jsplot",
6090
        *sgraph="sgraph";
6130
        *sgraph="sgraph";
6091
 
6131
 
6092
        while(((c = getc(infile)) != EOF)&&(c!='\n')&&(c!=',')&&(c!='=')&&(c!='\r')){
6132
        while(((c = getc(infile)) != EOF)&&(c!='\n')&&(c!=',')&&(c!='=')&&(c!='\r')){
6093
            if( i == 0 && (c == ' ' || c == '\t') ){
6133
            if( i == 0 && (c == ' ' || c == '\t') ){
6094
        continue; /* white spaces or tabs allowed before first command identifier */
6134
        continue; /* white spaces or tabs allowed before first command identifier */
Line 6722... Line 6762...
6722
        }
6762
        }
6723
        if( strcmp(input_type, jsmath) == 0 ){
6763
        if( strcmp(input_type, jsmath) == 0 ){
6724
        free(input_type);
6764
        free(input_type);
6725
        return JSMATH;
6765
        return JSMATH;
6726
        }
6766
        }
6727
        if( strcmp(input_type, trace_jsmath) == 0 ){
6767
        if( strcmp(input_type, trace_jscurve) == 0 ){
-
 
6768
        free(input_type);
-
 
6769
        return TRACE_JSCURVE;
-
 
6770
        }
-
 
6771
        if( strcmp(input_type, jscurve) == 0  ||  strcmp(input_type, jsplot) == 0 ){
6728
        free(input_type);
6772
        free(input_type);
6729
        return TRACE_JSMATH;
6773
        return JSCURVE;
6730
        }
6774
        }
6731
        if( strcmp(input_type, setlimits) == 0 ){
6775
        if( strcmp(input_type, setlimits) == 0 ){
6732
        free(input_type);
6776
        free(input_type);
6733
        return SETLIMITS;
6777
        return SETLIMITS;
6734
        }
6778
        }