~ubuntu-branches/ubuntu/trusty/xterm/trusty

« back to all changes in this revision

Viewing changes to os2main.c

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2010-03-31 12:32:27 UTC
  • mfrom: (1.1.17 upstream) (11.1.17 sid)
  • Revision ID: james.westby@ubuntu.com-20100331123227-8a6qwmyciob6j88y
Tags: 256-1ubuntu1
* Merge from Debian unstable.
* Revert the libutempter change for lucid. (LP: #539473)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $XTermId: os2main.c,v 1.262 2009/12/06 16:07:57 tom Exp $ */
 
1
/* $XTermId: os2main.c,v 1.263 2010/01/01 22:26:10 tom Exp $ */
2
2
 
3
3
/* removed all foreign stuff to get the code more clear (hv)
4
4
 * and did some rewrite for the obscure OS/2 environment
125
125
 
126
126
static SIGNAL_T reapchild(int n);
127
127
static int spawnXTerm(XtermWidget /* xw */ );
128
 
static void resize_termcap(XtermWidget xw, char *newtc);
 
128
static void resize_termcap(XtermWidget xw);
129
129
static void set_owner(char *device, uid_t uid, gid_t gid, mode_t mode);
130
130
 
131
131
static Bool added_utmp_entry = False;
1575
1575
    TERMIO_STRUCT tio;
1576
1576
    int status;
1577
1577
    Bool ok_termcap;
1578
 
    char *newtc;
1579
1578
 
1580
1579
    char *TermName = NULL;
1581
1580
    char *ptr, *shname, buf[64];
1676
1675
#if OPT_TEK4014
1677
1676
    if (TEK4014_ACTIVE(xw)) {
1678
1677
        envnew = tekterm;
1679
 
        newtc = TekScreenOf(tekWidget)->tcapbuf;
1680
1678
    } else
1681
1679
#endif
1682
1680
    {
1683
1681
        envnew = vtterm;
1684
 
        newtc = screen->tcapbuf;
1685
1682
    }
1686
1683
 
1687
1684
    /*
1691
1688
     * entry is not found.
1692
1689
     */
1693
1690
    ok_termcap = True;
1694
 
    if (!get_termcap(TermName = resource.term_name, newtc)) {
 
1691
    if (!get_termcap(TermName = resource.term_name)) {
1695
1692
        char *last = NULL;
1696
1693
        TermName = *envnew;
1697
1694
        ok_termcap = False;
1698
1695
        while (*envnew != NULL) {
1699
1696
            if ((last == NULL || strcmp(last, *envnew))
1700
 
                && get_termcap(*envnew, newtc)) {
 
1697
                && get_termcap(*envnew)) {
1701
1698
                TermName = *envnew;
1702
1699
                ok_termcap = True;
1703
1700
                break;
1707
1704
        }
1708
1705
    }
1709
1706
    if (ok_termcap) {
1710
 
        resize_termcap(xw, newtc);
 
1707
        resize_termcap(xw);
1711
1708
    }
1712
1709
 
1713
1710
    /* tell tty how big window is */
1820
1817
 
1821
1818
            xtermSetenv("TERM", TermName);
1822
1819
            if (!TermName)
1823
 
                *newtc = 0;
 
1820
                *get_tcap_buffer(xw) = 0;
1824
1821
 
1825
1822
            sprintf(buf, "%lu",
1826
1823
                    ((unsigned long) XtWindow(SHELL_OF(CURRENT_EMU()))));
2035
2032
 
2036
2033
/* ARGSUSED */
2037
2034
static void
2038
 
resize_termcap(XtermWidget xw, char *newtc)
 
2035
resize_termcap(XtermWidget xw)
2039
2036
{
2040
2037
}
2041
2038