Loading ...
Sorry, an error occurred while loading the content.

Ploticus API bug (fwd)

Expand Messages
  • Stephen C. Grubb
    Hi, thanks for finding & reporting this problem. It will be fixed in the next release. ploticus@yahoogroups.com is the location of ploticus bug report and
    Message 1 of 1 , May 19, 2006
    View Source
    • 0 Attachment
      Hi, thanks for finding & reporting this problem. It will be fixed in the
      next release.

      ploticus@yahoogroups.com is the location of ploticus' bug report and
      discussion forum.

      Steve

      Stephen C. Grubb scg@... x-6633
      Scientific Software Engineer, The Jackson Laboratory
      600 Main Street Bar Harbor, Maine 04609 USA

      ---------- Forwarded message ----------
      Date: Fri, 28 Apr 2006 07:50:56 -0400
      From: Steve Grubb <stevegrubb@...>
      To: scg@...
      Subject: Fwd: Ploticus API bug

      ---------- Forwarded message ----------
      From: Venky Iyer <venky@...>
      Date: Apr 28, 2006 12:21 AM
      Subject: Ploticus API bug
      To: stevegrubb@...

      I think this is a bug in api.c, the commented portion was what was in the
      tarball, I've replaced it by the three lines below.

      This allows the PREFABS_DIR flag (if set in Makefile_api) to be used
      (instead of trying to getenv again). preliminaries.c handles the getenv
      portion if not set in Makefile_api.
      The sprintf line was doing producing filename= $PREFABS_DIR/$PREFABS_DIR
      previously, which obviously is not a valid scriptfile.

      int
      ploticus_execscript( scriptfile, prefab )
      char *scriptfile;
      int prefab;
      {
      int stat;
      char filename[MAXPATH], *prefabs_dir, *getenv();
      if( begin_needed ) {
      stat = ploticus_begin();
      if( stat ) return( stat );
      }
      if( ! prefab ) return( PL_exec_scriptfile( scriptfile ));
      else {

      //prefabs_dir = getenv( "PLOTICUS_PREFABS" );
      //if( prefabs_dir == NULL ) return( Eerr( 7237, "PLOTICUS_PREFABS
      environment variable not found", "" ));

      // BUG!!! fixed
      // sprintf( filename, "%s/%s", prefabs_dir, filename );

      /* Added by Venky Iyer */
      prefabs_dir = PLS.prefabsdir;
      if( prefabs_dir == NULL ) return( Eerr( 7237, "PLOTICUS_PREFABS environment
      variable not found (or PREFABS_DIR not specified at compile)", "" ));
      sprintf( filename, "%s/%s.pl", prefabs_dir, scriptfile );

      return( PL_exec_scriptfile( filename ));
      }
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.