aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/tinfo/trim_sgr0.c
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2007-12-30 11:08:14 +0000
committerRong-En Fan <rafan@FreeBSD.org>2007-12-30 11:08:14 +0000
commit5ca44d1c915a0e0c87f8f347e61f7bfa65d609af (patch)
tree319eb1471eaf8c0c9cfc606e7cb8987ca9167507 /contrib/ncurses/ncurses/tinfo/trim_sgr0.c
parent01b82453a3d0c6d76d4afc340c07cfc2be4a6b7a (diff)
downloadsrc-5ca44d1c915a0e0c87f8f347e61f7bfa65d609af.tar.gz
src-5ca44d1c915a0e0c87f8f347e61f7bfa65d609af.zip
Import ncurses 5.6-20071222 snapshot onto the vender branch
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=174993
Diffstat (limited to 'contrib/ncurses/ncurses/tinfo/trim_sgr0.c')
-rw-r--r--contrib/ncurses/ncurses/tinfo/trim_sgr0.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/contrib/ncurses/ncurses/tinfo/trim_sgr0.c b/contrib/ncurses/ncurses/tinfo/trim_sgr0.c
index 3ce18e070b06..80c8f77fbebe 100644
--- a/contrib/ncurses/ncurses/tinfo/trim_sgr0.c
+++ b/contrib/ncurses/ncurses/tinfo/trim_sgr0.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2005 Free Software Foundation, Inc. *
+ * Copyright (c) 2005-2006,2007 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 *
@@ -37,7 +37,7 @@
#include <tic.h>
#include <term_entry.h>
-MODULE_ID("$Id: trim_sgr0.c,v 1.7 2006/12/02 19:37:57 tom Exp $")
+MODULE_ID("$Id: trim_sgr0.c,v 1.8 2007/04/07 17:14:11 tom Exp $")
#undef CUR
#define CUR tp->
@@ -247,9 +247,7 @@ _nc_trim_sgr0(TERMTYPE *tp)
if (!rewrite_sgr(on, enter_alt_charset_mode)
|| !rewrite_sgr(off, exit_alt_charset_mode)
|| !rewrite_sgr(end, exit_alt_charset_mode)) {
- FreeIfNeeded(on);
FreeIfNeeded(off);
- FreeIfNeeded(end);
} else if (similar_sgr(off, end)
&& !similar_sgr(off, on)) {
TR(TRACE_DATABASE, ("adjusting sgr(9:off) : %s", _nc_visbuf(off)));
@@ -315,8 +313,8 @@ _nc_trim_sgr0(TERMTYPE *tp)
*/
free(off);
}
- free(end);
- free(on);
+ FreeIfNeeded(end);
+ FreeIfNeeded(on);
} else {
/*
* Possibly some applications are confused if sgr0 contains rmacs,