Changeset 5145235


Ignore:
Timestamp:
Sep 15, 2002, 4:45:38 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:
425c013
Parents:
61e79a9
Message:
Fix memory problem in setting default tty.
Removed some commented material from configure.in and owl.c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r61e79a9 r5145235  
    77             lock up.
    88        Messages now have a direciton (in, out or none).  Filters can
    9             this direction
     9             match on this direction
    1010        Outbound messages are no longer type 'admin' but are of the
    1111             appropriate message type (i.e. 'zephyr') and are direction
  • configure.in

    r6794f72 r5145235  
    2727        AC_MSG_RESULT(no)
    2828fi
    29 
    30 dnl A hack for myself to use gnu curses
    31 dnl AC_MSG_CHECKING(for mit gnu hack)
    32 dnl if test -d /mit/gnu/include; then
    33 dnl     CFLAGS=${CFLAGS}\ -I/mit/gnu/include
    34 dnl     AC_MSG_RESULT(yes)
    35 dnl else
    36 dnl     AC_MSG_RESULT(no)
    37 dnl fi
    38 
    39 
    40 dnl Solaris ships with a broken curses.h
    41 dnl AC_MSG_CHECKING(for solaris broken curses.h)
    42 dnl if grep "Sun Microsystems" /usr/include/curses.h > /dev/null 2> /dev/null; then
    43 dnl   if test  "`grep -c getwc\(stdin\) /usr/include/widec.h`" = "2" ; then
    44 dnl     rm -rf includefix
    45 dnl     mkdir includefix
    46 dnl     sed -e 's/<widec.h>/\"widec.h\"/' /usr/include/curses.h > ./includefix/curses.h
    47 dnl 
    48 dnl     sed -e 's/<wchar.h>/\"wchar.h\"/' \
    49 dnl         -e 's/^#define.putwchar.*//' \
    50 dnl         -e 's/^#define.getwchar().*//' \
    51 dnl         -e 's/^#define.getwc(p).*//' \
    52 dnl         -e 's/^#define.putwc(x, p).*//' \
    53 dnl         /usr/include/widec.h > includefix/widec.h
    54 dnl     CFLAGS=-I./includefix\ ${CFLAGS}
    55 dnl     AC_MSG_RESULT(yes)
    56 dnl   fi
    57 dnl else
    58 dnl   AC_MSG_RESULT(no)
    59 dnl fi
    60 
    61 
    6229
    6330AC_CHECK_LIB(ncurses, initscr,,
  • owl.c

    r61e79a9 r5145235  
    1919#include <com_err.h>
    2020#include <signal.h>
     21#include <time.h>
    2122#include <sys/param.h>
    2223#include "owl.h"
     
    109110  noecho();
    110111
    111 #if 0 /* Removed to prevent flashing of popwin */
    112   intrflush(stdscr,FALSE);
    113   keypad(stdscr,TRUE);
    114   nodelay(stdscr,1);
    115   meta(stdscr,TRUE);
    116 #endif /*0*/
    117 
    118112  /* define simple color pairs */
    119113  if (has_colors() && COLOR_PAIRS>=8) {
     
    133127  owl_global_set_startupargs(&g, argcsave, argvsave);
    134128  owl_context_set_readconfig(owl_global_get_context(&g));
     129
    135130  if (tty) {
    136131    owl_global_set_tty(&g, tty);
  • util.c

    r61e79a9 r5145235  
    22#include <stdlib.h>
    33#include <string.h>
     4#include <unistd.h>
    45#include <malloc.h>
    56#include <ctype.h>
     
    496497char *owl_util_get_default_tty() {
    497498  /* call must free the return */
    498   char *out;
     499  char *out, *tmp;
    499500
    500501  if (getenv("DISPLAY")) {
    501502    out=owl_strdup(getenv("DISPLAY"));
    502   } else if (ttyname(fileno(stdout))) {
    503     out=strdup(ttyname(fileno(stdout)));
     503  } else if ((tmp=ttyname(fileno(stdout)))!=NULL) {
     504    out=owl_strdup(tmp);
    504505    if (!strncmp(out, "/dev/", 5)) {
    505506      owl_free(out);
    506       out=strdup(ttyname(fileno(stdout)+5));
     507      out=owl_strdup(tmp+5);
    507508    }
    508509  } else {
    509     out=strdup("unknown");
     510    out=owl_strdup("unknown");
    510511  }
    511512  return(out);
Note: See TracChangeset for help on using the changeset viewer.