comparison src/emacs.c @ 40418:625565cae9c9

Use argv[0] instead of emacs when -t was specified.
author Pavel Janík <Pavel@Janik.cz>
date Sun, 28 Oct 2001 18:52:14 +0000
parents ea36983f19d3
children 67c90e8bde1a
comparison
equal deleted inserted replaced
40417:5446cff179a4 40418:625565cae9c9
979 emacs_close (1); 979 emacs_close (1);
980 result = emacs_open (term, O_RDWR, 0); 980 result = emacs_open (term, O_RDWR, 0);
981 if (result < 0) 981 if (result < 0)
982 { 982 {
983 char *errstring = strerror (errno); 983 char *errstring = strerror (errno);
984 fprintf (stderr, "emacs: %s: %s\n", term, errstring); 984 fprintf (stderr, "%s: %s: %s\n", argv[0], term, errstring);
985 exit (1); 985 exit (1);
986 } 986 }
987 dup (0); 987 dup (0);
988 if (! isatty (0)) 988 if (! isatty (0))
989 { 989 {
990 fprintf (stderr, "emacs: %s: not a tty\n", term); 990 fprintf (stderr, "%s: %s: not a tty\n", argv[0], term);
991 exit (1); 991 exit (1);
992 } 992 }
993 fprintf (stderr, "Using %s\n", term); 993 fprintf (stderr, "Using %s\n", term);
994 #ifdef HAVE_WINDOW_SYSTEM 994 #ifdef HAVE_WINDOW_SYSTEM
995 inhibit_window_system = 1; /* -t => -nw */ 995 inhibit_window_system = 1; /* -t => -nw */