[BACK]Return to misc.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot

Diff for /OpenXM_contrib/gnuplot/Attic/misc.c between version 1.1.1.1 and 1.1.1.3

version 1.1.1.1, 2000/01/09 17:00:54 version 1.1.1.3, 2003/09/15 07:09:25
Line 68  do{if (datatype[axis]==TIME) { \
Line 68  do{if (datatype[axis]==TIME) { \
   }\    }\
   putc('"', fp);\    putc('"', fp);\
  } else {\   } else {\
   fprintf(fp,"%g",x);\    fprintf(fp,"%#g",x);\
 }} while(0)  }} while(0)
   
   
Line 100  int num;
Line 100  int num;
 {  {
     struct curve_points *cp;      struct curve_points *cp;
   
     cp = (struct curve_points *) gp_alloc((unsigned long) sizeof(struct curve_points), "curve");      cp = (struct curve_points *) gp_alloc(sizeof(struct curve_points), "curve");
     cp->p_max = (num >= 0 ? num : 0);      cp->p_max = (num >= 0 ? num : 0);
   
     if (num > 0) {      if (num > 0) {
         cp->points = (struct coordinate GPHUGE *)          cp->points = (struct coordinate GPHUGE *)
             gp_alloc((unsigned long) num * sizeof(struct coordinate), "curve points");              gp_alloc(num * sizeof(struct coordinate), "curve points");
     } else      } else
         cp->points = (struct coordinate GPHUGE *) NULL;          cp->points = (struct coordinate GPHUGE *) NULL;
     cp->next_cp = NULL;      cp->next_cp = NULL;
Line 138  int num;
Line 138  int num;
     if (num > 0) {      if (num > 0) {
         if (cp->points == NULL) {          if (cp->points == NULL) {
             cp->points = (struct coordinate GPHUGE *)              cp->points = (struct coordinate GPHUGE *)
                 gp_alloc((unsigned long) num * sizeof(struct coordinate), "curve points");                  gp_alloc(num * sizeof(struct coordinate), "curve points");
         } else {          } else {
             cp->points = (struct coordinate GPHUGE *)              cp->points = (struct coordinate GPHUGE *)
                 gp_realloc(cp->points, (unsigned long) num * sizeof(struct coordinate), "expanding curve points");                  gp_realloc(cp->points, (unsigned long) num * sizeof(struct coordinate), "expanding curve points");
Line 178  struct iso_curve *
Line 178  struct iso_curve *
 int num;  int num;
 {  {
     struct iso_curve *ip;      struct iso_curve *ip;
     ip = (struct iso_curve *) gp_alloc((unsigned long) sizeof(struct iso_curve), "iso curve");      ip = (struct iso_curve *) gp_alloc(sizeof(struct iso_curve), "iso curve");
     ip->p_max = (num >= 0 ? num : 0);      ip->p_max = (num >= 0 ? num : 0);
     if (num > 0) {      if (num > 0) {
         ip->points = (struct coordinate GPHUGE *)          ip->points = (struct coordinate GPHUGE *)
             gp_alloc((unsigned long) num * sizeof(struct coordinate), "iso curve points");              gp_alloc(num * sizeof(struct coordinate), "iso curve points");
     } else      } else
         ip->points = (struct coordinate GPHUGE *) NULL;          ip->points = (struct coordinate GPHUGE *) NULL;
     ip->next = NULL;      ip->next = NULL;
Line 212  int num;
Line 212  int num;
     if (num > 0) {      if (num > 0) {
         if (ip->points == NULL) {          if (ip->points == NULL) {
             ip->points = (struct coordinate GPHUGE *)              ip->points = (struct coordinate GPHUGE *)
                 gp_alloc((unsigned long) num * sizeof(struct coordinate), "iso curve points");                  gp_alloc(num * sizeof(struct coordinate), "iso curve points");
         } else {          } else {
             ip->points = (struct coordinate GPHUGE *)              ip->points = (struct coordinate GPHUGE *)
                 gp_realloc(ip->points, (unsigned long) num * sizeof(struct coordinate), "expanding curve points");                  gp_realloc(ip->points, num * sizeof(struct coordinate), "expanding curve points");
         }          }
         ip->p_max = num;          ip->p_max = num;
     } else {      } else {
Line 252  int num_samp_1, num_iso_1, num_samp_2, num_iso_2;
Line 252  int num_samp_1, num_iso_1, num_samp_2, num_iso_2;
 {  {
     struct surface_points *sp;      struct surface_points *sp;
   
     sp = (struct surface_points *) gp_alloc((unsigned long) sizeof(struct surface_points), "surface");      sp = (struct surface_points *) gp_alloc(sizeof(struct surface_points), "surface");
     sp->next_sp = NULL;      sp->next_sp = NULL;
     sp->title = NULL;      sp->title = NULL;
     sp->contours = NULL;      sp->contours = NULL;
Line 449  FILE *fp;
Line 449  FILE *fp;
     struct text_label *this_label;      struct text_label *this_label;
     struct arrow_def *this_arrow;      struct arrow_def *this_arrow;
     struct linestyle_def *this_linestyle;      struct linestyle_def *this_linestyle;
     char str[MAX_LINE_LEN + 1];      char str[MAX_LINE_LEN+1];
   
     /* opinions are split as to whether we save term and outfile      /* opinions are split as to whether we save term and outfile
      * as a compromise, we output them as comments !       * as a compromise, we output them as comments !
Line 502  set y2data%s\n",
Line 502  set y2data%s\n",
                 dgrid3d_col_fineness,                  dgrid3d_col_fineness,
                 dgrid3d_norm_value);                  dgrid3d_norm_value);
   
     fprintf(fp, "\      fprintf(fp, "set dummy %s,%s\n",dummy_var[0], dummy_var[1]);
 set dummy %s,%s\n\      fprintf(fp, "set format x \"%s\"\n", conv_text(str, xformat));
 set format x \"%s\"\n\      fprintf(fp, "set format y \"%s\"\n", conv_text(str, yformat));
 set format y \"%s\"\n\      fprintf(fp, "set format x2 \"%s\"\n", conv_text(str, x2format));
 set format x2 \"%s\"\n\      fprintf(fp, "set format y2 \"%s\"\n", conv_text(str, y2format));
 set format y2 \"%s\"\n\      fprintf(fp, "set format z \"%s\"\n", conv_text(str, zformat));
 set format z \"%s\"\n\      fprintf(fp, "set angles %s\n",
 set angles %s\n",  
             dummy_var[0], dummy_var[1],  
             conv_text(str, xformat),  
             conv_text(str, yformat),  
             conv_text(str, x2format),  
             conv_text(str, y2format),  
             conv_text(str, zformat),  
             (angles_format == ANGLES_RADIANS) ? "radians" : "degrees");              (angles_format == ANGLES_RADIANS) ? "radians" : "degrees");
   
     if (work_grid.l_type == 0)      if (work_grid.l_type == 0)
Line 696  set %scontour",
Line 689  set %scontour",
     }      }
   
     if (missing_val != NULL)      if (missing_val != NULL)
         fprintf(fp, "set missing %s\n", missing_val);          fprintf(fp, "set missing '%s'\n", missing_val);
   
     save_hidden3doptions(fp);      save_hidden3doptions(fp);
     fprintf(fp, "set cntrparam order %d\n", contour_order);      fprintf(fp, "set cntrparam order %d\n", contour_order);
Line 1014  FILE *fp;
Line 1007  FILE *fp;
 struct position *pos;  struct position *pos;
 {  {
     static char *msg[] =      static char *msg[] =
     {"first_axes ", "second axes ", "graph ", "screen "};      {"first ", "second ", "graph ", "screen "};
   
     assert(first_axes == 0 && second_axes == 1 && graph == 2 && screen == 3);      assert(first_axes == 0 && second_axes == 1 && graph == 2 && screen == 3);
   
Line 1120  TBOOLEAN can_do_args;
Line 1113  TBOOLEAN can_do_args;
                 if (can_do_args) {                  if (can_do_args) {
                     register int il = 0;                      register int il = 0;
                     register char *rl;                      register char *rl;
                     char *raw_line = rl = gp_alloc((unsigned long) strlen(input_line) + 1, "string");                      char *raw_line = gp_strdup(input_line);
   
                     strcpy(raw_line, input_line);                      rl = raw_line;
                     *input_line = '\0';                      *input_line = '\0';
                     while (*rl) {                      while (*rl) {
                         register int aix;                          register int aix;
Line 1154  TBOOLEAN can_do_args;
Line 1147  TBOOLEAN can_do_args;
                 }                  }
                 screen_ok = FALSE;      /* make sure command line is                  screen_ok = FALSE;      /* make sure command line is
                                            echoed on error */                                             echoed on error */
                 do_line();                  if (do_line())
                       stop = TRUE;
             }              }
         }          }
     }      }
Line 1204  FILE *fp;
Line 1198  FILE *fp;
     LFS *lf;      LFS *lf;
     int argindex;      int argindex;
   
     lf = (LFS *) gp_alloc((unsigned long) sizeof(LFS), (char *) NULL);      lf = (LFS *) gp_alloc(sizeof(LFS), (char *) NULL);
     if (lf == (LFS *) NULL) {      if (lf == (LFS *) NULL) {
         if (fp != (FILE *) NULL)          if (fp != (FILE *) NULL)
             (void) fclose(fp);  /* it won't be otherwise */              (void) fclose(fp);  /* it won't be otherwise */

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.3

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