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

Diff for /OpenXM_contrib/gnuplot/Attic/term.c between version 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2000/01/22 14:16:02 version 1.1.1.3, 2003/09/15 07:09:26
Line 112  extern float xsize, ysize;
Line 112  extern float xsize, ysize;
 /* internal pointsize for do_point */  /* internal pointsize for do_point */
 static double term_pointsize;  static double term_pointsize;
   
   int termcomp __PROTO((SORTFUNC_ARGS a, SORTFUNC_ARGS b));
 static void term_suspend __PROTO((void));  static void term_suspend __PROTO((void));
 static void term_close_output __PROTO((void));  static void term_close_output __PROTO((void));
 static void null_linewidth __PROTO((double));  static void null_linewidth __PROTO((double));
Line 829  term_count()
Line 830  term_count()
 void list_terms()  void list_terms()
 {  {
     register int i;      register int i;
     char line_buffer[BUFSIZ];      char *line_buffer = gp_alloc(BUFSIZ, "list_terms");
       int sort_idxs[TERMCOUNT];
   
       /* sort terminal types alphabetically */
       for( i = 0; i < TERMCOUNT; i++ )
           sort_idxs[i] = i;
       qsort( sort_idxs, TERMCOUNT, sizeof(int), termcomp );
       /* now sort_idxs[] contains the sorted indices */
   
     StartOutput();      StartOutput();
     sprintf(line_buffer,"\nAvailable terminal types:\n");      strcpy(line_buffer, "\nAvailable terminal types:\n");
     OutLine(line_buffer);      OutLine(line_buffer);
   
     for (i = 0; i < TERMCOUNT; i++) {      for (i = 0; i < TERMCOUNT; i++) {
         sprintf(line_buffer,"  %15s  %s\n",          sprintf(line_buffer, "  %15s  %s\n",
                 term_tbl[i].name, term_tbl[i].description);                  term_tbl[sort_idxs[i]].name,
                   term_tbl[sort_idxs[i]].description);
         OutLine(line_buffer);          OutLine(line_buffer);
     }      }
   
     EndOutput();      EndOutput();
       free(line_buffer);
 }  }
   
   int
   termcomp(arga, argb)
       SORTFUNC_ARGS arga;
       SORTFUNC_ARGS argb;
   {
       const int *a = arga;
       const int *b = argb;
   
       return( strcasecmp( term_tbl[*a].name, term_tbl[*b].name ) );
   }
   
 /* set_term: get terminal number from name on command line  /* set_term: get terminal number from name on command line
  * will change 'term' variable if successful   * will change 'term' variable if successful

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

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