[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.2 and 1.1.1.3

version 1.1.1.2, 2000/01/22 14:15:59 version 1.1.1.3, 2003/09/15 07:09:25
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 689  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 1007  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 1113  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 1198  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.2  
changed lines
  Added in v.1.1.1.3

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