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
This commit is contained in:
Michael R Sweet
2002-05-16 12:47:44 +00:00
parent 3654682476
commit 88d54cd78b
47 changed files with 414 additions and 374 deletions
+4 -5
View File
@@ -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 $".
//