diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-05-16 12:47:44 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-05-16 12:47:44 +0000 |
| commit | 88d54cd78bf73348e4f207ab3f741aa374f28b1c (patch) | |
| tree | d9310acf36b480d31f0c1527520fe7376f7953ca /fluid/file.cxx | |
| parent | 36546824762618bbe76d4ac72b632ca9927acd9f (diff) | |
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
Diffstat (limited to 'fluid/file.cxx')
| -rw-r--r-- | fluid/file.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fluid/file.cxx b/fluid/file.cxx index 1cb7b8c3a..cd3610169 100644 --- a/fluid/file.cxx +++ b/fluid/file.cxx @@ -1,5 +1,5 @@ // -// "$Id: file.cxx,v 1.7.2.6.2.5 2002/05/13 20:54:49 easysw Exp $" +// "$Id: file.cxx,v 1.7.2.6.2.6 2002/05/16 12:47:43 easysw Exp $" // // Fluid file routines for the Fast Light Tool Kit (FLTK). // @@ -28,10 +28,9 @@ // Please report all bugs and problems to "fltk-bugs@fltk.org". // -#include <ctype.h> #include <stdio.h> #include <stdlib.h> -#include <string.h> +#include "../src/flstring.h" #include <stdarg.h> #include "alignment_panel.h" @@ -157,7 +156,7 @@ void read_error(const char *format, ...) { va_start(args, format); if (!fin) { char buffer[1024]; - vsprintf(buffer, format, args); + vsnprintf(buffer, sizeof(buffer), format, args); fl_message(buffer); } else { fprintf(stderr, "%s:%d: ", fname, lineno); @@ -632,5 +631,5 @@ void read_fdesign() { } // -// End of "$Id: file.cxx,v 1.7.2.6.2.5 2002/05/13 20:54:49 easysw Exp $". +// End of "$Id: file.cxx,v 1.7.2.6.2.6 2002/05/16 12:47:43 easysw Exp $". // |
