OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   08-Oct-2004 22:20:16
  Branch: HEAD                             Handle: 2004100821201600

  Modified files:
    openpkg-src/devtodo     devtodo.patch

  Log:
    patch TERM fallback logic to work without setenv(3) which is not
    available on Solaris

  Summary:
    Revision    Changes     Path
    1.4         +21 -0      openpkg-src/devtodo/devtodo.patch
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/devtodo/devtodo.patch
  ============================================================================
  $ cvs diff -u -r1.3 -r1.4 devtodo.patch
  --- openpkg-src/devtodo/devtodo.patch 12 Jun 2003 18:15:51 -0000      1.3
  +++ openpkg-src/devtodo/devtodo.patch 8 Oct 2004 20:20:16 -0000       1.4
  @@ -16,3 +16,24 @@
    #include "c_regex.h"
    
    #ifndef CRASH_REGEX_CACHE_THRESHOLD
  +Index: src/todoterm.cc
  +--- src/todoterm.cc.orig     2004-08-29 11:59:48.000000000 +0200
  ++++ src/todoterm.cc  2004-10-08 22:10:04.913180000 +0200
  +@@ -15,13 +15,13 @@
  + 
  + int getWidth() {
  +     if (!term_initialized) {
  +-    char const *termtype = getenv("TERM");
  ++    char *termtype = getenv("TERM");
  +             if (!termtype) {
  +                     cerr << "can't get terminal type, defaulting to vt100." << 
endl;
  +                     cerr << "please set the TERM env variable." << endl;
  +-                    setenv("TERM", "vt100", 0);
  ++                    termtype = "vt100";
  +             }
  +-    int result = tgetent(info, getenv("TERM"));
  ++    int result = tgetent(info, termtype);
  +             if (result < 0)
  +                     throw runtime_error("could not access termcap database");
  +             if (result == 0)
  +
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to