version 1.1.1.1, 2000/01/09 17:00:56 |
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 819 struct termentry term_tbl[] = |
|
Line 820 struct termentry term_tbl[] = |
|
|
|
#define TERMCOUNT (sizeof(term_tbl)/sizeof(struct termentry)) |
#define TERMCOUNT (sizeof(term_tbl)/sizeof(struct termentry)) |
|
|
|
/* mainly useful for external code */ |
|
GP_INLINE int |
|
term_count() |
|
{ |
|
return TERMCOUNT; |
|
} |
|
|
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 |
*/ |
*/ |
Line 961 void init_terminal() |
|
Line 988 void init_terminal() |
|
#ifdef NEXT |
#ifdef NEXT |
env_term = getenv("TERM"); |
env_term = getenv("TERM"); |
if (term_name == (char *) NULL |
if (term_name == (char *) NULL |
&& env_term != (char *) NULL && strcmp(term, "next") == 0) |
&& env_term != (char *) NULL && strcmp(env_term, "next") == 0) |
term_name = "next"; |
term_name = "next"; |
#endif /* NeXT */ |
#endif /* NeXT */ |
|
|
Line 1181 void test_term() |
|
Line 1208 void test_term() |
|
key_entry_height = (t->v_char); |
key_entry_height = (t->v_char); |
|
|
/* border linetype */ |
/* border linetype */ |
|
(*t->linewidth) (1.0); |
(*t->linetype) (-2); |
(*t->linetype) (-2); |
(*t->move) (0, 0); |
(*t->move) (0, 0); |
(*t->vector) (xmax_t - 1, 0); |
(*t->vector) (xmax_t - 1, 0); |