X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_tgoto.c;fp=ncurses%2Ftinfo%2Flib_tgoto.c;h=4173d74efcddac2ab79791ce5125cbf19a8405f8;hp=292b2eb2698ca7ffae63a4ddfe9b41e4bbd52a36;hb=336aa0803853f7961dd31f1e35cd688d861ffd64;hpb=5f288254c618ae86f3811f2797e4d942061c9101 diff --git a/ncurses/tinfo/lib_tgoto.c b/ncurses/tinfo/lib_tgoto.c index 292b2eb2..4173d74e 100644 --- a/ncurses/tinfo/lib_tgoto.c +++ b/ncurses/tinfo/lib_tgoto.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2000-2012,2018 Free Software Foundation, Inc. * + * Copyright (c) 2000-2018,2019 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -35,7 +35,7 @@ #include #include -MODULE_ID("$Id: lib_tgoto.c,v 1.17 2018/04/07 21:11:48 tom Exp $") +MODULE_ID("$Id: lib_tgoto.c,v 1.18 2019/10/26 22:43:48 tom Exp $") #if !PURE_TERMINFO static bool @@ -125,7 +125,14 @@ tgoto_internal(const char *string, int x, int y) *value += 1; need_BC = TRUE; } else { - *value = 0200; /* tputs will treat this as \0 */ + /* tputs will pretend this is \0, which will almost + * always work since ANSI-compatible terminals ignore + * the character. ECMA-48 does not document a C1 + * control for this value. A few (obsolete) terminals + * can use this value in special cases, such as cursor + * addressing using single-byte coordinates. + */ + *value = 0200; } } result[used++] = (char) *value++;