Changeset 61e79a9 for global.c


Ignore:
Timestamp:
Sep 2, 2002, 12:10:37 PM (22 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
5145235
Parents:
c01e477
Message:
The tty variable now controls the zephyr location tty name
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    rc01e477 r61e79a9  
    6363  strcpy(g->buffercommand, "");
    6464
     65 
    6566  owl_global_set_config_format(g, 0);
    6667  owl_global_set_userclue(g, OWL_USERCLUE_NONE);
     
    381382}
    382383
    383 /* tty (not fully implemented yet) */
    384 
    385 void owl_global_set_tty_old(owl_global *g, char *tty) {
    386   if (tty) {
    387     strcpy(g->thistty, tty);
    388   } else if (getenv("DISPLAY")) {
    389     strcpy(g->thistty, getenv("DISPLAY"));
    390   } else if (ttyname(fileno(stdout))) {
    391     strcpy(g->thistty, ttyname(fileno(stdout)));
    392     if (!strncmp(g->thistty, "/dev/", 5)) {
    393       strcpy(g->thistty, g->thistty+5);
    394     }
    395   } else {
    396     strcpy(g->thistty, "unknown");
    397   }
    398    
    399 #ifdef HAVE_LIBZEPHYR_ZINITLOCATIONINFO
    400   ZInitLocationInfo(g->thishost, g->thistty);
    401 #endif
    402 }
    403 
    404 
    405384/* debug */
    406385
     
    427406  /* print something nicer later */   
    428407  sprintf(buff, "%i seconds", (int) diff);
     408}
     409
     410char *owl_global_get_hostname(owl_global *g) {
     411  return(g->thishost);
    429412}
    430413
Note: See TracChangeset for help on using the changeset viewer.