Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, October 17, 2026

Diff for dead/diplomovka/xgrafix/src/xginitc.c between version 1.1 and 1.2

version 1.1, 2001/09/20 14:12:00 version 1.2, 2002/07/07 23:55:16
Line 103  void XGInit(int argc, char **argv, doubl
Line 103  void XGInit(int argc, char **argv, doubl
         /*****************************************/          /*****************************************/
         /* Getting the code and input file names */          /* Getting the code and input file names */
   
         sprintf(theCodeName, "%s", argv[0]);          if (snprintf(theCodeName, theCodeName_LEN, "%s", argv[0]) == -1){
                   fprintf(stderr, "Warning: theCodeName truncated at %s:%d\n", __FILE__, __LINE__);
           }
         theInputFile[0]='\0';          theInputFile[0]='\0';
   
         /* Try to read the input parameters, i.e. -i -d -dp, etc. options */          /* Try to read the input parameters, i.e. -i -d -dp, etc. options */
Line 115  void XGInit(int argc, char **argv, doubl
Line 117  void XGInit(int argc, char **argv, doubl
                 switch (argv[index][1]) {                  switch (argv[index][1]) {
                         case 'd':                          case 'd':
                                 if (argv[index][2]!='\0' && argv[index][2]!='p' &&                                  if (argv[index][2]!='\0' && argv[index][2]!='p' &&
                                                                                 strcmp(argv[index],"-display")) {                                                  strcmp(argv[index],"-display")) {
                                         PrintUnknownOption(argv[index],argv[0]);                                          PrintUnknownOption(argv[index],argv[0]);
                                         exit(1);                                          exit(1);
                                 }                                  }
Line 229  void XGInit(int argc, char **argv, doubl
Line 231  void XGInit(int argc, char **argv, doubl
                                 iterationsPerXUpdate = atoi(argv[++index]);                                  iterationsPerXUpdate = atoi(argv[++index]);
                                 if (iterationsPerXUpdate < 1) iterationsPerXUpdate = 1;                                  if (iterationsPerXUpdate < 1) iterationsPerXUpdate = 1;
                                 printf("Iterations per X update: %d steps\n",                                  printf("Iterations per X update: %d steps\n",
                                                                                 iterationsPerXUpdate);                                                  iterationsPerXUpdate);
                                 break;                                  break;
                         case 'x':                          case 'x':
                                 printf("Debug switched ON\n");                                  printf("Debug switched ON\n");
Line 297  void XGInitX(void) {
Line 299  void XGInitX(void) {
         theDisplay = XOpenDisplay(ReqDisp);          theDisplay = XOpenDisplay(ReqDisp);
         if (theDisplay == NULL) {          if (theDisplay == NULL) {
                 fprintf(stderr, "XGrafix: Cannot establish connection "                  fprintf(stderr, "XGrafix: Cannot establish connection "
                                                                 "to the XServer %s\n", ReqDisp);                                  "to the XServer %s\n", ReqDisp);
                 exit(1);                  exit(1);
         }          }
   
Line 316  void XGInitX(void) {
Line 318  void XGInitX(void) {
         printf("\nXGrafix version %s\n",xgversion);          printf("\nXGrafix version %s\n",xgversion);
         printf("(c) Copyright 1991-95 The Regents of the University of California\n");          printf("(c) Copyright 1991-95 The Regents of the University of California\n");
         printf("XGrafix is running on %s version %d of the X Window System,"          printf("XGrafix is running on %s version %d of the X Window System,"
                                                         " X%d R%d\n",                          " X%d R%d\n",
                                                         ServerVendor(theDisplay),                          ServerVendor(theDisplay),
                                                         VendorRelease(theDisplay),                          VendorRelease(theDisplay),
                                                         ProtocolVersion(theDisplay),                          ProtocolVersion(theDisplay),
                                                         ProtocolRevision(theDisplay));                          ProtocolRevision(theDisplay));
   
         /*          /*
          * 7.20.93 XDisplayName takes a (char *) and not a (Display *) ! The NULL           * 7.20.93 XDisplayName takes a (char *) and not a (Display *) ! The NULL
Line 334  void XGInitX(void) {
Line 336  void XGInitX(void) {
   
         if (theDepth == 1)          if (theDepth == 1)
                 printf("Color plane depth ......... %d (monochrome)\n\n",                  printf("Color plane depth ......... %d (monochrome)\n\n",
                                                                 theDepth);                                  theDepth);
         else          else
                 printf("Color plane depth ......... %d\n\n", theDepth);                  printf("Color plane depth ......... %d\n\n", theDepth);
   
Line 343  void XGInitX(void) {
Line 345  void XGInitX(void) {
         if (theDepth > 1) {          if (theDepth > 1) {
                 for (i = 0; i < MAXCOLORS; i++) {                  for (i = 0; i < MAXCOLORS; i++) {
                         if (XLookupColor(theDisplay,                          if (XLookupColor(theDisplay,
                                                                                 theColormap,                                                  theColormap,
                                                                                 theColorNames[i],                                                  theColorNames[i],
                                                                                 &theRGBColor,                                                  &theRGBColor,
                                                                                 &theHardwareColor))                                                  &theHardwareColor))
                                 if (XAllocColor(theDisplay, theColormap, &theHardwareColor))                                  if (XAllocColor(theDisplay, theColormap, &theHardwareColor))
                                         Color[i] = theHardwareColor.pixel;                                          Color[i] = theHardwareColor.pixel;
                         RedColor[i] = (float)theHardwareColor.red/65535.0;                          RedColor[i] = (float)theHardwareColor.red/65535.0;
Line 354  void XGInitX(void) {
Line 356  void XGInitX(void) {
                         BlueColor[i] = (float)theHardwareColor.blue/65535.0;                          BlueColor[i] = (float)theHardwareColor.blue/65535.0;
                 }                  }
                 if (XLookupColor(theDisplay,                  if (XLookupColor(theDisplay,
                                                                         theColormap,                                          theColormap,
                                                                         WindowTextColor,                                          WindowTextColor,
                                                                         &theRGBColor,                                          &theRGBColor,
                                                                         &theHardwareColor))                                          &theHardwareColor))
                         if (XAllocColor(theDisplay, theColormap, &theHardwareColor))                          if (XAllocColor(theDisplay, theColormap, &theHardwareColor))
                                 theWinTextColor = theHardwareColor.pixel;                                  theWinTextColor = theHardwareColor.pixel;
   
                 if (XLookupColor(theDisplay,                  if (XLookupColor(theDisplay,
                                                                         theColormap,                                          theColormap,
                                                                         BorderColor,                                          BorderColor,
                                                                         &theRGBColor,                                          &theRGBColor,
                                                                         &theHardwareColor))                                          &theHardwareColor))
                         if (XAllocColor(theDisplay, theColormap, &theHardwareColor))                          if (XAllocColor(theDisplay, theColormap, &theHardwareColor))
                                 theBorderColor = theHardwareColor.pixel;                                  theBorderColor = theHardwareColor.pixel;
   
                 if (XLookupColor(theDisplay,                  if (XLookupColor(theDisplay,
                                                                         theColormap,                                          theColormap,
                                                                         TickMarkColor,                                          TickMarkColor,
                                                                         &theRGBColor,                                          &theRGBColor,
                                                                         &theHardwareColor))                                          &theHardwareColor))
                         if (XAllocColor(theDisplay, theColormap, &theHardwareColor))                          if (XAllocColor(theDisplay, theColormap, &theHardwareColor))
                                 theTickMarkColor = theHardwareColor.pixel;                                  theTickMarkColor = theHardwareColor.pixel;
   
                 if (XLookupColor(theDisplay,                  if (XLookupColor(theDisplay,
                                                                         theColormap,                                          theColormap,
                                                                         BackgroundColor,                                          BackgroundColor,
                                                                         &theRGBColor,                                          &theRGBColor,
                                                                         &theHardwareColor))                                          &theHardwareColor))
                         if (XAllocColor(theDisplay, theColormap, &theHardwareColor))                          if (XAllocColor(theDisplay, theColormap, &theHardwareColor))
                                 theBKGDColor = theHardwareColor.pixel;                                  theBKGDColor = theHardwareColor.pixel;
   
                 for (i = 0; i < MAXGRAYSHADES; i++) {                  for (i = 0; i < MAXGRAYSHADES; i++) {
                         if (XLookupColor(theDisplay,                          if (XLookupColor(theDisplay,
                                                                                 theColormap,                                                  theColormap,
                                                                                 theGrayShades[i],                                                  theGrayShades[i],
                                                                                 &theRGBColor,                                                  &theRGBColor,
                                                                                 &theHardwareColor))                                                  &theHardwareColor))
                                 if (XAllocColor(theDisplay, theColormap, &theHardwareColor))                                  if (XAllocColor(theDisplay, theColormap, &theHardwareColor))
                                         GrayShade[i] = theHardwareColor.pixel;                                          GrayShade[i] = theHardwareColor.pixel;
                 }                  }
Line 399  void XGInitX(void) {
Line 401  void XGInitX(void) {
                 for (i = 0; i <= 60; i++) {                  for (i = 0; i <= 60; i++) {
                         if (0 <= i && i < 10) {                          if (0 <= i && i < 10) {
                                 sprintf(temp, "#%s%s%s",                                  sprintf(temp, "#%s%s%s",
                                                                                 theTDColorNames[10],                                                  theTDColorNames[10],
                                                                                 theTDColorNames[i],                                                  theTDColorNames[i],
                                                                                 theTDColorNames[0]);                                                  theTDColorNames[0]);
                                 sprintf(ThreeDPSColor[i], "%s%s%s",                                  sprintf(ThreeDPSColor[i], "%s%s%s",
                                                                                 theTDPSColorNames[10],                                                  theTDPSColorNames[10],
                                                                                 theTDPSColorNames[i],                                                  theTDPSColorNames[i],
                                                                                 theTDPSColorNames[0]);                                                  theTDPSColorNames[0]);
                         }                          }
                         else if (10 <= i && i < 20) {                          else if (10 <= i && i < 20) {
                                 sprintf(temp, "#%s%s%s",                                  sprintf(temp, "#%s%s%s",
                                                                                 theTDColorNames[20 - i],                                                  theTDColorNames[20 - i],
                                                                                 theTDColorNames[10],                                                  theTDColorNames[10],
                                                                                 theTDColorNames[0]);                                                  theTDColorNames[0]);
                                 sprintf(ThreeDPSColor[i], "%s%s%s",                                  sprintf(ThreeDPSColor[i], "%s%s%s",
                                                                                 theTDPSColorNames[20 - i],                                                  theTDPSColorNames[20 - i],
                                                                                 theTDPSColorNames[10],                                                  theTDPSColorNames[10],
                                                                                 theTDPSColorNames[0]);                                                  theTDPSColorNames[0]);
                         }                          }
                         else if (20 <= i && i < 30) {                          else if (20 <= i && i < 30) {
                                 sprintf(temp, "#%s%s%s",                                  sprintf(temp, "#%s%s%s",
                                                                                 theTDColorNames[0],                                                  theTDColorNames[0],
                                                                                 theTDColorNames[10],                                                  theTDColorNames[10],
                                                                                 theTDColorNames[i - 20]);                                                  theTDColorNames[i - 20]);
                                 sprintf(ThreeDPSColor[i], "%s%s%s",                                  sprintf(ThreeDPSColor[i], "%s%s%s",
                                                                                 theTDPSColorNames[0],                                                  theTDPSColorNames[0],
                                                                                 theTDPSColorNames[10],                                                  theTDPSColorNames[10],
                                                                                 theTDPSColorNames[i - 20]);                                                  theTDPSColorNames[i - 20]);
                         }                          }
                         else if (30 <= i && i < 40) {                          else if (30 <= i && i < 40) {
                                 sprintf(temp, "#%s%s%s",                                  sprintf(temp, "#%s%s%s",
                                                                                 theTDColorNames[0],                                                  theTDColorNames[0],
                                                                                 theTDColorNames[40 - i],                                                  theTDColorNames[40 - i],
                                                                                 theTDColorNames[10]);                                                  theTDColorNames[10]);
                                 sprintf(ThreeDPSColor[i], "%s%s%s",                                  sprintf(ThreeDPSColor[i], "%s%s%s",
                                                                                 theTDPSColorNames[0],                                                  theTDPSColorNames[0],
                                                                                 theTDPSColorNames[40 - i],                                                  theTDPSColorNames[40 - i],
                                                                                 theTDPSColorNames[10]);                                                  theTDPSColorNames[10]);
                         }                          }
                         else if (40 <= i && i < 50) {                          else if (40 <= i && i < 50) {
                                 sprintf(temp, "#%s%s%s",                                  sprintf(temp, "#%s%s%s",
                                                                                 theTDColorNames[i - 40],                                                  theTDColorNames[i - 40],
                                                                                 theTDColorNames[0],                                                  theTDColorNames[0],
                                                                                 theTDColorNames[10]);                                                  theTDColorNames[10]);
                                 sprintf(ThreeDPSColor[i], "%s%s%s",                                  sprintf(ThreeDPSColor[i], "%s%s%s",
                                                                                 theTDPSColorNames[i - 40],                                                  theTDPSColorNames[i - 40],
                                                                                 theTDPSColorNames[0],                                                  theTDPSColorNames[0],
                                                                                 theTDPSColorNames[10]);                                                  theTDPSColorNames[10]);
                         }                          }
                         else if (50 <= i && i < 60) {                          else if (50 <= i && i < 60) {
                                 sprintf(temp, "#%s%s%s",                                  sprintf(temp, "#%s%s%s",
                                                                                 theTDColorNames[10],                                                  theTDColorNames[10],
                                                                                 theTDColorNames[i - 50],                                                  theTDColorNames[i - 50],
                                                                                 theTDColorNames[10]);                                                  theTDColorNames[10]);
                                 sprintf(ThreeDPSColor[i], "%s%s%s",                                  sprintf(ThreeDPSColor[i], "%s%s%s",
                                                                                 theTDPSColorNames[10],                                                  theTDPSColorNames[10],
                                                                                 theTDPSColorNames[i - 50],                                                  theTDPSColorNames[i - 50],
                                                                                 theTDPSColorNames[10]);                                                  theTDPSColorNames[10]);
                         }                          }
                         else if (i == 60) {                          else if (i == 60) {
                                 sprintf(temp, "#%s%s%s",                                  sprintf(temp, "#%s%s%s",
                                                                                 theTDColorNames[10],                                                  theTDColorNames[10],
                                                                                 theTDColorNames[10],                                                  theTDColorNames[10],
                                                                                 theTDColorNames[10]);                                                  theTDColorNames[10]);
                                 sprintf(ThreeDPSColor[i], "%s%s%s",                                  sprintf(ThreeDPSColor[i], "%s%s%s",
                                                                                 theTDPSColorNames[10],                                                  theTDPSColorNames[10],
                                                                                 theTDPSColorNames[10],                                                  theTDPSColorNames[10],
                                                                                 theTDPSColorNames[10]);                                                  theTDPSColorNames[10]);
                         }                          }
                         /* sprintf(temp, "#%x%x%x", 64+3*i, 64+3*i, 64+3*i); */                          /* sprintf(temp, "#%x%x%x", 64+3*i, 64+3*i, 64+3*i); */
                         // }}}                          // }}}
Line 516  void XGInitTclTk(void)
Line 518  void XGInitTclTk(void)
   
         interp = Tcl_CreateInterp();          interp = Tcl_CreateInterp();
         Tcl_Init(interp);          Tcl_Init(interp);
         sprintf(str2, "-display %s", ReqDisp);          if (snprintf(str2, 200, "-display %s", ReqDisp) == -1) {
                   fprintf(stderr, "Warning: display truncated at %s:%d\n", __FILE__, __LINE__);
           }
         Tcl_SetVar(interp, "argv", str2, 0);          Tcl_SetVar(interp, "argv", str2, 0);
         Tk_Init(interp);          Tk_Init(interp);
         mainWindow = Tk_MainWindow(interp);          mainWindow = Tk_MainWindow(interp);
         /*  
 #ifdef Tcl75_Tk41  
 interp = Tcl_CreateInterp();  
 Tcl_Init(interp);  
 sprintf(str2, "-display %s", ReqDisp);  
 Tcl_SetVar(interp, "argv", str2, 0);  
 Tk_Init(interp);  
 mainWindow = Tk_MainWindow(interp);  
 #endif  
 #ifdef Tcl74_Tk40  
 interp = Tcl_CreateInterp();  
 mainWindow = Tk_CreateMainWindow(interp, ReqDisp, "", "");  
 #endif  
          */  
         /***************************/          /***************************/
         /* Create the Tcl Commands */          /* Create the Tcl Commands */
   
Line 544  mainWindow = Tk_CreateMainWindow(interp,
Line 535  mainWindow = Tk_CreateMainWindow(interp,
   
         /*if XGTCL is set in ENV then use it else use compile time default*/          /*if XGTCL is set in ENV then use it else use compile time default*/
         /*          /*
         if (getenv("XGTCL")) {             if (getenv("XGTCL")) {
                 str = (char *)malloc((strlen(getenv("XGTCL"))+1024)*sizeof(char));             str = (char *)malloc((strlen(getenv("XGTCL"))+1024)*sizeof(char));
                 sprintf(str, "%s", getenv("XGTCL"));             sprintf(str, "%s", getenv("XGTCL"));
                 sprintf(TclCommand, "set XGrafixPath %s; "             if (snprintf(TclCommand, TclCommand_MAX, "set XGrafixPath %s; "
                                                                 "source %s/xgsetup250.tcl; "             "source %s/xgsetup250.tcl; "
                                                                 "InitMainMenu %d \"%s\"\n",             "InitMainMenu %d \"%s\"\n",
                                                                 str, str, WasInputFileGiven, theInputFile);             str, str, WasInputFileGiven, theInputFile) == -1) {
         }             fprintf(stderr, "Warning: TclCommand truncated at %s:%d\n", __FILE__, __LINE__);
         else {             }
                 sprintf(TclCommand, "set XGrafixPath " XGTCL "; "             }
                                                                 "source " XGTCL "/xgsetup250.tcl; "             else {
                                                                 "InitMainMenu %d \"%s\"\n",             if (snprintf(TclCommand, TclCommand_MAX, "set XGrafixPath " XGTCL "; "
                                                                 WasInputFileGiven, theInputFile);             "source " XGTCL "/xgsetup250.tcl; "
         }             "InitMainMenu %d \"%s\"\n",
         */             WasInputFileGiven, theInputFile) == -1) {
              fprintf(stderr, "Warning: TclCommand truncated at %s:%d\n", __FILE__, __LINE__);
              }
              }
              */
         str = (char *) malloc(1024*sizeof(char));          str = (char *) malloc(1024*sizeof(char));
         if (strlen(XGTCL) > 1024) {          if (strlen(XGTCL) > 1024) {
                 fprintf(stderr, "Warning: Compile time defined constant `XGTCL' "                  fprintf(stderr, "Warning: Compile time defined constant `XGTCL' "
                                                                 "is to big!\n");                                  "is to big!\n");
         }          }
         strncpy(str, XGTCL, 1024);          strncpy(str, XGTCL, 1024);
         if (getenv("XGTCL")) {          if (getenv("XGTCL")) {
                 if (strlen(getenv("XGTCL")) > 1024) {                  if (strlen(getenv("XGTCL")) > 1024) {
                         fprintf(stderr, "Warning: Lenght of enviroment variable `XGTCL' "                          fprintf(stderr, "Warning: Lenght of enviroment variable `XGTCL' "
                                                                         "is to big!\n");                                          "is to big!\n");
                 }                  }
                 strncpy(str, getenv("XGTCL"), 1024);                  strncpy(str, getenv("XGTCL"), 1024);
         }          }
         sprintf(TclCommand, "set XGrafixPath %s; "          if (snprintf(TclCommand, TclCommand_MAX, "set XGrafixPath %s; "
                                                         "source %s/xgsetup250.tcl; "                                  "source %s/xgsetup250.tcl; "
                                                         "InitMainMenu %d \"%s\"\n",                                  "InitMainMenu %d \"%s\"\n",
                                                         str, str, WasInputFileGiven, theInputFile);                                  str, str, WasInputFileGiven, theInputFile) == -1) {
                   fprintf(stderr, "Warning: TclCommand truncated at %s:%d\n", __FILE__, __LINE__);
           }
         if (Tcl_Eval(interp,TclCommand) != TCL_OK) {          if (Tcl_Eval(interp,TclCommand) != TCL_OK) {
                 printf("Error in initialization\n");                  printf("Error in initialization\n");
                 if (*interp->result != 0) {                  if (*interp->result != 0) {
Line 584  mainWindow = Tk_CreateMainWindow(interp,
Line 581  mainWindow = Tk_CreateMainWindow(interp,
                 exit(1);                  exit(1);
         }          }
         if (xgDebug == TRUE) {          if (xgDebug == TRUE) {
                 sprintf(TclCommand, "source %s/xgdebug250.tcl; ", str);                  if (snprintf(TclCommand, TclCommand_MAX,
                                           "source %s/xgdebug250.tcl; ", str) == -1) {
                           fprintf(stderr, "Warning: TclCommand truncated at %s:%d\n", __FILE__, __LINE__);
                   }
                 if (Tcl_Eval(interp,TclCommand) != TCL_OK) {                  if (Tcl_Eval(interp,TclCommand) != TCL_OK) {
                         printf("Error in initialization (debug option specified)\n");                          printf("Error in initialization (debug option specified)\n");
                         if (*interp->result != 0) {                          if (*interp->result != 0) {
Line 633  mainWindow = Tk_CreateMainWindow(interp,
Line 633  mainWindow = Tk_CreateMainWindow(interp,
    structure->next = theNewWindow->structures;     structure->next = theNewWindow->structures;
    theNewWindow->structures = structure;     theNewWindow->structures = structure;
    }     }
  */     */
 // }}}  // }}}
   
 // Function void XGStructureArray() {{{  // Function void XGStructureArray() {{{
 void XGStructureArray(int numPoints, STRUCT_FILL fillFlag, int lineColor,  void XGStructureArray(int numPoints, STRUCT_FILL fillFlag, int lineColor,
                                                 int fillColor, SCALAR *points )                  int fillColor, SCALAR *points )
 {  {
         int i;          int i;
         StructType *structure = (StructType *)malloc(sizeof(StructType));          StructType *structure = (StructType *)malloc(sizeof(StructType));
Line 662  void XGStructureArray(int numPoints, STR
Line 662  void XGStructureArray(int numPoints, STR
   
 // Function void XGSetVec() {{{  // Function void XGSetVec() {{{
 void XGSetVec(char *PlotType, char *X_Label, char *Y_Label, char *Z_Label,  void XGSetVec(char *PlotType, char *X_Label, char *Y_Label, char *Z_Label,
                                                 char *State,                  char *State,
                                                 int ulx, int uly,                  int ulx, int uly,
                                                 SCALAR X_Scale, SCALAR Y_Scale,                  SCALAR X_Scale, SCALAR Y_Scale,
                                                 int X_Auto_Rescale, int Y_Auto_Rescale,                  int X_Auto_Rescale, int Y_Auto_Rescale,
                                                 SCALAR X_Min, SCALAR X_Max,                  SCALAR X_Min, SCALAR X_Max,
                                                 SCALAR Y_Min, SCALAR Y_Max)                  SCALAR Y_Min, SCALAR Y_Max)
 {  {
         int             plottype;          int             plottype;
         DataType        data_ptr = NULL;          DataType        data_ptr = NULL;
Line 694  void XGSetVec(char *PlotType, char *X_La
Line 694  void XGSetVec(char *PlotType, char *X_La
                 plottype = VEC_VEC;                  plottype = VEC_VEC;
         else {          else {
                 printf("Unrecognized plot string '%s' for Window '%s'.\n", PlotType,                  printf("Unrecognized plot string '%s' for Window '%s'.\n", PlotType,
                                                                 Y_Label);                                  Y_Label);
                 exit(-1);                  exit(-1);
         }          }
   
Line 703  void XGSetVec(char *PlotType, char *X_La
Line 703  void XGSetVec(char *PlotType, char *X_La
   
 // Function void XGSetVecFlag() {{{  // Function void XGSetVecFlag() {{{
 void XGSetVecFlag(char *PlotType, char *X_Label, char *Y_Label, char *Z_Label,  void XGSetVecFlag(char *PlotType, char *X_Label, char *Y_Label, char *Z_Label,
                                                 char *State,                  char *State,
                                                 int ulx, int uly,                  int ulx, int uly,
                                                 SCALAR X_Scale,SCALAR Y_Scale,                  SCALAR X_Scale,SCALAR Y_Scale,
                                                 int X_Auto_Rescale, int Y_Auto_Rescale,                  int X_Auto_Rescale, int Y_Auto_Rescale,
                                                 SCALAR X_Min, SCALAR X_Max,                  SCALAR X_Min, SCALAR X_Max,
                                                 SCALAR Y_Min, SCALAR Y_Max,                  SCALAR Y_Min, SCALAR Y_Max,
                                                 int *openFlag)                  int *openFlag)
 {  {
         XGSetVec(PlotType, X_Label, Y_Label, Z_Label,          XGSetVec(PlotType, X_Label, Y_Label, Z_Label,
                                                         State,                          State,
                                                         ulx, uly,                          ulx, uly,
                                                         X_Scale, Y_Scale,                          X_Scale, Y_Scale,
                                                         X_Auto_Rescale, Y_Auto_Rescale,                          X_Auto_Rescale, Y_Auto_Rescale,
                                                         X_Min, X_Max, Y_Min,Y_Max);                          X_Min, X_Max, Y_Min,Y_Max);
   
         theWindowArray[numberOfWindows-1]->openFlag = openFlag;          theWindowArray[numberOfWindows-1]->openFlag = openFlag;
 } // }}}  } // }}}
   
 // Function void XGSet3D() {{{  // Function void XGSet3D() {{{
 void XGSet3D(char *PlotType, char *X_Label, char *Y_Label, char *Z_Label,  void XGSet3D(char *PlotType, char *X_Label, char *Y_Label, char *Z_Label,
                                                 SCALAR Theta, SCALAR Phi,                  SCALAR Theta, SCALAR Phi,
                                                 char *State,                  char *State,
                                                 int ulx, int uly,                  int ulx, int uly,
                                                 SCALAR X_Scale, SCALAR Y_Scale, SCALAR Z_Scale,                  SCALAR X_Scale, SCALAR Y_Scale, SCALAR Z_Scale,
                                                 int X_Auto_Rescale,                  int X_Auto_Rescale,
                                                 int Y_Auto_Rescale,                  int Y_Auto_Rescale,
                                                 int Z_Auto_Rescale,                  int Z_Auto_Rescale,
                                                 SCALAR X_Min, SCALAR X_Max, SCALAR Y_Min,                  SCALAR X_Min, SCALAR X_Max, SCALAR Y_Min,
                                                 SCALAR Y_Max, SCALAR Z_Min, SCALAR Z_Max)                  SCALAR Y_Max, SCALAR Z_Min, SCALAR Z_Max)
 {  {
         int             plottype;          int             plottype;
         DataType        data_ptr = NULL;          DataType        data_ptr = NULL;
Line 769  void XGSet3D(char *PlotType, char *X_Lab
Line 769  void XGSet3D(char *PlotType, char *X_Lab
         else if (!strcmp(PlotType, "logloglog")) plottype = LOG_LOG_LOG;          else if (!strcmp(PlotType, "logloglog")) plottype = LOG_LOG_LOG;
         else {          else {
                 printf("Unrecognized plot string '%s' for Window '%s'.\n",                  printf("Unrecognized plot string '%s' for Window '%s'.\n",
                                                                 PlotType, Z_Label);                                  PlotType, Z_Label);
                 exit(-1);                  exit(-1);
         }          }
   
         XGSetupWindow(Z_Label, State, ulx, uly, THREED, data_ptr, label_ptr,          XGSetupWindow(Z_Label, State, ulx, uly, THREED, data_ptr, label_ptr,
                                                         plottype);                          plottype);
 } // }}}  } // }}}
   
 // Function void XGSet3DFlag() {{{  // Function void XGSet3DFlag() {{{
 void XGSet3DFlag(char *PlotType, char *X_Label, char *Y_Label, char *Z_Label,  void XGSet3DFlag(char *PlotType, char *X_Label, char *Y_Label, char *Z_Label,
                                                 SCALAR Theta, SCALAR Phi,                  SCALAR Theta, SCALAR Phi,
                                                 char *State,                  char *State,
                                                 int ulx, int uly,                  int ulx, int uly,
                                                 SCALAR X_Scale, SCALAR Y_Scale, SCALAR Z_Scale,                  SCALAR X_Scale, SCALAR Y_Scale, SCALAR Z_Scale,
                                                 int X_Auto_Rescale,                  int X_Auto_Rescale,
                                                 int Y_Auto_Rescale,                  int Y_Auto_Rescale,
                                                 int Z_Auto_Rescale,                  int Z_Auto_Rescale,
                                                 SCALAR X_Min, SCALAR X_Max,                  SCALAR X_Min, SCALAR X_Max,
                                                 SCALAR Y_Min, SCALAR Y_Max,                  SCALAR Y_Min, SCALAR Y_Max,
                                                 SCALAR Z_Min, SCALAR Z_Max,                  SCALAR Z_Min, SCALAR Z_Max,
                                                 int *openFlag)                  int *openFlag)
 {  {
         XGSet3D(PlotType, X_Label, Y_Label, Z_Label,          XGSet3D(PlotType, X_Label, Y_Label, Z_Label,
                                                         Theta, Phi,                          Theta, Phi,
                                                         State, ulx, uly,                          State, ulx, uly,
                                                         X_Scale, Y_Scale, Z_Scale,                          X_Scale, Y_Scale, Z_Scale,
                                                         X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale,                          X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale,
                                                         X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max);                          X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max);
   
         theWindowArray[numberOfWindows-1]->openFlag = openFlag;          theWindowArray[numberOfWindows-1]->openFlag = openFlag;
 } // }}}  } // }}}
   
 // Function void XGSet2D() {{{  // Function void XGSet2D() {{{
 void XGSet2D(char *PlotType, char *X_Label, char *Y_Label,  void XGSet2D(char *PlotType, char *X_Label, char *Y_Label,
                                                 char *State,                  char *State,
                                                 int ulx, int uly,                  int ulx, int uly,
                                                 SCALAR X_Scale, SCALAR Y_Scale,                  SCALAR X_Scale, SCALAR Y_Scale,
                                                 int X_Auto_Rescale, int Y_Auto_Rescale,                  int X_Auto_Rescale, int Y_Auto_Rescale,
                                                 SCALAR X_Min, SCALAR X_Max, SCALAR Y_Min, SCALAR Y_Max)                  SCALAR X_Min, SCALAR X_Max, SCALAR Y_Min, SCALAR Y_Max)
 {  {
         int             plottype;          int             plottype;
   
Line 833  void XGSet2D(char *PlotType, char *X_Lab
Line 833  void XGSet2D(char *PlotType, char *X_Lab
         else if (!strcmp(PlotType, "loglin")) plottype = LOG_LIN;          else if (!strcmp(PlotType, "loglin")) plottype = LOG_LIN;
         else {          else {
                 printf("Unrecognized plot string '%s' for Window '%s'.\n",                  printf("Unrecognized plot string '%s' for Window '%s'.\n",
                                                                 PlotType, Y_Label);                                  PlotType, Y_Label);
                 exit(-1);                  exit(-1);
         }          }
   
Line 842  void XGSet2D(char *PlotType, char *X_Lab
Line 842  void XGSet2D(char *PlotType, char *X_Lab
   
 // Function void XGSet2DFlag() {{{  // Function void XGSet2DFlag() {{{
 void XGSet2DFlag(char *PlotType, char *X_Label, char *Y_Label,  void XGSet2DFlag(char *PlotType, char *X_Label, char *Y_Label,
                                                 char *State,                  char *State,
                                                 int ulx, int uly,                  int ulx, int uly,
                                                 SCALAR X_Scale, SCALAR Y_Scale,                  SCALAR X_Scale, SCALAR Y_Scale,
                                                 int X_Auto_Rescale, int Y_Auto_Rescale,                  int X_Auto_Rescale, int Y_Auto_Rescale,
                                                 SCALAR X_Min, SCALAR X_Max,                  SCALAR X_Min, SCALAR X_Max,
                                                 SCALAR Y_Min, SCALAR Y_Max, int *openFlag)                  SCALAR Y_Min, SCALAR Y_Max, int *openFlag)
 {  {
         XGSet2D(PlotType, X_Label, Y_Label,          XGSet2D(PlotType, X_Label, Y_Label,
                                                         State, ulx, uly, X_Scale, Y_Scale,                          State, ulx, uly, X_Scale, Y_Scale,
                                                         X_Auto_Rescale, Y_Auto_Rescale,                          X_Auto_Rescale, Y_Auto_Rescale,
                                                         X_Min, X_Max, Y_Min, Y_Max);                          X_Min, X_Max, Y_Min, Y_Max);
   
         theWindowArray[numberOfWindows-1]->openFlag = openFlag;          theWindowArray[numberOfWindows-1]->openFlag = openFlag;
 } // }}}  } // }}}
   
 // Function void XGSet2DC() {{{  // Function void XGSet2DC() {{{
 void XGSet2DC(char *PlotType, char *X_Label, char *Y_Label, char *Z_Label,  void XGSet2DC(char *PlotType, char *X_Label, char *Y_Label, char *Z_Label,
                                                 char *State,                  char *State,
                                                 int ulx, int uly,                  int ulx, int uly,
                                                 SCALAR X_Scale, SCALAR Y_Scale, SCALAR Z_Scale,                  SCALAR X_Scale, SCALAR Y_Scale, SCALAR Z_Scale,
                                                 int X_Auto_Rescale,                  int X_Auto_Rescale,
                                                 int Y_Auto_Rescale,                  int Y_Auto_Rescale,
                                                 int Z_Auto_Rescale,                  int Z_Auto_Rescale,
                                                 SCALAR X_Min, SCALAR X_Max,                  SCALAR X_Min, SCALAR X_Max,
                                                 SCALAR Y_Min, SCALAR Y_Max,                  SCALAR Y_Min, SCALAR Y_Max,
                                                 SCALAR Z_Min, SCALAR Z_Max)                  SCALAR Z_Min, SCALAR Z_Max)
 {  {
         XGSet3D(PlotType, X_Label, Y_Label, Z_Label,          XGSet3D(PlotType, X_Label, Y_Label, Z_Label,
                                                         0.0, 0.0, State, ulx, uly,                          0.0, 0.0, State, ulx, uly,
                                                         X_Scale, Y_Scale, Z_Scale,                          X_Scale, Y_Scale, Z_Scale,
                                                         X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale,                          X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale,
                                                         X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max);                          X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max);
 } // }}}  } // }}}
   
 // Function void XGSet2DCFlag() {{{  // Function void XGSet2DCFlag() {{{
 void XGSet2DCFlag(char *PlotType, char *X_Label, char *Y_Label, char *Z_Label,  void XGSet2DCFlag(char *PlotType, char *X_Label, char *Y_Label, char *Z_Label,
                                                 char *State,                  char *State,
                                                 int ulx, int uly,                  int ulx, int uly,
                                                 SCALAR X_Scale,SCALAR Y_Scale, SCALAR Z_Scale,                  SCALAR X_Scale,SCALAR Y_Scale, SCALAR Z_Scale,
                                                 int X_Auto_Rescale,                  int X_Auto_Rescale,
                                                 int Y_Auto_Rescale,                  int Y_Auto_Rescale,
                                                 int Z_Auto_Rescale,                  int Z_Auto_Rescale,
                                                 SCALAR X_Min, SCALAR X_Max,                  SCALAR X_Min, SCALAR X_Max,
                                                 SCALAR Y_Min, SCALAR Y_Max,                  SCALAR Y_Min, SCALAR Y_Max,
                                                 SCALAR Z_Min, SCALAR Z_Max, int *openFlag)                  SCALAR Z_Min, SCALAR Z_Max, int *openFlag)
 {  {
         XGSet3DFlag(PlotType, X_Label, Y_Label, Z_Label,          XGSet3DFlag(PlotType, X_Label, Y_Label, Z_Label,
                                                         0.0, 0.0, State, ulx, uly,                          0.0, 0.0, State, ulx, uly,
                                                         X_Scale, Y_Scale, Z_Scale,                          X_Scale, Y_Scale, Z_Scale,
                                                         X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale,                          X_Auto_Rescale, Y_Auto_Rescale, Z_Auto_Rescale,
                                                         X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max,                          X_Min, X_Max, Y_Min, Y_Max, Z_Min, Z_Max,
                                                         openFlag);                          openFlag);
 } // }}}  } // }}}
   
 // Function void XGCurve() {{{  // Function void XGCurve() {{{
Line 914  void XGCurve(SCALAR *x_array, SCALAR *y_
Line 914  void XGCurve(SCALAR *x_array, SCALAR *y_
   
 // Function void XGCurveVector() {{{  // Function void XGCurveVector() {{{
 void XGCurveVector(SCALAR *x_array, SCALAR *y_array,  void XGCurveVector(SCALAR *x_array, SCALAR *y_array,
                                                 int *npoints, int color,                  int *npoints, int color,
                                                 int xSize, int xOffset,                  int xSize, int xOffset,
                                                 int ySize, int yOffset)                  int ySize, int yOffset)
 {  {
         DataType data_ptr;          DataType data_ptr;
   
Line 949  void XGScat2D(SCALAR *x_array, SCALAR *y
Line 949  void XGScat2D(SCALAR *x_array, SCALAR *y
   
 // Function void XGScat3D() {{{  // Function void XGScat3D() {{{
 void XGScat3D(SCALAR *x_array, SCALAR *y_array, SCALAR *z_array,  void XGScat3D(SCALAR *x_array, SCALAR *y_array, SCALAR *z_array,
                                                 int *npoints, int color)                  int *npoints, int color)
 {  {
         DataType        data_prevptr, data_ptr;          DataType        data_prevptr, data_ptr;
   
Line 970  void XGScat3D(SCALAR *x_array, SCALAR *y
Line 970  void XGScat3D(SCALAR *x_array, SCALAR *y
   
 // Function void XGVector() {{{  // Function void XGVector() {{{
 void XGVector(SCALAR *x_array, SCALAR *y_array, SCALAR **z_array,  void XGVector(SCALAR *x_array, SCALAR *y_array, SCALAR **z_array,
                                                 SCALAR **w_array,                  SCALAR **w_array,
                                                 int *mpoints, int *npoints, int color)                  int *mpoints, int *npoints, int color)
 {  {
         DataType        data_prevptr, data_ptr;          DataType        data_prevptr, data_ptr;
   
Line 993  void XGVector(SCALAR *x_array, SCALAR *y
Line 993  void XGVector(SCALAR *x_array, SCALAR *y
   
 // Function void XGVectorVector() {{{  // Function void XGVectorVector() {{{
 void XGVectorVector(SCALAR *x_array, SCALAR *y_array,  void XGVectorVector(SCALAR *x_array, SCALAR *y_array,
                                                 SCALAR **z_array,                  SCALAR **z_array,
                                                 SCALAR **w_array,                  SCALAR **w_array,
                                                 int *mpoints, int *npoints,                  int *mpoints, int *npoints,
                                                 int color,                  int color,
                                                 int xSize, int xOffset,                  int xSize, int xOffset,
                                                 int ySize, int yOffset,                  int ySize, int yOffset,
                                                 int zSize, int zOffset,                  int zSize, int zOffset,
                                                 int wSize, int wOffset)                  int wSize, int wOffset)
 {  {
         DataType        data_ptr;          DataType        data_ptr;
   
Line 1019  void XGVectorVector(SCALAR *x_array, SCA
Line 1019  void XGVectorVector(SCALAR *x_array, SCA
   
 // Function void XGSurf() {{{  // Function void XGSurf() {{{
 void XGSurf(SCALAR *x_array, SCALAR *y_array, SCALAR **z_array,  void XGSurf(SCALAR *x_array, SCALAR *y_array, SCALAR **z_array,
                                                 int *mpoints, int *npoints, int color)                  int *mpoints, int *npoints, int color)
 {  {
         DataType        data_prevptr, data_ptr;          DataType        data_prevptr, data_ptr;
   
Line 1038  void XGSurf(SCALAR *x_array, SCALAR *y_a
Line 1038  void XGSurf(SCALAR *x_array, SCALAR *y_a
   
 // Function void XGSurfVector() {{{  // Function void XGSurfVector() {{{
 void XGSurfVector(SCALAR *x_array, SCALAR *y_array, SCALAR **z_array,  void XGSurfVector(SCALAR *x_array, SCALAR *y_array, SCALAR **z_array,
                                                 int *mpoints, int *npoints, int color,                  int *mpoints, int *npoints, int color,
                                                 int xSize, int xOffset,                  int xSize, int xOffset,
                                                 int ySize, int yOffset,                  int ySize, int yOffset,
                                                 int zSize, int zOffset)                  int zSize, int zOffset)
 {  {
         DataType        data_ptr;          DataType        data_ptr;
   
Line 1058  void XGSurfVector(SCALAR *x_array, SCALA
Line 1058  void XGSurfVector(SCALAR *x_array, SCALA
   
 // Function void XGCont() {{{  // Function void XGCont() {{{
 void XGCont(SCALAR *x_array, SCALAR *y_array, SCALAR **z_array,  void XGCont(SCALAR *x_array, SCALAR *y_array, SCALAR **z_array,
                                                 int *mpoints, int *npoints, int color)                  int *mpoints, int *npoints, int color)
 {  {
         XGSurf(x_array, y_array, z_array, mpoints, npoints, color);          XGSurf(x_array, y_array, z_array, mpoints, npoints, color);
 } // }}}  } // }}}
   
 // Function void XGIRSurf() {{{  // Function void XGIRSurf() {{{
 void XGIRSurf(SCALAR **x_array, SCALAR **y_array, SCALAR **z_array,  void XGIRSurf(SCALAR **x_array, SCALAR **y_array, SCALAR **z_array,
                                                 int *mpoints, int *npoints, int color)                  int *mpoints, int *npoints, int color)
 {  {
         DataType        data_prevptr, data_ptr;          DataType        data_prevptr, data_ptr;
   
Line 1086  void XGIRSurf(SCALAR **x_array, SCALAR *
Line 1086  void XGIRSurf(SCALAR **x_array, SCALAR *
   
 // Function void XGIRSurfVector() {{{  // Function void XGIRSurfVector() {{{
 void XGIRSurfVector(SCALAR **x_array, SCALAR **y_array, SCALAR **z_array,  void XGIRSurfVector(SCALAR **x_array, SCALAR **y_array, SCALAR **z_array,
                                                 int *mpoints, int *npoints, int color,                  int *mpoints, int *npoints, int color,
                                                 int xSize, int xOffset,                  int xSize, int xOffset,
                                                 int ySize, int yOffset,                  int ySize, int yOffset,
                                                 int zSize, int zOffset)                  int zSize, int zOffset)
 {  {
         DataType        data_ptr;          DataType        data_ptr;
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top