[BACK]Return to ox_plot_xevent.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / plot

Diff for /OpenXM_contrib2/asir2000/plot/ox_plot_xevent.c between version 1.10 and 1.13

version 1.10, 2000/11/09 01:51:12 version 1.13, 2001/12/25 02:39:07
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  *   *
  * $OpenXM: OpenXM_contrib2/asir2000/plot/ox_plot_xevent.c,v 1.9 2000/11/07 06:06:40 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/plot/ox_plot_xevent.c,v 1.12 2001/08/22 09:19:21 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "parse.h"  #include "parse.h"
Line 64  static char *dname;
Line 64  static char *dname;
 static int remotes;  static int remotes;
 static int depth,scrn;  static int depth,scrn;
   
 extern jmp_buf ox_env;  extern JMP_BUF ox_env;
 static Widget toplevel;  static Widget toplevel;
 static XtAppContext app_con;  static XtAppContext app_con;
   
Line 643  static XtResource resources[] = {
Line 643  static XtResource resources[] = {
         offset(DashPixel),XtRPixel,(XtPointer)&dashPixel},          offset(DashPixel),XtRPixel,(XtPointer)&dashPixel},
 };  };
   
 init_plot_display(argc,argv)  int init_plot_display(argc,argv)
 int argc;  int argc;
 char **argv;  char **argv;
 {  {
Line 652  char **argv;
Line 652  char **argv;
         unsigned int tmp;          unsigned int tmp;
   
         for ( ac = argc, av = argv; ac; ac--, av++ )          for ( ac = argc, av = argv; ac; ac--, av++ )
                 if ( index(*av,':') )                  if ( !strcmp(*av,"nox") )
                           return 0;
                   else if ( index(*av,':') )
                         dname = *av;                          dname = *av;
         XtToolkitInitialize();          XtToolkitInitialize();
         app_con = XtCreateApplicationContext();          app_con = XtCreateApplicationContext();
Line 660  char **argv;
Line 662  char **argv;
                 options,XtNumber(options),&argc,argv);                  options,XtNumber(options),&argc,argv);
         if ( !display ) {          if ( !display ) {
                 fprintf(stderr,"Can't open display\n");                  fprintf(stderr,"Can't open display\n");
                 exit(1);                  return 0;
         }          }
         toplevel = XtAppCreateShell(0,"Plot",applicationShellWidgetClass,          toplevel = XtAppCreateShell(0,"Plot",applicationShellWidgetClass,
                 display,0,0);                  display,0,0);
Line 681  char **argv;
Line 683  char **argv;
         create_gc();          create_gc();
         create_font();          create_font();
         create_cursors();          create_cursors();
           return 1;
 }  }
   
 static char *scalefont = "*-8-80-*";  static char *scalefont = "*-8-80-*";
Line 704  create_gc() {
Line 707  create_gc() {
         scaleGC = XCreateGC(display,rootwin,0,NULL);          scaleGC = XCreateGC(display,rootwin,0,NULL);
         xorGC = XCreateGC(display,rootwin,0,NULL);          xorGC = XCreateGC(display,rootwin,0,NULL);
         colorGC = XCreateGC(display,rootwin,0,NULL);          colorGC = XCreateGC(display,rootwin,0,NULL);
           cdrawGC = XCreateGC(display,rootwin,0,NULL);
         XCopyGC(display,DefaultGC(display,scrn),(1L<<(GCLastBit+1))-1,drawGC);          XCopyGC(display,DefaultGC(display,scrn),(1L<<(GCLastBit+1))-1,drawGC);
         XCopyGC(display,DefaultGC(display,scrn),(1L<<(GCLastBit+1))-1,dashGC);          XCopyGC(display,DefaultGC(display,scrn),(1L<<(GCLastBit+1))-1,dashGC);
         XCopyGC(display,DefaultGC(display,scrn),(1L<<(GCLastBit+1))-1,clearGC);          XCopyGC(display,DefaultGC(display,scrn),(1L<<(GCLastBit+1))-1,clearGC);
         XCopyGC(display,DefaultGC(display,scrn),(1L<<(GCLastBit+1))-1,scaleGC);          XCopyGC(display,DefaultGC(display,scrn),(1L<<(GCLastBit+1))-1,scaleGC);
         XCopyGC(display,DefaultGC(display,scrn),(1L<<(GCLastBit+1))-1,xorGC);          XCopyGC(display,DefaultGC(display,scrn),(1L<<(GCLastBit+1))-1,xorGC);
         XCopyGC(display,DefaultGC(display,scrn),(1L<<(GCLastBit+1))-1,colorGC);          XCopyGC(display,DefaultGC(display,scrn),(1L<<(GCLastBit+1))-1,colorGC);
           XCopyGC(display,DefaultGC(display,scrn),(1L<<(GCLastBit+1))-1,cdrawGC);
         XSetForeground(display,drawGC,forePixel);          XSetForeground(display,drawGC,forePixel);
         XSetForeground(display,scaleGC,forePixel);          XSetForeground(display,scaleGC,forePixel);
         XSetForeground(display,clearGC,backPixel);          XSetForeground(display,clearGC,backPixel);
Line 724  create_gc() {
Line 729  create_gc() {
         color.red = 0xffff; color.green = color.blue = 0;          color.red = 0xffff; color.green = color.blue = 0;
         XAllocColor(display,DefaultColormap(display,scrn),&color);          XAllocColor(display,DefaultColormap(display,scrn),&color);
         XSetForeground(display,colorGC,color.pixel);          XSetForeground(display,colorGC,color.pixel);
   }
   
   set_drawcolor(c)
   unsigned int c;
   {
           XColor color = {0,0x0,0x0,0x0,DoRed|DoGreen|DoBlue,0};
   
           color.red = (c&0xff0000)>>8;
           color.green = (c&0xff00);
           color.blue = (c&0xff)<<8;
           XAllocColor(display,DefaultColormap(display,scrn),&color);
           XSetForeground(display,cdrawGC,color.pixel);
 }  }
   
 create_cursors() {  create_cursors() {

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.13

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>