comparison src/term.c @ 20591:4411c2b96af9 v8.2.0849

patch 8.2.0849: BeOS code is not maintained and probably unused Commit: https://github.com/vim/vim/commit/041c7107f23d3b49ab62c1d7e36af90421db8b63 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 30 18:14:57 2020 +0200 patch 8.2.0849: BeOS code is not maintained and probably unused Problem: BeOS code is not maintained and probably unused. Solution: Remove the BeOS code. (Emir Sari, closes https://github.com/vim/vim/issues/5817)
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 May 2020 18:30:04 +0200
parents ecaceb5c5644
children c2570baa2e4c
comparison
equal deleted inserted replaced
20590:a76cdc4bf606 20591:4411c2b96af9
360 {TERMCAP2KEY('#', '2'), "\233\065\064~"}, // shifted home key 360 {TERMCAP2KEY('#', '2'), "\233\065\064~"}, // shifted home key
361 {TERMCAP2KEY('#', '3'), "\233\065\060~"}, // shifted insert key 361 {TERMCAP2KEY('#', '3'), "\233\065\060~"}, // shifted insert key
362 {TERMCAP2KEY('*', '7'), "\233\065\065~"}, // shifted end key 362 {TERMCAP2KEY('*', '7'), "\233\065\065~"}, // shifted end key
363 # endif 363 # endif
364 364
365 # if defined(__BEOS__) || defined(ALL_BUILTIN_TCAPS) 365 # ifdef ALL_BUILTIN_TCAPS
366 /* 366 /*
367 * almost standard ANSI terminal, default for bebox 367 * almost standard ANSI terminal
368 */ 368 */
369 {(int)KS_NAME, "beos-ansi"},
370 {(int)KS_CE, "\033[K"}, 369 {(int)KS_CE, "\033[K"},
371 {(int)KS_CD, "\033[J"}, 370 {(int)KS_CD, "\033[J"},
372 {(int)KS_AL, "\033[L"}, 371 {(int)KS_AL, "\033[L"},
373 # ifdef TERMINFO 372 # ifdef TERMINFO
374 {(int)KS_CAL, "\033[%p1%dL"}, 373 {(int)KS_CAL, "\033[%p1%dL"},
379 # ifdef TERMINFO 378 # ifdef TERMINFO
380 {(int)KS_CDL, "\033[%p1%dM"}, 379 {(int)KS_CDL, "\033[%p1%dM"},
381 # else 380 # else
382 {(int)KS_CDL, "\033[%dM"}, 381 {(int)KS_CDL, "\033[%dM"},
383 # endif 382 # endif
384 #ifdef BEOS_PR_OR_BETTER
385 # ifdef TERMINFO
386 {(int)KS_CS, "\033[%i%p1%d;%p2%dr"},
387 # else
388 {(int)KS_CS, "\033[%i%d;%dr"}, // scroll region
389 # endif
390 #endif
391 {(int)KS_CL, "\033[H\033[2J"}, 383 {(int)KS_CL, "\033[H\033[2J"},
392 #ifdef notyet 384 #ifdef notyet
393 {(int)KS_VI, "[VI]"}, // cursor invisible, VT320: CSI ? 25 l 385 {(int)KS_VI, "[VI]"}, // cursor invisible, VT320: CSI ? 25 l
394 {(int)KS_VE, "[VE]"}, // cursor visible, VT320: CSI ? 25 h 386 {(int)KS_VE, "[VE]"}, // cursor visible, VT320: CSI ? 25 h
395 #endif 387 #endif
422 {(int)KS_SR, "\033M"}, 414 {(int)KS_SR, "\033M"},
423 # ifdef TERMINFO 415 # ifdef TERMINFO
424 {(int)KS_CRI, "\033[%p1%dC"}, 416 {(int)KS_CRI, "\033[%p1%dC"},
425 # else 417 # else
426 {(int)KS_CRI, "\033[%dC"}, 418 {(int)KS_CRI, "\033[%dC"},
427 # endif
428 # if defined(BEOS_DR8)
429 {(int)KS_DB, ""}, // hack! see screen.c
430 # endif 419 # endif
431 420
432 {K_UP, "\033[A"}, 421 {K_UP, "\033[A"},
433 {K_DOWN, "\033[B"}, 422 {K_DOWN, "\033[B"},
434 {K_LEFT, "\033[D"}, 423 {K_LEFT, "\033[D"},
1413 1402
1414 #ifdef VMS 1403 #ifdef VMS
1415 # define DEFAULT_TERM (char_u *)"vt320" 1404 # define DEFAULT_TERM (char_u *)"vt320"
1416 #endif 1405 #endif
1417 1406
1418 #ifdef __BEOS__
1419 # undef DEFAULT_TERM
1420 # define DEFAULT_TERM (char_u *)"beos-ansi"
1421 #endif
1422
1423 #ifdef __HAIKU__ 1407 #ifdef __HAIKU__
1424 # undef DEFAULT_TERM 1408 # undef DEFAULT_TERM
1425 # define DEFAULT_TERM (char_u *)"xterm" 1409 # define DEFAULT_TERM (char_u *)"xterm"
1426 #endif 1410 #endif
1427 1411
2427 2411
2428 if (name != NULL && *name == NUL) 2412 if (name != NULL && *name == NUL)
2429 name = NULL; // empty name is equal to no name 2413 name = NULL; // empty name is equal to no name
2430 term = name; 2414 term = name;
2431 2415
2432 #ifdef __BEOS__
2433 /*
2434 * TERM environment variable is normally set to 'ansi' on the Bebox;
2435 * Since the BeBox doesn't quite support full ANSI yet, we use our
2436 * own custom 'ansi-beos' termcap instead, unless the -T option has
2437 * been given on the command line.
2438 */
2439 if (term == NULL
2440 && strcmp((char *)mch_getenv((char_u *)"TERM"), "ansi") == 0)
2441 term = DEFAULT_TERM;
2442 #endif
2443 #ifndef MSWIN 2416 #ifndef MSWIN
2444 if (term == NULL) 2417 if (term == NULL)
2445 term = mch_getenv((char_u *)"TERM"); 2418 term = mch_getenv((char_u *)"TERM");
2446 #endif 2419 #endif
2447 if (term == NULL || *term == NUL) 2420 if (term == NULL || *term == NUL)