=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/plot/if.c,v retrieving revision 1.7 retrieving revision 1.9 diff -u -p -r1.7 -r1.9 --- OpenXM_contrib2/asir2000/plot/if.c 2001/10/09 01:36:27 1.7 +++ OpenXM_contrib2/asir2000/plot/if.c 2002/07/10 05:29:35 1.9 @@ -45,14 +45,14 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/plot/if.c,v 1.6 2001/08/22 09:19:21 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/plot/if.c,v 1.8 2001/12/25 02:39:07 noro Exp $ */ #include "ca.h" #include "parse.h" #include "ox.h" #include "ifplot.h" -extern jmp_buf ox_env; +extern JMP_BUF ox_env; int open_canvas(NODE arg) { @@ -304,6 +304,33 @@ int draw_obj(NODE arg) return 0; } +int draw_string(NODE arg) +{ + int index,x,y; + char *str; + NODE pos; + struct canvas *can; + int color; + + index = QTOS((Q)ARG0(arg)); + can = canvas[index]; + if ( !can || !can->window ) { + set_lasterror("draw_string : canvas does not exist"); + return -1; + } + + pos = BDY((LIST)ARG1(arg)); + str = BDY((STRING)ARG2(arg)); + if ( argc(arg) == 4 ) + color = QTOS((Q)ARG3(arg)); + else + color = 0; /* black */ + x = (int)ToReal((Q)ARG0(pos)); + y = (int)ToReal((Q)ARG1(pos)); + draw_character_string(display,can,x,y,str,color); + return 0; +} + int clear_canvas(NODE arg) { int index; @@ -542,7 +569,7 @@ void qifplotmain(struct canvas *can) width = can->width; height = can->height; tabe = (char **)ALLOCA(width*sizeof(char *)+width*height*sizeof(char)); - bzero(tabe,width*sizeof(char *)+width*height*sizeof(char)); + bzero((void *)tabe,width*sizeof(char *)+width*height*sizeof(char)); for ( i = 0, tabeb = (char *)(tabe+width); i < width; i++ ) tabe[i] = tabeb + height*i; define_cursor(can->window,runningcur);