From 88d54cd78bf73348e4f207ab3f741aa374f28b1c Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 16 May 2002 12:47:44 +0000 Subject: Massive update to use strlcpy() and strlcat() instead of strncpy() and strncat() in almost all places (there are still a few strncpy's that need to be used...) Added configure check for strlcat() and strlcpy(). Added emulation code for strlcat() and strlcpy(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2239 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/code.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'fluid/code.cxx') diff --git a/fluid/code.cxx b/fluid/code.cxx index 1e15abd71..13554f4c8 100644 --- a/fluid/code.cxx +++ b/fluid/code.cxx @@ -1,5 +1,5 @@ // -// "$Id: code.cxx,v 1.9.2.9.2.4 2002/03/25 21:08:41 easysw Exp $" +// "$Id: code.cxx,v 1.9.2.9.2.5 2002/05/16 12:47:43 easysw Exp $" // // Code output routines for the Fast Light Tool Kit (FLTK). // @@ -23,10 +23,9 @@ // Please report all bugs and problems to "fltk-bugs@fltk.org". // -#include #include #include -#include +#include "../src/flstring.h" #include #include @@ -136,7 +135,7 @@ int write_declare(const char *format, ...) { va_list args; char buf[1024]; va_start(args, format); - vsprintf(buf, format, args); + vsnprintf(buf, sizeof(buf), format, args); va_end(args); included **p = &included_root; while (*p) { @@ -464,5 +463,5 @@ void Fl_Type::write_code1() { void Fl_Type::write_code2() {} // -// End of "$Id: code.cxx,v 1.9.2.9.2.4 2002/03/25 21:08:41 easysw Exp $". +// End of "$Id: code.cxx,v 1.9.2.9.2.5 2002/05/16 12:47:43 easysw Exp $". // -- cgit v1.2.3