X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fcaptoinfo.c;h=926ac2ff49e953ebb5463db6f5e44a6e3f8ba484;hp=de0133b386c6b50fbafdc7ad07a493ea84b7631f;hb=3934889cc6b0f45cf218c88df7f35634d250c9e5;hpb=9a9dd79463eba7af0b06b6a1f7e580b632ec1be1 diff --git a/ncurses/tinfo/captoinfo.c b/ncurses/tinfo/captoinfo.c index de0133b3..926ac2ff 100644 --- a/ncurses/tinfo/captoinfo.c +++ b/ncurses/tinfo/captoinfo.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2021 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -98,7 +98,7 @@ #include #include -MODULE_ID("$Id: captoinfo.c,v 1.100 2020/07/08 21:39:54 tom Exp $") +MODULE_ID("$Id: captoinfo.c,v 1.101 2021/02/28 01:05:07 tom Exp $") #if 0 #define DEBUG_THIS(p) DEBUG(9, p) @@ -634,7 +634,10 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz int offset; } fixups[MAX_TC_FIXUPS]; - DEBUG_THIS(("_nc_infotocap params %d, %s", parameterized, str)); + DEBUG_THIS(("_nc_infotocap %s params %d, %s", + _nc_strict_bsd ? "strict" : "loose", + parameterized, + _nc_visbuf(str))); /* we may have to move some trailing mandatory padding up front */ padding = str + strlen(str) - 1; @@ -673,6 +676,11 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz bufptr = save_char(bufptr, *str++); bufptr = save_char(bufptr, *str); } + } else if (str[0] == ':') { + bufptr = save_char(bufptr, '\\'); + bufptr = save_char(bufptr, '0'); + bufptr = save_char(bufptr, '7'); + bufptr = save_char(bufptr, '2'); } else if (str[0] == '\\') { if (str[1] == '\0' || (str + 1) == trimmed) { bufptr = save_string(bufptr, "\\134");