X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fcomp_expand.c;h=742fa7c248b256ec8f61596ddd94a7a12be9c5ab;hp=5841baa656f1fb1267845de6ea038a3350cb3316;hb=ee27d238caeccd1ed781a92957afbdb890e1e88f;hpb=8b06e371ed1bce3dd6f37138e6becb5e1a562fe0 diff --git a/ncurses/tinfo/comp_expand.c b/ncurses/tinfo/comp_expand.c index 5841baa6..742fa7c2 100644 --- a/ncurses/tinfo/comp_expand.c +++ b/ncurses/tinfo/comp_expand.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. * + * Copyright (c) 1998-2012,2016 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: comp_expand.c,v 1.24 2012/02/22 22:40:24 tom Exp $") +MODULE_ID("$Id: comp_expand.c,v 1.26 2016/09/24 21:15:51 tom Exp $") static int trailing_spaces(const char *src) @@ -46,10 +46,10 @@ trailing_spaces(const char *src) } /* this deals with differences over whether 0x7f and 0x80..0x9f are controls */ -#define REALCTL(s) (UChar(*(s)) < 127 && iscntrl(UChar(*(s)))) +#define REALCTL(s) (UChar(*(s)) < 127 && iscntrl(UChar(*(s)))) #define REALPRINT(s) (UChar(*(s)) < 127 && isprint(UChar(*(s)))) -#define P_LIMIT(p) (length - (size_t)(p)) +#define P_LIMIT(p) (length - (size_t)(p)) NCURSES_EXPORT(char *) _nc_tic_expand(const char *srcp, bool tic_format, int numbers) @@ -133,6 +133,8 @@ _nc_tic_expand(const char *srcp, bool tic_format, int numbers) } break; default: + if (*str == ',') /* minitel1 uses this */ + buffer[bufp++] = '\\'; buffer[bufp++] = *str; break; }