diff options
author | Xin LI <delphij@FreeBSD.org> | 2014-03-01 00:40:26 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2014-03-01 00:40:26 +0000 |
commit | cea297eb34d2361e79529034397465068ae34ecd (patch) | |
tree | fbc3775582ebd1e6f026931751cfab6c588b643c /c++/demo.cc | |
parent | 6826a395a618014c4541ff6a654be0d3afb392a1 (diff) | |
download | src-cea297eb34d2361e79529034397465068ae34ecd.tar.gz src-cea297eb34d2361e79529034397465068ae34ecd.zip |
Vendor import of ncurses 5.9 20140222 snapshot.vendor/ncurses/5.9-20140222
Notes
Notes:
svn path=/vendor/ncurses/dist/; revision=262639
svn path=/vendor/ncurses/5.9-20140222/; revision=262640; tag=vendor/ncurses/5.9-20140222
Diffstat (limited to 'c++/demo.cc')
-rw-r--r-- | c++/demo.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/c++/demo.cc b/c++/demo.cc index 35433425f1fc..8bcfb146420e 100644 --- a/c++/demo.cc +++ b/c++/demo.cc @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2011,2012 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 @@ * Demo code for NCursesMenu and NCursesForm written by * Juergen Pfeifer * - * $Id: demo.cc,v 1.39 2008/12/07 02:07:34 juergen Exp $ + * $Id: demo.cc,v 1.41 2012/02/23 10:41:56 tom Exp $ */ #include "internal.h" @@ -220,6 +220,7 @@ private: int chk; protected: bool field_check(NCursesFormField& f) { + (void) f; return TRUE; } bool char_check(int c) { @@ -319,7 +320,7 @@ public: for(int i=1; i <= S->labels(); i++) { char buf[8]; assert(i < 100); - ::sprintf(buf, "Frm%02d", i); + ::_nc_SPRINTF(buf, _nc_SLIMIT(sizeof(buf)) "Frm%02d", i); (*S)[i] = buf; // Text (*S)[i] = Soft_Label_Key_Set::Soft_Label_Key::Left; // Justification } @@ -539,7 +540,7 @@ void TestApplication::init_labels(Soft_Label_Key_Set& S) const for(int i=1; i <= S.labels(); i++) { char buf[8]; assert(i < 100); - ::sprintf(buf, "Key%02d", i); + ::_nc_SPRINTF(buf, _nc_SLIMIT(sizeof(buf)) "Key%02d", i); S[i] = buf; // Text S[i] = Soft_Label_Key_Set::Soft_Label_Key::Left; // Justification } |