summaryrefslogtreecommitdiff
path: root/src/Fl_get_system_colors.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 /src/Fl_get_system_colors.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 'src/Fl_get_system_colors.cxx')
-rw-r--r--src/Fl_get_system_colors.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx
index 2ac699e3f..eb1a6e170 100644
--- a/src/Fl_get_system_colors.cxx
+++ b/src/Fl_get_system_colors.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.9 2002/04/27 19:35:18 easysw Exp $"
+// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.10 2002/05/16 12:47:43 easysw Exp $"
//
// System color support for the Fast Light Tool Kit (FLTK).
//
@@ -233,10 +233,7 @@ int Fl::scheme(const char *s) {
// inherit it...
static char e[1024];
strcpy(e,"FLTK_SCHEME=");
- if (s) {
- strncat(e,s,sizeof(e) - 1);
- e[sizeof(e) - 1] = '\0';
- }
+ if (s) strlcat(e,s,sizeof(e));
putenv(e);
// Load the scheme...
@@ -316,5 +313,5 @@ int Fl::reload_scheme() {
//
-// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.9 2002/04/27 19:35:18 easysw Exp $".
+// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.10 2002/05/16 12:47:43 easysw Exp $".
//