~ubuntu-branches/ubuntu/saucy/xterm/saucy-proposed

« back to all changes in this revision

Viewing changes to main.c

  • Committer: Bazaar Package Importer
  • Author(s): Ryan Kavanagh
  • Date: 2008-11-23 17:15:10 UTC
  • mfrom: (1.1.10 upstream) (11.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20081123171510-fdwvfr4ytnfvjwjl
Tags: 237-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
  - Enabled URL hilighting
  - Maintainer field
  - rm -rf for .pc patches
* Closes (LP: #301451)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $XTermId: main.c,v 1.586 2008/02/28 00:28:00 Matthieu.Herrb Exp $ */
 
1
/* $XTermId: main.c,v 1.588 2008/09/14 15:20:31 Paul.Lampert Exp $ */
2
2
 
3
3
/*
4
4
 *                               W A R N I N G
1036
1036
{"-lcc",        "*localeFilter",XrmoptionSepArg,        (caddr_t) NULL},
1037
1037
{"-en",         "*locale",      XrmoptionSepArg,        (caddr_t) NULL},
1038
1038
#endif
 
1039
{"-uc",         "*cursorUnderLine", XrmoptionNoArg,     (caddr_t) "on"},
 
1040
{"+uc",         "*cursorUnderLine", XrmoptionNoArg,     (caddr_t) "off"},
1039
1041
{"-ulc",        "*colorULMode", XrmoptionNoArg,         (caddr_t) "off"},
1040
1042
{"+ulc",        "*colorULMode", XrmoptionNoArg,         (caddr_t) "on"},
1041
1043
{"-ulit",       "*italicULMode", XrmoptionNoArg,        (caddr_t) "off"},
1206
1208
{ "-/+lc",                 "turn on/off locale mode using luit" },
1207
1209
{ "-lcc path",             "filename of locale converter (" DEFLOCALEFILTER ")" },
1208
1210
#endif
 
1211
{ "-/+uc",                 "turn on/off underline cursor" },
1209
1212
{ "-/+ulc",                "turn off/on display of underline as color" },
1210
1213
{ "-/+ulit",               "turn off/on display of underline as italics" },
1211
1214
#ifdef HAVE_UTMP
2236
2239
            c[1 + u] = "--";
2237
2240
            command_to_exec_with_luit = c;
2238
2241
        } else {
2239
 
            static char *luit[4];
 
2242
            static char *luit[6];
2240
2243
            luit[0] = term->misc.localefilter;
2241
2244
            if (u) {
2242
2245
                luit[1] = "-encoding";
4321
4324
             * there, or refuses to run.  In that case we will fall-through to
4322
4325
             * to command that the user gave anyway.
4323
4326
             */
4324
 
            if (command_to_exec_with_luit) {
 
4327
            if (command_to_exec_with_luit && command_to_exec) {
4325
4328
                xtermSetenv("XTERM_SHELL",
4326
4329
                            xtermFindShell(*command_to_exec_with_luit, False));
4327
4330
                TRACE(("spawning command \"%s\"\n", *command_to_exec_with_luit));
4362
4365
            if (xw->misc.login_shell && pw && added_utmp_entry)
4363
4366
                execl(bin_login, "login", "-p", "-f", login_name, (void *) 0);
4364
4367
#endif
 
4368
 
 
4369
#if OPT_LUIT_PROG
 
4370
            if (command_to_exec_with_luit) {
 
4371
                if (xw->misc.login_shell) {
 
4372
                    int u;
 
4373
                    u = (term->misc.use_encoding ? 2 : 0);
 
4374
                    command_to_exec_with_luit[u + 1] = "-argv0";
 
4375
                    command_to_exec_with_luit[u + 2] = shname_minus;
 
4376
                    command_to_exec_with_luit[u + 3] = NULL;
 
4377
                }
 
4378
                execvp(*command_to_exec_with_luit, command_to_exec_with_luit);
 
4379
                /* Exec failed. */
 
4380
                fprintf(stderr, "%s: Can't execvp %s: %s\n", ProgramName,
 
4381
                        *command_to_exec_with_luit, strerror(errno));
 
4382
            }
 
4383
#endif
4365
4384
            execlp(ptr,
4366
4385
                   (xw->misc.login_shell ? shname_minus : shname),
4367
4386
                   (void *) 0);