summaryrefslogtreecommitdiff
path: root/fluid/code.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-05-16 12:47:44 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-05-16 12:47:44 +0000
commit88d54cd78bf73348e4f207ab3f741aa374f28b1c (patch)
treed9310acf36b480d31f0c1527520fe7376f7953ca /fluid/code.cxx
parent36546824762618bbe76d4ac72b632ca9927acd9f (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/code.cxx')
-rw-r--r--fluid/code.cxx9
1 files changed, 4 insertions, 5 deletions
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 <ctype.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
+#include "../src/flstring.h"
#include <stdarg.h>
#include <FL/Fl.H>
@@ -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 $".
//