Changeset 61e79a9 for util.c


Ignore:
Timestamp:
Sep 2, 2002, 12:10:37 PM (19 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, 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
  • util.c

    r4b464a4 r61e79a9  
    494494}
    495495
     496char *owl_util_get_default_tty() {
     497  /* call must free the return */
     498  char *out;
     499
     500  if (getenv("DISPLAY")) {
     501    out=owl_strdup(getenv("DISPLAY"));
     502  } else if (ttyname(fileno(stdout))) {
     503    out=strdup(ttyname(fileno(stdout)));
     504    if (!strncmp(out, "/dev/", 5)) {
     505      owl_free(out);
     506      out=strdup(ttyname(fileno(stdout)+5));
     507    }
     508  } else {
     509    out=strdup("unknown");
     510  }
     511  return(out);
     512}
     513
     514
    496515void owl_hack_animate() {
    497516  owl_messagelist *ml;
Note: See TracChangeset for help on using the changeset viewer.