comparison src/term.c @ 107847:e81bca2fba28

(init_tty): Move common text outside of #ifdef TERMINFO.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 12 Apr 2010 22:19:17 -0400
parents a744b1df50bd
children bef5d1738c0b
comparison
equal deleted inserted replaced
107846:e8ea73860300 107847:e81bca2fba28
3591 "Cannot open termcap database file"); 3591 "Cannot open termcap database file");
3592 #endif 3592 #endif
3593 } 3593 }
3594 if (status == 0) 3594 if (status == 0)
3595 { 3595 {
3596 #ifdef TERMINFO
3597 maybe_fatal (must_succeed, terminal, 3596 maybe_fatal (must_succeed, terminal,
3598 "Terminal type %s is not defined", 3597 "Terminal type %s is not defined",
3599 "Terminal type %s is not defined.\n\ 3598 "Terminal type %s is not defined.\n\
3600 If that is not the actual type of terminal you have,\n\ 3599 If that is not the actual type of terminal you have,\n\
3601 use the Bourne shell command `TERM=... export TERM' (C-shell:\n\ 3600 use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
3602 `setenv TERM ...') to specify the correct type. It may be necessary\n\ 3601 `setenv TERM ...') to specify the correct type. It may be necessary\n"
3603 to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.", 3602 #ifdef TERMINFO
3603 "to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.",
3604 #else
3605 "to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
3606 #endif
3604 terminal_type); 3607 terminal_type);
3605 #else
3606 maybe_fatal (must_succeed, terminal,
3607 "Terminal type %s is not defined",
3608 "Terminal type %s is not defined.\n\
3609 If that is not the actual type of terminal you have,\n\
3610 use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
3611 `setenv TERM ...') to specify the correct type. It may be necessary\n\
3612 to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
3613 terminal_type);
3614 #endif
3615 } 3608 }
3616 3609
3617 #ifndef TERMINFO 3610 #ifndef TERMINFO
3618 if (strlen (tty->termcap_term_buffer) >= buffer_size) 3611 if (strlen (tty->termcap_term_buffer) >= buffer_size)
3619 abort (); 3612 abort ();
3876 3869
3877 if (Wcm_init (tty) == -1) /* can't do cursor motion */ 3870 if (Wcm_init (tty) == -1) /* can't do cursor motion */
3878 { 3871 {
3879 maybe_fatal (must_succeed, terminal, 3872 maybe_fatal (must_succeed, terminal,
3880 "Terminal type \"%s\" is not powerful enough to run Emacs", 3873 "Terminal type \"%s\" is not powerful enough to run Emacs",
3881 # ifdef TERMINFO
3882 "Terminal type \"%s\" is not powerful enough to run Emacs.\n\ 3874 "Terminal type \"%s\" is not powerful enough to run Emacs.\n\
3883 It lacks the ability to position the cursor.\n\ 3875 It lacks the ability to position the cursor.\n\
3884 If that is not the actual type of terminal you have,\n\ 3876 If that is not the actual type of terminal you have,\n\
3885 use the Bourne shell command `TERM=... export TERM' (C-shell:\n\ 3877 use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
3886 `setenv TERM ...') to specify the correct type. It may be necessary\n\ 3878 `setenv TERM ...') to specify the correct type. It may be necessary\n"
3887 to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.", 3879 # ifdef TERMINFO
3880 "to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.",
3888 # else /* TERMCAP */ 3881 # else /* TERMCAP */
3889 "Terminal type \"%s\" is not powerful enough to run Emacs.\n\ 3882 "to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
3890 It lacks the ability to position the cursor.\n\
3891 If that is not the actual type of terminal you have,\n\
3892 use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
3893 `setenv TERM ...') to specify the correct type. It may be necessary\n\
3894 to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
3895 # endif /* TERMINFO */ 3883 # endif /* TERMINFO */
3896 terminal_type); 3884 terminal_type);
3897 } 3885 }
3898 3886
3899 if (FrameRows (tty) <= 0 || FrameCols (tty) <= 0) 3887 if (FrameRows (tty) <= 0 || FrameCols (tty) <= 0)