PLplot  5.10.0
tclgen.c
Go to the documentation of this file.
00001 /*--------------------------------------------------------------------------*\
00002  * pl_setcontlabelformatCmd
00003  *
00004  * Processes pl_setcontlabelformat Tcl command.
00005 \*--------------------------------------------------------------------------*/
00006 
00007 static int
00008 pl_setcontlabelformatCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00009 {
00010     PLINT lexp;
00011     PLINT sigprec;
00012 
00013     pl_errcode = 0; errmsg[0] = '\0';
00014 
00015     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00016         Tcl_AppendResult( interp, "command syntax: \"",
00017                           "pl_setcontlabelformat lexp sigprec", "\"",
00018                           (char *) NULL);
00019         return TCL_ERROR;
00020     }
00021 
00022     if ( (!0 && 0 && (argc < (1 + 2 - 0))) ||
00023          (!0 && !0 && (argc != (2 + 1))) ||
00024          ( 0 && (argc != 1) && (argc != (2 + 1))) ) {
00025         Tcl_AppendResult( interp, "wrong # args: should be \"",
00026                           "pl_setcontlabelformat lexp sigprec", "\"",
00027                           (char *) NULL);
00028         return TCL_ERROR;
00029     }
00030 
00031     lexp = atoi(argv[1+0]);
00032     sigprec = atoi(argv[1+1]);
00033 
00034     pl_setcontlabelformat ( lexp, sigprec );
00035 
00036 
00037     if (pl_errcode != 0) {
00038         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00039         return TCL_ERROR;
00040     }
00041 
00042     plflush();
00043     return TCL_OK;
00044 }
00045 
00046 /*--------------------------------------------------------------------------*\
00047  * pl_setcontlabelparamCmd
00048  *
00049  * Processes pl_setcontlabelparam Tcl command.
00050 \*--------------------------------------------------------------------------*/
00051 
00052 static int
00053 pl_setcontlabelparamCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00054 {
00055     PLFLT offset;
00056     PLFLT size;
00057     PLFLT spacing;
00058     PLINT active;
00059 
00060     pl_errcode = 0; errmsg[0] = '\0';
00061 
00062     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00063         Tcl_AppendResult( interp, "command syntax: \"",
00064                           "pl_setcontlabelparam offset size spacing active", "\"",
00065                           (char *) NULL);
00066         return TCL_ERROR;
00067     }
00068 
00069     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
00070          (!0 && !0 && (argc != (4 + 1))) ||
00071          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
00072         Tcl_AppendResult( interp, "wrong # args: should be \"",
00073                           "pl_setcontlabelparam offset size spacing active", "\"",
00074                           (char *) NULL);
00075         return TCL_ERROR;
00076     }
00077 
00078     offset = atof(argv[1+0]);
00079     size = atof(argv[1+1]);
00080     spacing = atof(argv[1+2]);
00081     active = atoi(argv[1+3]);
00082 
00083     pl_setcontlabelparam ( offset, size, spacing, active );
00084 
00085 
00086     if (pl_errcode != 0) {
00087         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00088         return TCL_ERROR;
00089     }
00090 
00091     plflush();
00092     return TCL_OK;
00093 }
00094 
00095 /*--------------------------------------------------------------------------*\
00096  * pladvCmd
00097  *
00098  * Processes pladv Tcl command.
00099 \*--------------------------------------------------------------------------*/
00100 
00101 static int
00102 pladvCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00103 {
00104     PLINT page = 0;
00105 
00106     pl_errcode = 0; errmsg[0] = '\0';
00107 
00108     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00109         Tcl_AppendResult( interp, "command syntax: \"",
00110                           "pladv page", "\"",
00111                           (char *) NULL);
00112         return TCL_ERROR;
00113     }
00114 
00115     if ( (!0 && 1 && (argc < (1 + 1 - 1))) ||
00116          (!0 && !1 && (argc != (1 + 1))) ||
00117          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
00118         Tcl_AppendResult( interp, "wrong # args: should be \"",
00119                           "pladv page", "\"",
00120                           (char *) NULL);
00121         return TCL_ERROR;
00122     }
00123 
00124     if (argc > 0+1) {    
00125     page = atoi(argv[1+0]);
00126     }
00127 
00128     pladv ( page );
00129 
00130 
00131     if (pl_errcode != 0) {
00132         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00133         return TCL_ERROR;
00134     }
00135 
00136     plflush();
00137     return TCL_OK;
00138 }
00139 
00140 /*--------------------------------------------------------------------------*\
00141  * plarcCmd
00142  *
00143  * Processes plarc Tcl command.
00144 \*--------------------------------------------------------------------------*/
00145 
00146 static int
00147 plarcCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00148 {
00149     PLFLT x;
00150     PLFLT y;
00151     PLFLT a;
00152     PLFLT b;
00153     PLFLT angle1;
00154     PLFLT angle2;
00155     PLFLT rotate;
00156     PLINT fill;
00157 
00158     pl_errcode = 0; errmsg[0] = '\0';
00159 
00160     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00161         Tcl_AppendResult( interp, "command syntax: \"",
00162                           "plarc x y a b angle1 angle2 rotate fill", "\"",
00163                           (char *) NULL);
00164         return TCL_ERROR;
00165     }
00166 
00167     if ( (!0 && 0 && (argc < (1 + 8 - 0))) ||
00168          (!0 && !0 && (argc != (8 + 1))) ||
00169          ( 0 && (argc != 1) && (argc != (8 + 1))) ) {
00170         Tcl_AppendResult( interp, "wrong # args: should be \"",
00171                           "plarc x y a b angle1 angle2 rotate fill", "\"",
00172                           (char *) NULL);
00173         return TCL_ERROR;
00174     }
00175 
00176     x = atof(argv[1+0]);
00177     y = atof(argv[1+1]);
00178     a = atof(argv[1+2]);
00179     b = atof(argv[1+3]);
00180     angle1 = atof(argv[1+4]);
00181     angle2 = atof(argv[1+5]);
00182     rotate = atof(argv[1+6]);
00183     fill = atoi(argv[1+7]);
00184 
00185     plarc ( x, y, a, b, angle1, angle2, rotate, fill );
00186 
00187 
00188     if (pl_errcode != 0) {
00189         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00190         return TCL_ERROR;
00191     }
00192 
00193     plflush();
00194     return TCL_OK;
00195 }
00196 
00197 /*--------------------------------------------------------------------------*\
00198  * plaxesCmd
00199  *
00200  * Processes plaxes Tcl command.
00201 \*--------------------------------------------------------------------------*/
00202 
00203 static int
00204 plaxesCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00205 {
00206     PLFLT x0;
00207     PLFLT y0;
00208     const char *xopt;
00209     PLFLT xtick;
00210     PLINT nxsub;
00211     const char *yopt;
00212     PLFLT ytick;
00213     PLINT nysub;
00214 
00215     pl_errcode = 0; errmsg[0] = '\0';
00216 
00217     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00218         Tcl_AppendResult( interp, "command syntax: \"",
00219                           "plaxes x0 y0 xopt xtick nxsub yopt ytick nysub", "\"",
00220                           (char *) NULL);
00221         return TCL_ERROR;
00222     }
00223 
00224     if ( (!0 && 0 && (argc < (1 + 8 - 0))) ||
00225          (!0 && !0 && (argc != (8 + 1))) ||
00226          ( 0 && (argc != 1) && (argc != (8 + 1))) ) {
00227         Tcl_AppendResult( interp, "wrong # args: should be \"",
00228                           "plaxes x0 y0 xopt xtick nxsub yopt ytick nysub", "\"",
00229                           (char *) NULL);
00230         return TCL_ERROR;
00231     }
00232 
00233     x0 = atof(argv[1+0]);
00234     y0 = atof(argv[1+1]);
00235     xopt = argv[1+2];
00236     xtick = atof(argv[1+3]);
00237     nxsub = atoi(argv[1+4]);
00238     yopt = argv[1+5];
00239     ytick = atof(argv[1+6]);
00240     nysub = atoi(argv[1+7]);
00241 
00242     plaxes ( x0, y0, xopt, xtick, nxsub, yopt, ytick, nysub );
00243 
00244 
00245     if (pl_errcode != 0) {
00246         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00247         return TCL_ERROR;
00248     }
00249 
00250     plflush();
00251     return TCL_OK;
00252 }
00253 
00254 /*--------------------------------------------------------------------------*\
00255  * plbinCmd
00256  *
00257  * Processes plbin Tcl command.
00258 \*--------------------------------------------------------------------------*/
00259 
00260 static int
00261 plbinCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00262 {
00263     PLINT nbin;
00264     PLFLT *x;
00265     tclMatrix *matx;
00266     PLFLT *y;
00267     tclMatrix *maty;
00268     PLINT center;
00269 
00270     pl_errcode = 0; errmsg[0] = '\0';
00271 
00272     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00273         Tcl_AppendResult( interp, "command syntax: \"",
00274                           "plbin nbin x y center", "\"",
00275                           (char *) NULL);
00276         return TCL_ERROR;
00277     }
00278 
00279     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
00280          (!0 && !0 && (argc != (4 + 1))) ||
00281          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
00282         Tcl_AppendResult( interp, "wrong # args: should be \"",
00283                           "plbin nbin x y center", "\"",
00284                           (char *) NULL);
00285         return TCL_ERROR;
00286     }
00287 
00288     nbin = atoi(argv[1+0]);
00289     matx = Tcl_GetMatrixPtr( interp, argv[1+1] );
00290     if (matx == NULL) return TCL_ERROR;
00291     x = matx->fdata;
00292     maty = Tcl_GetMatrixPtr( interp, argv[1+2] );
00293     if (maty == NULL) return TCL_ERROR;
00294     y = maty->fdata;
00295     center = atoi(argv[1+3]);
00296 
00297     plbin ( nbin, x, y, center );
00298 
00299 
00300     if (pl_errcode != 0) {
00301         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00302         return TCL_ERROR;
00303     }
00304 
00305     plflush();
00306     return TCL_OK;
00307 }
00308 
00309 /*--------------------------------------------------------------------------*\
00310  * plbopCmd
00311  *
00312  * Processes plbop Tcl command.
00313 \*--------------------------------------------------------------------------*/
00314 
00315 static int
00316 plbopCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00317 {
00318 
00319     pl_errcode = 0; errmsg[0] = '\0';
00320 
00321     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00322         Tcl_AppendResult( interp, "command syntax: \"",
00323                           "plbop ", "\"",
00324                           (char *) NULL);
00325         return TCL_ERROR;
00326     }
00327 
00328     if ( (!0 && 0 && (argc < (1 + 0 - 0))) ||
00329          (!0 && !0 && (argc != (0 + 1))) ||
00330          ( 0 && (argc != 1) && (argc != (0 + 1))) ) {
00331         Tcl_AppendResult( interp, "wrong # args: should be \"",
00332                           "plbop ", "\"",
00333                           (char *) NULL);
00334         return TCL_ERROR;
00335     }
00336 
00337 
00338     plbop (  );
00339 
00340 
00341     if (pl_errcode != 0) {
00342         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00343         return TCL_ERROR;
00344     }
00345 
00346     plflush();
00347     return TCL_OK;
00348 }
00349 
00350 /*--------------------------------------------------------------------------*\
00351  * plboxCmd
00352  *
00353  * Processes plbox Tcl command.
00354 \*--------------------------------------------------------------------------*/
00355 
00356 static int
00357 plboxCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00358 {
00359     const char *xopt;
00360     PLFLT xtick;
00361     PLINT nxsub;
00362     const char *yopt;
00363     PLFLT ytick;
00364     PLINT nysub;
00365 
00366     pl_errcode = 0; errmsg[0] = '\0';
00367 
00368     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00369         Tcl_AppendResult( interp, "command syntax: \"",
00370                           "plbox xopt xtick nxsub yopt ytick nysub", "\"",
00371                           (char *) NULL);
00372         return TCL_ERROR;
00373     }
00374 
00375     if ( (!0 && 0 && (argc < (1 + 6 - 0))) ||
00376          (!0 && !0 && (argc != (6 + 1))) ||
00377          ( 0 && (argc != 1) && (argc != (6 + 1))) ) {
00378         Tcl_AppendResult( interp, "wrong # args: should be \"",
00379                           "plbox xopt xtick nxsub yopt ytick nysub", "\"",
00380                           (char *) NULL);
00381         return TCL_ERROR;
00382     }
00383 
00384     xopt = argv[1+0];
00385     xtick = atof(argv[1+1]);
00386     nxsub = atoi(argv[1+2]);
00387     yopt = argv[1+3];
00388     ytick = atof(argv[1+4]);
00389     nysub = atoi(argv[1+5]);
00390 
00391     plbox ( xopt, xtick, nxsub, yopt, ytick, nysub );
00392 
00393 
00394     if (pl_errcode != 0) {
00395         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00396         return TCL_ERROR;
00397     }
00398 
00399     plflush();
00400     return TCL_OK;
00401 }
00402 
00403 /*--------------------------------------------------------------------------*\
00404  * plbox3Cmd
00405  *
00406  * Processes plbox3 Tcl command.
00407 \*--------------------------------------------------------------------------*/
00408 
00409 static int
00410 plbox3Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00411 {
00412     const char *xopt;
00413     const char *xlabel;
00414     PLFLT xtick;
00415     PLINT nsubx;
00416     const char *yopt;
00417     const char *ylabel;
00418     PLFLT ytick;
00419     PLINT nsuby;
00420     const char *zopt;
00421     const char *zlabel;
00422     PLFLT ztick;
00423     PLINT nsubz;
00424 
00425     pl_errcode = 0; errmsg[0] = '\0';
00426 
00427     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00428         Tcl_AppendResult( interp, "command syntax: \"",
00429                           "plbox3 xopt xlabel xtick nsubx yopt ylabel ytick nsuby zopt zlabel ztick nsubz", "\"",
00430                           (char *) NULL);
00431         return TCL_ERROR;
00432     }
00433 
00434     if ( (!0 && 0 && (argc < (1 + 12 - 0))) ||
00435          (!0 && !0 && (argc != (12 + 1))) ||
00436          ( 0 && (argc != 1) && (argc != (12 + 1))) ) {
00437         Tcl_AppendResult( interp, "wrong # args: should be \"",
00438                           "plbox3 xopt xlabel xtick nsubx yopt ylabel ytick nsuby zopt zlabel ztick nsubz", "\"",
00439                           (char *) NULL);
00440         return TCL_ERROR;
00441     }
00442 
00443     xopt = argv[1+0];
00444     xlabel = argv[1+1];
00445     xtick = atof(argv[1+2]);
00446     nsubx = atoi(argv[1+3]);
00447     yopt = argv[1+4];
00448     ylabel = argv[1+5];
00449     ytick = atof(argv[1+6]);
00450     nsuby = atoi(argv[1+7]);
00451     zopt = argv[1+8];
00452     zlabel = argv[1+9];
00453     ztick = atof(argv[1+10]);
00454     nsubz = atoi(argv[1+11]);
00455 
00456     plbox3 ( xopt, xlabel, xtick, nsubx, yopt, ylabel, ytick, nsuby, zopt, zlabel, ztick, nsubz );
00457 
00458 
00459     if (pl_errcode != 0) {
00460         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00461         return TCL_ERROR;
00462     }
00463 
00464     plflush();
00465     return TCL_OK;
00466 }
00467 
00468 /*--------------------------------------------------------------------------*\
00469  * plbtimeCmd
00470  *
00471  * Processes plbtime Tcl command.
00472 \*--------------------------------------------------------------------------*/
00473 
00474 static int
00475 plbtimeCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00476 {
00477     PLINT year;
00478     PLINT month;
00479     PLINT day;
00480     PLINT hour;
00481     PLINT min;
00482     PLFLT sec;
00483     PLFLT ctime;
00484 
00485     pl_errcode = 0; errmsg[0] = '\0';
00486 
00487     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00488         Tcl_AppendResult( interp, "command syntax: \"",
00489                           "plbtime ?year month day hour min sec ctime?", "\"",
00490                           (char *) NULL);
00491         return TCL_ERROR;
00492     }
00493 
00494     if ( (!1 && 0 && (argc < (1 + 7 - 0))) ||
00495          (!1 && !0 && (argc != (7 + 1))) ||
00496          ( 1 && (argc != 1) && (argc != (7 + 1))) ) {
00497         Tcl_AppendResult( interp, "wrong # args: should be \"",
00498                           "plbtime ?year month day hour min sec ctime?", "\"",
00499                           (char *) NULL);
00500         return TCL_ERROR;
00501     }
00502 
00503 /* year is for output. */
00504 /* month is for output. */
00505 /* day is for output. */
00506 /* hour is for output. */
00507 /* min is for output. */
00508 /* sec is for output. */
00509     ctime = atof(argv[1+6]);
00510 
00511     plbtime ( &year, &month, &day, &hour, &min, &sec, ctime );
00512 
00513     sprintf( buf, "%d", year );
00514     if (argc > 1)
00515         Tcl_SetVar( interp, argv[1+0], buf, 0 );
00516     else
00517         Tcl_AppendResult( interp, buf, (char *) NULL );
00518     if (argc == 1)
00519         Tcl_AppendResult( interp, " ", (char *) NULL );
00520     sprintf( buf, "%d", month );
00521     if (argc > 1)
00522         Tcl_SetVar( interp, argv[1+1], buf, 0 );
00523     else
00524         Tcl_AppendResult( interp, buf, (char *) NULL );
00525     if (argc == 1)
00526         Tcl_AppendResult( interp, " ", (char *) NULL );
00527     sprintf( buf, "%d", day );
00528     if (argc > 1)
00529         Tcl_SetVar( interp, argv[1+2], buf, 0 );
00530     else
00531         Tcl_AppendResult( interp, buf, (char *) NULL );
00532     if (argc == 1)
00533         Tcl_AppendResult( interp, " ", (char *) NULL );
00534     sprintf( buf, "%d", hour );
00535     if (argc > 1)
00536         Tcl_SetVar( interp, argv[1+3], buf, 0 );
00537     else
00538         Tcl_AppendResult( interp, buf, (char *) NULL );
00539     if (argc == 1)
00540         Tcl_AppendResult( interp, " ", (char *) NULL );
00541     sprintf( buf, "%d", min );
00542     if (argc > 1)
00543         Tcl_SetVar( interp, argv[1+4], buf, 0 );
00544     else
00545         Tcl_AppendResult( interp, buf, (char *) NULL );
00546     if (argc == 1)
00547         Tcl_AppendResult( interp, " ", (char *) NULL );
00548     Tcl_PrintDouble( interp, sec, buf );
00549     if (argc > 1)
00550         Tcl_SetVar( interp, argv[1+5], buf, 0 );
00551     else
00552         Tcl_AppendResult( interp, buf, (char *) NULL );
00553 
00554     if (pl_errcode != 0) {
00555         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00556         return TCL_ERROR;
00557     }
00558 
00559     plflush();
00560     return TCL_OK;
00561 }
00562 
00563 /*--------------------------------------------------------------------------*\
00564  * plcalc_worldCmd
00565  *
00566  * Processes plcalc_world Tcl command.
00567 \*--------------------------------------------------------------------------*/
00568 
00569 static int
00570 plcalc_worldCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00571 {
00572     PLFLT rx;
00573     PLFLT ry;
00574     PLFLT wx;
00575     PLFLT wy;
00576     PLINT window;
00577 
00578     pl_errcode = 0; errmsg[0] = '\0';
00579 
00580     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00581         Tcl_AppendResult( interp, "command syntax: \"",
00582                           "plcalc_world ?rx ry wx wy window?", "\"",
00583                           (char *) NULL);
00584         return TCL_ERROR;
00585     }
00586 
00587     if ( (!1 && 0 && (argc < (1 + 5 - 0))) ||
00588          (!1 && !0 && (argc != (5 + 1))) ||
00589          ( 1 && (argc != 1) && (argc != (5 + 1))) ) {
00590         Tcl_AppendResult( interp, "wrong # args: should be \"",
00591                           "plcalc_world ?rx ry wx wy window?", "\"",
00592                           (char *) NULL);
00593         return TCL_ERROR;
00594     }
00595 
00596     rx = atof(argv[1+0]);
00597     ry = atof(argv[1+1]);
00598 /* wx is for output. */
00599 /* wy is for output. */
00600 /* window is for output. */
00601 
00602     plcalc_world ( rx, ry, &wx, &wy, &window );
00603 
00604     if (argc == 1)
00605         Tcl_AppendResult( interp, " ", (char *) NULL );
00606     Tcl_PrintDouble( interp, wx, buf );
00607     if (argc > 1)
00608         Tcl_SetVar( interp, argv[1+2], buf, 0 );
00609     else
00610         Tcl_AppendResult( interp, buf, (char *) NULL );
00611     if (argc == 1)
00612         Tcl_AppendResult( interp, " ", (char *) NULL );
00613     Tcl_PrintDouble( interp, wy, buf );
00614     if (argc > 1)
00615         Tcl_SetVar( interp, argv[1+3], buf, 0 );
00616     else
00617         Tcl_AppendResult( interp, buf, (char *) NULL );
00618     if (argc == 1)
00619         Tcl_AppendResult( interp, " ", (char *) NULL );
00620     sprintf( buf, "%d", window );
00621     if (argc > 1)
00622         Tcl_SetVar( interp, argv[1+4], buf, 0 );
00623     else
00624         Tcl_AppendResult( interp, buf, (char *) NULL );
00625 
00626     if (pl_errcode != 0) {
00627         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00628         return TCL_ERROR;
00629     }
00630 
00631     plflush();
00632     return TCL_OK;
00633 }
00634 
00635 /*--------------------------------------------------------------------------*\
00636  * plclearCmd
00637  *
00638  * Processes plclear Tcl command.
00639 \*--------------------------------------------------------------------------*/
00640 
00641 static int
00642 plclearCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00643 {
00644 
00645     pl_errcode = 0; errmsg[0] = '\0';
00646 
00647     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00648         Tcl_AppendResult( interp, "command syntax: \"",
00649                           "plclear ", "\"",
00650                           (char *) NULL);
00651         return TCL_ERROR;
00652     }
00653 
00654     if ( (!0 && 0 && (argc < (1 + 0 - 0))) ||
00655          (!0 && !0 && (argc != (0 + 1))) ||
00656          ( 0 && (argc != 1) && (argc != (0 + 1))) ) {
00657         Tcl_AppendResult( interp, "wrong # args: should be \"",
00658                           "plclear ", "\"",
00659                           (char *) NULL);
00660         return TCL_ERROR;
00661     }
00662 
00663 
00664     plclear (  );
00665 
00666 
00667     if (pl_errcode != 0) {
00668         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00669         return TCL_ERROR;
00670     }
00671 
00672     plflush();
00673     return TCL_OK;
00674 }
00675 
00676 /*--------------------------------------------------------------------------*\
00677  * plcol0Cmd
00678  *
00679  * Processes plcol0 Tcl command.
00680 \*--------------------------------------------------------------------------*/
00681 
00682 static int
00683 plcol0Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00684 {
00685     PLINT icol0;
00686 
00687     pl_errcode = 0; errmsg[0] = '\0';
00688 
00689     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00690         Tcl_AppendResult( interp, "command syntax: \"",
00691                           "plcol0 icol0", "\"",
00692                           (char *) NULL);
00693         return TCL_ERROR;
00694     }
00695 
00696     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
00697          (!0 && !0 && (argc != (1 + 1))) ||
00698          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
00699         Tcl_AppendResult( interp, "wrong # args: should be \"",
00700                           "plcol0 icol0", "\"",
00701                           (char *) NULL);
00702         return TCL_ERROR;
00703     }
00704 
00705     icol0 = atoi(argv[1+0]);
00706 
00707     plcol0 ( icol0 );
00708 
00709 
00710     if (pl_errcode != 0) {
00711         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00712         return TCL_ERROR;
00713     }
00714 
00715     plflush();
00716     return TCL_OK;
00717 }
00718 
00719 /*--------------------------------------------------------------------------*\
00720  * plcol1Cmd
00721  *
00722  * Processes plcol1 Tcl command.
00723 \*--------------------------------------------------------------------------*/
00724 
00725 static int
00726 plcol1Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00727 {
00728     PLFLT col1;
00729 
00730     pl_errcode = 0; errmsg[0] = '\0';
00731 
00732     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00733         Tcl_AppendResult( interp, "command syntax: \"",
00734                           "plcol1 col1", "\"",
00735                           (char *) NULL);
00736         return TCL_ERROR;
00737     }
00738 
00739     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
00740          (!0 && !0 && (argc != (1 + 1))) ||
00741          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
00742         Tcl_AppendResult( interp, "wrong # args: should be \"",
00743                           "plcol1 col1", "\"",
00744                           (char *) NULL);
00745         return TCL_ERROR;
00746     }
00747 
00748     col1 = atof(argv[1+0]);
00749 
00750     plcol1 ( col1 );
00751 
00752 
00753     if (pl_errcode != 0) {
00754         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00755         return TCL_ERROR;
00756     }
00757 
00758     plflush();
00759     return TCL_OK;
00760 }
00761 
00762 /*--------------------------------------------------------------------------*\
00763  * plconfigtimeCmd
00764  *
00765  * Processes plconfigtime Tcl command.
00766 \*--------------------------------------------------------------------------*/
00767 
00768 static int
00769 plconfigtimeCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00770 {
00771     PLFLT scale;
00772     PLFLT offset1;
00773     PLFLT offset2;
00774     PLINT ccontrol;
00775     PLINT ifbtime_offset;
00776     PLINT year;
00777     PLINT month;
00778     PLINT day;
00779     PLINT hour;
00780     PLINT min;
00781     PLFLT sec;
00782 
00783     pl_errcode = 0; errmsg[0] = '\0';
00784 
00785     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00786         Tcl_AppendResult( interp, "command syntax: \"",
00787                           "plconfigtime scale offset1 offset2 ccontrol ifbtime_offset year month day hour min sec", "\"",
00788                           (char *) NULL);
00789         return TCL_ERROR;
00790     }
00791 
00792     if ( (!0 && 0 && (argc < (1 + 11 - 0))) ||
00793          (!0 && !0 && (argc != (11 + 1))) ||
00794          ( 0 && (argc != 1) && (argc != (11 + 1))) ) {
00795         Tcl_AppendResult( interp, "wrong # args: should be \"",
00796                           "plconfigtime scale offset1 offset2 ccontrol ifbtime_offset year month day hour min sec", "\"",
00797                           (char *) NULL);
00798         return TCL_ERROR;
00799     }
00800 
00801     scale = atof(argv[1+0]);
00802     offset1 = atof(argv[1+1]);
00803     offset2 = atof(argv[1+2]);
00804     ccontrol = atoi(argv[1+3]);
00805     ifbtime_offset = atoi(argv[1+4]);
00806     year = atoi(argv[1+5]);
00807     month = atoi(argv[1+6]);
00808     day = atoi(argv[1+7]);
00809     hour = atoi(argv[1+8]);
00810     min = atoi(argv[1+9]);
00811     sec = atof(argv[1+10]);
00812 
00813     plconfigtime ( scale, offset1, offset2, ccontrol, ifbtime_offset, year, month, day, hour, min, sec );
00814 
00815 
00816     if (pl_errcode != 0) {
00817         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00818         return TCL_ERROR;
00819     }
00820 
00821     plflush();
00822     return TCL_OK;
00823 }
00824 
00825 /*--------------------------------------------------------------------------*\
00826  * plcpstrmCmd
00827  *
00828  * Processes plcpstrm Tcl command.
00829 \*--------------------------------------------------------------------------*/
00830 
00831 static int
00832 plcpstrmCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00833 {
00834     PLINT iplsr;
00835     PLINT flags;
00836 
00837     pl_errcode = 0; errmsg[0] = '\0';
00838 
00839     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00840         Tcl_AppendResult( interp, "command syntax: \"",
00841                           "plcpstrm iplsr flags", "\"",
00842                           (char *) NULL);
00843         return TCL_ERROR;
00844     }
00845 
00846     if ( (!0 && 0 && (argc < (1 + 2 - 0))) ||
00847          (!0 && !0 && (argc != (2 + 1))) ||
00848          ( 0 && (argc != 1) && (argc != (2 + 1))) ) {
00849         Tcl_AppendResult( interp, "wrong # args: should be \"",
00850                           "plcpstrm iplsr flags", "\"",
00851                           (char *) NULL);
00852         return TCL_ERROR;
00853     }
00854 
00855     iplsr = atoi(argv[1+0]);
00856     flags = atoi(argv[1+1]);
00857 
00858     plcpstrm ( iplsr, flags );
00859 
00860 
00861     if (pl_errcode != 0) {
00862         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00863         return TCL_ERROR;
00864     }
00865 
00866     plflush();
00867     return TCL_OK;
00868 }
00869 
00870 /*--------------------------------------------------------------------------*\
00871  * plctimeCmd
00872  *
00873  * Processes plctime Tcl command.
00874 \*--------------------------------------------------------------------------*/
00875 
00876 static int
00877 plctimeCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00878 {
00879     PLINT year;
00880     PLINT month;
00881     PLINT day;
00882     PLINT hour;
00883     PLINT min;
00884     PLFLT sec;
00885     PLFLT ctime;
00886 
00887     pl_errcode = 0; errmsg[0] = '\0';
00888 
00889     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00890         Tcl_AppendResult( interp, "command syntax: \"",
00891                           "plctime ?year month day hour min sec ctime?", "\"",
00892                           (char *) NULL);
00893         return TCL_ERROR;
00894     }
00895 
00896     if ( (!1 && 0 && (argc < (1 + 7 - 0))) ||
00897          (!1 && !0 && (argc != (7 + 1))) ||
00898          ( 1 && (argc != 1) && (argc != (7 + 1))) ) {
00899         Tcl_AppendResult( interp, "wrong # args: should be \"",
00900                           "plctime ?year month day hour min sec ctime?", "\"",
00901                           (char *) NULL);
00902         return TCL_ERROR;
00903     }
00904 
00905     year = atoi(argv[1+0]);
00906     month = atoi(argv[1+1]);
00907     day = atoi(argv[1+2]);
00908     hour = atoi(argv[1+3]);
00909     min = atoi(argv[1+4]);
00910     sec = atof(argv[1+5]);
00911 /* ctime is for output. */
00912 
00913     plctime ( year, month, day, hour, min, sec, &ctime );
00914 
00915     if (argc == 1)
00916         Tcl_AppendResult( interp, " ", (char *) NULL );
00917     Tcl_PrintDouble( interp, ctime, buf );
00918     if (argc > 1)
00919         Tcl_SetVar( interp, argv[1+6], buf, 0 );
00920     else
00921         Tcl_AppendResult( interp, buf, (char *) NULL );
00922 
00923     if (pl_errcode != 0) {
00924         Tcl_AppendResult(interp, errmsg, (char *) NULL);
00925         return TCL_ERROR;
00926     }
00927 
00928     plflush();
00929     return TCL_OK;
00930 }
00931 
00932 /*--------------------------------------------------------------------------*\
00933  * pldid2pcCmd
00934  *
00935  * Processes pldid2pc Tcl command.
00936 \*--------------------------------------------------------------------------*/
00937 
00938 static int
00939 pldid2pcCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
00940 {
00941     PLFLT xmin;
00942     PLFLT ymin;
00943     PLFLT xmax;
00944     PLFLT ymax;
00945 
00946     pl_errcode = 0; errmsg[0] = '\0';
00947 
00948     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
00949         Tcl_AppendResult( interp, "command syntax: \"",
00950                           "pldid2pc ?xmin ymin xmax ymax?", "\"",
00951                           (char *) NULL);
00952         return TCL_ERROR;
00953     }
00954 
00955     if ( (!1 && 0 && (argc < (1 + 4 - 0))) ||
00956          (!1 && !0 && (argc != (4 + 1))) ||
00957          ( 1 && (argc != 1) && (argc != (4 + 1))) ) {
00958         Tcl_AppendResult( interp, "wrong # args: should be \"",
00959                           "pldid2pc ?xmin ymin xmax ymax?", "\"",
00960                           (char *) NULL);
00961         return TCL_ERROR;
00962     }
00963 
00964 /* xmin is for output. */
00965 /* ymin is for output. */
00966 /* xmax is for output. */
00967 /* ymax is for output. */
00968 
00969     pldid2pc ( &xmin, &ymin, &xmax, &ymax );
00970 
00971     Tcl_PrintDouble( interp, xmin, buf );
00972     if (argc > 1)
00973         Tcl_SetVar( interp, argv[1+0], buf, 0 );
00974     else
00975         Tcl_AppendResult( interp, buf, (char *) NULL );
00976     if (argc == 1)
00977         Tcl_AppendResult( interp, " ", (char *) NULL );
00978     Tcl_PrintDouble( interp, ymin, buf );
00979     if (argc > 1)
00980         Tcl_SetVar( interp, argv[1+1], buf, 0 );
00981     else
00982         Tcl_AppendResult( interp, buf, (char *) NULL );
00983     if (argc == 1)
00984         Tcl_AppendResult( interp, " ", (char *) NULL );
00985     Tcl_PrintDouble( interp, xmax, buf );
00986     if (argc > 1)
00987         Tcl_SetVar( interp, argv[1+2], buf, 0 );
00988     else
00989         Tcl_AppendResult( interp, buf, (char *) NULL );
00990     if (argc == 1)
00991         Tcl_AppendResult( interp, " ", (char *) NULL );
00992     Tcl_PrintDouble( interp, ymax, buf );
00993     if (argc > 1)
00994         Tcl_SetVar( interp, argv[1+3], buf, 0 );
00995     else
00996         Tcl_AppendResult( interp, buf, (char *) NULL );
00997 
00998     if (pl_errcode != 0) {
00999         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01000         return TCL_ERROR;
01001     }
01002 
01003     plflush();
01004     return TCL_OK;
01005 }
01006 
01007 /*--------------------------------------------------------------------------*\
01008  * pldip2dcCmd
01009  *
01010  * Processes pldip2dc Tcl command.
01011 \*--------------------------------------------------------------------------*/
01012 
01013 static int
01014 pldip2dcCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01015 {
01016     PLFLT xmin;
01017     PLFLT ymin;
01018     PLFLT xmax;
01019     PLFLT ymax;
01020 
01021     pl_errcode = 0; errmsg[0] = '\0';
01022 
01023     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01024         Tcl_AppendResult( interp, "command syntax: \"",
01025                           "pldip2dc ?xmin ymin xmax ymax?", "\"",
01026                           (char *) NULL);
01027         return TCL_ERROR;
01028     }
01029 
01030     if ( (!1 && 0 && (argc < (1 + 4 - 0))) ||
01031          (!1 && !0 && (argc != (4 + 1))) ||
01032          ( 1 && (argc != 1) && (argc != (4 + 1))) ) {
01033         Tcl_AppendResult( interp, "wrong # args: should be \"",
01034                           "pldip2dc ?xmin ymin xmax ymax?", "\"",
01035                           (char *) NULL);
01036         return TCL_ERROR;
01037     }
01038 
01039 /* xmin is for output. */
01040 /* ymin is for output. */
01041 /* xmax is for output. */
01042 /* ymax is for output. */
01043 
01044     pldip2dc ( &xmin, &ymin, &xmax, &ymax );
01045 
01046     Tcl_PrintDouble( interp, xmin, buf );
01047     if (argc > 1)
01048         Tcl_SetVar( interp, argv[1+0], buf, 0 );
01049     else
01050         Tcl_AppendResult( interp, buf, (char *) NULL );
01051     if (argc == 1)
01052         Tcl_AppendResult( interp, " ", (char *) NULL );
01053     Tcl_PrintDouble( interp, ymin, buf );
01054     if (argc > 1)
01055         Tcl_SetVar( interp, argv[1+1], buf, 0 );
01056     else
01057         Tcl_AppendResult( interp, buf, (char *) NULL );
01058     if (argc == 1)
01059         Tcl_AppendResult( interp, " ", (char *) NULL );
01060     Tcl_PrintDouble( interp, xmax, buf );
01061     if (argc > 1)
01062         Tcl_SetVar( interp, argv[1+2], buf, 0 );
01063     else
01064         Tcl_AppendResult( interp, buf, (char *) NULL );
01065     if (argc == 1)
01066         Tcl_AppendResult( interp, " ", (char *) NULL );
01067     Tcl_PrintDouble( interp, ymax, buf );
01068     if (argc > 1)
01069         Tcl_SetVar( interp, argv[1+3], buf, 0 );
01070     else
01071         Tcl_AppendResult( interp, buf, (char *) NULL );
01072 
01073     if (pl_errcode != 0) {
01074         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01075         return TCL_ERROR;
01076     }
01077 
01078     plflush();
01079     return TCL_OK;
01080 }
01081 
01082 /*--------------------------------------------------------------------------*\
01083  * plendCmd
01084  *
01085  * Processes plend Tcl command.
01086 \*--------------------------------------------------------------------------*/
01087 
01088 static int
01089 plendCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01090 {
01091 
01092     pl_errcode = 0; errmsg[0] = '\0';
01093 
01094     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01095         Tcl_AppendResult( interp, "command syntax: \"",
01096                           "plend ", "\"",
01097                           (char *) NULL);
01098         return TCL_ERROR;
01099     }
01100 
01101     if ( (!0 && 0 && (argc < (1 + 0 - 0))) ||
01102          (!0 && !0 && (argc != (0 + 1))) ||
01103          ( 0 && (argc != 1) && (argc != (0 + 1))) ) {
01104         Tcl_AppendResult( interp, "wrong # args: should be \"",
01105                           "plend ", "\"",
01106                           (char *) NULL);
01107         return TCL_ERROR;
01108     }
01109 
01110 
01111     plend (  );
01112 
01113 
01114     if (pl_errcode != 0) {
01115         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01116         return TCL_ERROR;
01117     }
01118 
01119     plflush();
01120     return TCL_OK;
01121 }
01122 
01123 /*--------------------------------------------------------------------------*\
01124  * plend1Cmd
01125  *
01126  * Processes plend1 Tcl command.
01127 \*--------------------------------------------------------------------------*/
01128 
01129 static int
01130 plend1Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01131 {
01132 
01133     pl_errcode = 0; errmsg[0] = '\0';
01134 
01135     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01136         Tcl_AppendResult( interp, "command syntax: \"",
01137                           "plend1 ", "\"",
01138                           (char *) NULL);
01139         return TCL_ERROR;
01140     }
01141 
01142     if ( (!0 && 0 && (argc < (1 + 0 - 0))) ||
01143          (!0 && !0 && (argc != (0 + 1))) ||
01144          ( 0 && (argc != 1) && (argc != (0 + 1))) ) {
01145         Tcl_AppendResult( interp, "wrong # args: should be \"",
01146                           "plend1 ", "\"",
01147                           (char *) NULL);
01148         return TCL_ERROR;
01149     }
01150 
01151 
01152     plend1 (  );
01153 
01154 
01155     if (pl_errcode != 0) {
01156         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01157         return TCL_ERROR;
01158     }
01159 
01160     plflush();
01161     return TCL_OK;
01162 }
01163 
01164 /*--------------------------------------------------------------------------*\
01165  * plenvCmd
01166  *
01167  * Processes plenv Tcl command.
01168 \*--------------------------------------------------------------------------*/
01169 
01170 static int
01171 plenvCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01172 {
01173     PLFLT xmin;
01174     PLFLT xmax;
01175     PLFLT ymin;
01176     PLFLT ymax;
01177     PLINT just;
01178     PLINT axis;
01179 
01180     pl_errcode = 0; errmsg[0] = '\0';
01181 
01182     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01183         Tcl_AppendResult( interp, "command syntax: \"",
01184                           "plenv xmin xmax ymin ymax just axis", "\"",
01185                           (char *) NULL);
01186         return TCL_ERROR;
01187     }
01188 
01189     if ( (!0 && 0 && (argc < (1 + 6 - 0))) ||
01190          (!0 && !0 && (argc != (6 + 1))) ||
01191          ( 0 && (argc != 1) && (argc != (6 + 1))) ) {
01192         Tcl_AppendResult( interp, "wrong # args: should be \"",
01193                           "plenv xmin xmax ymin ymax just axis", "\"",
01194                           (char *) NULL);
01195         return TCL_ERROR;
01196     }
01197 
01198     xmin = atof(argv[1+0]);
01199     xmax = atof(argv[1+1]);
01200     ymin = atof(argv[1+2]);
01201     ymax = atof(argv[1+3]);
01202     just = atoi(argv[1+4]);
01203     axis = atoi(argv[1+5]);
01204 
01205     plenv ( xmin, xmax, ymin, ymax, just, axis );
01206 
01207 
01208     if (pl_errcode != 0) {
01209         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01210         return TCL_ERROR;
01211     }
01212 
01213     plflush();
01214     return TCL_OK;
01215 }
01216 
01217 /*--------------------------------------------------------------------------*\
01218  * plenv0Cmd
01219  *
01220  * Processes plenv0 Tcl command.
01221 \*--------------------------------------------------------------------------*/
01222 
01223 static int
01224 plenv0Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01225 {
01226     PLFLT xmin;
01227     PLFLT xmax;
01228     PLFLT ymin;
01229     PLFLT ymax;
01230     PLINT just;
01231     PLINT axis;
01232 
01233     pl_errcode = 0; errmsg[0] = '\0';
01234 
01235     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01236         Tcl_AppendResult( interp, "command syntax: \"",
01237                           "plenv0 xmin xmax ymin ymax just axis", "\"",
01238                           (char *) NULL);
01239         return TCL_ERROR;
01240     }
01241 
01242     if ( (!0 && 0 && (argc < (1 + 6 - 0))) ||
01243          (!0 && !0 && (argc != (6 + 1))) ||
01244          ( 0 && (argc != 1) && (argc != (6 + 1))) ) {
01245         Tcl_AppendResult( interp, "wrong # args: should be \"",
01246                           "plenv0 xmin xmax ymin ymax just axis", "\"",
01247                           (char *) NULL);
01248         return TCL_ERROR;
01249     }
01250 
01251     xmin = atof(argv[1+0]);
01252     xmax = atof(argv[1+1]);
01253     ymin = atof(argv[1+2]);
01254     ymax = atof(argv[1+3]);
01255     just = atoi(argv[1+4]);
01256     axis = atoi(argv[1+5]);
01257 
01258     plenv0 ( xmin, xmax, ymin, ymax, just, axis );
01259 
01260 
01261     if (pl_errcode != 0) {
01262         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01263         return TCL_ERROR;
01264     }
01265 
01266     plflush();
01267     return TCL_OK;
01268 }
01269 
01270 /*--------------------------------------------------------------------------*\
01271  * pleopCmd
01272  *
01273  * Processes pleop Tcl command.
01274 \*--------------------------------------------------------------------------*/
01275 
01276 static int
01277 pleopCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01278 {
01279 
01280     pl_errcode = 0; errmsg[0] = '\0';
01281 
01282     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01283         Tcl_AppendResult( interp, "command syntax: \"",
01284                           "pleop ", "\"",
01285                           (char *) NULL);
01286         return TCL_ERROR;
01287     }
01288 
01289     if ( (!0 && 0 && (argc < (1 + 0 - 0))) ||
01290          (!0 && !0 && (argc != (0 + 1))) ||
01291          ( 0 && (argc != 1) && (argc != (0 + 1))) ) {
01292         Tcl_AppendResult( interp, "wrong # args: should be \"",
01293                           "pleop ", "\"",
01294                           (char *) NULL);
01295         return TCL_ERROR;
01296     }
01297 
01298 
01299     pleop (  );
01300 
01301 
01302     if (pl_errcode != 0) {
01303         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01304         return TCL_ERROR;
01305     }
01306 
01307     plflush();
01308     return TCL_OK;
01309 }
01310 
01311 /*--------------------------------------------------------------------------*\
01312  * plerrxCmd
01313  *
01314  * Processes plerrx Tcl command.
01315 \*--------------------------------------------------------------------------*/
01316 
01317 static int
01318 plerrxCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01319 {
01320     PLINT n;
01321     PLFLT *xmin;
01322     tclMatrix *matxmin;
01323     PLFLT *xmax;
01324     tclMatrix *matxmax;
01325     PLFLT *y;
01326     tclMatrix *maty;
01327 
01328     pl_errcode = 0; errmsg[0] = '\0';
01329 
01330     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01331         Tcl_AppendResult( interp, "command syntax: \"",
01332                           "plerrx n xmin xmax y", "\"",
01333                           (char *) NULL);
01334         return TCL_ERROR;
01335     }
01336 
01337     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
01338          (!0 && !0 && (argc != (4 + 1))) ||
01339          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
01340         Tcl_AppendResult( interp, "wrong # args: should be \"",
01341                           "plerrx n xmin xmax y", "\"",
01342                           (char *) NULL);
01343         return TCL_ERROR;
01344     }
01345 
01346     n = atoi(argv[1+0]);
01347     matxmin = Tcl_GetMatrixPtr( interp, argv[1+1] );
01348     if (matxmin == NULL) return TCL_ERROR;
01349     xmin = matxmin->fdata;
01350     matxmax = Tcl_GetMatrixPtr( interp, argv[1+2] );
01351     if (matxmax == NULL) return TCL_ERROR;
01352     xmax = matxmax->fdata;
01353     maty = Tcl_GetMatrixPtr( interp, argv[1+3] );
01354     if (maty == NULL) return TCL_ERROR;
01355     y = maty->fdata;
01356 
01357     plerrx ( n, xmin, xmax, y );
01358 
01359 
01360     if (pl_errcode != 0) {
01361         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01362         return TCL_ERROR;
01363     }
01364 
01365     plflush();
01366     return TCL_OK;
01367 }
01368 
01369 /*--------------------------------------------------------------------------*\
01370  * plerryCmd
01371  *
01372  * Processes plerry Tcl command.
01373 \*--------------------------------------------------------------------------*/
01374 
01375 static int
01376 plerryCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01377 {
01378     PLINT n;
01379     PLFLT *x;
01380     tclMatrix *matx;
01381     PLFLT *ymin;
01382     tclMatrix *matymin;
01383     PLFLT *ymax;
01384     tclMatrix *matymax;
01385 
01386     pl_errcode = 0; errmsg[0] = '\0';
01387 
01388     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01389         Tcl_AppendResult( interp, "command syntax: \"",
01390                           "plerry n x ymin ymax", "\"",
01391                           (char *) NULL);
01392         return TCL_ERROR;
01393     }
01394 
01395     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
01396          (!0 && !0 && (argc != (4 + 1))) ||
01397          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
01398         Tcl_AppendResult( interp, "wrong # args: should be \"",
01399                           "plerry n x ymin ymax", "\"",
01400                           (char *) NULL);
01401         return TCL_ERROR;
01402     }
01403 
01404     n = atoi(argv[1+0]);
01405     matx = Tcl_GetMatrixPtr( interp, argv[1+1] );
01406     if (matx == NULL) return TCL_ERROR;
01407     x = matx->fdata;
01408     matymin = Tcl_GetMatrixPtr( interp, argv[1+2] );
01409     if (matymin == NULL) return TCL_ERROR;
01410     ymin = matymin->fdata;
01411     matymax = Tcl_GetMatrixPtr( interp, argv[1+3] );
01412     if (matymax == NULL) return TCL_ERROR;
01413     ymax = matymax->fdata;
01414 
01415     plerry ( n, x, ymin, ymax );
01416 
01417 
01418     if (pl_errcode != 0) {
01419         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01420         return TCL_ERROR;
01421     }
01422 
01423     plflush();
01424     return TCL_OK;
01425 }
01426 
01427 /*--------------------------------------------------------------------------*\
01428  * plfamadvCmd
01429  *
01430  * Processes plfamadv Tcl command.
01431 \*--------------------------------------------------------------------------*/
01432 
01433 static int
01434 plfamadvCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01435 {
01436 
01437     pl_errcode = 0; errmsg[0] = '\0';
01438 
01439     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01440         Tcl_AppendResult( interp, "command syntax: \"",
01441                           "plfamadv ", "\"",
01442                           (char *) NULL);
01443         return TCL_ERROR;
01444     }
01445 
01446     if ( (!0 && 0 && (argc < (1 + 0 - 0))) ||
01447          (!0 && !0 && (argc != (0 + 1))) ||
01448          ( 0 && (argc != 1) && (argc != (0 + 1))) ) {
01449         Tcl_AppendResult( interp, "wrong # args: should be \"",
01450                           "plfamadv ", "\"",
01451                           (char *) NULL);
01452         return TCL_ERROR;
01453     }
01454 
01455 
01456     plfamadv (  );
01457 
01458 
01459     if (pl_errcode != 0) {
01460         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01461         return TCL_ERROR;
01462     }
01463 
01464     plflush();
01465     return TCL_OK;
01466 }
01467 
01468 /*--------------------------------------------------------------------------*\
01469  * plfillCmd
01470  *
01471  * Processes plfill Tcl command.
01472 \*--------------------------------------------------------------------------*/
01473 
01474 static int
01475 plfillCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01476 {
01477     PLINT n;
01478     PLFLT *x;
01479     tclMatrix *matx;
01480     PLFLT *y;
01481     tclMatrix *maty;
01482 
01483     pl_errcode = 0; errmsg[0] = '\0';
01484 
01485     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01486         Tcl_AppendResult( interp, "command syntax: \"",
01487                           "plfill n x y", "\"",
01488                           (char *) NULL);
01489         return TCL_ERROR;
01490     }
01491 
01492     if ( (!0 && 0 && (argc < (1 + 3 - 0))) ||
01493          (!0 && !0 && (argc != (3 + 1))) ||
01494          ( 0 && (argc != 1) && (argc != (3 + 1))) ) {
01495         Tcl_AppendResult( interp, "wrong # args: should be \"",
01496                           "plfill n x y", "\"",
01497                           (char *) NULL);
01498         return TCL_ERROR;
01499     }
01500 
01501     n = atoi(argv[1+0]);
01502     matx = Tcl_GetMatrixPtr( interp, argv[1+1] );
01503     if (matx == NULL) return TCL_ERROR;
01504     x = matx->fdata;
01505     maty = Tcl_GetMatrixPtr( interp, argv[1+2] );
01506     if (maty == NULL) return TCL_ERROR;
01507     y = maty->fdata;
01508 
01509     plfill ( n, x, y );
01510 
01511 
01512     if (pl_errcode != 0) {
01513         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01514         return TCL_ERROR;
01515     }
01516 
01517     plflush();
01518     return TCL_OK;
01519 }
01520 
01521 /*--------------------------------------------------------------------------*\
01522  * plfill3Cmd
01523  *
01524  * Processes plfill3 Tcl command.
01525 \*--------------------------------------------------------------------------*/
01526 
01527 static int
01528 plfill3Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01529 {
01530     PLINT n;
01531     PLFLT *x;
01532     tclMatrix *matx;
01533     PLFLT *y;
01534     tclMatrix *maty;
01535     PLFLT *z;
01536     tclMatrix *matz;
01537 
01538     pl_errcode = 0; errmsg[0] = '\0';
01539 
01540     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01541         Tcl_AppendResult( interp, "command syntax: \"",
01542                           "plfill3 n x y z", "\"",
01543                           (char *) NULL);
01544         return TCL_ERROR;
01545     }
01546 
01547     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
01548          (!0 && !0 && (argc != (4 + 1))) ||
01549          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
01550         Tcl_AppendResult( interp, "wrong # args: should be \"",
01551                           "plfill3 n x y z", "\"",
01552                           (char *) NULL);
01553         return TCL_ERROR;
01554     }
01555 
01556     n = atoi(argv[1+0]);
01557     matx = Tcl_GetMatrixPtr( interp, argv[1+1] );
01558     if (matx == NULL) return TCL_ERROR;
01559     x = matx->fdata;
01560     maty = Tcl_GetMatrixPtr( interp, argv[1+2] );
01561     if (maty == NULL) return TCL_ERROR;
01562     y = maty->fdata;
01563     matz = Tcl_GetMatrixPtr( interp, argv[1+3] );
01564     if (matz == NULL) return TCL_ERROR;
01565     z = matz->fdata;
01566 
01567     plfill3 ( n, x, y, z );
01568 
01569 
01570     if (pl_errcode != 0) {
01571         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01572         return TCL_ERROR;
01573     }
01574 
01575     plflush();
01576     return TCL_OK;
01577 }
01578 
01579 /*--------------------------------------------------------------------------*\
01580  * plflushCmd
01581  *
01582  * Processes plflush Tcl command.
01583 \*--------------------------------------------------------------------------*/
01584 
01585 static int
01586 plflushCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01587 {
01588 
01589     pl_errcode = 0; errmsg[0] = '\0';
01590 
01591     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01592         Tcl_AppendResult( interp, "command syntax: \"",
01593                           "plflush ", "\"",
01594                           (char *) NULL);
01595         return TCL_ERROR;
01596     }
01597 
01598     if ( (!0 && 0 && (argc < (1 + 0 - 0))) ||
01599          (!0 && !0 && (argc != (0 + 1))) ||
01600          ( 0 && (argc != 1) && (argc != (0 + 1))) ) {
01601         Tcl_AppendResult( interp, "wrong # args: should be \"",
01602                           "plflush ", "\"",
01603                           (char *) NULL);
01604         return TCL_ERROR;
01605     }
01606 
01607 
01608     plflush (  );
01609 
01610 
01611     if (pl_errcode != 0) {
01612         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01613         return TCL_ERROR;
01614     }
01615 
01616     plflush();
01617     return TCL_OK;
01618 }
01619 
01620 /*--------------------------------------------------------------------------*\
01621  * plfontCmd
01622  *
01623  * Processes plfont Tcl command.
01624 \*--------------------------------------------------------------------------*/
01625 
01626 static int
01627 plfontCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01628 {
01629     PLINT ifont;
01630 
01631     pl_errcode = 0; errmsg[0] = '\0';
01632 
01633     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01634         Tcl_AppendResult( interp, "command syntax: \"",
01635                           "plfont ifont", "\"",
01636                           (char *) NULL);
01637         return TCL_ERROR;
01638     }
01639 
01640     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
01641          (!0 && !0 && (argc != (1 + 1))) ||
01642          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
01643         Tcl_AppendResult( interp, "wrong # args: should be \"",
01644                           "plfont ifont", "\"",
01645                           (char *) NULL);
01646         return TCL_ERROR;
01647     }
01648 
01649     ifont = atoi(argv[1+0]);
01650 
01651     plfont ( ifont );
01652 
01653 
01654     if (pl_errcode != 0) {
01655         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01656         return TCL_ERROR;
01657     }
01658 
01659     plflush();
01660     return TCL_OK;
01661 }
01662 
01663 /*--------------------------------------------------------------------------*\
01664  * plfontldCmd
01665  *
01666  * Processes plfontld Tcl command.
01667 \*--------------------------------------------------------------------------*/
01668 
01669 static int
01670 plfontldCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01671 {
01672     PLINT fnt;
01673 
01674     pl_errcode = 0; errmsg[0] = '\0';
01675 
01676     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01677         Tcl_AppendResult( interp, "command syntax: \"",
01678                           "plfontld fnt", "\"",
01679                           (char *) NULL);
01680         return TCL_ERROR;
01681     }
01682 
01683     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
01684          (!0 && !0 && (argc != (1 + 1))) ||
01685          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
01686         Tcl_AppendResult( interp, "wrong # args: should be \"",
01687                           "plfontld fnt", "\"",
01688                           (char *) NULL);
01689         return TCL_ERROR;
01690     }
01691 
01692     fnt = atoi(argv[1+0]);
01693 
01694     plfontld ( fnt );
01695 
01696 
01697     if (pl_errcode != 0) {
01698         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01699         return TCL_ERROR;
01700     }
01701 
01702     plflush();
01703     return TCL_OK;
01704 }
01705 
01706 /*--------------------------------------------------------------------------*\
01707  * plgchrCmd
01708  *
01709  * Processes plgchr Tcl command.
01710 \*--------------------------------------------------------------------------*/
01711 
01712 static int
01713 plgchrCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01714 {
01715     PLFLT def;
01716     PLFLT ht;
01717 
01718     pl_errcode = 0; errmsg[0] = '\0';
01719 
01720     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01721         Tcl_AppendResult( interp, "command syntax: \"",
01722                           "plgchr ?def ht?", "\"",
01723                           (char *) NULL);
01724         return TCL_ERROR;
01725     }
01726 
01727     if ( (!1 && 0 && (argc < (1 + 2 - 0))) ||
01728          (!1 && !0 && (argc != (2 + 1))) ||
01729          ( 1 && (argc != 1) && (argc != (2 + 1))) ) {
01730         Tcl_AppendResult( interp, "wrong # args: should be \"",
01731                           "plgchr ?def ht?", "\"",
01732                           (char *) NULL);
01733         return TCL_ERROR;
01734     }
01735 
01736 /* def is for output. */
01737 /* ht is for output. */
01738 
01739     plgchr ( &def, &ht );
01740 
01741     Tcl_PrintDouble( interp, def, buf );
01742     if (argc > 1)
01743         Tcl_SetVar( interp, argv[1+0], buf, 0 );
01744     else
01745         Tcl_AppendResult( interp, buf, (char *) NULL );
01746     if (argc == 1)
01747         Tcl_AppendResult( interp, " ", (char *) NULL );
01748     Tcl_PrintDouble( interp, ht, buf );
01749     if (argc > 1)
01750         Tcl_SetVar( interp, argv[1+1], buf, 0 );
01751     else
01752         Tcl_AppendResult( interp, buf, (char *) NULL );
01753 
01754     if (pl_errcode != 0) {
01755         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01756         return TCL_ERROR;
01757     }
01758 
01759     plflush();
01760     return TCL_OK;
01761 }
01762 
01763 /*--------------------------------------------------------------------------*\
01764  * plgcmap1_rangeCmd
01765  *
01766  * Processes plgcmap1_range Tcl command.
01767 \*--------------------------------------------------------------------------*/
01768 
01769 static int
01770 plgcmap1_rangeCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01771 {
01772     PLFLT min_color;
01773     PLFLT max_color;
01774 
01775     pl_errcode = 0; errmsg[0] = '\0';
01776 
01777     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01778         Tcl_AppendResult( interp, "command syntax: \"",
01779                           "plgcmap1_range ?min_color max_color?", "\"",
01780                           (char *) NULL);
01781         return TCL_ERROR;
01782     }
01783 
01784     if ( (!1 && 0 && (argc < (1 + 2 - 0))) ||
01785          (!1 && !0 && (argc != (2 + 1))) ||
01786          ( 1 && (argc != 1) && (argc != (2 + 1))) ) {
01787         Tcl_AppendResult( interp, "wrong # args: should be \"",
01788                           "plgcmap1_range ?min_color max_color?", "\"",
01789                           (char *) NULL);
01790         return TCL_ERROR;
01791     }
01792 
01793 /* min_color is for output. */
01794 /* max_color is for output. */
01795 
01796     plgcmap1_range ( &min_color, &max_color );
01797 
01798     Tcl_PrintDouble( interp, min_color, buf );
01799     if (argc > 1)
01800         Tcl_SetVar( interp, argv[1+0], buf, 0 );
01801     else
01802         Tcl_AppendResult( interp, buf, (char *) NULL );
01803     if (argc == 1)
01804         Tcl_AppendResult( interp, " ", (char *) NULL );
01805     Tcl_PrintDouble( interp, max_color, buf );
01806     if (argc > 1)
01807         Tcl_SetVar( interp, argv[1+1], buf, 0 );
01808     else
01809         Tcl_AppendResult( interp, buf, (char *) NULL );
01810 
01811     if (pl_errcode != 0) {
01812         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01813         return TCL_ERROR;
01814     }
01815 
01816     plflush();
01817     return TCL_OK;
01818 }
01819 
01820 /*--------------------------------------------------------------------------*\
01821  * plgcol0Cmd
01822  *
01823  * Processes plgcol0 Tcl command.
01824 \*--------------------------------------------------------------------------*/
01825 
01826 static int
01827 plgcol0Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01828 {
01829     PLINT icol0;
01830     PLINT r;
01831     PLINT g;
01832     PLINT b;
01833 
01834     pl_errcode = 0; errmsg[0] = '\0';
01835 
01836     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01837         Tcl_AppendResult( interp, "command syntax: \"",
01838                           "plgcol0 ?icol0 r g b?", "\"",
01839                           (char *) NULL);
01840         return TCL_ERROR;
01841     }
01842 
01843     if ( (!1 && 0 && (argc < (1 + 4 - 0))) ||
01844          (!1 && !0 && (argc != (4 + 1))) ||
01845          ( 1 && (argc != 1) && (argc != (4 + 1))) ) {
01846         Tcl_AppendResult( interp, "wrong # args: should be \"",
01847                           "plgcol0 ?icol0 r g b?", "\"",
01848                           (char *) NULL);
01849         return TCL_ERROR;
01850     }
01851 
01852     icol0 = atoi(argv[1+0]);
01853 /* r is for output. */
01854 /* g is for output. */
01855 /* b is for output. */
01856 
01857     plgcol0 ( icol0, &r, &g, &b );
01858 
01859     if (argc == 1)
01860         Tcl_AppendResult( interp, " ", (char *) NULL );
01861     sprintf( buf, "%d", r );
01862     if (argc > 1)
01863         Tcl_SetVar( interp, argv[1+1], buf, 0 );
01864     else
01865         Tcl_AppendResult( interp, buf, (char *) NULL );
01866     if (argc == 1)
01867         Tcl_AppendResult( interp, " ", (char *) NULL );
01868     sprintf( buf, "%d", g );
01869     if (argc > 1)
01870         Tcl_SetVar( interp, argv[1+2], buf, 0 );
01871     else
01872         Tcl_AppendResult( interp, buf, (char *) NULL );
01873     if (argc == 1)
01874         Tcl_AppendResult( interp, " ", (char *) NULL );
01875     sprintf( buf, "%d", b );
01876     if (argc > 1)
01877         Tcl_SetVar( interp, argv[1+3], buf, 0 );
01878     else
01879         Tcl_AppendResult( interp, buf, (char *) NULL );
01880 
01881     if (pl_errcode != 0) {
01882         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01883         return TCL_ERROR;
01884     }
01885 
01886     plflush();
01887     return TCL_OK;
01888 }
01889 
01890 /*--------------------------------------------------------------------------*\
01891  * plgcol0aCmd
01892  *
01893  * Processes plgcol0a Tcl command.
01894 \*--------------------------------------------------------------------------*/
01895 
01896 static int
01897 plgcol0aCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01898 {
01899     PLINT icol0;
01900     PLINT r;
01901     PLINT g;
01902     PLINT b;
01903     PLFLT a;
01904 
01905     pl_errcode = 0; errmsg[0] = '\0';
01906 
01907     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01908         Tcl_AppendResult( interp, "command syntax: \"",
01909                           "plgcol0a ?icol0 r g b a?", "\"",
01910                           (char *) NULL);
01911         return TCL_ERROR;
01912     }
01913 
01914     if ( (!1 && 0 && (argc < (1 + 5 - 0))) ||
01915          (!1 && !0 && (argc != (5 + 1))) ||
01916          ( 1 && (argc != 1) && (argc != (5 + 1))) ) {
01917         Tcl_AppendResult( interp, "wrong # args: should be \"",
01918                           "plgcol0a ?icol0 r g b a?", "\"",
01919                           (char *) NULL);
01920         return TCL_ERROR;
01921     }
01922 
01923     icol0 = atoi(argv[1+0]);
01924 /* r is for output. */
01925 /* g is for output. */
01926 /* b is for output. */
01927 /* a is for output. */
01928 
01929     plgcol0a ( icol0, &r, &g, &b, &a );
01930 
01931     if (argc == 1)
01932         Tcl_AppendResult( interp, " ", (char *) NULL );
01933     sprintf( buf, "%d", r );
01934     if (argc > 1)
01935         Tcl_SetVar( interp, argv[1+1], buf, 0 );
01936     else
01937         Tcl_AppendResult( interp, buf, (char *) NULL );
01938     if (argc == 1)
01939         Tcl_AppendResult( interp, " ", (char *) NULL );
01940     sprintf( buf, "%d", g );
01941     if (argc > 1)
01942         Tcl_SetVar( interp, argv[1+2], buf, 0 );
01943     else
01944         Tcl_AppendResult( interp, buf, (char *) NULL );
01945     if (argc == 1)
01946         Tcl_AppendResult( interp, " ", (char *) NULL );
01947     sprintf( buf, "%d", b );
01948     if (argc > 1)
01949         Tcl_SetVar( interp, argv[1+3], buf, 0 );
01950     else
01951         Tcl_AppendResult( interp, buf, (char *) NULL );
01952     if (argc == 1)
01953         Tcl_AppendResult( interp, " ", (char *) NULL );
01954     Tcl_PrintDouble( interp, a, buf );
01955     if (argc > 1)
01956         Tcl_SetVar( interp, argv[1+4], buf, 0 );
01957     else
01958         Tcl_AppendResult( interp, buf, (char *) NULL );
01959 
01960     if (pl_errcode != 0) {
01961         Tcl_AppendResult(interp, errmsg, (char *) NULL);
01962         return TCL_ERROR;
01963     }
01964 
01965     plflush();
01966     return TCL_OK;
01967 }
01968 
01969 /*--------------------------------------------------------------------------*\
01970  * plgcolbgCmd
01971  *
01972  * Processes plgcolbg Tcl command.
01973 \*--------------------------------------------------------------------------*/
01974 
01975 static int
01976 plgcolbgCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
01977 {
01978     PLINT r;
01979     PLINT g;
01980     PLINT b;
01981 
01982     pl_errcode = 0; errmsg[0] = '\0';
01983 
01984     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
01985         Tcl_AppendResult( interp, "command syntax: \"",
01986                           "plgcolbg ?r g b?", "\"",
01987                           (char *) NULL);
01988         return TCL_ERROR;
01989     }
01990 
01991     if ( (!1 && 0 && (argc < (1 + 3 - 0))) ||
01992          (!1 && !0 && (argc != (3 + 1))) ||
01993          ( 1 && (argc != 1) && (argc != (3 + 1))) ) {
01994         Tcl_AppendResult( interp, "wrong # args: should be \"",
01995                           "plgcolbg ?r g b?", "\"",
01996                           (char *) NULL);
01997         return TCL_ERROR;
01998     }
01999 
02000 /* r is for output. */
02001 /* g is for output. */
02002 /* b is for output. */
02003 
02004     plgcolbg ( &r, &g, &b );
02005 
02006     sprintf( buf, "%d", r );
02007     if (argc > 1)
02008         Tcl_SetVar( interp, argv[1+0], buf, 0 );
02009     else
02010         Tcl_AppendResult( interp, buf, (char *) NULL );
02011     if (argc == 1)
02012         Tcl_AppendResult( interp, " ", (char *) NULL );
02013     sprintf( buf, "%d", g );
02014     if (argc > 1)
02015         Tcl_SetVar( interp, argv[1+1], buf, 0 );
02016     else
02017         Tcl_AppendResult( interp, buf, (char *) NULL );
02018     if (argc == 1)
02019         Tcl_AppendResult( interp, " ", (char *) NULL );
02020     sprintf( buf, "%d", b );
02021     if (argc > 1)
02022         Tcl_SetVar( interp, argv[1+2], buf, 0 );
02023     else
02024         Tcl_AppendResult( interp, buf, (char *) NULL );
02025 
02026     if (pl_errcode != 0) {
02027         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02028         return TCL_ERROR;
02029     }
02030 
02031     plflush();
02032     return TCL_OK;
02033 }
02034 
02035 /*--------------------------------------------------------------------------*\
02036  * plgcolbgaCmd
02037  *
02038  * Processes plgcolbga Tcl command.
02039 \*--------------------------------------------------------------------------*/
02040 
02041 static int
02042 plgcolbgaCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02043 {
02044     PLINT r;
02045     PLINT g;
02046     PLINT b;
02047     PLFLT a;
02048 
02049     pl_errcode = 0; errmsg[0] = '\0';
02050 
02051     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02052         Tcl_AppendResult( interp, "command syntax: \"",
02053                           "plgcolbga ?r g b a?", "\"",
02054                           (char *) NULL);
02055         return TCL_ERROR;
02056     }
02057 
02058     if ( (!1 && 0 && (argc < (1 + 4 - 0))) ||
02059          (!1 && !0 && (argc != (4 + 1))) ||
02060          ( 1 && (argc != 1) && (argc != (4 + 1))) ) {
02061         Tcl_AppendResult( interp, "wrong # args: should be \"",
02062                           "plgcolbga ?r g b a?", "\"",
02063                           (char *) NULL);
02064         return TCL_ERROR;
02065     }
02066 
02067 /* r is for output. */
02068 /* g is for output. */
02069 /* b is for output. */
02070 /* a is for output. */
02071 
02072     plgcolbga ( &r, &g, &b, &a );
02073 
02074     sprintf( buf, "%d", r );
02075     if (argc > 1)
02076         Tcl_SetVar( interp, argv[1+0], buf, 0 );
02077     else
02078         Tcl_AppendResult( interp, buf, (char *) NULL );
02079     if (argc == 1)
02080         Tcl_AppendResult( interp, " ", (char *) NULL );
02081     sprintf( buf, "%d", g );
02082     if (argc > 1)
02083         Tcl_SetVar( interp, argv[1+1], buf, 0 );
02084     else
02085         Tcl_AppendResult( interp, buf, (char *) NULL );
02086     if (argc == 1)
02087         Tcl_AppendResult( interp, " ", (char *) NULL );
02088     sprintf( buf, "%d", b );
02089     if (argc > 1)
02090         Tcl_SetVar( interp, argv[1+2], buf, 0 );
02091     else
02092         Tcl_AppendResult( interp, buf, (char *) NULL );
02093     if (argc == 1)
02094         Tcl_AppendResult( interp, " ", (char *) NULL );
02095     Tcl_PrintDouble( interp, a, buf );
02096     if (argc > 1)
02097         Tcl_SetVar( interp, argv[1+3], buf, 0 );
02098     else
02099         Tcl_AppendResult( interp, buf, (char *) NULL );
02100 
02101     if (pl_errcode != 0) {
02102         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02103         return TCL_ERROR;
02104     }
02105 
02106     plflush();
02107     return TCL_OK;
02108 }
02109 
02110 /*--------------------------------------------------------------------------*\
02111  * plgcompressionCmd
02112  *
02113  * Processes plgcompression Tcl command.
02114 \*--------------------------------------------------------------------------*/
02115 
02116 static int
02117 plgcompressionCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02118 {
02119     PLINT compression;
02120 
02121     pl_errcode = 0; errmsg[0] = '\0';
02122 
02123     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02124         Tcl_AppendResult( interp, "command syntax: \"",
02125                           "plgcompression ?compression?", "\"",
02126                           (char *) NULL);
02127         return TCL_ERROR;
02128     }
02129 
02130     if ( (!1 && 0 && (argc < (1 + 1 - 0))) ||
02131          (!1 && !0 && (argc != (1 + 1))) ||
02132          ( 1 && (argc != 1) && (argc != (1 + 1))) ) {
02133         Tcl_AppendResult( interp, "wrong # args: should be \"",
02134                           "plgcompression ?compression?", "\"",
02135                           (char *) NULL);
02136         return TCL_ERROR;
02137     }
02138 
02139 /* compression is for output. */
02140 
02141     plgcompression ( &compression );
02142 
02143     sprintf( buf, "%d", compression );
02144     if (argc > 1)
02145         Tcl_SetVar( interp, argv[1+0], buf, 0 );
02146     else
02147         Tcl_AppendResult( interp, buf, (char *) NULL );
02148 
02149     if (pl_errcode != 0) {
02150         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02151         return TCL_ERROR;
02152     }
02153 
02154     plflush();
02155     return TCL_OK;
02156 }
02157 
02158 /*--------------------------------------------------------------------------*\
02159  * plgdevCmd
02160  *
02161  * Processes plgdev Tcl command.
02162 \*--------------------------------------------------------------------------*/
02163 
02164 static int
02165 plgdevCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02166 {
02167     char devnam[200];
02168 
02169     pl_errcode = 0; errmsg[0] = '\0';
02170 
02171     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02172         Tcl_AppendResult( interp, "command syntax: \"",
02173                           "plgdev ?devnam?", "\"",
02174                           (char *) NULL);
02175         return TCL_ERROR;
02176     }
02177 
02178     if ( (!1 && 0 && (argc < (1 + 1 - 0))) ||
02179          (!1 && !0 && (argc != (1 + 1))) ||
02180          ( 1 && (argc != 1) && (argc != (1 + 1))) ) {
02181         Tcl_AppendResult( interp, "wrong # args: should be \"",
02182                           "plgdev ?devnam?", "\"",
02183                           (char *) NULL);
02184         return TCL_ERROR;
02185     }
02186 
02187 /* devnam is for output. */
02188 
02189     plgdev ( devnam );
02190 
02191     if (argc > 1)
02192        Tcl_SetVar( interp, argv[1+0], devnam, 0 );
02193     else
02194         Tcl_AppendResult( interp, devnam, (char *) NULL );
02195 
02196     if (pl_errcode != 0) {
02197         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02198         return TCL_ERROR;
02199     }
02200 
02201     plflush();
02202     return TCL_OK;
02203 }
02204 
02205 /*--------------------------------------------------------------------------*\
02206  * plgdidevCmd
02207  *
02208  * Processes plgdidev Tcl command.
02209 \*--------------------------------------------------------------------------*/
02210 
02211 static int
02212 plgdidevCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02213 {
02214     PLFLT mar;
02215     PLFLT aspect;
02216     PLFLT jx;
02217     PLFLT jy;
02218 
02219     pl_errcode = 0; errmsg[0] = '\0';
02220 
02221     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02222         Tcl_AppendResult( interp, "command syntax: \"",
02223                           "plgdidev ?mar aspect jx jy?", "\"",
02224                           (char *) NULL);
02225         return TCL_ERROR;
02226     }
02227 
02228     if ( (!1 && 0 && (argc < (1 + 4 - 0))) ||
02229          (!1 && !0 && (argc != (4 + 1))) ||
02230          ( 1 && (argc != 1) && (argc != (4 + 1))) ) {
02231         Tcl_AppendResult( interp, "wrong # args: should be \"",
02232                           "plgdidev ?mar aspect jx jy?", "\"",
02233                           (char *) NULL);
02234         return TCL_ERROR;
02235     }
02236 
02237 /* mar is for output. */
02238 /* aspect is for output. */
02239 /* jx is for output. */
02240 /* jy is for output. */
02241 
02242     plgdidev ( &mar, &aspect, &jx, &jy );
02243 
02244     Tcl_PrintDouble( interp, mar, buf );
02245     if (argc > 1)
02246         Tcl_SetVar( interp, argv[1+0], buf, 0 );
02247     else
02248         Tcl_AppendResult( interp, buf, (char *) NULL );
02249     if (argc == 1)
02250         Tcl_AppendResult( interp, " ", (char *) NULL );
02251     Tcl_PrintDouble( interp, aspect, buf );
02252     if (argc > 1)
02253         Tcl_SetVar( interp, argv[1+1], buf, 0 );
02254     else
02255         Tcl_AppendResult( interp, buf, (char *) NULL );
02256     if (argc == 1)
02257         Tcl_AppendResult( interp, " ", (char *) NULL );
02258     Tcl_PrintDouble( interp, jx, buf );
02259     if (argc > 1)
02260         Tcl_SetVar( interp, argv[1+2], buf, 0 );
02261     else
02262         Tcl_AppendResult( interp, buf, (char *) NULL );
02263     if (argc == 1)
02264         Tcl_AppendResult( interp, " ", (char *) NULL );
02265     Tcl_PrintDouble( interp, jy, buf );
02266     if (argc > 1)
02267         Tcl_SetVar( interp, argv[1+3], buf, 0 );
02268     else
02269         Tcl_AppendResult( interp, buf, (char *) NULL );
02270 
02271     if (pl_errcode != 0) {
02272         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02273         return TCL_ERROR;
02274     }
02275 
02276     plflush();
02277     return TCL_OK;
02278 }
02279 
02280 /*--------------------------------------------------------------------------*\
02281  * plgdioriCmd
02282  *
02283  * Processes plgdiori Tcl command.
02284 \*--------------------------------------------------------------------------*/
02285 
02286 static int
02287 plgdioriCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02288 {
02289     PLFLT rot;
02290 
02291     pl_errcode = 0; errmsg[0] = '\0';
02292 
02293     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02294         Tcl_AppendResult( interp, "command syntax: \"",
02295                           "plgdiori ?rot?", "\"",
02296                           (char *) NULL);
02297         return TCL_ERROR;
02298     }
02299 
02300     if ( (!1 && 0 && (argc < (1 + 1 - 0))) ||
02301          (!1 && !0 && (argc != (1 + 1))) ||
02302          ( 1 && (argc != 1) && (argc != (1 + 1))) ) {
02303         Tcl_AppendResult( interp, "wrong # args: should be \"",
02304                           "plgdiori ?rot?", "\"",
02305                           (char *) NULL);
02306         return TCL_ERROR;
02307     }
02308 
02309 /* rot is for output. */
02310 
02311     plgdiori ( &rot );
02312 
02313     Tcl_PrintDouble( interp, rot, buf );
02314     if (argc > 1)
02315         Tcl_SetVar( interp, argv[1+0], buf, 0 );
02316     else
02317         Tcl_AppendResult( interp, buf, (char *) NULL );
02318 
02319     if (pl_errcode != 0) {
02320         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02321         return TCL_ERROR;
02322     }
02323 
02324     plflush();
02325     return TCL_OK;
02326 }
02327 
02328 /*--------------------------------------------------------------------------*\
02329  * plgdipltCmd
02330  *
02331  * Processes plgdiplt Tcl command.
02332 \*--------------------------------------------------------------------------*/
02333 
02334 static int
02335 plgdipltCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02336 {
02337     PLFLT xmin;
02338     PLFLT ymin;
02339     PLFLT xmax;
02340     PLFLT ymax;
02341 
02342     pl_errcode = 0; errmsg[0] = '\0';
02343 
02344     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02345         Tcl_AppendResult( interp, "command syntax: \"",
02346                           "plgdiplt ?xmin ymin xmax ymax?", "\"",
02347                           (char *) NULL);
02348         return TCL_ERROR;
02349     }
02350 
02351     if ( (!1 && 0 && (argc < (1 + 4 - 0))) ||
02352          (!1 && !0 && (argc != (4 + 1))) ||
02353          ( 1 && (argc != 1) && (argc != (4 + 1))) ) {
02354         Tcl_AppendResult( interp, "wrong # args: should be \"",
02355                           "plgdiplt ?xmin ymin xmax ymax?", "\"",
02356                           (char *) NULL);
02357         return TCL_ERROR;
02358     }
02359 
02360 /* xmin is for output. */
02361 /* ymin is for output. */
02362 /* xmax is for output. */
02363 /* ymax is for output. */
02364 
02365     plgdiplt ( &xmin, &ymin, &xmax, &ymax );
02366 
02367     Tcl_PrintDouble( interp, xmin, buf );
02368     if (argc > 1)
02369         Tcl_SetVar( interp, argv[1+0], buf, 0 );
02370     else
02371         Tcl_AppendResult( interp, buf, (char *) NULL );
02372     if (argc == 1)
02373         Tcl_AppendResult( interp, " ", (char *) NULL );
02374     Tcl_PrintDouble( interp, ymin, buf );
02375     if (argc > 1)
02376         Tcl_SetVar( interp, argv[1+1], buf, 0 );
02377     else
02378         Tcl_AppendResult( interp, buf, (char *) NULL );
02379     if (argc == 1)
02380         Tcl_AppendResult( interp, " ", (char *) NULL );
02381     Tcl_PrintDouble( interp, xmax, buf );
02382     if (argc > 1)
02383         Tcl_SetVar( interp, argv[1+2], buf, 0 );
02384     else
02385         Tcl_AppendResult( interp, buf, (char *) NULL );
02386     if (argc == 1)
02387         Tcl_AppendResult( interp, " ", (char *) NULL );
02388     Tcl_PrintDouble( interp, ymax, buf );
02389     if (argc > 1)
02390         Tcl_SetVar( interp, argv[1+3], buf, 0 );
02391     else
02392         Tcl_AppendResult( interp, buf, (char *) NULL );
02393 
02394     if (pl_errcode != 0) {
02395         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02396         return TCL_ERROR;
02397     }
02398 
02399     plflush();
02400     return TCL_OK;
02401 }
02402 
02403 /*--------------------------------------------------------------------------*\
02404  * plgescCmd
02405  *
02406  * Processes plgesc Tcl command.
02407 \*--------------------------------------------------------------------------*/
02408 
02409 static int
02410 plgescCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02411 {
02412     char esc;
02413 
02414     pl_errcode = 0; errmsg[0] = '\0';
02415 
02416     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02417         Tcl_AppendResult( interp, "command syntax: \"",
02418                           "plgesc ?esc?", "\"",
02419                           (char *) NULL);
02420         return TCL_ERROR;
02421     }
02422 
02423     if ( (!1 && 0 && (argc < (1 + 1 - 0))) ||
02424          (!1 && !0 && (argc != (1 + 1))) ||
02425          ( 1 && (argc != 1) && (argc != (1 + 1))) ) {
02426         Tcl_AppendResult( interp, "wrong # args: should be \"",
02427                           "plgesc ?esc?", "\"",
02428                           (char *) NULL);
02429         return TCL_ERROR;
02430     }
02431 
02432 /* esc is for output. */
02433 
02434     plgesc ( &esc );
02435 
02436     sprintf( buf, "%c", esc );
02437     if (argc > 1)
02438         Tcl_SetVar( interp, argv[1+0], buf, 0 );
02439     else
02440         Tcl_AppendResult( interp, buf, (char *) NULL );
02441 
02442     if (pl_errcode != 0) {
02443         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02444         return TCL_ERROR;
02445     }
02446 
02447     plflush();
02448     return TCL_OK;
02449 }
02450 
02451 /*--------------------------------------------------------------------------*\
02452  * plgfamCmd
02453  *
02454  * Processes plgfam Tcl command.
02455 \*--------------------------------------------------------------------------*/
02456 
02457 static int
02458 plgfamCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02459 {
02460     PLINT fam;
02461     PLINT num;
02462     PLINT bmax;
02463 
02464     pl_errcode = 0; errmsg[0] = '\0';
02465 
02466     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02467         Tcl_AppendResult( interp, "command syntax: \"",
02468                           "plgfam ?fam num bmax?", "\"",
02469                           (char *) NULL);
02470         return TCL_ERROR;
02471     }
02472 
02473     if ( (!1 && 0 && (argc < (1 + 3 - 0))) ||
02474          (!1 && !0 && (argc != (3 + 1))) ||
02475          ( 1 && (argc != 1) && (argc != (3 + 1))) ) {
02476         Tcl_AppendResult( interp, "wrong # args: should be \"",
02477                           "plgfam ?fam num bmax?", "\"",
02478                           (char *) NULL);
02479         return TCL_ERROR;
02480     }
02481 
02482 /* fam is for output. */
02483 /* num is for output. */
02484 /* bmax is for output. */
02485 
02486     plgfam ( &fam, &num, &bmax );
02487 
02488     sprintf( buf, "%d", fam );
02489     if (argc > 1)
02490         Tcl_SetVar( interp, argv[1+0], buf, 0 );
02491     else
02492         Tcl_AppendResult( interp, buf, (char *) NULL );
02493     if (argc == 1)
02494         Tcl_AppendResult( interp, " ", (char *) NULL );
02495     sprintf( buf, "%d", num );
02496     if (argc > 1)
02497         Tcl_SetVar( interp, argv[1+1], buf, 0 );
02498     else
02499         Tcl_AppendResult( interp, buf, (char *) NULL );
02500     if (argc == 1)
02501         Tcl_AppendResult( interp, " ", (char *) NULL );
02502     sprintf( buf, "%d", bmax );
02503     if (argc > 1)
02504         Tcl_SetVar( interp, argv[1+2], buf, 0 );
02505     else
02506         Tcl_AppendResult( interp, buf, (char *) NULL );
02507 
02508     if (pl_errcode != 0) {
02509         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02510         return TCL_ERROR;
02511     }
02512 
02513     plflush();
02514     return TCL_OK;
02515 }
02516 
02517 /*--------------------------------------------------------------------------*\
02518  * plgfciCmd
02519  *
02520  * Processes plgfci Tcl command.
02521 \*--------------------------------------------------------------------------*/
02522 
02523 static int
02524 plgfciCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02525 {
02526     PLUNICODE fci;
02527 
02528     pl_errcode = 0; errmsg[0] = '\0';
02529 
02530     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02531         Tcl_AppendResult( interp, "command syntax: \"",
02532                           "plgfci ?fci?", "\"",
02533                           (char *) NULL);
02534         return TCL_ERROR;
02535     }
02536 
02537     if ( (!1 && 0 && (argc < (1 + 1 - 0))) ||
02538          (!1 && !0 && (argc != (1 + 1))) ||
02539          ( 1 && (argc != 1) && (argc != (1 + 1))) ) {
02540         Tcl_AppendResult( interp, "wrong # args: should be \"",
02541                           "plgfci ?fci?", "\"",
02542                           (char *) NULL);
02543         return TCL_ERROR;
02544     }
02545 
02546 /* fci is for output. */
02547 
02548     plgfci ( &fci );
02549 
02550     sprintf( buf, "%u", fci );
02551     if (argc > 1)
02552         Tcl_SetVar( interp, argv[1+0], buf, 0 );
02553     else
02554         Tcl_AppendResult( interp, buf, (char *) NULL );
02555 
02556     if (pl_errcode != 0) {
02557         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02558         return TCL_ERROR;
02559     }
02560 
02561     plflush();
02562     return TCL_OK;
02563 }
02564 
02565 /*--------------------------------------------------------------------------*\
02566  * plgfnamCmd
02567  *
02568  * Processes plgfnam Tcl command.
02569 \*--------------------------------------------------------------------------*/
02570 
02571 static int
02572 plgfnamCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02573 {
02574     char fnam[200];
02575 
02576     pl_errcode = 0; errmsg[0] = '\0';
02577 
02578     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02579         Tcl_AppendResult( interp, "command syntax: \"",
02580                           "plgfnam ?fnam?", "\"",
02581                           (char *) NULL);
02582         return TCL_ERROR;
02583     }
02584 
02585     if ( (!1 && 0 && (argc < (1 + 1 - 0))) ||
02586          (!1 && !0 && (argc != (1 + 1))) ||
02587          ( 1 && (argc != 1) && (argc != (1 + 1))) ) {
02588         Tcl_AppendResult( interp, "wrong # args: should be \"",
02589                           "plgfnam ?fnam?", "\"",
02590                           (char *) NULL);
02591         return TCL_ERROR;
02592     }
02593 
02594 /* fnam is for output. */
02595 
02596     plgfnam ( fnam );
02597 
02598     if (argc > 1)
02599        Tcl_SetVar( interp, argv[1+0], fnam, 0 );
02600     else
02601         Tcl_AppendResult( interp, fnam, (char *) NULL );
02602 
02603     if (pl_errcode != 0) {
02604         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02605         return TCL_ERROR;
02606     }
02607 
02608     plflush();
02609     return TCL_OK;
02610 }
02611 
02612 /*--------------------------------------------------------------------------*\
02613  * plgfontCmd
02614  *
02615  * Processes plgfont Tcl command.
02616 \*--------------------------------------------------------------------------*/
02617 
02618 static int
02619 plgfontCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02620 {
02621     PLINT family;
02622     PLINT style;
02623     PLINT weight;
02624 
02625     pl_errcode = 0; errmsg[0] = '\0';
02626 
02627     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02628         Tcl_AppendResult( interp, "command syntax: \"",
02629                           "plgfont ?family style weight?", "\"",
02630                           (char *) NULL);
02631         return TCL_ERROR;
02632     }
02633 
02634     if ( (!1 && 0 && (argc < (1 + 3 - 0))) ||
02635          (!1 && !0 && (argc != (3 + 1))) ||
02636          ( 1 && (argc != 1) && (argc != (3 + 1))) ) {
02637         Tcl_AppendResult( interp, "wrong # args: should be \"",
02638                           "plgfont ?family style weight?", "\"",
02639                           (char *) NULL);
02640         return TCL_ERROR;
02641     }
02642 
02643 /* family is for output. */
02644 /* style is for output. */
02645 /* weight is for output. */
02646 
02647     plgfont ( &family, &style, &weight );
02648 
02649     sprintf( buf, "%d", family );
02650     if (argc > 1)
02651         Tcl_SetVar( interp, argv[1+0], buf, 0 );
02652     else
02653         Tcl_AppendResult( interp, buf, (char *) NULL );
02654     if (argc == 1)
02655         Tcl_AppendResult( interp, " ", (char *) NULL );
02656     sprintf( buf, "%d", style );
02657     if (argc > 1)
02658         Tcl_SetVar( interp, argv[1+1], buf, 0 );
02659     else
02660         Tcl_AppendResult( interp, buf, (char *) NULL );
02661     if (argc == 1)
02662         Tcl_AppendResult( interp, " ", (char *) NULL );
02663     sprintf( buf, "%d", weight );
02664     if (argc > 1)
02665         Tcl_SetVar( interp, argv[1+2], buf, 0 );
02666     else
02667         Tcl_AppendResult( interp, buf, (char *) NULL );
02668 
02669     if (pl_errcode != 0) {
02670         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02671         return TCL_ERROR;
02672     }
02673 
02674     plflush();
02675     return TCL_OK;
02676 }
02677 
02678 /*--------------------------------------------------------------------------*\
02679  * plglevelCmd
02680  *
02681  * Processes plglevel Tcl command.
02682 \*--------------------------------------------------------------------------*/
02683 
02684 static int
02685 plglevelCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02686 {
02687     PLINT level;
02688 
02689     pl_errcode = 0; errmsg[0] = '\0';
02690 
02691     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02692         Tcl_AppendResult( interp, "command syntax: \"",
02693                           "plglevel ?level?", "\"",
02694                           (char *) NULL);
02695         return TCL_ERROR;
02696     }
02697 
02698     if ( (!1 && 0 && (argc < (1 + 1 - 0))) ||
02699          (!1 && !0 && (argc != (1 + 1))) ||
02700          ( 1 && (argc != 1) && (argc != (1 + 1))) ) {
02701         Tcl_AppendResult( interp, "wrong # args: should be \"",
02702                           "plglevel ?level?", "\"",
02703                           (char *) NULL);
02704         return TCL_ERROR;
02705     }
02706 
02707 /* level is for output. */
02708 
02709     plglevel ( &level );
02710 
02711     sprintf( buf, "%d", level );
02712     if (argc > 1)
02713         Tcl_SetVar( interp, argv[1+0], buf, 0 );
02714     else
02715         Tcl_AppendResult( interp, buf, (char *) NULL );
02716 
02717     if (pl_errcode != 0) {
02718         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02719         return TCL_ERROR;
02720     }
02721 
02722     plflush();
02723     return TCL_OK;
02724 }
02725 
02726 /*--------------------------------------------------------------------------*\
02727  * plgpageCmd
02728  *
02729  * Processes plgpage Tcl command.
02730 \*--------------------------------------------------------------------------*/
02731 
02732 static int
02733 plgpageCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02734 {
02735     PLFLT xp;
02736     PLFLT yp;
02737     PLINT xleng;
02738     PLINT yleng;
02739     PLINT xoff;
02740     PLINT yoff;
02741 
02742     pl_errcode = 0; errmsg[0] = '\0';
02743 
02744     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02745         Tcl_AppendResult( interp, "command syntax: \"",
02746                           "plgpage ?xp yp xleng yleng xoff yoff?", "\"",
02747                           (char *) NULL);
02748         return TCL_ERROR;
02749     }
02750 
02751     if ( (!1 && 0 && (argc < (1 + 6 - 0))) ||
02752          (!1 && !0 && (argc != (6 + 1))) ||
02753          ( 1 && (argc != 1) && (argc != (6 + 1))) ) {
02754         Tcl_AppendResult( interp, "wrong # args: should be \"",
02755                           "plgpage ?xp yp xleng yleng xoff yoff?", "\"",
02756                           (char *) NULL);
02757         return TCL_ERROR;
02758     }
02759 
02760 /* xp is for output. */
02761 /* yp is for output. */
02762 /* xleng is for output. */
02763 /* yleng is for output. */
02764 /* xoff is for output. */
02765 /* yoff is for output. */
02766 
02767     plgpage ( &xp, &yp, &xleng, &yleng, &xoff, &yoff );
02768 
02769     Tcl_PrintDouble( interp, xp, buf );
02770     if (argc > 1)
02771         Tcl_SetVar( interp, argv[1+0], buf, 0 );
02772     else
02773         Tcl_AppendResult( interp, buf, (char *) NULL );
02774     if (argc == 1)
02775         Tcl_AppendResult( interp, " ", (char *) NULL );
02776     Tcl_PrintDouble( interp, yp, buf );
02777     if (argc > 1)
02778         Tcl_SetVar( interp, argv[1+1], buf, 0 );
02779     else
02780         Tcl_AppendResult( interp, buf, (char *) NULL );
02781     if (argc == 1)
02782         Tcl_AppendResult( interp, " ", (char *) NULL );
02783     sprintf( buf, "%d", xleng );
02784     if (argc > 1)
02785         Tcl_SetVar( interp, argv[1+2], buf, 0 );
02786     else
02787         Tcl_AppendResult( interp, buf, (char *) NULL );
02788     if (argc == 1)
02789         Tcl_AppendResult( interp, " ", (char *) NULL );
02790     sprintf( buf, "%d", yleng );
02791     if (argc > 1)
02792         Tcl_SetVar( interp, argv[1+3], buf, 0 );
02793     else
02794         Tcl_AppendResult( interp, buf, (char *) NULL );
02795     if (argc == 1)
02796         Tcl_AppendResult( interp, " ", (char *) NULL );
02797     sprintf( buf, "%d", xoff );
02798     if (argc > 1)
02799         Tcl_SetVar( interp, argv[1+4], buf, 0 );
02800     else
02801         Tcl_AppendResult( interp, buf, (char *) NULL );
02802     if (argc == 1)
02803         Tcl_AppendResult( interp, " ", (char *) NULL );
02804     sprintf( buf, "%d", yoff );
02805     if (argc > 1)
02806         Tcl_SetVar( interp, argv[1+5], buf, 0 );
02807     else
02808         Tcl_AppendResult( interp, buf, (char *) NULL );
02809 
02810     if (pl_errcode != 0) {
02811         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02812         return TCL_ERROR;
02813     }
02814 
02815     plflush();
02816     return TCL_OK;
02817 }
02818 
02819 /*--------------------------------------------------------------------------*\
02820  * plgraCmd
02821  *
02822  * Processes plgra Tcl command.
02823 \*--------------------------------------------------------------------------*/
02824 
02825 static int
02826 plgraCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02827 {
02828 
02829     pl_errcode = 0; errmsg[0] = '\0';
02830 
02831     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02832         Tcl_AppendResult( interp, "command syntax: \"",
02833                           "plgra ", "\"",
02834                           (char *) NULL);
02835         return TCL_ERROR;
02836     }
02837 
02838     if ( (!0 && 0 && (argc < (1 + 0 - 0))) ||
02839          (!0 && !0 && (argc != (0 + 1))) ||
02840          ( 0 && (argc != 1) && (argc != (0 + 1))) ) {
02841         Tcl_AppendResult( interp, "wrong # args: should be \"",
02842                           "plgra ", "\"",
02843                           (char *) NULL);
02844         return TCL_ERROR;
02845     }
02846 
02847 
02848     plgra (  );
02849 
02850 
02851     if (pl_errcode != 0) {
02852         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02853         return TCL_ERROR;
02854     }
02855 
02856     plflush();
02857     return TCL_OK;
02858 }
02859 
02860 /*--------------------------------------------------------------------------*\
02861  * plgradientCmd
02862  *
02863  * Processes plgradient Tcl command.
02864 \*--------------------------------------------------------------------------*/
02865 
02866 static int
02867 plgradientCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02868 {
02869     PLINT n;
02870     PLFLT *x;
02871     tclMatrix *matx;
02872     PLFLT *y;
02873     tclMatrix *maty;
02874     PLFLT angle;
02875 
02876     pl_errcode = 0; errmsg[0] = '\0';
02877 
02878     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02879         Tcl_AppendResult( interp, "command syntax: \"",
02880                           "plgradient n x y angle", "\"",
02881                           (char *) NULL);
02882         return TCL_ERROR;
02883     }
02884 
02885     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
02886          (!0 && !0 && (argc != (4 + 1))) ||
02887          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
02888         Tcl_AppendResult( interp, "wrong # args: should be \"",
02889                           "plgradient n x y angle", "\"",
02890                           (char *) NULL);
02891         return TCL_ERROR;
02892     }
02893 
02894     n = atoi(argv[1+0]);
02895     matx = Tcl_GetMatrixPtr( interp, argv[1+1] );
02896     if (matx == NULL) return TCL_ERROR;
02897     x = matx->fdata;
02898     maty = Tcl_GetMatrixPtr( interp, argv[1+2] );
02899     if (maty == NULL) return TCL_ERROR;
02900     y = maty->fdata;
02901     angle = atof(argv[1+3]);
02902 
02903     plgradient ( n, x, y, angle );
02904 
02905 
02906     if (pl_errcode != 0) {
02907         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02908         return TCL_ERROR;
02909     }
02910 
02911     plflush();
02912     return TCL_OK;
02913 }
02914 
02915 /*--------------------------------------------------------------------------*\
02916  * plgspaCmd
02917  *
02918  * Processes plgspa Tcl command.
02919 \*--------------------------------------------------------------------------*/
02920 
02921 static int
02922 plgspaCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02923 {
02924     PLFLT xmin;
02925     PLFLT xmax;
02926     PLFLT ymin;
02927     PLFLT ymax;
02928 
02929     pl_errcode = 0; errmsg[0] = '\0';
02930 
02931     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
02932         Tcl_AppendResult( interp, "command syntax: \"",
02933                           "plgspa ?xmin xmax ymin ymax?", "\"",
02934                           (char *) NULL);
02935         return TCL_ERROR;
02936     }
02937 
02938     if ( (!1 && 0 && (argc < (1 + 4 - 0))) ||
02939          (!1 && !0 && (argc != (4 + 1))) ||
02940          ( 1 && (argc != 1) && (argc != (4 + 1))) ) {
02941         Tcl_AppendResult( interp, "wrong # args: should be \"",
02942                           "plgspa ?xmin xmax ymin ymax?", "\"",
02943                           (char *) NULL);
02944         return TCL_ERROR;
02945     }
02946 
02947 /* xmin is for output. */
02948 /* xmax is for output. */
02949 /* ymin is for output. */
02950 /* ymax is for output. */
02951 
02952     plgspa ( &xmin, &xmax, &ymin, &ymax );
02953 
02954     Tcl_PrintDouble( interp, xmin, buf );
02955     if (argc > 1)
02956         Tcl_SetVar( interp, argv[1+0], buf, 0 );
02957     else
02958         Tcl_AppendResult( interp, buf, (char *) NULL );
02959     if (argc == 1)
02960         Tcl_AppendResult( interp, " ", (char *) NULL );
02961     Tcl_PrintDouble( interp, xmax, buf );
02962     if (argc > 1)
02963         Tcl_SetVar( interp, argv[1+1], buf, 0 );
02964     else
02965         Tcl_AppendResult( interp, buf, (char *) NULL );
02966     if (argc == 1)
02967         Tcl_AppendResult( interp, " ", (char *) NULL );
02968     Tcl_PrintDouble( interp, ymin, buf );
02969     if (argc > 1)
02970         Tcl_SetVar( interp, argv[1+2], buf, 0 );
02971     else
02972         Tcl_AppendResult( interp, buf, (char *) NULL );
02973     if (argc == 1)
02974         Tcl_AppendResult( interp, " ", (char *) NULL );
02975     Tcl_PrintDouble( interp, ymax, buf );
02976     if (argc > 1)
02977         Tcl_SetVar( interp, argv[1+3], buf, 0 );
02978     else
02979         Tcl_AppendResult( interp, buf, (char *) NULL );
02980 
02981     if (pl_errcode != 0) {
02982         Tcl_AppendResult(interp, errmsg, (char *) NULL);
02983         return TCL_ERROR;
02984     }
02985 
02986     plflush();
02987     return TCL_OK;
02988 }
02989 
02990 /*--------------------------------------------------------------------------*\
02991  * plgstrmCmd
02992  *
02993  * Processes plgstrm Tcl command.
02994 \*--------------------------------------------------------------------------*/
02995 
02996 static int
02997 plgstrmCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
02998 {
02999     PLINT strm;
03000 
03001     pl_errcode = 0; errmsg[0] = '\0';
03002 
03003     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03004         Tcl_AppendResult( interp, "command syntax: \"",
03005                           "plgstrm ?strm?", "\"",
03006                           (char *) NULL);
03007         return TCL_ERROR;
03008     }
03009 
03010     if ( (!1 && 0 && (argc < (1 + 1 - 0))) ||
03011          (!1 && !0 && (argc != (1 + 1))) ||
03012          ( 1 && (argc != 1) && (argc != (1 + 1))) ) {
03013         Tcl_AppendResult( interp, "wrong # args: should be \"",
03014                           "plgstrm ?strm?", "\"",
03015                           (char *) NULL);
03016         return TCL_ERROR;
03017     }
03018 
03019 /* strm is for output. */
03020 
03021     plgstrm ( &strm );
03022 
03023     sprintf( buf, "%d", strm );
03024     if (argc > 1)
03025         Tcl_SetVar( interp, argv[1+0], buf, 0 );
03026     else
03027         Tcl_AppendResult( interp, buf, (char *) NULL );
03028 
03029     if (pl_errcode != 0) {
03030         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03031         return TCL_ERROR;
03032     }
03033 
03034     plflush();
03035     return TCL_OK;
03036 }
03037 
03038 /*--------------------------------------------------------------------------*\
03039  * plgverCmd
03040  *
03041  * Processes plgver Tcl command.
03042 \*--------------------------------------------------------------------------*/
03043 
03044 static int
03045 plgverCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03046 {
03047     char ver[200];
03048 
03049     pl_errcode = 0; errmsg[0] = '\0';
03050 
03051     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03052         Tcl_AppendResult( interp, "command syntax: \"",
03053                           "plgver ?ver?", "\"",
03054                           (char *) NULL);
03055         return TCL_ERROR;
03056     }
03057 
03058     if ( (!1 && 0 && (argc < (1 + 1 - 0))) ||
03059          (!1 && !0 && (argc != (1 + 1))) ||
03060          ( 1 && (argc != 1) && (argc != (1 + 1))) ) {
03061         Tcl_AppendResult( interp, "wrong # args: should be \"",
03062                           "plgver ?ver?", "\"",
03063                           (char *) NULL);
03064         return TCL_ERROR;
03065     }
03066 
03067 /* ver is for output. */
03068 
03069     plgver ( ver );
03070 
03071     if (argc > 1)
03072        Tcl_SetVar( interp, argv[1+0], ver, 0 );
03073     else
03074         Tcl_AppendResult( interp, ver, (char *) NULL );
03075 
03076     if (pl_errcode != 0) {
03077         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03078         return TCL_ERROR;
03079     }
03080 
03081     plflush();
03082     return TCL_OK;
03083 }
03084 
03085 /*--------------------------------------------------------------------------*\
03086  * plgvpdCmd
03087  *
03088  * Processes plgvpd Tcl command.
03089 \*--------------------------------------------------------------------------*/
03090 
03091 static int
03092 plgvpdCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03093 {
03094     PLFLT xmin;
03095     PLFLT xmax;
03096     PLFLT ymin;
03097     PLFLT ymax;
03098 
03099     pl_errcode = 0; errmsg[0] = '\0';
03100 
03101     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03102         Tcl_AppendResult( interp, "command syntax: \"",
03103                           "plgvpd ?xmin xmax ymin ymax?", "\"",
03104                           (char *) NULL);
03105         return TCL_ERROR;
03106     }
03107 
03108     if ( (!1 && 0 && (argc < (1 + 4 - 0))) ||
03109          (!1 && !0 && (argc != (4 + 1))) ||
03110          ( 1 && (argc != 1) && (argc != (4 + 1))) ) {
03111         Tcl_AppendResult( interp, "wrong # args: should be \"",
03112                           "plgvpd ?xmin xmax ymin ymax?", "\"",
03113                           (char *) NULL);
03114         return TCL_ERROR;
03115     }
03116 
03117 /* xmin is for output. */
03118 /* xmax is for output. */
03119 /* ymin is for output. */
03120 /* ymax is for output. */
03121 
03122     plgvpd ( &xmin, &xmax, &ymin, &ymax );
03123 
03124     Tcl_PrintDouble( interp, xmin, buf );
03125     if (argc > 1)
03126         Tcl_SetVar( interp, argv[1+0], buf, 0 );
03127     else
03128         Tcl_AppendResult( interp, buf, (char *) NULL );
03129     if (argc == 1)
03130         Tcl_AppendResult( interp, " ", (char *) NULL );
03131     Tcl_PrintDouble( interp, xmax, buf );
03132     if (argc > 1)
03133         Tcl_SetVar( interp, argv[1+1], buf, 0 );
03134     else
03135         Tcl_AppendResult( interp, buf, (char *) NULL );
03136     if (argc == 1)
03137         Tcl_AppendResult( interp, " ", (char *) NULL );
03138     Tcl_PrintDouble( interp, ymin, buf );
03139     if (argc > 1)
03140         Tcl_SetVar( interp, argv[1+2], buf, 0 );
03141     else
03142         Tcl_AppendResult( interp, buf, (char *) NULL );
03143     if (argc == 1)
03144         Tcl_AppendResult( interp, " ", (char *) NULL );
03145     Tcl_PrintDouble( interp, ymax, buf );
03146     if (argc > 1)
03147         Tcl_SetVar( interp, argv[1+3], buf, 0 );
03148     else
03149         Tcl_AppendResult( interp, buf, (char *) NULL );
03150 
03151     if (pl_errcode != 0) {
03152         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03153         return TCL_ERROR;
03154     }
03155 
03156     plflush();
03157     return TCL_OK;
03158 }
03159 
03160 /*--------------------------------------------------------------------------*\
03161  * plgvpwCmd
03162  *
03163  * Processes plgvpw Tcl command.
03164 \*--------------------------------------------------------------------------*/
03165 
03166 static int
03167 plgvpwCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03168 {
03169     PLFLT xmin;
03170     PLFLT xmax;
03171     PLFLT ymin;
03172     PLFLT ymax;
03173 
03174     pl_errcode = 0; errmsg[0] = '\0';
03175 
03176     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03177         Tcl_AppendResult( interp, "command syntax: \"",
03178                           "plgvpw ?xmin xmax ymin ymax?", "\"",
03179                           (char *) NULL);
03180         return TCL_ERROR;
03181     }
03182 
03183     if ( (!1 && 0 && (argc < (1 + 4 - 0))) ||
03184          (!1 && !0 && (argc != (4 + 1))) ||
03185          ( 1 && (argc != 1) && (argc != (4 + 1))) ) {
03186         Tcl_AppendResult( interp, "wrong # args: should be \"",
03187                           "plgvpw ?xmin xmax ymin ymax?", "\"",
03188                           (char *) NULL);
03189         return TCL_ERROR;
03190     }
03191 
03192 /* xmin is for output. */
03193 /* xmax is for output. */
03194 /* ymin is for output. */
03195 /* ymax is for output. */
03196 
03197     plgvpw ( &xmin, &xmax, &ymin, &ymax );
03198 
03199     Tcl_PrintDouble( interp, xmin, buf );
03200     if (argc > 1)
03201         Tcl_SetVar( interp, argv[1+0], buf, 0 );
03202     else
03203         Tcl_AppendResult( interp, buf, (char *) NULL );
03204     if (argc == 1)
03205         Tcl_AppendResult( interp, " ", (char *) NULL );
03206     Tcl_PrintDouble( interp, xmax, buf );
03207     if (argc > 1)
03208         Tcl_SetVar( interp, argv[1+1], buf, 0 );
03209     else
03210         Tcl_AppendResult( interp, buf, (char *) NULL );
03211     if (argc == 1)
03212         Tcl_AppendResult( interp, " ", (char *) NULL );
03213     Tcl_PrintDouble( interp, ymin, buf );
03214     if (argc > 1)
03215         Tcl_SetVar( interp, argv[1+2], buf, 0 );
03216     else
03217         Tcl_AppendResult( interp, buf, (char *) NULL );
03218     if (argc == 1)
03219         Tcl_AppendResult( interp, " ", (char *) NULL );
03220     Tcl_PrintDouble( interp, ymax, buf );
03221     if (argc > 1)
03222         Tcl_SetVar( interp, argv[1+3], buf, 0 );
03223     else
03224         Tcl_AppendResult( interp, buf, (char *) NULL );
03225 
03226     if (pl_errcode != 0) {
03227         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03228         return TCL_ERROR;
03229     }
03230 
03231     plflush();
03232     return TCL_OK;
03233 }
03234 
03235 /*--------------------------------------------------------------------------*\
03236  * plgxaxCmd
03237  *
03238  * Processes plgxax Tcl command.
03239 \*--------------------------------------------------------------------------*/
03240 
03241 static int
03242 plgxaxCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03243 {
03244     PLINT digmax;
03245     PLINT digits;
03246 
03247     pl_errcode = 0; errmsg[0] = '\0';
03248 
03249     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03250         Tcl_AppendResult( interp, "command syntax: \"",
03251                           "plgxax ?digmax digits?", "\"",
03252                           (char *) NULL);
03253         return TCL_ERROR;
03254     }
03255 
03256     if ( (!1 && 0 && (argc < (1 + 2 - 0))) ||
03257          (!1 && !0 && (argc != (2 + 1))) ||
03258          ( 1 && (argc != 1) && (argc != (2 + 1))) ) {
03259         Tcl_AppendResult( interp, "wrong # args: should be \"",
03260                           "plgxax ?digmax digits?", "\"",
03261                           (char *) NULL);
03262         return TCL_ERROR;
03263     }
03264 
03265 /* digmax is for output. */
03266 /* digits is for output. */
03267 
03268     plgxax ( &digmax, &digits );
03269 
03270     sprintf( buf, "%d", digmax );
03271     if (argc > 1)
03272         Tcl_SetVar( interp, argv[1+0], buf, 0 );
03273     else
03274         Tcl_AppendResult( interp, buf, (char *) NULL );
03275     if (argc == 1)
03276         Tcl_AppendResult( interp, " ", (char *) NULL );
03277     sprintf( buf, "%d", digits );
03278     if (argc > 1)
03279         Tcl_SetVar( interp, argv[1+1], buf, 0 );
03280     else
03281         Tcl_AppendResult( interp, buf, (char *) NULL );
03282 
03283     if (pl_errcode != 0) {
03284         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03285         return TCL_ERROR;
03286     }
03287 
03288     plflush();
03289     return TCL_OK;
03290 }
03291 
03292 /*--------------------------------------------------------------------------*\
03293  * plgyaxCmd
03294  *
03295  * Processes plgyax Tcl command.
03296 \*--------------------------------------------------------------------------*/
03297 
03298 static int
03299 plgyaxCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03300 {
03301     PLINT digmax;
03302     PLINT digits;
03303 
03304     pl_errcode = 0; errmsg[0] = '\0';
03305 
03306     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03307         Tcl_AppendResult( interp, "command syntax: \"",
03308                           "plgyax ?digmax digits?", "\"",
03309                           (char *) NULL);
03310         return TCL_ERROR;
03311     }
03312 
03313     if ( (!1 && 0 && (argc < (1 + 2 - 0))) ||
03314          (!1 && !0 && (argc != (2 + 1))) ||
03315          ( 1 && (argc != 1) && (argc != (2 + 1))) ) {
03316         Tcl_AppendResult( interp, "wrong # args: should be \"",
03317                           "plgyax ?digmax digits?", "\"",
03318                           (char *) NULL);
03319         return TCL_ERROR;
03320     }
03321 
03322 /* digmax is for output. */
03323 /* digits is for output. */
03324 
03325     plgyax ( &digmax, &digits );
03326 
03327     sprintf( buf, "%d", digmax );
03328     if (argc > 1)
03329         Tcl_SetVar( interp, argv[1+0], buf, 0 );
03330     else
03331         Tcl_AppendResult( interp, buf, (char *) NULL );
03332     if (argc == 1)
03333         Tcl_AppendResult( interp, " ", (char *) NULL );
03334     sprintf( buf, "%d", digits );
03335     if (argc > 1)
03336         Tcl_SetVar( interp, argv[1+1], buf, 0 );
03337     else
03338         Tcl_AppendResult( interp, buf, (char *) NULL );
03339 
03340     if (pl_errcode != 0) {
03341         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03342         return TCL_ERROR;
03343     }
03344 
03345     plflush();
03346     return TCL_OK;
03347 }
03348 
03349 /*--------------------------------------------------------------------------*\
03350  * plgzaxCmd
03351  *
03352  * Processes plgzax Tcl command.
03353 \*--------------------------------------------------------------------------*/
03354 
03355 static int
03356 plgzaxCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03357 {
03358     PLINT digmax;
03359     PLINT digits;
03360 
03361     pl_errcode = 0; errmsg[0] = '\0';
03362 
03363     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03364         Tcl_AppendResult( interp, "command syntax: \"",
03365                           "plgzax ?digmax digits?", "\"",
03366                           (char *) NULL);
03367         return TCL_ERROR;
03368     }
03369 
03370     if ( (!1 && 0 && (argc < (1 + 2 - 0))) ||
03371          (!1 && !0 && (argc != (2 + 1))) ||
03372          ( 1 && (argc != 1) && (argc != (2 + 1))) ) {
03373         Tcl_AppendResult( interp, "wrong # args: should be \"",
03374                           "plgzax ?digmax digits?", "\"",
03375                           (char *) NULL);
03376         return TCL_ERROR;
03377     }
03378 
03379 /* digmax is for output. */
03380 /* digits is for output. */
03381 
03382     plgzax ( &digmax, &digits );
03383 
03384     sprintf( buf, "%d", digmax );
03385     if (argc > 1)
03386         Tcl_SetVar( interp, argv[1+0], buf, 0 );
03387     else
03388         Tcl_AppendResult( interp, buf, (char *) NULL );
03389     if (argc == 1)
03390         Tcl_AppendResult( interp, " ", (char *) NULL );
03391     sprintf( buf, "%d", digits );
03392     if (argc > 1)
03393         Tcl_SetVar( interp, argv[1+1], buf, 0 );
03394     else
03395         Tcl_AppendResult( interp, buf, (char *) NULL );
03396 
03397     if (pl_errcode != 0) {
03398         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03399         return TCL_ERROR;
03400     }
03401 
03402     plflush();
03403     return TCL_OK;
03404 }
03405 
03406 /*--------------------------------------------------------------------------*\
03407  * plhistCmd
03408  *
03409  * Processes plhist Tcl command.
03410 \*--------------------------------------------------------------------------*/
03411 
03412 static int
03413 plhistCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03414 {
03415     PLINT n;
03416     PLFLT *data;
03417     tclMatrix *matdata;
03418     PLFLT datmin;
03419     PLFLT datmax;
03420     PLINT nbin;
03421     PLINT oldwin;
03422 
03423     pl_errcode = 0; errmsg[0] = '\0';
03424 
03425     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03426         Tcl_AppendResult( interp, "command syntax: \"",
03427                           "plhist n data datmin datmax nbin oldwin", "\"",
03428                           (char *) NULL);
03429         return TCL_ERROR;
03430     }
03431 
03432     if ( (!0 && 0 && (argc < (1 + 6 - 0))) ||
03433          (!0 && !0 && (argc != (6 + 1))) ||
03434          ( 0 && (argc != 1) && (argc != (6 + 1))) ) {
03435         Tcl_AppendResult( interp, "wrong # args: should be \"",
03436                           "plhist n data datmin datmax nbin oldwin", "\"",
03437                           (char *) NULL);
03438         return TCL_ERROR;
03439     }
03440 
03441     n = atoi(argv[1+0]);
03442     matdata = Tcl_GetMatrixPtr( interp, argv[1+1] );
03443     if (matdata == NULL) return TCL_ERROR;
03444     data = matdata->fdata;
03445     datmin = atof(argv[1+2]);
03446     datmax = atof(argv[1+3]);
03447     nbin = atoi(argv[1+4]);
03448     oldwin = atoi(argv[1+5]);
03449 
03450     plhist ( n, data, datmin, datmax, nbin, oldwin );
03451 
03452 
03453     if (pl_errcode != 0) {
03454         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03455         return TCL_ERROR;
03456     }
03457 
03458     plflush();
03459     return TCL_OK;
03460 }
03461 
03462 /*--------------------------------------------------------------------------*\
03463  * plhlsrgbCmd
03464  *
03465  * Processes plhlsrgb Tcl command.
03466 \*--------------------------------------------------------------------------*/
03467 
03468 static int
03469 plhlsrgbCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03470 {
03471     PLFLT h;
03472     PLFLT l;
03473     PLFLT s;
03474     PLFLT r;
03475     PLFLT g;
03476     PLFLT b;
03477 
03478     pl_errcode = 0; errmsg[0] = '\0';
03479 
03480     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03481         Tcl_AppendResult( interp, "command syntax: \"",
03482                           "plhlsrgb ?h l s r g b?", "\"",
03483                           (char *) NULL);
03484         return TCL_ERROR;
03485     }
03486 
03487     if ( (!1 && 0 && (argc < (1 + 6 - 0))) ||
03488          (!1 && !0 && (argc != (6 + 1))) ||
03489          ( 1 && (argc != 1) && (argc != (6 + 1))) ) {
03490         Tcl_AppendResult( interp, "wrong # args: should be \"",
03491                           "plhlsrgb ?h l s r g b?", "\"",
03492                           (char *) NULL);
03493         return TCL_ERROR;
03494     }
03495 
03496     h = atof(argv[1+0]);
03497     l = atof(argv[1+1]);
03498     s = atof(argv[1+2]);
03499 /* r is for output. */
03500 /* g is for output. */
03501 /* b is for output. */
03502 
03503     plhlsrgb ( h, l, s, &r, &g, &b );
03504 
03505     if (argc == 1)
03506         Tcl_AppendResult( interp, " ", (char *) NULL );
03507     Tcl_PrintDouble( interp, r, buf );
03508     if (argc > 1)
03509         Tcl_SetVar( interp, argv[1+3], buf, 0 );
03510     else
03511         Tcl_AppendResult( interp, buf, (char *) NULL );
03512     if (argc == 1)
03513         Tcl_AppendResult( interp, " ", (char *) NULL );
03514     Tcl_PrintDouble( interp, g, buf );
03515     if (argc > 1)
03516         Tcl_SetVar( interp, argv[1+4], buf, 0 );
03517     else
03518         Tcl_AppendResult( interp, buf, (char *) NULL );
03519     if (argc == 1)
03520         Tcl_AppendResult( interp, " ", (char *) NULL );
03521     Tcl_PrintDouble( interp, b, buf );
03522     if (argc > 1)
03523         Tcl_SetVar( interp, argv[1+5], buf, 0 );
03524     else
03525         Tcl_AppendResult( interp, buf, (char *) NULL );
03526 
03527     if (pl_errcode != 0) {
03528         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03529         return TCL_ERROR;
03530     }
03531 
03532     plflush();
03533     return TCL_OK;
03534 }
03535 
03536 /*--------------------------------------------------------------------------*\
03537  * plinitCmd
03538  *
03539  * Processes plinit Tcl command.
03540 \*--------------------------------------------------------------------------*/
03541 
03542 static int
03543 plinitCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03544 {
03545 
03546     pl_errcode = 0; errmsg[0] = '\0';
03547 
03548     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03549         Tcl_AppendResult( interp, "command syntax: \"",
03550                           "plinit ", "\"",
03551                           (char *) NULL);
03552         return TCL_ERROR;
03553     }
03554 
03555     if ( (!0 && 0 && (argc < (1 + 0 - 0))) ||
03556          (!0 && !0 && (argc != (0 + 1))) ||
03557          ( 0 && (argc != 1) && (argc != (0 + 1))) ) {
03558         Tcl_AppendResult( interp, "wrong # args: should be \"",
03559                           "plinit ", "\"",
03560                           (char *) NULL);
03561         return TCL_ERROR;
03562     }
03563 
03564 
03565     plinit (  );
03566 
03567 
03568     if (pl_errcode != 0) {
03569         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03570         return TCL_ERROR;
03571     }
03572 
03573     plflush();
03574     return TCL_OK;
03575 }
03576 
03577 /*--------------------------------------------------------------------------*\
03578  * pljoinCmd
03579  *
03580  * Processes pljoin Tcl command.
03581 \*--------------------------------------------------------------------------*/
03582 
03583 static int
03584 pljoinCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03585 {
03586     PLFLT x1;
03587     PLFLT y1;
03588     PLFLT x2;
03589     PLFLT y2;
03590 
03591     pl_errcode = 0; errmsg[0] = '\0';
03592 
03593     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03594         Tcl_AppendResult( interp, "command syntax: \"",
03595                           "pljoin x1 y1 x2 y2", "\"",
03596                           (char *) NULL);
03597         return TCL_ERROR;
03598     }
03599 
03600     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
03601          (!0 && !0 && (argc != (4 + 1))) ||
03602          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
03603         Tcl_AppendResult( interp, "wrong # args: should be \"",
03604                           "pljoin x1 y1 x2 y2", "\"",
03605                           (char *) NULL);
03606         return TCL_ERROR;
03607     }
03608 
03609     x1 = atof(argv[1+0]);
03610     y1 = atof(argv[1+1]);
03611     x2 = atof(argv[1+2]);
03612     y2 = atof(argv[1+3]);
03613 
03614     pljoin ( x1, y1, x2, y2 );
03615 
03616 
03617     if (pl_errcode != 0) {
03618         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03619         return TCL_ERROR;
03620     }
03621 
03622     plflush();
03623     return TCL_OK;
03624 }
03625 
03626 /*--------------------------------------------------------------------------*\
03627  * pllabCmd
03628  *
03629  * Processes pllab Tcl command.
03630 \*--------------------------------------------------------------------------*/
03631 
03632 static int
03633 pllabCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03634 {
03635     const char *xlabel;
03636     const char *ylabel;
03637     const char *tlabel;
03638 
03639     pl_errcode = 0; errmsg[0] = '\0';
03640 
03641     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03642         Tcl_AppendResult( interp, "command syntax: \"",
03643                           "pllab xlabel ylabel tlabel", "\"",
03644                           (char *) NULL);
03645         return TCL_ERROR;
03646     }
03647 
03648     if ( (!0 && 0 && (argc < (1 + 3 - 0))) ||
03649          (!0 && !0 && (argc != (3 + 1))) ||
03650          ( 0 && (argc != 1) && (argc != (3 + 1))) ) {
03651         Tcl_AppendResult( interp, "wrong # args: should be \"",
03652                           "pllab xlabel ylabel tlabel", "\"",
03653                           (char *) NULL);
03654         return TCL_ERROR;
03655     }
03656 
03657     xlabel = argv[1+0];
03658     ylabel = argv[1+1];
03659     tlabel = argv[1+2];
03660 
03661     pllab ( xlabel, ylabel, tlabel );
03662 
03663 
03664     if (pl_errcode != 0) {
03665         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03666         return TCL_ERROR;
03667     }
03668 
03669     plflush();
03670     return TCL_OK;
03671 }
03672 
03673 /*--------------------------------------------------------------------------*\
03674  * pllightsourceCmd
03675  *
03676  * Processes pllightsource Tcl command.
03677 \*--------------------------------------------------------------------------*/
03678 
03679 static int
03680 pllightsourceCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03681 {
03682     PLFLT x;
03683     PLFLT y;
03684     PLFLT z;
03685 
03686     pl_errcode = 0; errmsg[0] = '\0';
03687 
03688     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03689         Tcl_AppendResult( interp, "command syntax: \"",
03690                           "pllightsource x y z", "\"",
03691                           (char *) NULL);
03692         return TCL_ERROR;
03693     }
03694 
03695     if ( (!0 && 0 && (argc < (1 + 3 - 0))) ||
03696          (!0 && !0 && (argc != (3 + 1))) ||
03697          ( 0 && (argc != 1) && (argc != (3 + 1))) ) {
03698         Tcl_AppendResult( interp, "wrong # args: should be \"",
03699                           "pllightsource x y z", "\"",
03700                           (char *) NULL);
03701         return TCL_ERROR;
03702     }
03703 
03704     x = atof(argv[1+0]);
03705     y = atof(argv[1+1]);
03706     z = atof(argv[1+2]);
03707 
03708     pllightsource ( x, y, z );
03709 
03710 
03711     if (pl_errcode != 0) {
03712         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03713         return TCL_ERROR;
03714     }
03715 
03716     plflush();
03717     return TCL_OK;
03718 }
03719 
03720 /*--------------------------------------------------------------------------*\
03721  * pllineCmd
03722  *
03723  * Processes plline Tcl command.
03724 \*--------------------------------------------------------------------------*/
03725 
03726 static int
03727 pllineCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03728 {
03729     PLINT n;
03730     PLFLT *x;
03731     tclMatrix *matx;
03732     PLFLT *y;
03733     tclMatrix *maty;
03734 
03735     pl_errcode = 0; errmsg[0] = '\0';
03736 
03737     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03738         Tcl_AppendResult( interp, "command syntax: \"",
03739                           "plline n x y", "\"",
03740                           (char *) NULL);
03741         return TCL_ERROR;
03742     }
03743 
03744     if ( (!0 && 0 && (argc < (1 + 3 - 0))) ||
03745          (!0 && !0 && (argc != (3 + 1))) ||
03746          ( 0 && (argc != 1) && (argc != (3 + 1))) ) {
03747         Tcl_AppendResult( interp, "wrong # args: should be \"",
03748                           "plline n x y", "\"",
03749                           (char *) NULL);
03750         return TCL_ERROR;
03751     }
03752 
03753     n = atoi(argv[1+0]);
03754     matx = Tcl_GetMatrixPtr( interp, argv[1+1] );
03755     if (matx == NULL) return TCL_ERROR;
03756     x = matx->fdata;
03757     maty = Tcl_GetMatrixPtr( interp, argv[1+2] );
03758     if (maty == NULL) return TCL_ERROR;
03759     y = maty->fdata;
03760 
03761     plline ( n, x, y );
03762 
03763 
03764     if (pl_errcode != 0) {
03765         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03766         return TCL_ERROR;
03767     }
03768 
03769     plflush();
03770     return TCL_OK;
03771 }
03772 
03773 /*--------------------------------------------------------------------------*\
03774  * plline3Cmd
03775  *
03776  * Processes plline3 Tcl command.
03777 \*--------------------------------------------------------------------------*/
03778 
03779 static int
03780 plline3Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03781 {
03782     PLINT n;
03783     PLFLT *x;
03784     tclMatrix *matx;
03785     PLFLT *y;
03786     tclMatrix *maty;
03787     PLFLT *z;
03788     tclMatrix *matz;
03789 
03790     pl_errcode = 0; errmsg[0] = '\0';
03791 
03792     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03793         Tcl_AppendResult( interp, "command syntax: \"",
03794                           "plline3 n x y z", "\"",
03795                           (char *) NULL);
03796         return TCL_ERROR;
03797     }
03798 
03799     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
03800          (!0 && !0 && (argc != (4 + 1))) ||
03801          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
03802         Tcl_AppendResult( interp, "wrong # args: should be \"",
03803                           "plline3 n x y z", "\"",
03804                           (char *) NULL);
03805         return TCL_ERROR;
03806     }
03807 
03808     n = atoi(argv[1+0]);
03809     matx = Tcl_GetMatrixPtr( interp, argv[1+1] );
03810     if (matx == NULL) return TCL_ERROR;
03811     x = matx->fdata;
03812     maty = Tcl_GetMatrixPtr( interp, argv[1+2] );
03813     if (maty == NULL) return TCL_ERROR;
03814     y = maty->fdata;
03815     matz = Tcl_GetMatrixPtr( interp, argv[1+3] );
03816     if (matz == NULL) return TCL_ERROR;
03817     z = matz->fdata;
03818 
03819     plline3 ( n, x, y, z );
03820 
03821 
03822     if (pl_errcode != 0) {
03823         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03824         return TCL_ERROR;
03825     }
03826 
03827     plflush();
03828     return TCL_OK;
03829 }
03830 
03831 /*--------------------------------------------------------------------------*\
03832  * pllstyCmd
03833  *
03834  * Processes pllsty Tcl command.
03835 \*--------------------------------------------------------------------------*/
03836 
03837 static int
03838 pllstyCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03839 {
03840     PLINT lin;
03841 
03842     pl_errcode = 0; errmsg[0] = '\0';
03843 
03844     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03845         Tcl_AppendResult( interp, "command syntax: \"",
03846                           "pllsty lin", "\"",
03847                           (char *) NULL);
03848         return TCL_ERROR;
03849     }
03850 
03851     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
03852          (!0 && !0 && (argc != (1 + 1))) ||
03853          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
03854         Tcl_AppendResult( interp, "wrong # args: should be \"",
03855                           "pllsty lin", "\"",
03856                           (char *) NULL);
03857         return TCL_ERROR;
03858     }
03859 
03860     lin = atoi(argv[1+0]);
03861 
03862     pllsty ( lin );
03863 
03864 
03865     if (pl_errcode != 0) {
03866         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03867         return TCL_ERROR;
03868     }
03869 
03870     plflush();
03871     return TCL_OK;
03872 }
03873 
03874 /*--------------------------------------------------------------------------*\
03875  * plmkstrmCmd
03876  *
03877  * Processes plmkstrm Tcl command.
03878 \*--------------------------------------------------------------------------*/
03879 
03880 static int
03881 plmkstrmCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03882 {
03883     PLINT strm;
03884 
03885     pl_errcode = 0; errmsg[0] = '\0';
03886 
03887     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03888         Tcl_AppendResult( interp, "command syntax: \"",
03889                           "plmkstrm ?strm?", "\"",
03890                           (char *) NULL);
03891         return TCL_ERROR;
03892     }
03893 
03894     if ( (!1 && 0 && (argc < (1 + 1 - 0))) ||
03895          (!1 && !0 && (argc != (1 + 1))) ||
03896          ( 1 && (argc != 1) && (argc != (1 + 1))) ) {
03897         Tcl_AppendResult( interp, "wrong # args: should be \"",
03898                           "plmkstrm ?strm?", "\"",
03899                           (char *) NULL);
03900         return TCL_ERROR;
03901     }
03902 
03903 /* strm is for output. */
03904 
03905     plmkstrm ( &strm );
03906 
03907     sprintf( buf, "%d", strm );
03908     if (argc > 1)
03909         Tcl_SetVar( interp, argv[1+0], buf, 0 );
03910     else
03911         Tcl_AppendResult( interp, buf, (char *) NULL );
03912 
03913     if (pl_errcode != 0) {
03914         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03915         return TCL_ERROR;
03916     }
03917 
03918     plflush();
03919     return TCL_OK;
03920 }
03921 
03922 /*--------------------------------------------------------------------------*\
03923  * plmtexCmd
03924  *
03925  * Processes plmtex Tcl command.
03926 \*--------------------------------------------------------------------------*/
03927 
03928 static int
03929 plmtexCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03930 {
03931     const char *side;
03932     PLFLT disp;
03933     PLFLT pos;
03934     PLFLT just;
03935     const char *text;
03936 
03937     pl_errcode = 0; errmsg[0] = '\0';
03938 
03939     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03940         Tcl_AppendResult( interp, "command syntax: \"",
03941                           "plmtex side disp pos just text", "\"",
03942                           (char *) NULL);
03943         return TCL_ERROR;
03944     }
03945 
03946     if ( (!0 && 0 && (argc < (1 + 5 - 0))) ||
03947          (!0 && !0 && (argc != (5 + 1))) ||
03948          ( 0 && (argc != 1) && (argc != (5 + 1))) ) {
03949         Tcl_AppendResult( interp, "wrong # args: should be \"",
03950                           "plmtex side disp pos just text", "\"",
03951                           (char *) NULL);
03952         return TCL_ERROR;
03953     }
03954 
03955     side = argv[1+0];
03956     disp = atof(argv[1+1]);
03957     pos = atof(argv[1+2]);
03958     just = atof(argv[1+3]);
03959     text = argv[1+4];
03960 
03961     plmtex ( side, disp, pos, just, text );
03962 
03963 
03964     if (pl_errcode != 0) {
03965         Tcl_AppendResult(interp, errmsg, (char *) NULL);
03966         return TCL_ERROR;
03967     }
03968 
03969     plflush();
03970     return TCL_OK;
03971 }
03972 
03973 /*--------------------------------------------------------------------------*\
03974  * plmtex3Cmd
03975  *
03976  * Processes plmtex3 Tcl command.
03977 \*--------------------------------------------------------------------------*/
03978 
03979 static int
03980 plmtex3Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
03981 {
03982     const char *side;
03983     PLFLT disp;
03984     PLFLT pos;
03985     PLFLT just;
03986     const char *text;
03987 
03988     pl_errcode = 0; errmsg[0] = '\0';
03989 
03990     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
03991         Tcl_AppendResult( interp, "command syntax: \"",
03992                           "plmtex3 side disp pos just text", "\"",
03993                           (char *) NULL);
03994         return TCL_ERROR;
03995     }
03996 
03997     if ( (!0 && 0 && (argc < (1 + 5 - 0))) ||
03998          (!0 && !0 && (argc != (5 + 1))) ||
03999          ( 0 && (argc != 1) && (argc != (5 + 1))) ) {
04000         Tcl_AppendResult( interp, "wrong # args: should be \"",
04001                           "plmtex3 side disp pos just text", "\"",
04002                           (char *) NULL);
04003         return TCL_ERROR;
04004     }
04005 
04006     side = argv[1+0];
04007     disp = atof(argv[1+1]);
04008     pos = atof(argv[1+2]);
04009     just = atof(argv[1+3]);
04010     text = argv[1+4];
04011 
04012     plmtex3 ( side, disp, pos, just, text );
04013 
04014 
04015     if (pl_errcode != 0) {
04016         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04017         return TCL_ERROR;
04018     }
04019 
04020     plflush();
04021     return TCL_OK;
04022 }
04023 
04024 /*--------------------------------------------------------------------------*\
04025  * plpatCmd
04026  *
04027  * Processes plpat Tcl command.
04028 \*--------------------------------------------------------------------------*/
04029 
04030 static int
04031 plpatCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04032 {
04033     PLINT nlin;
04034     PLINT *inc;
04035     tclMatrix *matinc;
04036     PLINT *del;
04037     tclMatrix *matdel;
04038 
04039     pl_errcode = 0; errmsg[0] = '\0';
04040 
04041     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04042         Tcl_AppendResult( interp, "command syntax: \"",
04043                           "plpat nlin inc del", "\"",
04044                           (char *) NULL);
04045         return TCL_ERROR;
04046     }
04047 
04048     if ( (!0 && 0 && (argc < (1 + 3 - 0))) ||
04049          (!0 && !0 && (argc != (3 + 1))) ||
04050          ( 0 && (argc != 1) && (argc != (3 + 1))) ) {
04051         Tcl_AppendResult( interp, "wrong # args: should be \"",
04052                           "plpat nlin inc del", "\"",
04053                           (char *) NULL);
04054         return TCL_ERROR;
04055     }
04056 
04057     nlin = atoi(argv[1+0]);
04058     matinc = Tcl_GetMatrixPtr( interp, argv[1+1] );
04059     if (matinc == NULL) return TCL_ERROR;
04060     inc = matinc->idata;
04061     matdel = Tcl_GetMatrixPtr( interp, argv[1+2] );
04062     if (matdel == NULL) return TCL_ERROR;
04063     del = matdel->idata;
04064 
04065     plpat ( nlin, inc, del );
04066 
04067 
04068     if (pl_errcode != 0) {
04069         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04070         return TCL_ERROR;
04071     }
04072 
04073     plflush();
04074     return TCL_OK;
04075 }
04076 
04077 /*--------------------------------------------------------------------------*\
04078  * plpathCmd
04079  *
04080  * Processes plpath Tcl command.
04081 \*--------------------------------------------------------------------------*/
04082 
04083 static int
04084 plpathCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04085 {
04086     PLINT n;
04087     PLFLT x1;
04088     PLFLT y1;
04089     PLFLT x2;
04090     PLFLT y2;
04091 
04092     pl_errcode = 0; errmsg[0] = '\0';
04093 
04094     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04095         Tcl_AppendResult( interp, "command syntax: \"",
04096                           "plpath n x1 y1 x2 y2", "\"",
04097                           (char *) NULL);
04098         return TCL_ERROR;
04099     }
04100 
04101     if ( (!0 && 0 && (argc < (1 + 5 - 0))) ||
04102          (!0 && !0 && (argc != (5 + 1))) ||
04103          ( 0 && (argc != 1) && (argc != (5 + 1))) ) {
04104         Tcl_AppendResult( interp, "wrong # args: should be \"",
04105                           "plpath n x1 y1 x2 y2", "\"",
04106                           (char *) NULL);
04107         return TCL_ERROR;
04108     }
04109 
04110     n = atoi(argv[1+0]);
04111     x1 = atof(argv[1+1]);
04112     y1 = atof(argv[1+2]);
04113     x2 = atof(argv[1+3]);
04114     y2 = atof(argv[1+4]);
04115 
04116     plpath ( n, x1, y1, x2, y2 );
04117 
04118 
04119     if (pl_errcode != 0) {
04120         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04121         return TCL_ERROR;
04122     }
04123 
04124     plflush();
04125     return TCL_OK;
04126 }
04127 
04128 /*--------------------------------------------------------------------------*\
04129  * plpoinCmd
04130  *
04131  * Processes plpoin Tcl command.
04132 \*--------------------------------------------------------------------------*/
04133 
04134 static int
04135 plpoinCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04136 {
04137     PLINT n;
04138     PLFLT *x;
04139     tclMatrix *matx;
04140     PLFLT *y;
04141     tclMatrix *maty;
04142     PLINT code;
04143 
04144     pl_errcode = 0; errmsg[0] = '\0';
04145 
04146     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04147         Tcl_AppendResult( interp, "command syntax: \"",
04148                           "plpoin n x y code", "\"",
04149                           (char *) NULL);
04150         return TCL_ERROR;
04151     }
04152 
04153     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
04154          (!0 && !0 && (argc != (4 + 1))) ||
04155          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
04156         Tcl_AppendResult( interp, "wrong # args: should be \"",
04157                           "plpoin n x y code", "\"",
04158                           (char *) NULL);
04159         return TCL_ERROR;
04160     }
04161 
04162     n = atoi(argv[1+0]);
04163     matx = Tcl_GetMatrixPtr( interp, argv[1+1] );
04164     if (matx == NULL) return TCL_ERROR;
04165     x = matx->fdata;
04166     maty = Tcl_GetMatrixPtr( interp, argv[1+2] );
04167     if (maty == NULL) return TCL_ERROR;
04168     y = maty->fdata;
04169     code = atoi(argv[1+3]);
04170 
04171     plpoin ( n, x, y, code );
04172 
04173 
04174     if (pl_errcode != 0) {
04175         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04176         return TCL_ERROR;
04177     }
04178 
04179     plflush();
04180     return TCL_OK;
04181 }
04182 
04183 /*--------------------------------------------------------------------------*\
04184  * plpoin3Cmd
04185  *
04186  * Processes plpoin3 Tcl command.
04187 \*--------------------------------------------------------------------------*/
04188 
04189 static int
04190 plpoin3Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04191 {
04192     PLINT n;
04193     PLFLT *x;
04194     tclMatrix *matx;
04195     PLFLT *y;
04196     tclMatrix *maty;
04197     PLFLT *z;
04198     tclMatrix *matz;
04199     PLINT code;
04200 
04201     pl_errcode = 0; errmsg[0] = '\0';
04202 
04203     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04204         Tcl_AppendResult( interp, "command syntax: \"",
04205                           "plpoin3 n x y z code", "\"",
04206                           (char *) NULL);
04207         return TCL_ERROR;
04208     }
04209 
04210     if ( (!0 && 0 && (argc < (1 + 5 - 0))) ||
04211          (!0 && !0 && (argc != (5 + 1))) ||
04212          ( 0 && (argc != 1) && (argc != (5 + 1))) ) {
04213         Tcl_AppendResult( interp, "wrong # args: should be \"",
04214                           "plpoin3 n x y z code", "\"",
04215                           (char *) NULL);
04216         return TCL_ERROR;
04217     }
04218 
04219     n = atoi(argv[1+0]);
04220     matx = Tcl_GetMatrixPtr( interp, argv[1+1] );
04221     if (matx == NULL) return TCL_ERROR;
04222     x = matx->fdata;
04223     maty = Tcl_GetMatrixPtr( interp, argv[1+2] );
04224     if (maty == NULL) return TCL_ERROR;
04225     y = maty->fdata;
04226     matz = Tcl_GetMatrixPtr( interp, argv[1+3] );
04227     if (matz == NULL) return TCL_ERROR;
04228     z = matz->fdata;
04229     code = atoi(argv[1+4]);
04230 
04231     plpoin3 ( n, x, y, z, code );
04232 
04233 
04234     if (pl_errcode != 0) {
04235         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04236         return TCL_ERROR;
04237     }
04238 
04239     plflush();
04240     return TCL_OK;
04241 }
04242 
04243 /*--------------------------------------------------------------------------*\
04244  * plpoly3Cmd
04245  *
04246  * Processes plpoly3 Tcl command.
04247 \*--------------------------------------------------------------------------*/
04248 
04249 static int
04250 plpoly3Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04251 {
04252     PLINT n;
04253     PLFLT *x;
04254     tclMatrix *matx;
04255     PLFLT *y;
04256     tclMatrix *maty;
04257     PLFLT *z;
04258     tclMatrix *matz;
04259     PLINT *draw;
04260     tclMatrix *matdraw;
04261     PLINT ifcc;
04262 
04263     pl_errcode = 0; errmsg[0] = '\0';
04264 
04265     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04266         Tcl_AppendResult( interp, "command syntax: \"",
04267                           "plpoly3 n x y z draw ifcc", "\"",
04268                           (char *) NULL);
04269         return TCL_ERROR;
04270     }
04271 
04272     if ( (!0 && 0 && (argc < (1 + 6 - 0))) ||
04273          (!0 && !0 && (argc != (6 + 1))) ||
04274          ( 0 && (argc != 1) && (argc != (6 + 1))) ) {
04275         Tcl_AppendResult( interp, "wrong # args: should be \"",
04276                           "plpoly3 n x y z draw ifcc", "\"",
04277                           (char *) NULL);
04278         return TCL_ERROR;
04279     }
04280 
04281     n = atoi(argv[1+0]);
04282     matx = Tcl_GetMatrixPtr( interp, argv[1+1] );
04283     if (matx == NULL) return TCL_ERROR;
04284     x = matx->fdata;
04285     maty = Tcl_GetMatrixPtr( interp, argv[1+2] );
04286     if (maty == NULL) return TCL_ERROR;
04287     y = maty->fdata;
04288     matz = Tcl_GetMatrixPtr( interp, argv[1+3] );
04289     if (matz == NULL) return TCL_ERROR;
04290     z = matz->fdata;
04291     matdraw = Tcl_GetMatrixPtr( interp, argv[1+4] );
04292     if (matdraw == NULL) return TCL_ERROR;
04293     draw = matdraw->idata;
04294     ifcc = atoi(argv[1+5]);
04295 
04296     plpoly3 ( n, x, y, z, draw, ifcc );
04297 
04298 
04299     if (pl_errcode != 0) {
04300         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04301         return TCL_ERROR;
04302     }
04303 
04304     plflush();
04305     return TCL_OK;
04306 }
04307 
04308 /*--------------------------------------------------------------------------*\
04309  * plprecCmd
04310  *
04311  * Processes plprec Tcl command.
04312 \*--------------------------------------------------------------------------*/
04313 
04314 static int
04315 plprecCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04316 {
04317     PLINT setp;
04318     PLINT prec;
04319 
04320     pl_errcode = 0; errmsg[0] = '\0';
04321 
04322     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04323         Tcl_AppendResult( interp, "command syntax: \"",
04324                           "plprec setp prec", "\"",
04325                           (char *) NULL);
04326         return TCL_ERROR;
04327     }
04328 
04329     if ( (!0 && 0 && (argc < (1 + 2 - 0))) ||
04330          (!0 && !0 && (argc != (2 + 1))) ||
04331          ( 0 && (argc != 1) && (argc != (2 + 1))) ) {
04332         Tcl_AppendResult( interp, "wrong # args: should be \"",
04333                           "plprec setp prec", "\"",
04334                           (char *) NULL);
04335         return TCL_ERROR;
04336     }
04337 
04338     setp = atoi(argv[1+0]);
04339     prec = atoi(argv[1+1]);
04340 
04341     plprec ( setp, prec );
04342 
04343 
04344     if (pl_errcode != 0) {
04345         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04346         return TCL_ERROR;
04347     }
04348 
04349     plflush();
04350     return TCL_OK;
04351 }
04352 
04353 /*--------------------------------------------------------------------------*\
04354  * plpstyCmd
04355  *
04356  * Processes plpsty Tcl command.
04357 \*--------------------------------------------------------------------------*/
04358 
04359 static int
04360 plpstyCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04361 {
04362     PLINT patt;
04363 
04364     pl_errcode = 0; errmsg[0] = '\0';
04365 
04366     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04367         Tcl_AppendResult( interp, "command syntax: \"",
04368                           "plpsty patt", "\"",
04369                           (char *) NULL);
04370         return TCL_ERROR;
04371     }
04372 
04373     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
04374          (!0 && !0 && (argc != (1 + 1))) ||
04375          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
04376         Tcl_AppendResult( interp, "wrong # args: should be \"",
04377                           "plpsty patt", "\"",
04378                           (char *) NULL);
04379         return TCL_ERROR;
04380     }
04381 
04382     patt = atoi(argv[1+0]);
04383 
04384     plpsty ( patt );
04385 
04386 
04387     if (pl_errcode != 0) {
04388         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04389         return TCL_ERROR;
04390     }
04391 
04392     plflush();
04393     return TCL_OK;
04394 }
04395 
04396 /*--------------------------------------------------------------------------*\
04397  * plptexCmd
04398  *
04399  * Processes plptex Tcl command.
04400 \*--------------------------------------------------------------------------*/
04401 
04402 static int
04403 plptexCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04404 {
04405     PLFLT x;
04406     PLFLT y;
04407     PLFLT dx;
04408     PLFLT dy;
04409     PLFLT just;
04410     const char *text;
04411 
04412     pl_errcode = 0; errmsg[0] = '\0';
04413 
04414     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04415         Tcl_AppendResult( interp, "command syntax: \"",
04416                           "plptex x y dx dy just text", "\"",
04417                           (char *) NULL);
04418         return TCL_ERROR;
04419     }
04420 
04421     if ( (!0 && 0 && (argc < (1 + 6 - 0))) ||
04422          (!0 && !0 && (argc != (6 + 1))) ||
04423          ( 0 && (argc != 1) && (argc != (6 + 1))) ) {
04424         Tcl_AppendResult( interp, "wrong # args: should be \"",
04425                           "plptex x y dx dy just text", "\"",
04426                           (char *) NULL);
04427         return TCL_ERROR;
04428     }
04429 
04430     x = atof(argv[1+0]);
04431     y = atof(argv[1+1]);
04432     dx = atof(argv[1+2]);
04433     dy = atof(argv[1+3]);
04434     just = atof(argv[1+4]);
04435     text = argv[1+5];
04436 
04437     plptex ( x, y, dx, dy, just, text );
04438 
04439 
04440     if (pl_errcode != 0) {
04441         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04442         return TCL_ERROR;
04443     }
04444 
04445     plflush();
04446     return TCL_OK;
04447 }
04448 
04449 /*--------------------------------------------------------------------------*\
04450  * plptex3Cmd
04451  *
04452  * Processes plptex3 Tcl command.
04453 \*--------------------------------------------------------------------------*/
04454 
04455 static int
04456 plptex3Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04457 {
04458     PLFLT wx;
04459     PLFLT wy;
04460     PLFLT wz;
04461     PLFLT dx;
04462     PLFLT dy;
04463     PLFLT dz;
04464     PLFLT sx;
04465     PLFLT sy;
04466     PLFLT sz;
04467     PLFLT just;
04468     const char *text;
04469 
04470     pl_errcode = 0; errmsg[0] = '\0';
04471 
04472     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04473         Tcl_AppendResult( interp, "command syntax: \"",
04474                           "plptex3 wx wy wz dx dy dz sx sy sz just text", "\"",
04475                           (char *) NULL);
04476         return TCL_ERROR;
04477     }
04478 
04479     if ( (!0 && 0 && (argc < (1 + 11 - 0))) ||
04480          (!0 && !0 && (argc != (11 + 1))) ||
04481          ( 0 && (argc != 1) && (argc != (11 + 1))) ) {
04482         Tcl_AppendResult( interp, "wrong # args: should be \"",
04483                           "plptex3 wx wy wz dx dy dz sx sy sz just text", "\"",
04484                           (char *) NULL);
04485         return TCL_ERROR;
04486     }
04487 
04488     wx = atof(argv[1+0]);
04489     wy = atof(argv[1+1]);
04490     wz = atof(argv[1+2]);
04491     dx = atof(argv[1+3]);
04492     dy = atof(argv[1+4]);
04493     dz = atof(argv[1+5]);
04494     sx = atof(argv[1+6]);
04495     sy = atof(argv[1+7]);
04496     sz = atof(argv[1+8]);
04497     just = atof(argv[1+9]);
04498     text = argv[1+10];
04499 
04500     plptex3 ( wx, wy, wz, dx, dy, dz, sx, sy, sz, just, text );
04501 
04502 
04503     if (pl_errcode != 0) {
04504         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04505         return TCL_ERROR;
04506     }
04507 
04508     plflush();
04509     return TCL_OK;
04510 }
04511 
04512 /*--------------------------------------------------------------------------*\
04513  * plreplotCmd
04514  *
04515  * Processes plreplot Tcl command.
04516 \*--------------------------------------------------------------------------*/
04517 
04518 static int
04519 plreplotCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04520 {
04521 
04522     pl_errcode = 0; errmsg[0] = '\0';
04523 
04524     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04525         Tcl_AppendResult( interp, "command syntax: \"",
04526                           "plreplot ", "\"",
04527                           (char *) NULL);
04528         return TCL_ERROR;
04529     }
04530 
04531     if ( (!0 && 0 && (argc < (1 + 0 - 0))) ||
04532          (!0 && !0 && (argc != (0 + 1))) ||
04533          ( 0 && (argc != 1) && (argc != (0 + 1))) ) {
04534         Tcl_AppendResult( interp, "wrong # args: should be \"",
04535                           "plreplot ", "\"",
04536                           (char *) NULL);
04537         return TCL_ERROR;
04538     }
04539 
04540 
04541     plreplot (  );
04542 
04543 
04544     if (pl_errcode != 0) {
04545         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04546         return TCL_ERROR;
04547     }
04548 
04549     plflush();
04550     return TCL_OK;
04551 }
04552 
04553 /*--------------------------------------------------------------------------*\
04554  * plrgbhlsCmd
04555  *
04556  * Processes plrgbhls Tcl command.
04557 \*--------------------------------------------------------------------------*/
04558 
04559 static int
04560 plrgbhlsCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04561 {
04562     PLFLT r;
04563     PLFLT g;
04564     PLFLT b;
04565     PLFLT h;
04566     PLFLT l;
04567     PLFLT s;
04568 
04569     pl_errcode = 0; errmsg[0] = '\0';
04570 
04571     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04572         Tcl_AppendResult( interp, "command syntax: \"",
04573                           "plrgbhls ?r g b h l s?", "\"",
04574                           (char *) NULL);
04575         return TCL_ERROR;
04576     }
04577 
04578     if ( (!1 && 0 && (argc < (1 + 6 - 0))) ||
04579          (!1 && !0 && (argc != (6 + 1))) ||
04580          ( 1 && (argc != 1) && (argc != (6 + 1))) ) {
04581         Tcl_AppendResult( interp, "wrong # args: should be \"",
04582                           "plrgbhls ?r g b h l s?", "\"",
04583                           (char *) NULL);
04584         return TCL_ERROR;
04585     }
04586 
04587     r = atof(argv[1+0]);
04588     g = atof(argv[1+1]);
04589     b = atof(argv[1+2]);
04590 /* h is for output. */
04591 /* l is for output. */
04592 /* s is for output. */
04593 
04594     plrgbhls ( r, g, b, &h, &l, &s );
04595 
04596     if (argc == 1)
04597         Tcl_AppendResult( interp, " ", (char *) NULL );
04598     Tcl_PrintDouble( interp, h, buf );
04599     if (argc > 1)
04600         Tcl_SetVar( interp, argv[1+3], buf, 0 );
04601     else
04602         Tcl_AppendResult( interp, buf, (char *) NULL );
04603     if (argc == 1)
04604         Tcl_AppendResult( interp, " ", (char *) NULL );
04605     Tcl_PrintDouble( interp, l, buf );
04606     if (argc > 1)
04607         Tcl_SetVar( interp, argv[1+4], buf, 0 );
04608     else
04609         Tcl_AppendResult( interp, buf, (char *) NULL );
04610     if (argc == 1)
04611         Tcl_AppendResult( interp, " ", (char *) NULL );
04612     Tcl_PrintDouble( interp, s, buf );
04613     if (argc > 1)
04614         Tcl_SetVar( interp, argv[1+5], buf, 0 );
04615     else
04616         Tcl_AppendResult( interp, buf, (char *) NULL );
04617 
04618     if (pl_errcode != 0) {
04619         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04620         return TCL_ERROR;
04621     }
04622 
04623     plflush();
04624     return TCL_OK;
04625 }
04626 
04627 /*--------------------------------------------------------------------------*\
04628  * plschrCmd
04629  *
04630  * Processes plschr Tcl command.
04631 \*--------------------------------------------------------------------------*/
04632 
04633 static int
04634 plschrCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04635 {
04636     PLFLT def;
04637     PLFLT scale;
04638 
04639     pl_errcode = 0; errmsg[0] = '\0';
04640 
04641     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04642         Tcl_AppendResult( interp, "command syntax: \"",
04643                           "plschr def scale", "\"",
04644                           (char *) NULL);
04645         return TCL_ERROR;
04646     }
04647 
04648     if ( (!0 && 0 && (argc < (1 + 2 - 0))) ||
04649          (!0 && !0 && (argc != (2 + 1))) ||
04650          ( 0 && (argc != 1) && (argc != (2 + 1))) ) {
04651         Tcl_AppendResult( interp, "wrong # args: should be \"",
04652                           "plschr def scale", "\"",
04653                           (char *) NULL);
04654         return TCL_ERROR;
04655     }
04656 
04657     def = atof(argv[1+0]);
04658     scale = atof(argv[1+1]);
04659 
04660     plschr ( def, scale );
04661 
04662 
04663     if (pl_errcode != 0) {
04664         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04665         return TCL_ERROR;
04666     }
04667 
04668     plflush();
04669     return TCL_OK;
04670 }
04671 
04672 /*--------------------------------------------------------------------------*\
04673  * plscmap0Cmd
04674  *
04675  * Processes plscmap0 Tcl command.
04676 \*--------------------------------------------------------------------------*/
04677 
04678 static int
04679 plscmap0Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04680 {
04681     PLINT *r;
04682     tclMatrix *matr;
04683     PLINT *g;
04684     tclMatrix *matg;
04685     PLINT *b;
04686     tclMatrix *matb;
04687     PLINT ncol0;
04688 
04689     pl_errcode = 0; errmsg[0] = '\0';
04690 
04691     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04692         Tcl_AppendResult( interp, "command syntax: \"",
04693                           "plscmap0 r g b ncol0", "\"",
04694                           (char *) NULL);
04695         return TCL_ERROR;
04696     }
04697 
04698     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
04699          (!0 && !0 && (argc != (4 + 1))) ||
04700          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
04701         Tcl_AppendResult( interp, "wrong # args: should be \"",
04702                           "plscmap0 r g b ncol0", "\"",
04703                           (char *) NULL);
04704         return TCL_ERROR;
04705     }
04706 
04707     matr = Tcl_GetMatrixPtr( interp, argv[1+0] );
04708     if (matr == NULL) return TCL_ERROR;
04709     r = matr->idata;
04710     matg = Tcl_GetMatrixPtr( interp, argv[1+1] );
04711     if (matg == NULL) return TCL_ERROR;
04712     g = matg->idata;
04713     matb = Tcl_GetMatrixPtr( interp, argv[1+2] );
04714     if (matb == NULL) return TCL_ERROR;
04715     b = matb->idata;
04716     ncol0 = atoi(argv[1+3]);
04717 
04718     plscmap0 ( r, g, b, ncol0 );
04719 
04720 
04721     if (pl_errcode != 0) {
04722         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04723         return TCL_ERROR;
04724     }
04725 
04726     plflush();
04727     return TCL_OK;
04728 }
04729 
04730 /*--------------------------------------------------------------------------*\
04731  * plscmap0aCmd
04732  *
04733  * Processes plscmap0a Tcl command.
04734 \*--------------------------------------------------------------------------*/
04735 
04736 static int
04737 plscmap0aCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04738 {
04739     PLINT *r;
04740     tclMatrix *matr;
04741     PLINT *g;
04742     tclMatrix *matg;
04743     PLINT *b;
04744     tclMatrix *matb;
04745     PLFLT *a;
04746     tclMatrix *mata;
04747     PLINT ncol0;
04748 
04749     pl_errcode = 0; errmsg[0] = '\0';
04750 
04751     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04752         Tcl_AppendResult( interp, "command syntax: \"",
04753                           "plscmap0a r g b a ncol0", "\"",
04754                           (char *) NULL);
04755         return TCL_ERROR;
04756     }
04757 
04758     if ( (!0 && 0 && (argc < (1 + 5 - 0))) ||
04759          (!0 && !0 && (argc != (5 + 1))) ||
04760          ( 0 && (argc != 1) && (argc != (5 + 1))) ) {
04761         Tcl_AppendResult( interp, "wrong # args: should be \"",
04762                           "plscmap0a r g b a ncol0", "\"",
04763                           (char *) NULL);
04764         return TCL_ERROR;
04765     }
04766 
04767     matr = Tcl_GetMatrixPtr( interp, argv[1+0] );
04768     if (matr == NULL) return TCL_ERROR;
04769     r = matr->idata;
04770     matg = Tcl_GetMatrixPtr( interp, argv[1+1] );
04771     if (matg == NULL) return TCL_ERROR;
04772     g = matg->idata;
04773     matb = Tcl_GetMatrixPtr( interp, argv[1+2] );
04774     if (matb == NULL) return TCL_ERROR;
04775     b = matb->idata;
04776     mata = Tcl_GetMatrixPtr( interp, argv[1+3] );
04777     if (mata == NULL) return TCL_ERROR;
04778     a = mata->fdata;
04779     ncol0 = atoi(argv[1+4]);
04780 
04781     plscmap0a ( r, g, b, a, ncol0 );
04782 
04783 
04784     if (pl_errcode != 0) {
04785         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04786         return TCL_ERROR;
04787     }
04788 
04789     plflush();
04790     return TCL_OK;
04791 }
04792 
04793 /*--------------------------------------------------------------------------*\
04794  * plscmap0nCmd
04795  *
04796  * Processes plscmap0n Tcl command.
04797 \*--------------------------------------------------------------------------*/
04798 
04799 static int
04800 plscmap0nCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04801 {
04802     PLINT ncol0;
04803 
04804     pl_errcode = 0; errmsg[0] = '\0';
04805 
04806     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04807         Tcl_AppendResult( interp, "command syntax: \"",
04808                           "plscmap0n ncol0", "\"",
04809                           (char *) NULL);
04810         return TCL_ERROR;
04811     }
04812 
04813     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
04814          (!0 && !0 && (argc != (1 + 1))) ||
04815          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
04816         Tcl_AppendResult( interp, "wrong # args: should be \"",
04817                           "plscmap0n ncol0", "\"",
04818                           (char *) NULL);
04819         return TCL_ERROR;
04820     }
04821 
04822     ncol0 = atoi(argv[1+0]);
04823 
04824     plscmap0n ( ncol0 );
04825 
04826 
04827     if (pl_errcode != 0) {
04828         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04829         return TCL_ERROR;
04830     }
04831 
04832     plflush();
04833     return TCL_OK;
04834 }
04835 
04836 /*--------------------------------------------------------------------------*\
04837  * plscmap1Cmd
04838  *
04839  * Processes plscmap1 Tcl command.
04840 \*--------------------------------------------------------------------------*/
04841 
04842 static int
04843 plscmap1Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04844 {
04845     PLINT *r;
04846     tclMatrix *matr;
04847     PLINT *g;
04848     tclMatrix *matg;
04849     PLINT *b;
04850     tclMatrix *matb;
04851     PLINT ncol1;
04852 
04853     pl_errcode = 0; errmsg[0] = '\0';
04854 
04855     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04856         Tcl_AppendResult( interp, "command syntax: \"",
04857                           "plscmap1 r g b ncol1", "\"",
04858                           (char *) NULL);
04859         return TCL_ERROR;
04860     }
04861 
04862     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
04863          (!0 && !0 && (argc != (4 + 1))) ||
04864          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
04865         Tcl_AppendResult( interp, "wrong # args: should be \"",
04866                           "plscmap1 r g b ncol1", "\"",
04867                           (char *) NULL);
04868         return TCL_ERROR;
04869     }
04870 
04871     matr = Tcl_GetMatrixPtr( interp, argv[1+0] );
04872     if (matr == NULL) return TCL_ERROR;
04873     r = matr->idata;
04874     matg = Tcl_GetMatrixPtr( interp, argv[1+1] );
04875     if (matg == NULL) return TCL_ERROR;
04876     g = matg->idata;
04877     matb = Tcl_GetMatrixPtr( interp, argv[1+2] );
04878     if (matb == NULL) return TCL_ERROR;
04879     b = matb->idata;
04880     ncol1 = atoi(argv[1+3]);
04881 
04882     plscmap1 ( r, g, b, ncol1 );
04883 
04884 
04885     if (pl_errcode != 0) {
04886         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04887         return TCL_ERROR;
04888     }
04889 
04890     plflush();
04891     return TCL_OK;
04892 }
04893 
04894 /*--------------------------------------------------------------------------*\
04895  * plscmap1aCmd
04896  *
04897  * Processes plscmap1a Tcl command.
04898 \*--------------------------------------------------------------------------*/
04899 
04900 static int
04901 plscmap1aCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04902 {
04903     PLINT *r;
04904     tclMatrix *matr;
04905     PLINT *g;
04906     tclMatrix *matg;
04907     PLINT *b;
04908     tclMatrix *matb;
04909     PLFLT *a;
04910     tclMatrix *mata;
04911     PLINT ncol1;
04912 
04913     pl_errcode = 0; errmsg[0] = '\0';
04914 
04915     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04916         Tcl_AppendResult( interp, "command syntax: \"",
04917                           "plscmap1a r g b a ncol1", "\"",
04918                           (char *) NULL);
04919         return TCL_ERROR;
04920     }
04921 
04922     if ( (!0 && 0 && (argc < (1 + 5 - 0))) ||
04923          (!0 && !0 && (argc != (5 + 1))) ||
04924          ( 0 && (argc != 1) && (argc != (5 + 1))) ) {
04925         Tcl_AppendResult( interp, "wrong # args: should be \"",
04926                           "plscmap1a r g b a ncol1", "\"",
04927                           (char *) NULL);
04928         return TCL_ERROR;
04929     }
04930 
04931     matr = Tcl_GetMatrixPtr( interp, argv[1+0] );
04932     if (matr == NULL) return TCL_ERROR;
04933     r = matr->idata;
04934     matg = Tcl_GetMatrixPtr( interp, argv[1+1] );
04935     if (matg == NULL) return TCL_ERROR;
04936     g = matg->idata;
04937     matb = Tcl_GetMatrixPtr( interp, argv[1+2] );
04938     if (matb == NULL) return TCL_ERROR;
04939     b = matb->idata;
04940     mata = Tcl_GetMatrixPtr( interp, argv[1+3] );
04941     if (mata == NULL) return TCL_ERROR;
04942     a = mata->fdata;
04943     ncol1 = atoi(argv[1+4]);
04944 
04945     plscmap1a ( r, g, b, a, ncol1 );
04946 
04947 
04948     if (pl_errcode != 0) {
04949         Tcl_AppendResult(interp, errmsg, (char *) NULL);
04950         return TCL_ERROR;
04951     }
04952 
04953     plflush();
04954     return TCL_OK;
04955 }
04956 
04957 /*--------------------------------------------------------------------------*\
04958  * plscmap1lCmd
04959  *
04960  * Processes plscmap1l Tcl command.
04961 \*--------------------------------------------------------------------------*/
04962 
04963 static int
04964 plscmap1lCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
04965 {
04966     PLINT itype;
04967     PLINT npts;
04968     PLFLT *intensity;
04969     tclMatrix *matintensity;
04970     PLFLT *coord1;
04971     tclMatrix *matcoord1;
04972     PLFLT *coord2;
04973     tclMatrix *matcoord2;
04974     PLFLT *coord3;
04975     tclMatrix *matcoord3;
04976     PLINT *alt_hue_path;
04977     tclMatrix *matalt_hue_path;
04978 
04979     pl_errcode = 0; errmsg[0] = '\0';
04980 
04981     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
04982         Tcl_AppendResult( interp, "command syntax: \"",
04983                           "plscmap1l itype npts intensity coord1 coord2 coord3 alt_hue_path", "\"",
04984                           (char *) NULL);
04985         return TCL_ERROR;
04986     }
04987 
04988     if ( (!0 && 0 && (argc < (1 + 7 - 0))) ||
04989          (!0 && !0 && (argc != (7 + 1))) ||
04990          ( 0 && (argc != 1) && (argc != (7 + 1))) ) {
04991         Tcl_AppendResult( interp, "wrong # args: should be \"",
04992                           "plscmap1l itype npts intensity coord1 coord2 coord3 alt_hue_path", "\"",
04993                           (char *) NULL);
04994         return TCL_ERROR;
04995     }
04996 
04997     itype = atoi(argv[1+0]);
04998     npts = atoi(argv[1+1]);
04999     matintensity = Tcl_GetMatrixPtr( interp, argv[1+2] );
05000     if (matintensity == NULL) return TCL_ERROR;
05001     intensity = matintensity->fdata;
05002     matcoord1 = Tcl_GetMatrixPtr( interp, argv[1+3] );
05003     if (matcoord1 == NULL) return TCL_ERROR;
05004     coord1 = matcoord1->fdata;
05005     matcoord2 = Tcl_GetMatrixPtr( interp, argv[1+4] );
05006     if (matcoord2 == NULL) return TCL_ERROR;
05007     coord2 = matcoord2->fdata;
05008     matcoord3 = Tcl_GetMatrixPtr( interp, argv[1+5] );
05009     if (matcoord3 == NULL) return TCL_ERROR;
05010     coord3 = matcoord3->fdata;
05011     matalt_hue_path = Tcl_GetMatrixPtr( interp, argv[1+6] );
05012     if (matalt_hue_path == NULL) return TCL_ERROR;
05013     alt_hue_path = matalt_hue_path->idata;
05014 
05015     plscmap1l ( itype, npts, intensity, coord1, coord2, coord3, alt_hue_path );
05016 
05017 
05018     if (pl_errcode != 0) {
05019         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05020         return TCL_ERROR;
05021     }
05022 
05023     plflush();
05024     return TCL_OK;
05025 }
05026 
05027 /*--------------------------------------------------------------------------*\
05028  * plscmap1laCmd
05029  *
05030  * Processes plscmap1la Tcl command.
05031 \*--------------------------------------------------------------------------*/
05032 
05033 static int
05034 plscmap1laCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05035 {
05036     PLINT itype;
05037     PLINT npts;
05038     PLFLT *intensity;
05039     tclMatrix *matintensity;
05040     PLFLT *coord1;
05041     tclMatrix *matcoord1;
05042     PLFLT *coord2;
05043     tclMatrix *matcoord2;
05044     PLFLT *coord3;
05045     tclMatrix *matcoord3;
05046     PLFLT *a;
05047     tclMatrix *mata;
05048     PLINT *alt_hue_path;
05049     tclMatrix *matalt_hue_path;
05050 
05051     pl_errcode = 0; errmsg[0] = '\0';
05052 
05053     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05054         Tcl_AppendResult( interp, "command syntax: \"",
05055                           "plscmap1la itype npts intensity coord1 coord2 coord3 a alt_hue_path", "\"",
05056                           (char *) NULL);
05057         return TCL_ERROR;
05058     }
05059 
05060     if ( (!0 && 0 && (argc < (1 + 8 - 0))) ||
05061          (!0 && !0 && (argc != (8 + 1))) ||
05062          ( 0 && (argc != 1) && (argc != (8 + 1))) ) {
05063         Tcl_AppendResult( interp, "wrong # args: should be \"",
05064                           "plscmap1la itype npts intensity coord1 coord2 coord3 a alt_hue_path", "\"",
05065                           (char *) NULL);
05066         return TCL_ERROR;
05067     }
05068 
05069     itype = atoi(argv[1+0]);
05070     npts = atoi(argv[1+1]);
05071     matintensity = Tcl_GetMatrixPtr( interp, argv[1+2] );
05072     if (matintensity == NULL) return TCL_ERROR;
05073     intensity = matintensity->fdata;
05074     matcoord1 = Tcl_GetMatrixPtr( interp, argv[1+3] );
05075     if (matcoord1 == NULL) return TCL_ERROR;
05076     coord1 = matcoord1->fdata;
05077     matcoord2 = Tcl_GetMatrixPtr( interp, argv[1+4] );
05078     if (matcoord2 == NULL) return TCL_ERROR;
05079     coord2 = matcoord2->fdata;
05080     matcoord3 = Tcl_GetMatrixPtr( interp, argv[1+5] );
05081     if (matcoord3 == NULL) return TCL_ERROR;
05082     coord3 = matcoord3->fdata;
05083     mata = Tcl_GetMatrixPtr( interp, argv[1+6] );
05084     if (mata == NULL) return TCL_ERROR;
05085     a = mata->fdata;
05086     matalt_hue_path = Tcl_GetMatrixPtr( interp, argv[1+7] );
05087     if (matalt_hue_path == NULL) return TCL_ERROR;
05088     alt_hue_path = matalt_hue_path->idata;
05089 
05090     plscmap1la ( itype, npts, intensity, coord1, coord2, coord3, a, alt_hue_path );
05091 
05092 
05093     if (pl_errcode != 0) {
05094         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05095         return TCL_ERROR;
05096     }
05097 
05098     plflush();
05099     return TCL_OK;
05100 }
05101 
05102 /*--------------------------------------------------------------------------*\
05103  * plscmap1nCmd
05104  *
05105  * Processes plscmap1n Tcl command.
05106 \*--------------------------------------------------------------------------*/
05107 
05108 static int
05109 plscmap1nCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05110 {
05111     PLINT ncol1;
05112 
05113     pl_errcode = 0; errmsg[0] = '\0';
05114 
05115     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05116         Tcl_AppendResult( interp, "command syntax: \"",
05117                           "plscmap1n ncol1", "\"",
05118                           (char *) NULL);
05119         return TCL_ERROR;
05120     }
05121 
05122     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
05123          (!0 && !0 && (argc != (1 + 1))) ||
05124          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
05125         Tcl_AppendResult( interp, "wrong # args: should be \"",
05126                           "plscmap1n ncol1", "\"",
05127                           (char *) NULL);
05128         return TCL_ERROR;
05129     }
05130 
05131     ncol1 = atoi(argv[1+0]);
05132 
05133     plscmap1n ( ncol1 );
05134 
05135 
05136     if (pl_errcode != 0) {
05137         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05138         return TCL_ERROR;
05139     }
05140 
05141     plflush();
05142     return TCL_OK;
05143 }
05144 
05145 /*--------------------------------------------------------------------------*\
05146  * plscmap1_rangeCmd
05147  *
05148  * Processes plscmap1_range Tcl command.
05149 \*--------------------------------------------------------------------------*/
05150 
05151 static int
05152 plscmap1_rangeCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05153 {
05154     PLFLT min_color;
05155     PLFLT max_color;
05156 
05157     pl_errcode = 0; errmsg[0] = '\0';
05158 
05159     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05160         Tcl_AppendResult( interp, "command syntax: \"",
05161                           "plscmap1_range min_color max_color", "\"",
05162                           (char *) NULL);
05163         return TCL_ERROR;
05164     }
05165 
05166     if ( (!0 && 0 && (argc < (1 + 2 - 0))) ||
05167          (!0 && !0 && (argc != (2 + 1))) ||
05168          ( 0 && (argc != 1) && (argc != (2 + 1))) ) {
05169         Tcl_AppendResult( interp, "wrong # args: should be \"",
05170                           "plscmap1_range min_color max_color", "\"",
05171                           (char *) NULL);
05172         return TCL_ERROR;
05173     }
05174 
05175     min_color = atof(argv[1+0]);
05176     max_color = atof(argv[1+1]);
05177 
05178     plscmap1_range ( min_color, max_color );
05179 
05180 
05181     if (pl_errcode != 0) {
05182         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05183         return TCL_ERROR;
05184     }
05185 
05186     plflush();
05187     return TCL_OK;
05188 }
05189 
05190 /*--------------------------------------------------------------------------*\
05191  * plscol0Cmd
05192  *
05193  * Processes plscol0 Tcl command.
05194 \*--------------------------------------------------------------------------*/
05195 
05196 static int
05197 plscol0Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05198 {
05199     PLINT icol0;
05200     PLINT r;
05201     PLINT g;
05202     PLINT b;
05203 
05204     pl_errcode = 0; errmsg[0] = '\0';
05205 
05206     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05207         Tcl_AppendResult( interp, "command syntax: \"",
05208                           "plscol0 icol0 r g b", "\"",
05209                           (char *) NULL);
05210         return TCL_ERROR;
05211     }
05212 
05213     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
05214          (!0 && !0 && (argc != (4 + 1))) ||
05215          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
05216         Tcl_AppendResult( interp, "wrong # args: should be \"",
05217                           "plscol0 icol0 r g b", "\"",
05218                           (char *) NULL);
05219         return TCL_ERROR;
05220     }
05221 
05222     icol0 = atoi(argv[1+0]);
05223     r = atoi(argv[1+1]);
05224     g = atoi(argv[1+2]);
05225     b = atoi(argv[1+3]);
05226 
05227     plscol0 ( icol0, r, g, b );
05228 
05229 
05230     if (pl_errcode != 0) {
05231         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05232         return TCL_ERROR;
05233     }
05234 
05235     plflush();
05236     return TCL_OK;
05237 }
05238 
05239 /*--------------------------------------------------------------------------*\
05240  * plscol0aCmd
05241  *
05242  * Processes plscol0a Tcl command.
05243 \*--------------------------------------------------------------------------*/
05244 
05245 static int
05246 plscol0aCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05247 {
05248     PLINT icol0;
05249     PLINT r;
05250     PLINT g;
05251     PLINT b;
05252     PLFLT a;
05253 
05254     pl_errcode = 0; errmsg[0] = '\0';
05255 
05256     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05257         Tcl_AppendResult( interp, "command syntax: \"",
05258                           "plscol0a icol0 r g b a", "\"",
05259                           (char *) NULL);
05260         return TCL_ERROR;
05261     }
05262 
05263     if ( (!0 && 0 && (argc < (1 + 5 - 0))) ||
05264          (!0 && !0 && (argc != (5 + 1))) ||
05265          ( 0 && (argc != 1) && (argc != (5 + 1))) ) {
05266         Tcl_AppendResult( interp, "wrong # args: should be \"",
05267                           "plscol0a icol0 r g b a", "\"",
05268                           (char *) NULL);
05269         return TCL_ERROR;
05270     }
05271 
05272     icol0 = atoi(argv[1+0]);
05273     r = atoi(argv[1+1]);
05274     g = atoi(argv[1+2]);
05275     b = atoi(argv[1+3]);
05276     a = atof(argv[1+4]);
05277 
05278     plscol0a ( icol0, r, g, b, a );
05279 
05280 
05281     if (pl_errcode != 0) {
05282         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05283         return TCL_ERROR;
05284     }
05285 
05286     plflush();
05287     return TCL_OK;
05288 }
05289 
05290 /*--------------------------------------------------------------------------*\
05291  * plscolbgCmd
05292  *
05293  * Processes plscolbg Tcl command.
05294 \*--------------------------------------------------------------------------*/
05295 
05296 static int
05297 plscolbgCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05298 {
05299     PLINT r;
05300     PLINT g;
05301     PLINT b;
05302 
05303     pl_errcode = 0; errmsg[0] = '\0';
05304 
05305     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05306         Tcl_AppendResult( interp, "command syntax: \"",
05307                           "plscolbg r g b", "\"",
05308                           (char *) NULL);
05309         return TCL_ERROR;
05310     }
05311 
05312     if ( (!0 && 0 && (argc < (1 + 3 - 0))) ||
05313          (!0 && !0 && (argc != (3 + 1))) ||
05314          ( 0 && (argc != 1) && (argc != (3 + 1))) ) {
05315         Tcl_AppendResult( interp, "wrong # args: should be \"",
05316                           "plscolbg r g b", "\"",
05317                           (char *) NULL);
05318         return TCL_ERROR;
05319     }
05320 
05321     r = atoi(argv[1+0]);
05322     g = atoi(argv[1+1]);
05323     b = atoi(argv[1+2]);
05324 
05325     plscolbg ( r, g, b );
05326 
05327 
05328     if (pl_errcode != 0) {
05329         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05330         return TCL_ERROR;
05331     }
05332 
05333     plflush();
05334     return TCL_OK;
05335 }
05336 
05337 /*--------------------------------------------------------------------------*\
05338  * plscolbgaCmd
05339  *
05340  * Processes plscolbga Tcl command.
05341 \*--------------------------------------------------------------------------*/
05342 
05343 static int
05344 plscolbgaCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05345 {
05346     PLINT r;
05347     PLINT g;
05348     PLINT b;
05349     PLFLT a;
05350 
05351     pl_errcode = 0; errmsg[0] = '\0';
05352 
05353     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05354         Tcl_AppendResult( interp, "command syntax: \"",
05355                           "plscolbga r g b a", "\"",
05356                           (char *) NULL);
05357         return TCL_ERROR;
05358     }
05359 
05360     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
05361          (!0 && !0 && (argc != (4 + 1))) ||
05362          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
05363         Tcl_AppendResult( interp, "wrong # args: should be \"",
05364                           "plscolbga r g b a", "\"",
05365                           (char *) NULL);
05366         return TCL_ERROR;
05367     }
05368 
05369     r = atoi(argv[1+0]);
05370     g = atoi(argv[1+1]);
05371     b = atoi(argv[1+2]);
05372     a = atof(argv[1+3]);
05373 
05374     plscolbga ( r, g, b, a );
05375 
05376 
05377     if (pl_errcode != 0) {
05378         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05379         return TCL_ERROR;
05380     }
05381 
05382     plflush();
05383     return TCL_OK;
05384 }
05385 
05386 /*--------------------------------------------------------------------------*\
05387  * plscolorCmd
05388  *
05389  * Processes plscolor Tcl command.
05390 \*--------------------------------------------------------------------------*/
05391 
05392 static int
05393 plscolorCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05394 {
05395     PLINT color;
05396 
05397     pl_errcode = 0; errmsg[0] = '\0';
05398 
05399     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05400         Tcl_AppendResult( interp, "command syntax: \"",
05401                           "plscolor color", "\"",
05402                           (char *) NULL);
05403         return TCL_ERROR;
05404     }
05405 
05406     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
05407          (!0 && !0 && (argc != (1 + 1))) ||
05408          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
05409         Tcl_AppendResult( interp, "wrong # args: should be \"",
05410                           "plscolor color", "\"",
05411                           (char *) NULL);
05412         return TCL_ERROR;
05413     }
05414 
05415     color = atoi(argv[1+0]);
05416 
05417     plscolor ( color );
05418 
05419 
05420     if (pl_errcode != 0) {
05421         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05422         return TCL_ERROR;
05423     }
05424 
05425     plflush();
05426     return TCL_OK;
05427 }
05428 
05429 /*--------------------------------------------------------------------------*\
05430  * plscompressionCmd
05431  *
05432  * Processes plscompression Tcl command.
05433 \*--------------------------------------------------------------------------*/
05434 
05435 static int
05436 plscompressionCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05437 {
05438     PLINT compression;
05439 
05440     pl_errcode = 0; errmsg[0] = '\0';
05441 
05442     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05443         Tcl_AppendResult( interp, "command syntax: \"",
05444                           "plscompression compression", "\"",
05445                           (char *) NULL);
05446         return TCL_ERROR;
05447     }
05448 
05449     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
05450          (!0 && !0 && (argc != (1 + 1))) ||
05451          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
05452         Tcl_AppendResult( interp, "wrong # args: should be \"",
05453                           "plscompression compression", "\"",
05454                           (char *) NULL);
05455         return TCL_ERROR;
05456     }
05457 
05458     compression = atoi(argv[1+0]);
05459 
05460     plscompression ( compression );
05461 
05462 
05463     if (pl_errcode != 0) {
05464         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05465         return TCL_ERROR;
05466     }
05467 
05468     plflush();
05469     return TCL_OK;
05470 }
05471 
05472 /*--------------------------------------------------------------------------*\
05473  * plsdevCmd
05474  *
05475  * Processes plsdev Tcl command.
05476 \*--------------------------------------------------------------------------*/
05477 
05478 static int
05479 plsdevCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05480 {
05481     const char *devnam;
05482 
05483     pl_errcode = 0; errmsg[0] = '\0';
05484 
05485     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05486         Tcl_AppendResult( interp, "command syntax: \"",
05487                           "plsdev devnam", "\"",
05488                           (char *) NULL);
05489         return TCL_ERROR;
05490     }
05491 
05492     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
05493          (!0 && !0 && (argc != (1 + 1))) ||
05494          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
05495         Tcl_AppendResult( interp, "wrong # args: should be \"",
05496                           "plsdev devnam", "\"",
05497                           (char *) NULL);
05498         return TCL_ERROR;
05499     }
05500 
05501     devnam = argv[1+0];
05502 
05503     plsdev ( devnam );
05504 
05505 
05506     if (pl_errcode != 0) {
05507         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05508         return TCL_ERROR;
05509     }
05510 
05511     plflush();
05512     return TCL_OK;
05513 }
05514 
05515 /*--------------------------------------------------------------------------*\
05516  * plsdidevCmd
05517  *
05518  * Processes plsdidev Tcl command.
05519 \*--------------------------------------------------------------------------*/
05520 
05521 static int
05522 plsdidevCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05523 {
05524     PLFLT mar;
05525     PLFLT aspect;
05526     PLFLT jx;
05527     PLFLT jy;
05528 
05529     pl_errcode = 0; errmsg[0] = '\0';
05530 
05531     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05532         Tcl_AppendResult( interp, "command syntax: \"",
05533                           "plsdidev mar aspect jx jy", "\"",
05534                           (char *) NULL);
05535         return TCL_ERROR;
05536     }
05537 
05538     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
05539          (!0 && !0 && (argc != (4 + 1))) ||
05540          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
05541         Tcl_AppendResult( interp, "wrong # args: should be \"",
05542                           "plsdidev mar aspect jx jy", "\"",
05543                           (char *) NULL);
05544         return TCL_ERROR;
05545     }
05546 
05547     mar = atof(argv[1+0]);
05548     aspect = atof(argv[1+1]);
05549     jx = atof(argv[1+2]);
05550     jy = atof(argv[1+3]);
05551 
05552     plsdidev ( mar, aspect, jx, jy );
05553 
05554 
05555     if (pl_errcode != 0) {
05556         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05557         return TCL_ERROR;
05558     }
05559 
05560     plflush();
05561     return TCL_OK;
05562 }
05563 
05564 /*--------------------------------------------------------------------------*\
05565  * plsdimapCmd
05566  *
05567  * Processes plsdimap Tcl command.
05568 \*--------------------------------------------------------------------------*/
05569 
05570 static int
05571 plsdimapCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05572 {
05573     PLINT dimxmin;
05574     PLINT dimxmax;
05575     PLINT dimymin;
05576     PLINT dimymax;
05577     PLFLT dimxpmm;
05578     PLFLT dimypmm;
05579 
05580     pl_errcode = 0; errmsg[0] = '\0';
05581 
05582     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05583         Tcl_AppendResult( interp, "command syntax: \"",
05584                           "plsdimap dimxmin dimxmax dimymin dimymax dimxpmm dimypmm", "\"",
05585                           (char *) NULL);
05586         return TCL_ERROR;
05587     }
05588 
05589     if ( (!0 && 0 && (argc < (1 + 6 - 0))) ||
05590          (!0 && !0 && (argc != (6 + 1))) ||
05591          ( 0 && (argc != 1) && (argc != (6 + 1))) ) {
05592         Tcl_AppendResult( interp, "wrong # args: should be \"",
05593                           "plsdimap dimxmin dimxmax dimymin dimymax dimxpmm dimypmm", "\"",
05594                           (char *) NULL);
05595         return TCL_ERROR;
05596     }
05597 
05598     dimxmin = atoi(argv[1+0]);
05599     dimxmax = atoi(argv[1+1]);
05600     dimymin = atoi(argv[1+2]);
05601     dimymax = atoi(argv[1+3]);
05602     dimxpmm = atof(argv[1+4]);
05603     dimypmm = atof(argv[1+5]);
05604 
05605     plsdimap ( dimxmin, dimxmax, dimymin, dimymax, dimxpmm, dimypmm );
05606 
05607 
05608     if (pl_errcode != 0) {
05609         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05610         return TCL_ERROR;
05611     }
05612 
05613     plflush();
05614     return TCL_OK;
05615 }
05616 
05617 /*--------------------------------------------------------------------------*\
05618  * plsdioriCmd
05619  *
05620  * Processes plsdiori Tcl command.
05621 \*--------------------------------------------------------------------------*/
05622 
05623 static int
05624 plsdioriCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05625 {
05626     PLFLT rot;
05627 
05628     pl_errcode = 0; errmsg[0] = '\0';
05629 
05630     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05631         Tcl_AppendResult( interp, "command syntax: \"",
05632                           "plsdiori rot", "\"",
05633                           (char *) NULL);
05634         return TCL_ERROR;
05635     }
05636 
05637     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
05638          (!0 && !0 && (argc != (1 + 1))) ||
05639          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
05640         Tcl_AppendResult( interp, "wrong # args: should be \"",
05641                           "plsdiori rot", "\"",
05642                           (char *) NULL);
05643         return TCL_ERROR;
05644     }
05645 
05646     rot = atof(argv[1+0]);
05647 
05648     plsdiori ( rot );
05649 
05650 
05651     if (pl_errcode != 0) {
05652         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05653         return TCL_ERROR;
05654     }
05655 
05656     plflush();
05657     return TCL_OK;
05658 }
05659 
05660 /*--------------------------------------------------------------------------*\
05661  * plsdipltCmd
05662  *
05663  * Processes plsdiplt Tcl command.
05664 \*--------------------------------------------------------------------------*/
05665 
05666 static int
05667 plsdipltCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05668 {
05669     PLFLT xmin;
05670     PLFLT ymin;
05671     PLFLT xmax;
05672     PLFLT ymax;
05673 
05674     pl_errcode = 0; errmsg[0] = '\0';
05675 
05676     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05677         Tcl_AppendResult( interp, "command syntax: \"",
05678                           "plsdiplt xmin ymin xmax ymax", "\"",
05679                           (char *) NULL);
05680         return TCL_ERROR;
05681     }
05682 
05683     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
05684          (!0 && !0 && (argc != (4 + 1))) ||
05685          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
05686         Tcl_AppendResult( interp, "wrong # args: should be \"",
05687                           "plsdiplt xmin ymin xmax ymax", "\"",
05688                           (char *) NULL);
05689         return TCL_ERROR;
05690     }
05691 
05692     xmin = atof(argv[1+0]);
05693     ymin = atof(argv[1+1]);
05694     xmax = atof(argv[1+2]);
05695     ymax = atof(argv[1+3]);
05696 
05697     plsdiplt ( xmin, ymin, xmax, ymax );
05698 
05699 
05700     if (pl_errcode != 0) {
05701         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05702         return TCL_ERROR;
05703     }
05704 
05705     plflush();
05706     return TCL_OK;
05707 }
05708 
05709 /*--------------------------------------------------------------------------*\
05710  * plsdiplzCmd
05711  *
05712  * Processes plsdiplz Tcl command.
05713 \*--------------------------------------------------------------------------*/
05714 
05715 static int
05716 plsdiplzCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05717 {
05718     PLFLT xmin;
05719     PLFLT ymin;
05720     PLFLT xmax;
05721     PLFLT ymax;
05722 
05723     pl_errcode = 0; errmsg[0] = '\0';
05724 
05725     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05726         Tcl_AppendResult( interp, "command syntax: \"",
05727                           "plsdiplz xmin ymin xmax ymax", "\"",
05728                           (char *) NULL);
05729         return TCL_ERROR;
05730     }
05731 
05732     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
05733          (!0 && !0 && (argc != (4 + 1))) ||
05734          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
05735         Tcl_AppendResult( interp, "wrong # args: should be \"",
05736                           "plsdiplz xmin ymin xmax ymax", "\"",
05737                           (char *) NULL);
05738         return TCL_ERROR;
05739     }
05740 
05741     xmin = atof(argv[1+0]);
05742     ymin = atof(argv[1+1]);
05743     xmax = atof(argv[1+2]);
05744     ymax = atof(argv[1+3]);
05745 
05746     plsdiplz ( xmin, ymin, xmax, ymax );
05747 
05748 
05749     if (pl_errcode != 0) {
05750         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05751         return TCL_ERROR;
05752     }
05753 
05754     plflush();
05755     return TCL_OK;
05756 }
05757 
05758 /*--------------------------------------------------------------------------*\
05759  * plseedCmd
05760  *
05761  * Processes plseed Tcl command.
05762 \*--------------------------------------------------------------------------*/
05763 
05764 static int
05765 plseedCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05766 {
05767     unsigned int s;
05768 
05769     pl_errcode = 0; errmsg[0] = '\0';
05770 
05771     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05772         Tcl_AppendResult( interp, "command syntax: \"",
05773                           "plseed s", "\"",
05774                           (char *) NULL);
05775         return TCL_ERROR;
05776     }
05777 
05778     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
05779          (!0 && !0 && (argc != (1 + 1))) ||
05780          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
05781         Tcl_AppendResult( interp, "wrong # args: should be \"",
05782                           "plseed s", "\"",
05783                           (char *) NULL);
05784         return TCL_ERROR;
05785     }
05786 
05787     s = (unsigned int) strtoul(argv[1+0],NULL,10);
05788 
05789     plseed ( s );
05790 
05791 
05792     if (pl_errcode != 0) {
05793         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05794         return TCL_ERROR;
05795     }
05796 
05797     plflush();
05798     return TCL_OK;
05799 }
05800 
05801 /*--------------------------------------------------------------------------*\
05802  * plsescCmd
05803  *
05804  * Processes plsesc Tcl command.
05805 \*--------------------------------------------------------------------------*/
05806 
05807 static int
05808 plsescCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05809 {
05810     char esc;
05811 
05812     pl_errcode = 0; errmsg[0] = '\0';
05813 
05814     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05815         Tcl_AppendResult( interp, "command syntax: \"",
05816                           "plsesc esc", "\"",
05817                           (char *) NULL);
05818         return TCL_ERROR;
05819     }
05820 
05821     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
05822          (!0 && !0 && (argc != (1 + 1))) ||
05823          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
05824         Tcl_AppendResult( interp, "wrong # args: should be \"",
05825                           "plsesc esc", "\"",
05826                           (char *) NULL);
05827         return TCL_ERROR;
05828     }
05829 
05830     esc = argv[1+0][0];
05831 
05832     plsesc ( esc );
05833 
05834 
05835     if (pl_errcode != 0) {
05836         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05837         return TCL_ERROR;
05838     }
05839 
05840     plflush();
05841     return TCL_OK;
05842 }
05843 
05844 /*--------------------------------------------------------------------------*\
05845  * plsfamCmd
05846  *
05847  * Processes plsfam Tcl command.
05848 \*--------------------------------------------------------------------------*/
05849 
05850 static int
05851 plsfamCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05852 {
05853     PLINT fam;
05854     PLINT num;
05855     PLINT bmax;
05856 
05857     pl_errcode = 0; errmsg[0] = '\0';
05858 
05859     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05860         Tcl_AppendResult( interp, "command syntax: \"",
05861                           "plsfam fam num bmax", "\"",
05862                           (char *) NULL);
05863         return TCL_ERROR;
05864     }
05865 
05866     if ( (!0 && 0 && (argc < (1 + 3 - 0))) ||
05867          (!0 && !0 && (argc != (3 + 1))) ||
05868          ( 0 && (argc != 1) && (argc != (3 + 1))) ) {
05869         Tcl_AppendResult( interp, "wrong # args: should be \"",
05870                           "plsfam fam num bmax", "\"",
05871                           (char *) NULL);
05872         return TCL_ERROR;
05873     }
05874 
05875     fam = atoi(argv[1+0]);
05876     num = atoi(argv[1+1]);
05877     bmax = atoi(argv[1+2]);
05878 
05879     plsfam ( fam, num, bmax );
05880 
05881 
05882     if (pl_errcode != 0) {
05883         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05884         return TCL_ERROR;
05885     }
05886 
05887     plflush();
05888     return TCL_OK;
05889 }
05890 
05891 /*--------------------------------------------------------------------------*\
05892  * plsfciCmd
05893  *
05894  * Processes plsfci Tcl command.
05895 \*--------------------------------------------------------------------------*/
05896 
05897 static int
05898 plsfciCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05899 {
05900     PLUNICODE fci;
05901 
05902     pl_errcode = 0; errmsg[0] = '\0';
05903 
05904     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05905         Tcl_AppendResult( interp, "command syntax: \"",
05906                           "plsfci fci", "\"",
05907                           (char *) NULL);
05908         return TCL_ERROR;
05909     }
05910 
05911     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
05912          (!0 && !0 && (argc != (1 + 1))) ||
05913          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
05914         Tcl_AppendResult( interp, "wrong # args: should be \"",
05915                           "plsfci fci", "\"",
05916                           (char *) NULL);
05917         return TCL_ERROR;
05918     }
05919 
05920     fci = (PLUNICODE) strtoul(argv[1+0],NULL,10);
05921 
05922     plsfci ( fci );
05923 
05924 
05925     if (pl_errcode != 0) {
05926         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05927         return TCL_ERROR;
05928     }
05929 
05930     plflush();
05931     return TCL_OK;
05932 }
05933 
05934 /*--------------------------------------------------------------------------*\
05935  * plsfnamCmd
05936  *
05937  * Processes plsfnam Tcl command.
05938 \*--------------------------------------------------------------------------*/
05939 
05940 static int
05941 plsfnamCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05942 {
05943     const char *fnam;
05944 
05945     pl_errcode = 0; errmsg[0] = '\0';
05946 
05947     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05948         Tcl_AppendResult( interp, "command syntax: \"",
05949                           "plsfnam fnam", "\"",
05950                           (char *) NULL);
05951         return TCL_ERROR;
05952     }
05953 
05954     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
05955          (!0 && !0 && (argc != (1 + 1))) ||
05956          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
05957         Tcl_AppendResult( interp, "wrong # args: should be \"",
05958                           "plsfnam fnam", "\"",
05959                           (char *) NULL);
05960         return TCL_ERROR;
05961     }
05962 
05963     fnam = argv[1+0];
05964 
05965     plsfnam ( fnam );
05966 
05967 
05968     if (pl_errcode != 0) {
05969         Tcl_AppendResult(interp, errmsg, (char *) NULL);
05970         return TCL_ERROR;
05971     }
05972 
05973     plflush();
05974     return TCL_OK;
05975 }
05976 
05977 /*--------------------------------------------------------------------------*\
05978  * plsfontCmd
05979  *
05980  * Processes plsfont Tcl command.
05981 \*--------------------------------------------------------------------------*/
05982 
05983 static int
05984 plsfontCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
05985 {
05986     PLINT family;
05987     PLINT style;
05988     PLINT weight;
05989 
05990     pl_errcode = 0; errmsg[0] = '\0';
05991 
05992     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
05993         Tcl_AppendResult( interp, "command syntax: \"",
05994                           "plsfont family style weight", "\"",
05995                           (char *) NULL);
05996         return TCL_ERROR;
05997     }
05998 
05999     if ( (!0 && 0 && (argc < (1 + 3 - 0))) ||
06000          (!0 && !0 && (argc != (3 + 1))) ||
06001          ( 0 && (argc != 1) && (argc != (3 + 1))) ) {
06002         Tcl_AppendResult( interp, "wrong # args: should be \"",
06003                           "plsfont family style weight", "\"",
06004                           (char *) NULL);
06005         return TCL_ERROR;
06006     }
06007 
06008     family = atoi(argv[1+0]);
06009     style = atoi(argv[1+1]);
06010     weight = atoi(argv[1+2]);
06011 
06012     plsfont ( family, style, weight );
06013 
06014 
06015     if (pl_errcode != 0) {
06016         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06017         return TCL_ERROR;
06018     }
06019 
06020     plflush();
06021     return TCL_OK;
06022 }
06023 
06024 /*--------------------------------------------------------------------------*\
06025  * plsmajCmd
06026  *
06027  * Processes plsmaj Tcl command.
06028 \*--------------------------------------------------------------------------*/
06029 
06030 static int
06031 plsmajCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06032 {
06033     PLFLT def;
06034     PLFLT scale;
06035 
06036     pl_errcode = 0; errmsg[0] = '\0';
06037 
06038     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06039         Tcl_AppendResult( interp, "command syntax: \"",
06040                           "plsmaj def scale", "\"",
06041                           (char *) NULL);
06042         return TCL_ERROR;
06043     }
06044 
06045     if ( (!0 && 0 && (argc < (1 + 2 - 0))) ||
06046          (!0 && !0 && (argc != (2 + 1))) ||
06047          ( 0 && (argc != 1) && (argc != (2 + 1))) ) {
06048         Tcl_AppendResult( interp, "wrong # args: should be \"",
06049                           "plsmaj def scale", "\"",
06050                           (char *) NULL);
06051         return TCL_ERROR;
06052     }
06053 
06054     def = atof(argv[1+0]);
06055     scale = atof(argv[1+1]);
06056 
06057     plsmaj ( def, scale );
06058 
06059 
06060     if (pl_errcode != 0) {
06061         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06062         return TCL_ERROR;
06063     }
06064 
06065     plflush();
06066     return TCL_OK;
06067 }
06068 
06069 /*--------------------------------------------------------------------------*\
06070  * plsminCmd
06071  *
06072  * Processes plsmin Tcl command.
06073 \*--------------------------------------------------------------------------*/
06074 
06075 static int
06076 plsminCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06077 {
06078     PLFLT def;
06079     PLFLT scale;
06080 
06081     pl_errcode = 0; errmsg[0] = '\0';
06082 
06083     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06084         Tcl_AppendResult( interp, "command syntax: \"",
06085                           "plsmin def scale", "\"",
06086                           (char *) NULL);
06087         return TCL_ERROR;
06088     }
06089 
06090     if ( (!0 && 0 && (argc < (1 + 2 - 0))) ||
06091          (!0 && !0 && (argc != (2 + 1))) ||
06092          ( 0 && (argc != 1) && (argc != (2 + 1))) ) {
06093         Tcl_AppendResult( interp, "wrong # args: should be \"",
06094                           "plsmin def scale", "\"",
06095                           (char *) NULL);
06096         return TCL_ERROR;
06097     }
06098 
06099     def = atof(argv[1+0]);
06100     scale = atof(argv[1+1]);
06101 
06102     plsmin ( def, scale );
06103 
06104 
06105     if (pl_errcode != 0) {
06106         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06107         return TCL_ERROR;
06108     }
06109 
06110     plflush();
06111     return TCL_OK;
06112 }
06113 
06114 /*--------------------------------------------------------------------------*\
06115  * plsoriCmd
06116  *
06117  * Processes plsori Tcl command.
06118 \*--------------------------------------------------------------------------*/
06119 
06120 static int
06121 plsoriCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06122 {
06123     PLINT ori;
06124 
06125     pl_errcode = 0; errmsg[0] = '\0';
06126 
06127     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06128         Tcl_AppendResult( interp, "command syntax: \"",
06129                           "plsori ori", "\"",
06130                           (char *) NULL);
06131         return TCL_ERROR;
06132     }
06133 
06134     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
06135          (!0 && !0 && (argc != (1 + 1))) ||
06136          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
06137         Tcl_AppendResult( interp, "wrong # args: should be \"",
06138                           "plsori ori", "\"",
06139                           (char *) NULL);
06140         return TCL_ERROR;
06141     }
06142 
06143     ori = atoi(argv[1+0]);
06144 
06145     plsori ( ori );
06146 
06147 
06148     if (pl_errcode != 0) {
06149         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06150         return TCL_ERROR;
06151     }
06152 
06153     plflush();
06154     return TCL_OK;
06155 }
06156 
06157 /*--------------------------------------------------------------------------*\
06158  * plspageCmd
06159  *
06160  * Processes plspage Tcl command.
06161 \*--------------------------------------------------------------------------*/
06162 
06163 static int
06164 plspageCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06165 {
06166     PLFLT xp;
06167     PLFLT yp;
06168     PLINT xleng;
06169     PLINT yleng;
06170     PLINT xoff;
06171     PLINT yoff;
06172 
06173     pl_errcode = 0; errmsg[0] = '\0';
06174 
06175     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06176         Tcl_AppendResult( interp, "command syntax: \"",
06177                           "plspage xp yp xleng yleng xoff yoff", "\"",
06178                           (char *) NULL);
06179         return TCL_ERROR;
06180     }
06181 
06182     if ( (!0 && 0 && (argc < (1 + 6 - 0))) ||
06183          (!0 && !0 && (argc != (6 + 1))) ||
06184          ( 0 && (argc != 1) && (argc != (6 + 1))) ) {
06185         Tcl_AppendResult( interp, "wrong # args: should be \"",
06186                           "plspage xp yp xleng yleng xoff yoff", "\"",
06187                           (char *) NULL);
06188         return TCL_ERROR;
06189     }
06190 
06191     xp = atof(argv[1+0]);
06192     yp = atof(argv[1+1]);
06193     xleng = atoi(argv[1+2]);
06194     yleng = atoi(argv[1+3]);
06195     xoff = atoi(argv[1+4]);
06196     yoff = atoi(argv[1+5]);
06197 
06198     plspage ( xp, yp, xleng, yleng, xoff, yoff );
06199 
06200 
06201     if (pl_errcode != 0) {
06202         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06203         return TCL_ERROR;
06204     }
06205 
06206     plflush();
06207     return TCL_OK;
06208 }
06209 
06210 /*--------------------------------------------------------------------------*\
06211  * plspal0Cmd
06212  *
06213  * Processes plspal0 Tcl command.
06214 \*--------------------------------------------------------------------------*/
06215 
06216 static int
06217 plspal0Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06218 {
06219     const char *filename;
06220 
06221     pl_errcode = 0; errmsg[0] = '\0';
06222 
06223     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06224         Tcl_AppendResult( interp, "command syntax: \"",
06225                           "plspal0 filename", "\"",
06226                           (char *) NULL);
06227         return TCL_ERROR;
06228     }
06229 
06230     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
06231          (!0 && !0 && (argc != (1 + 1))) ||
06232          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
06233         Tcl_AppendResult( interp, "wrong # args: should be \"",
06234                           "plspal0 filename", "\"",
06235                           (char *) NULL);
06236         return TCL_ERROR;
06237     }
06238 
06239     filename = argv[1+0];
06240 
06241     plspal0 ( filename );
06242 
06243 
06244     if (pl_errcode != 0) {
06245         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06246         return TCL_ERROR;
06247     }
06248 
06249     plflush();
06250     return TCL_OK;
06251 }
06252 
06253 /*--------------------------------------------------------------------------*\
06254  * plspal1Cmd
06255  *
06256  * Processes plspal1 Tcl command.
06257 \*--------------------------------------------------------------------------*/
06258 
06259 static int
06260 plspal1Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06261 {
06262     const char *filename;
06263     PLINT interpolate;
06264 
06265     pl_errcode = 0; errmsg[0] = '\0';
06266 
06267     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06268         Tcl_AppendResult( interp, "command syntax: \"",
06269                           "plspal1 filename interpolate", "\"",
06270                           (char *) NULL);
06271         return TCL_ERROR;
06272     }
06273 
06274     if ( (!0 && 0 && (argc < (1 + 2 - 0))) ||
06275          (!0 && !0 && (argc != (2 + 1))) ||
06276          ( 0 && (argc != 1) && (argc != (2 + 1))) ) {
06277         Tcl_AppendResult( interp, "wrong # args: should be \"",
06278                           "plspal1 filename interpolate", "\"",
06279                           (char *) NULL);
06280         return TCL_ERROR;
06281     }
06282 
06283     filename = argv[1+0];
06284     interpolate = atoi(argv[1+1]);
06285 
06286     plspal1 ( filename, interpolate );
06287 
06288 
06289     if (pl_errcode != 0) {
06290         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06291         return TCL_ERROR;
06292     }
06293 
06294     plflush();
06295     return TCL_OK;
06296 }
06297 
06298 /*--------------------------------------------------------------------------*\
06299  * plspauseCmd
06300  *
06301  * Processes plspause Tcl command.
06302 \*--------------------------------------------------------------------------*/
06303 
06304 static int
06305 plspauseCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06306 {
06307     PLINT paus;
06308 
06309     pl_errcode = 0; errmsg[0] = '\0';
06310 
06311     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06312         Tcl_AppendResult( interp, "command syntax: \"",
06313                           "plspause paus", "\"",
06314                           (char *) NULL);
06315         return TCL_ERROR;
06316     }
06317 
06318     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
06319          (!0 && !0 && (argc != (1 + 1))) ||
06320          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
06321         Tcl_AppendResult( interp, "wrong # args: should be \"",
06322                           "plspause paus", "\"",
06323                           (char *) NULL);
06324         return TCL_ERROR;
06325     }
06326 
06327     paus = atoi(argv[1+0]);
06328 
06329     plspause ( paus );
06330 
06331 
06332     if (pl_errcode != 0) {
06333         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06334         return TCL_ERROR;
06335     }
06336 
06337     plflush();
06338     return TCL_OK;
06339 }
06340 
06341 /*--------------------------------------------------------------------------*\
06342  * plsstrmCmd
06343  *
06344  * Processes plsstrm Tcl command.
06345 \*--------------------------------------------------------------------------*/
06346 
06347 static int
06348 plsstrmCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06349 {
06350     PLINT strm;
06351 
06352     pl_errcode = 0; errmsg[0] = '\0';
06353 
06354     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06355         Tcl_AppendResult( interp, "command syntax: \"",
06356                           "plsstrm strm", "\"",
06357                           (char *) NULL);
06358         return TCL_ERROR;
06359     }
06360 
06361     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
06362          (!0 && !0 && (argc != (1 + 1))) ||
06363          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
06364         Tcl_AppendResult( interp, "wrong # args: should be \"",
06365                           "plsstrm strm", "\"",
06366                           (char *) NULL);
06367         return TCL_ERROR;
06368     }
06369 
06370     strm = atoi(argv[1+0]);
06371 
06372     plsstrm ( strm );
06373 
06374 
06375     if (pl_errcode != 0) {
06376         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06377         return TCL_ERROR;
06378     }
06379 
06380     plflush();
06381     return TCL_OK;
06382 }
06383 
06384 /*--------------------------------------------------------------------------*\
06385  * plssubCmd
06386  *
06387  * Processes plssub Tcl command.
06388 \*--------------------------------------------------------------------------*/
06389 
06390 static int
06391 plssubCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06392 {
06393     PLINT nx;
06394     PLINT ny;
06395 
06396     pl_errcode = 0; errmsg[0] = '\0';
06397 
06398     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06399         Tcl_AppendResult( interp, "command syntax: \"",
06400                           "plssub nx ny", "\"",
06401                           (char *) NULL);
06402         return TCL_ERROR;
06403     }
06404 
06405     if ( (!0 && 0 && (argc < (1 + 2 - 0))) ||
06406          (!0 && !0 && (argc != (2 + 1))) ||
06407          ( 0 && (argc != 1) && (argc != (2 + 1))) ) {
06408         Tcl_AppendResult( interp, "wrong # args: should be \"",
06409                           "plssub nx ny", "\"",
06410                           (char *) NULL);
06411         return TCL_ERROR;
06412     }
06413 
06414     nx = atoi(argv[1+0]);
06415     ny = atoi(argv[1+1]);
06416 
06417     plssub ( nx, ny );
06418 
06419 
06420     if (pl_errcode != 0) {
06421         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06422         return TCL_ERROR;
06423     }
06424 
06425     plflush();
06426     return TCL_OK;
06427 }
06428 
06429 /*--------------------------------------------------------------------------*\
06430  * plssymCmd
06431  *
06432  * Processes plssym Tcl command.
06433 \*--------------------------------------------------------------------------*/
06434 
06435 static int
06436 plssymCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06437 {
06438     PLFLT def;
06439     PLFLT scale;
06440 
06441     pl_errcode = 0; errmsg[0] = '\0';
06442 
06443     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06444         Tcl_AppendResult( interp, "command syntax: \"",
06445                           "plssym def scale", "\"",
06446                           (char *) NULL);
06447         return TCL_ERROR;
06448     }
06449 
06450     if ( (!0 && 0 && (argc < (1 + 2 - 0))) ||
06451          (!0 && !0 && (argc != (2 + 1))) ||
06452          ( 0 && (argc != 1) && (argc != (2 + 1))) ) {
06453         Tcl_AppendResult( interp, "wrong # args: should be \"",
06454                           "plssym def scale", "\"",
06455                           (char *) NULL);
06456         return TCL_ERROR;
06457     }
06458 
06459     def = atof(argv[1+0]);
06460     scale = atof(argv[1+1]);
06461 
06462     plssym ( def, scale );
06463 
06464 
06465     if (pl_errcode != 0) {
06466         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06467         return TCL_ERROR;
06468     }
06469 
06470     plflush();
06471     return TCL_OK;
06472 }
06473 
06474 /*--------------------------------------------------------------------------*\
06475  * plstarCmd
06476  *
06477  * Processes plstar Tcl command.
06478 \*--------------------------------------------------------------------------*/
06479 
06480 static int
06481 plstarCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06482 {
06483     PLINT nx;
06484     PLINT ny;
06485 
06486     pl_errcode = 0; errmsg[0] = '\0';
06487 
06488     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06489         Tcl_AppendResult( interp, "command syntax: \"",
06490                           "plstar nx ny", "\"",
06491                           (char *) NULL);
06492         return TCL_ERROR;
06493     }
06494 
06495     if ( (!0 && 0 && (argc < (1 + 2 - 0))) ||
06496          (!0 && !0 && (argc != (2 + 1))) ||
06497          ( 0 && (argc != 1) && (argc != (2 + 1))) ) {
06498         Tcl_AppendResult( interp, "wrong # args: should be \"",
06499                           "plstar nx ny", "\"",
06500                           (char *) NULL);
06501         return TCL_ERROR;
06502     }
06503 
06504     nx = atoi(argv[1+0]);
06505     ny = atoi(argv[1+1]);
06506 
06507     plstar ( nx, ny );
06508 
06509 
06510     if (pl_errcode != 0) {
06511         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06512         return TCL_ERROR;
06513     }
06514 
06515     plflush();
06516     return TCL_OK;
06517 }
06518 
06519 /*--------------------------------------------------------------------------*\
06520  * plstartCmd
06521  *
06522  * Processes plstart Tcl command.
06523 \*--------------------------------------------------------------------------*/
06524 
06525 static int
06526 plstartCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06527 {
06528     const char *devname;
06529     PLINT nx;
06530     PLINT ny;
06531 
06532     pl_errcode = 0; errmsg[0] = '\0';
06533 
06534     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06535         Tcl_AppendResult( interp, "command syntax: \"",
06536                           "plstart devname nx ny", "\"",
06537                           (char *) NULL);
06538         return TCL_ERROR;
06539     }
06540 
06541     if ( (!0 && 0 && (argc < (1 + 3 - 0))) ||
06542          (!0 && !0 && (argc != (3 + 1))) ||
06543          ( 0 && (argc != 1) && (argc != (3 + 1))) ) {
06544         Tcl_AppendResult( interp, "wrong # args: should be \"",
06545                           "plstart devname nx ny", "\"",
06546                           (char *) NULL);
06547         return TCL_ERROR;
06548     }
06549 
06550     devname = argv[1+0];
06551     nx = atoi(argv[1+1]);
06552     ny = atoi(argv[1+2]);
06553 
06554     plstart ( devname, nx, ny );
06555 
06556 
06557     if (pl_errcode != 0) {
06558         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06559         return TCL_ERROR;
06560     }
06561 
06562     plflush();
06563     return TCL_OK;
06564 }
06565 
06566 /*--------------------------------------------------------------------------*\
06567  * plstringCmd
06568  *
06569  * Processes plstring Tcl command.
06570 \*--------------------------------------------------------------------------*/
06571 
06572 static int
06573 plstringCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06574 {
06575     PLINT n;
06576     PLFLT *x;
06577     tclMatrix *matx;
06578     PLFLT *y;
06579     tclMatrix *maty;
06580     const char *string;
06581 
06582     pl_errcode = 0; errmsg[0] = '\0';
06583 
06584     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06585         Tcl_AppendResult( interp, "command syntax: \"",
06586                           "plstring n x y string", "\"",
06587                           (char *) NULL);
06588         return TCL_ERROR;
06589     }
06590 
06591     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
06592          (!0 && !0 && (argc != (4 + 1))) ||
06593          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
06594         Tcl_AppendResult( interp, "wrong # args: should be \"",
06595                           "plstring n x y string", "\"",
06596                           (char *) NULL);
06597         return TCL_ERROR;
06598     }
06599 
06600     n = atoi(argv[1+0]);
06601     matx = Tcl_GetMatrixPtr( interp, argv[1+1] );
06602     if (matx == NULL) return TCL_ERROR;
06603     x = matx->fdata;
06604     maty = Tcl_GetMatrixPtr( interp, argv[1+2] );
06605     if (maty == NULL) return TCL_ERROR;
06606     y = maty->fdata;
06607     string = argv[1+3];
06608 
06609     plstring ( n, x, y, string );
06610 
06611 
06612     if (pl_errcode != 0) {
06613         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06614         return TCL_ERROR;
06615     }
06616 
06617     plflush();
06618     return TCL_OK;
06619 }
06620 
06621 /*--------------------------------------------------------------------------*\
06622  * plstring3Cmd
06623  *
06624  * Processes plstring3 Tcl command.
06625 \*--------------------------------------------------------------------------*/
06626 
06627 static int
06628 plstring3Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06629 {
06630     PLINT n;
06631     PLFLT *x;
06632     tclMatrix *matx;
06633     PLFLT *y;
06634     tclMatrix *maty;
06635     PLFLT *z;
06636     tclMatrix *matz;
06637     const char *string;
06638 
06639     pl_errcode = 0; errmsg[0] = '\0';
06640 
06641     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06642         Tcl_AppendResult( interp, "command syntax: \"",
06643                           "plstring3 n x y z string", "\"",
06644                           (char *) NULL);
06645         return TCL_ERROR;
06646     }
06647 
06648     if ( (!0 && 0 && (argc < (1 + 5 - 0))) ||
06649          (!0 && !0 && (argc != (5 + 1))) ||
06650          ( 0 && (argc != 1) && (argc != (5 + 1))) ) {
06651         Tcl_AppendResult( interp, "wrong # args: should be \"",
06652                           "plstring3 n x y z string", "\"",
06653                           (char *) NULL);
06654         return TCL_ERROR;
06655     }
06656 
06657     n = atoi(argv[1+0]);
06658     matx = Tcl_GetMatrixPtr( interp, argv[1+1] );
06659     if (matx == NULL) return TCL_ERROR;
06660     x = matx->fdata;
06661     maty = Tcl_GetMatrixPtr( interp, argv[1+2] );
06662     if (maty == NULL) return TCL_ERROR;
06663     y = maty->fdata;
06664     matz = Tcl_GetMatrixPtr( interp, argv[1+3] );
06665     if (matz == NULL) return TCL_ERROR;
06666     z = matz->fdata;
06667     string = argv[1+4];
06668 
06669     plstring3 ( n, x, y, z, string );
06670 
06671 
06672     if (pl_errcode != 0) {
06673         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06674         return TCL_ERROR;
06675     }
06676 
06677     plflush();
06678     return TCL_OK;
06679 }
06680 
06681 /*--------------------------------------------------------------------------*\
06682  * plstripaCmd
06683  *
06684  * Processes plstripa Tcl command.
06685 \*--------------------------------------------------------------------------*/
06686 
06687 static int
06688 plstripaCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06689 {
06690     PLINT id;
06691     PLINT pen;
06692     PLFLT x;
06693     PLFLT y;
06694 
06695     pl_errcode = 0; errmsg[0] = '\0';
06696 
06697     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06698         Tcl_AppendResult( interp, "command syntax: \"",
06699                           "plstripa id pen x y", "\"",
06700                           (char *) NULL);
06701         return TCL_ERROR;
06702     }
06703 
06704     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
06705          (!0 && !0 && (argc != (4 + 1))) ||
06706          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
06707         Tcl_AppendResult( interp, "wrong # args: should be \"",
06708                           "plstripa id pen x y", "\"",
06709                           (char *) NULL);
06710         return TCL_ERROR;
06711     }
06712 
06713     id = atoi(argv[1+0]);
06714     pen = atoi(argv[1+1]);
06715     x = atof(argv[1+2]);
06716     y = atof(argv[1+3]);
06717 
06718     plstripa ( id, pen, x, y );
06719 
06720 
06721     if (pl_errcode != 0) {
06722         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06723         return TCL_ERROR;
06724     }
06725 
06726     plflush();
06727     return TCL_OK;
06728 }
06729 
06730 /*--------------------------------------------------------------------------*\
06731  * plstripdCmd
06732  *
06733  * Processes plstripd Tcl command.
06734 \*--------------------------------------------------------------------------*/
06735 
06736 static int
06737 plstripdCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06738 {
06739     PLINT id;
06740 
06741     pl_errcode = 0; errmsg[0] = '\0';
06742 
06743     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06744         Tcl_AppendResult( interp, "command syntax: \"",
06745                           "plstripd id", "\"",
06746                           (char *) NULL);
06747         return TCL_ERROR;
06748     }
06749 
06750     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
06751          (!0 && !0 && (argc != (1 + 1))) ||
06752          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
06753         Tcl_AppendResult( interp, "wrong # args: should be \"",
06754                           "plstripd id", "\"",
06755                           (char *) NULL);
06756         return TCL_ERROR;
06757     }
06758 
06759     id = atoi(argv[1+0]);
06760 
06761     plstripd ( id );
06762 
06763 
06764     if (pl_errcode != 0) {
06765         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06766         return TCL_ERROR;
06767     }
06768 
06769     plflush();
06770     return TCL_OK;
06771 }
06772 
06773 /*--------------------------------------------------------------------------*\
06774  * plstylCmd
06775  *
06776  * Processes plstyl Tcl command.
06777 \*--------------------------------------------------------------------------*/
06778 
06779 static int
06780 plstylCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06781 {
06782     PLINT nms;
06783     PLINT *mark;
06784     tclMatrix *matmark;
06785     PLINT *space;
06786     tclMatrix *matspace;
06787 
06788     pl_errcode = 0; errmsg[0] = '\0';
06789 
06790     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06791         Tcl_AppendResult( interp, "command syntax: \"",
06792                           "plstyl nms mark space", "\"",
06793                           (char *) NULL);
06794         return TCL_ERROR;
06795     }
06796 
06797     if ( (!0 && 0 && (argc < (1 + 3 - 0))) ||
06798          (!0 && !0 && (argc != (3 + 1))) ||
06799          ( 0 && (argc != 1) && (argc != (3 + 1))) ) {
06800         Tcl_AppendResult( interp, "wrong # args: should be \"",
06801                           "plstyl nms mark space", "\"",
06802                           (char *) NULL);
06803         return TCL_ERROR;
06804     }
06805 
06806     nms = atoi(argv[1+0]);
06807     matmark = Tcl_GetMatrixPtr( interp, argv[1+1] );
06808     if (matmark == NULL) return TCL_ERROR;
06809     mark = matmark->idata;
06810     matspace = Tcl_GetMatrixPtr( interp, argv[1+2] );
06811     if (matspace == NULL) return TCL_ERROR;
06812     space = matspace->idata;
06813 
06814     plstyl ( nms, mark, space );
06815 
06816 
06817     if (pl_errcode != 0) {
06818         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06819         return TCL_ERROR;
06820     }
06821 
06822     plflush();
06823     return TCL_OK;
06824 }
06825 
06826 /*--------------------------------------------------------------------------*\
06827  * plsvpaCmd
06828  *
06829  * Processes plsvpa Tcl command.
06830 \*--------------------------------------------------------------------------*/
06831 
06832 static int
06833 plsvpaCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06834 {
06835     PLFLT xmin;
06836     PLFLT xmax;
06837     PLFLT ymin;
06838     PLFLT ymax;
06839 
06840     pl_errcode = 0; errmsg[0] = '\0';
06841 
06842     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06843         Tcl_AppendResult( interp, "command syntax: \"",
06844                           "plsvpa xmin xmax ymin ymax", "\"",
06845                           (char *) NULL);
06846         return TCL_ERROR;
06847     }
06848 
06849     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
06850          (!0 && !0 && (argc != (4 + 1))) ||
06851          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
06852         Tcl_AppendResult( interp, "wrong # args: should be \"",
06853                           "plsvpa xmin xmax ymin ymax", "\"",
06854                           (char *) NULL);
06855         return TCL_ERROR;
06856     }
06857 
06858     xmin = atof(argv[1+0]);
06859     xmax = atof(argv[1+1]);
06860     ymin = atof(argv[1+2]);
06861     ymax = atof(argv[1+3]);
06862 
06863     plsvpa ( xmin, xmax, ymin, ymax );
06864 
06865 
06866     if (pl_errcode != 0) {
06867         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06868         return TCL_ERROR;
06869     }
06870 
06871     plflush();
06872     return TCL_OK;
06873 }
06874 
06875 /*--------------------------------------------------------------------------*\
06876  * plsxaxCmd
06877  *
06878  * Processes plsxax Tcl command.
06879 \*--------------------------------------------------------------------------*/
06880 
06881 static int
06882 plsxaxCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06883 {
06884     PLINT digmax;
06885     PLINT digits;
06886 
06887     pl_errcode = 0; errmsg[0] = '\0';
06888 
06889     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06890         Tcl_AppendResult( interp, "command syntax: \"",
06891                           "plsxax digmax digits", "\"",
06892                           (char *) NULL);
06893         return TCL_ERROR;
06894     }
06895 
06896     if ( (!0 && 0 && (argc < (1 + 2 - 0))) ||
06897          (!0 && !0 && (argc != (2 + 1))) ||
06898          ( 0 && (argc != 1) && (argc != (2 + 1))) ) {
06899         Tcl_AppendResult( interp, "wrong # args: should be \"",
06900                           "plsxax digmax digits", "\"",
06901                           (char *) NULL);
06902         return TCL_ERROR;
06903     }
06904 
06905     digmax = atoi(argv[1+0]);
06906     digits = atoi(argv[1+1]);
06907 
06908     plsxax ( digmax, digits );
06909 
06910 
06911     if (pl_errcode != 0) {
06912         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06913         return TCL_ERROR;
06914     }
06915 
06916     plflush();
06917     return TCL_OK;
06918 }
06919 
06920 /*--------------------------------------------------------------------------*\
06921  * plsyaxCmd
06922  *
06923  * Processes plsyax Tcl command.
06924 \*--------------------------------------------------------------------------*/
06925 
06926 static int
06927 plsyaxCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06928 {
06929     PLINT digmax = 0;
06930     PLINT digits = 0;
06931 
06932     pl_errcode = 0; errmsg[0] = '\0';
06933 
06934     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06935         Tcl_AppendResult( interp, "command syntax: \"",
06936                           "plsyax digmax digits", "\"",
06937                           (char *) NULL);
06938         return TCL_ERROR;
06939     }
06940 
06941     if ( (!0 && 2 && (argc < (1 + 2 - 2))) ||
06942          (!0 && !2 && (argc != (2 + 1))) ||
06943          ( 0 && (argc != 1) && (argc != (2 + 1))) ) {
06944         Tcl_AppendResult( interp, "wrong # args: should be \"",
06945                           "plsyax digmax digits", "\"",
06946                           (char *) NULL);
06947         return TCL_ERROR;
06948     }
06949 
06950     if (argc > 0+1) {    
06951     digmax = atoi(argv[1+0]);
06952     }
06953     if (argc > 1+1) {    
06954     digits = atoi(argv[1+1]);
06955     }
06956 
06957     plsyax ( digmax, digits );
06958 
06959 
06960     if (pl_errcode != 0) {
06961         Tcl_AppendResult(interp, errmsg, (char *) NULL);
06962         return TCL_ERROR;
06963     }
06964 
06965     plflush();
06966     return TCL_OK;
06967 }
06968 
06969 /*--------------------------------------------------------------------------*\
06970  * plsymCmd
06971  *
06972  * Processes plsym Tcl command.
06973 \*--------------------------------------------------------------------------*/
06974 
06975 static int
06976 plsymCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
06977 {
06978     PLINT n;
06979     PLFLT *x;
06980     tclMatrix *matx;
06981     PLFLT *y;
06982     tclMatrix *maty;
06983     PLINT code;
06984 
06985     pl_errcode = 0; errmsg[0] = '\0';
06986 
06987     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
06988         Tcl_AppendResult( interp, "command syntax: \"",
06989                           "plsym n x y code", "\"",
06990                           (char *) NULL);
06991         return TCL_ERROR;
06992     }
06993 
06994     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
06995          (!0 && !0 && (argc != (4 + 1))) ||
06996          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
06997         Tcl_AppendResult( interp, "wrong # args: should be \"",
06998                           "plsym n x y code", "\"",
06999                           (char *) NULL);
07000         return TCL_ERROR;
07001     }
07002 
07003     n = atoi(argv[1+0]);
07004     matx = Tcl_GetMatrixPtr( interp, argv[1+1] );
07005     if (matx == NULL) return TCL_ERROR;
07006     x = matx->fdata;
07007     maty = Tcl_GetMatrixPtr( interp, argv[1+2] );
07008     if (maty == NULL) return TCL_ERROR;
07009     y = maty->fdata;
07010     code = atoi(argv[1+3]);
07011 
07012     plsym ( n, x, y, code );
07013 
07014 
07015     if (pl_errcode != 0) {
07016         Tcl_AppendResult(interp, errmsg, (char *) NULL);
07017         return TCL_ERROR;
07018     }
07019 
07020     plflush();
07021     return TCL_OK;
07022 }
07023 
07024 /*--------------------------------------------------------------------------*\
07025  * plszaxCmd
07026  *
07027  * Processes plszax Tcl command.
07028 \*--------------------------------------------------------------------------*/
07029 
07030 static int
07031 plszaxCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
07032 {
07033     PLINT digmax;
07034     PLINT digits;
07035 
07036     pl_errcode = 0; errmsg[0] = '\0';
07037 
07038     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
07039         Tcl_AppendResult( interp, "command syntax: \"",
07040                           "plszax digmax digits", "\"",
07041                           (char *) NULL);
07042         return TCL_ERROR;
07043     }
07044 
07045     if ( (!0 && 0 && (argc < (1 + 2 - 0))) ||
07046          (!0 && !0 && (argc != (2 + 1))) ||
07047          ( 0 && (argc != 1) && (argc != (2 + 1))) ) {
07048         Tcl_AppendResult( interp, "wrong # args: should be \"",
07049                           "plszax digmax digits", "\"",
07050                           (char *) NULL);
07051         return TCL_ERROR;
07052     }
07053 
07054     digmax = atoi(argv[1+0]);
07055     digits = atoi(argv[1+1]);
07056 
07057     plszax ( digmax, digits );
07058 
07059 
07060     if (pl_errcode != 0) {
07061         Tcl_AppendResult(interp, errmsg, (char *) NULL);
07062         return TCL_ERROR;
07063     }
07064 
07065     plflush();
07066     return TCL_OK;
07067 }
07068 
07069 /*--------------------------------------------------------------------------*\
07070  * pltextCmd
07071  *
07072  * Processes pltext Tcl command.
07073 \*--------------------------------------------------------------------------*/
07074 
07075 static int
07076 pltextCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
07077 {
07078 
07079     pl_errcode = 0; errmsg[0] = '\0';
07080 
07081     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
07082         Tcl_AppendResult( interp, "command syntax: \"",
07083                           "pltext ", "\"",
07084                           (char *) NULL);
07085         return TCL_ERROR;
07086     }
07087 
07088     if ( (!0 && 0 && (argc < (1 + 0 - 0))) ||
07089          (!0 && !0 && (argc != (0 + 1))) ||
07090          ( 0 && (argc != 1) && (argc != (0 + 1))) ) {
07091         Tcl_AppendResult( interp, "wrong # args: should be \"",
07092                           "pltext ", "\"",
07093                           (char *) NULL);
07094         return TCL_ERROR;
07095     }
07096 
07097 
07098     pltext (  );
07099 
07100 
07101     if (pl_errcode != 0) {
07102         Tcl_AppendResult(interp, errmsg, (char *) NULL);
07103         return TCL_ERROR;
07104     }
07105 
07106     plflush();
07107     return TCL_OK;
07108 }
07109 
07110 /*--------------------------------------------------------------------------*\
07111  * pltimefmtCmd
07112  *
07113  * Processes pltimefmt Tcl command.
07114 \*--------------------------------------------------------------------------*/
07115 
07116 static int
07117 pltimefmtCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
07118 {
07119     const char *fmt;
07120 
07121     pl_errcode = 0; errmsg[0] = '\0';
07122 
07123     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
07124         Tcl_AppendResult( interp, "command syntax: \"",
07125                           "pltimefmt fmt", "\"",
07126                           (char *) NULL);
07127         return TCL_ERROR;
07128     }
07129 
07130     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
07131          (!0 && !0 && (argc != (1 + 1))) ||
07132          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
07133         Tcl_AppendResult( interp, "wrong # args: should be \"",
07134                           "pltimefmt fmt", "\"",
07135                           (char *) NULL);
07136         return TCL_ERROR;
07137     }
07138 
07139     fmt = argv[1+0];
07140 
07141     pltimefmt ( fmt );
07142 
07143 
07144     if (pl_errcode != 0) {
07145         Tcl_AppendResult(interp, errmsg, (char *) NULL);
07146         return TCL_ERROR;
07147     }
07148 
07149     plflush();
07150     return TCL_OK;
07151 }
07152 
07153 /*--------------------------------------------------------------------------*\
07154  * plvaspCmd
07155  *
07156  * Processes plvasp Tcl command.
07157 \*--------------------------------------------------------------------------*/
07158 
07159 static int
07160 plvaspCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
07161 {
07162     PLFLT aspect;
07163 
07164     pl_errcode = 0; errmsg[0] = '\0';
07165 
07166     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
07167         Tcl_AppendResult( interp, "command syntax: \"",
07168                           "plvasp aspect", "\"",
07169                           (char *) NULL);
07170         return TCL_ERROR;
07171     }
07172 
07173     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
07174          (!0 && !0 && (argc != (1 + 1))) ||
07175          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
07176         Tcl_AppendResult( interp, "wrong # args: should be \"",
07177                           "plvasp aspect", "\"",
07178                           (char *) NULL);
07179         return TCL_ERROR;
07180     }
07181 
07182     aspect = atof(argv[1+0]);
07183 
07184     plvasp ( aspect );
07185 
07186 
07187     if (pl_errcode != 0) {
07188         Tcl_AppendResult(interp, errmsg, (char *) NULL);
07189         return TCL_ERROR;
07190     }
07191 
07192     plflush();
07193     return TCL_OK;
07194 }
07195 
07196 /*--------------------------------------------------------------------------*\
07197  * plvpasCmd
07198  *
07199  * Processes plvpas Tcl command.
07200 \*--------------------------------------------------------------------------*/
07201 
07202 static int
07203 plvpasCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
07204 {
07205     PLFLT xmin;
07206     PLFLT xmax;
07207     PLFLT ymin;
07208     PLFLT ymax;
07209     PLFLT aspect;
07210 
07211     pl_errcode = 0; errmsg[0] = '\0';
07212 
07213     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
07214         Tcl_AppendResult( interp, "command syntax: \"",
07215                           "plvpas xmin xmax ymin ymax aspect", "\"",
07216                           (char *) NULL);
07217         return TCL_ERROR;
07218     }
07219 
07220     if ( (!0 && 0 && (argc < (1 + 5 - 0))) ||
07221          (!0 && !0 && (argc != (5 + 1))) ||
07222          ( 0 && (argc != 1) && (argc != (5 + 1))) ) {
07223         Tcl_AppendResult( interp, "wrong # args: should be \"",
07224                           "plvpas xmin xmax ymin ymax aspect", "\"",
07225                           (char *) NULL);
07226         return TCL_ERROR;
07227     }
07228 
07229     xmin = atof(argv[1+0]);
07230     xmax = atof(argv[1+1]);
07231     ymin = atof(argv[1+2]);
07232     ymax = atof(argv[1+3]);
07233     aspect = atof(argv[1+4]);
07234 
07235     plvpas ( xmin, xmax, ymin, ymax, aspect );
07236 
07237 
07238     if (pl_errcode != 0) {
07239         Tcl_AppendResult(interp, errmsg, (char *) NULL);
07240         return TCL_ERROR;
07241     }
07242 
07243     plflush();
07244     return TCL_OK;
07245 }
07246 
07247 /*--------------------------------------------------------------------------*\
07248  * plvporCmd
07249  *
07250  * Processes plvpor Tcl command.
07251 \*--------------------------------------------------------------------------*/
07252 
07253 static int
07254 plvporCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
07255 {
07256     PLFLT xmin;
07257     PLFLT xmax;
07258     PLFLT ymin;
07259     PLFLT ymax;
07260 
07261     pl_errcode = 0; errmsg[0] = '\0';
07262 
07263     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
07264         Tcl_AppendResult( interp, "command syntax: \"",
07265                           "plvpor xmin xmax ymin ymax", "\"",
07266                           (char *) NULL);
07267         return TCL_ERROR;
07268     }
07269 
07270     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
07271          (!0 && !0 && (argc != (4 + 1))) ||
07272          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
07273         Tcl_AppendResult( interp, "wrong # args: should be \"",
07274                           "plvpor xmin xmax ymin ymax", "\"",
07275                           (char *) NULL);
07276         return TCL_ERROR;
07277     }
07278 
07279     xmin = atof(argv[1+0]);
07280     xmax = atof(argv[1+1]);
07281     ymin = atof(argv[1+2]);
07282     ymax = atof(argv[1+3]);
07283 
07284     plvpor ( xmin, xmax, ymin, ymax );
07285 
07286 
07287     if (pl_errcode != 0) {
07288         Tcl_AppendResult(interp, errmsg, (char *) NULL);
07289         return TCL_ERROR;
07290     }
07291 
07292     plflush();
07293     return TCL_OK;
07294 }
07295 
07296 /*--------------------------------------------------------------------------*\
07297  * plvstaCmd
07298  *
07299  * Processes plvsta Tcl command.
07300 \*--------------------------------------------------------------------------*/
07301 
07302 static int
07303 plvstaCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
07304 {
07305 
07306     pl_errcode = 0; errmsg[0] = '\0';
07307 
07308     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
07309         Tcl_AppendResult( interp, "command syntax: \"",
07310                           "plvsta ", "\"",
07311                           (char *) NULL);
07312         return TCL_ERROR;
07313     }
07314 
07315     if ( (!0 && 0 && (argc < (1 + 0 - 0))) ||
07316          (!0 && !0 && (argc != (0 + 1))) ||
07317          ( 0 && (argc != 1) && (argc != (0 + 1))) ) {
07318         Tcl_AppendResult( interp, "wrong # args: should be \"",
07319                           "plvsta ", "\"",
07320                           (char *) NULL);
07321         return TCL_ERROR;
07322     }
07323 
07324 
07325     plvsta (  );
07326 
07327 
07328     if (pl_errcode != 0) {
07329         Tcl_AppendResult(interp, errmsg, (char *) NULL);
07330         return TCL_ERROR;
07331     }
07332 
07333     plflush();
07334     return TCL_OK;
07335 }
07336 
07337 /*--------------------------------------------------------------------------*\
07338  * plw3dCmd
07339  *
07340  * Processes plw3d Tcl command.
07341 \*--------------------------------------------------------------------------*/
07342 
07343 static int
07344 plw3dCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
07345 {
07346     PLFLT basex;
07347     PLFLT basey;
07348     PLFLT height;
07349     PLFLT xmin0;
07350     PLFLT xmax0;
07351     PLFLT ymin0;
07352     PLFLT ymax0;
07353     PLFLT zmin0;
07354     PLFLT zmax0;
07355     PLFLT alt;
07356     PLFLT az;
07357 
07358     pl_errcode = 0; errmsg[0] = '\0';
07359 
07360     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
07361         Tcl_AppendResult( interp, "command syntax: \"",
07362                           "plw3d basex basey height xmin0 xmax0 ymin0 ymax0 zmin0 zmax0 alt az", "\"",
07363                           (char *) NULL);
07364         return TCL_ERROR;
07365     }
07366 
07367     if ( (!0 && 0 && (argc < (1 + 11 - 0))) ||
07368          (!0 && !0 && (argc != (11 + 1))) ||
07369          ( 0 && (argc != 1) && (argc != (11 + 1))) ) {
07370         Tcl_AppendResult( interp, "wrong # args: should be \"",
07371                           "plw3d basex basey height xmin0 xmax0 ymin0 ymax0 zmin0 zmax0 alt az", "\"",
07372                           (char *) NULL);
07373         return TCL_ERROR;
07374     }
07375 
07376     basex = atof(argv[1+0]);
07377     basey = atof(argv[1+1]);
07378     height = atof(argv[1+2]);
07379     xmin0 = atof(argv[1+3]);
07380     xmax0 = atof(argv[1+4]);
07381     ymin0 = atof(argv[1+5]);
07382     ymax0 = atof(argv[1+6]);
07383     zmin0 = atof(argv[1+7]);
07384     zmax0 = atof(argv[1+8]);
07385     alt = atof(argv[1+9]);
07386     az = atof(argv[1+10]);
07387 
07388     plw3d ( basex, basey, height, xmin0, xmax0, ymin0, ymax0, zmin0, zmax0, alt, az );
07389 
07390 
07391     if (pl_errcode != 0) {
07392         Tcl_AppendResult(interp, errmsg, (char *) NULL);
07393         return TCL_ERROR;
07394     }
07395 
07396     plflush();
07397     return TCL_OK;
07398 }
07399 
07400 /*--------------------------------------------------------------------------*\
07401  * plwidthCmd
07402  *
07403  * Processes plwidth Tcl command.
07404 \*--------------------------------------------------------------------------*/
07405 
07406 static int
07407 plwidthCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
07408 {
07409     PLFLT width;
07410 
07411     pl_errcode = 0; errmsg[0] = '\0';
07412 
07413     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
07414         Tcl_AppendResult( interp, "command syntax: \"",
07415                           "plwidth width", "\"",
07416                           (char *) NULL);
07417         return TCL_ERROR;
07418     }
07419 
07420     if ( (!0 && 0 && (argc < (1 + 1 - 0))) ||
07421          (!0 && !0 && (argc != (1 + 1))) ||
07422          ( 0 && (argc != 1) && (argc != (1 + 1))) ) {
07423         Tcl_AppendResult( interp, "wrong # args: should be \"",
07424                           "plwidth width", "\"",
07425                           (char *) NULL);
07426         return TCL_ERROR;
07427     }
07428 
07429     width = atof(argv[1+0]);
07430 
07431     plwidth ( width );
07432 
07433 
07434     if (pl_errcode != 0) {
07435         Tcl_AppendResult(interp, errmsg, (char *) NULL);
07436         return TCL_ERROR;
07437     }
07438 
07439     plflush();
07440     return TCL_OK;
07441 }
07442 
07443 /*--------------------------------------------------------------------------*\
07444  * plwindCmd
07445  *
07446  * Processes plwind Tcl command.
07447 \*--------------------------------------------------------------------------*/
07448 
07449 static int
07450 plwindCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
07451 {
07452     PLFLT xmin;
07453     PLFLT xmax;
07454     PLFLT ymin;
07455     PLFLT ymax;
07456 
07457     pl_errcode = 0; errmsg[0] = '\0';
07458 
07459     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
07460         Tcl_AppendResult( interp, "command syntax: \"",
07461                           "plwind xmin xmax ymin ymax", "\"",
07462                           (char *) NULL);
07463         return TCL_ERROR;
07464     }
07465 
07466     if ( (!0 && 0 && (argc < (1 + 4 - 0))) ||
07467          (!0 && !0 && (argc != (4 + 1))) ||
07468          ( 0 && (argc != 1) && (argc != (4 + 1))) ) {
07469         Tcl_AppendResult( interp, "wrong # args: should be \"",
07470                           "plwind xmin xmax ymin ymax", "\"",
07471                           (char *) NULL);
07472         return TCL_ERROR;
07473     }
07474 
07475     xmin = atof(argv[1+0]);
07476     xmax = atof(argv[1+1]);
07477     ymin = atof(argv[1+2]);
07478     ymax = atof(argv[1+3]);
07479 
07480     plwind ( xmin, xmax, ymin, ymax );
07481 
07482 
07483     if (pl_errcode != 0) {
07484         Tcl_AppendResult(interp, errmsg, (char *) NULL);
07485         return TCL_ERROR;
07486     }
07487 
07488     plflush();
07489     return TCL_OK;
07490 }
07491 
07492 /*--------------------------------------------------------------------------*\
07493  * plxormodCmd
07494  *
07495  * Processes plxormod Tcl command.
07496 \*--------------------------------------------------------------------------*/
07497 
07498 static int
07499 plxormodCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] )
07500 {
07501     PLINT mod;
07502     PLINT st;
07503 
07504     pl_errcode = 0; errmsg[0] = '\0';
07505 
07506     if ( (argc == 2) && (strlen(argv[1])>0) && (strncmp(argv[1],"-help",strlen(argv[1])) == 0) ) {
07507         Tcl_AppendResult( interp, "command syntax: \"",
07508                           "plxormod ?mod st?", "\"",
07509                           (char *) NULL);
07510         return TCL_ERROR;
07511     }
07512 
07513     if ( (!1 && 0 && (argc < (1 + 2 - 0))) ||
07514          (!1 && !0 && (argc != (2 + 1))) ||
07515          ( 1 && (argc != 1) && (argc != (2 + 1))) ) {
07516         Tcl_AppendResult( interp, "wrong # args: should be \"",
07517                           "plxormod ?mod st?", "\"",
07518                           (char *) NULL);
07519         return TCL_ERROR;
07520     }
07521 
07522     mod = atoi(argv[1+0]);
07523 /* st is for output. */
07524 
07525     plxormod ( mod, &st );
07526 
07527     if (argc == 1)
07528         Tcl_AppendResult( interp, " ", (char *) NULL );
07529     sprintf( buf, "%d", st );
07530     if (argc > 1)
07531         Tcl_SetVar( interp, argv[1+1], buf, 0 );
07532     else
07533         Tcl_AppendResult( interp, buf, (char *) NULL );
07534 
07535     if (pl_errcode != 0) {
07536         Tcl_AppendResult(interp, errmsg, (char *) NULL);
07537         return TCL_ERROR;
07538     }
07539 
07540     plflush();
07541     return TCL_OK;
07542 }
07543 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines