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/Fl_Type.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/Fl_Type.cxx')
| -rw-r--r-- | fluid/Fl_Type.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fluid/Fl_Type.cxx b/fluid/Fl_Type.cxx index a65defc73..ee1680a33 100644 --- a/fluid/Fl_Type.cxx +++ b/fluid/Fl_Type.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Type.cxx,v 1.6.2.6.2.7 2002/04/28 08:42:32 easysw Exp $" +// "$Id: Fl_Type.cxx,v 1.6.2.6.2.8 2002/05/16 12:47:42 easysw Exp $" // // Widget type code for the Fast Light Tool Kit (FLTK). // @@ -38,9 +38,8 @@ #include <FL/Fl.H> #include <FL/Fl_Browser_.H> #include <FL/fl_draw.H> -#include <ctype.h> #include <stdlib.h> -#include <string.h> +#include "../src/flstring.h" #include <stdio.h> #include "Fl_Type.h" @@ -454,8 +453,7 @@ int storestring(const char *n, const char * & p, int nostrip) { p = 0; } else { char *q = (char *)malloc(length+1); - strncpy(q,n,length); - q[length] = 0; + strlcpy(q,n,length+1); p = q; } modflag = 1; @@ -682,5 +680,5 @@ void Fl_Type::read_property(const char *c) { int Fl_Type::read_fdesign(const char*, const char*) {return 0;} // -// End of "$Id: Fl_Type.cxx,v 1.6.2.6.2.7 2002/04/28 08:42:32 easysw Exp $". +// End of "$Id: Fl_Type.cxx,v 1.6.2.6.2.8 2002/05/16 12:47:42 easysw Exp $". // |
