X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=progs%2Ftic.c;h=e6032c80989dd3779d3d062a0d6d0d07b65dd4f9;hp=3d894acd2d406b850c465268400a2b6c2933c31b;hb=41677b308e138027b7e435f741ee7fe5651237b0;hpb=3996fe0bf797f113d6abc4329cc869951735a4d8 diff --git a/progs/tic.c b/progs/tic.c index 3d894acd..e6032c80 100644 --- a/progs/tic.c +++ b/progs/tic.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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 * @@ -44,7 +44,7 @@ #include #include -MODULE_ID("$Id: tic.c,v 1.139 2009/12/12 17:30:12 Nicholas.Marriott Exp $") +MODULE_ID("$Id: tic.c,v 1.141 2010/05/01 21:17:23 tom Exp $") const char *_nc_progname = "tic"; @@ -347,6 +347,9 @@ stripped(char *src) if ((dst = strdup(src)) == NULL) failed("strdup"); + + assert(dst != 0); + len = strlen(dst); while (--len != 0 && isspace(UChar(dst[len]))) dst[len] = '\0'; @@ -1272,6 +1275,8 @@ similar_sgr(int num, char *a, char *b) } else if (delaying) { a = skip_delay(a); b = skip_delay(b); + } else if ((*b == '0' || (*b == ';')) && *a == 'm') { + b++; } else { a++; }