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 /src/Fl_Help_Dialog.fl | |
| 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 'src/Fl_Help_Dialog.fl')
| -rw-r--r-- | src/Fl_Help_Dialog.fl | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/Fl_Help_Dialog.fl b/src/Fl_Help_Dialog.fl index bd333badc..99b676eef 100644 --- a/src/Fl_Help_Dialog.fl +++ b/src/Fl_Help_Dialog.fl @@ -1,10 +1,10 @@ # data file for the Fltk User Interface Designer (fluid) version 1.0100 header_name {../FL/Fl_Help_Dialog.H} -code_name {.cxx} -gridx 5 -gridy 5 -snap 3 +code_name {.cxx} +decl {\#include "flstring.h"} {selected +} + class Fl_Help_Dialog {open } { decl {int index_;} {} @@ -16,7 +16,7 @@ class Fl_Help_Dialog {open Fl_Window window_ { label {Help Dialog} open private xywh {470 380 530 385} type Double resizable - code0 {\#include <string.h>} visible + visible } { Fl_Group view_ { callback {if (view_->changed()) @@ -32,7 +32,7 @@ class Fl_Help_Dialog {open max_ = index_; - strcpy(file_[index_], view_->filename()); + strlcpy(file_[index_], view_->filename(),sizeof(file_[0])); line_[index_] = view_->topline(); if (index_ > 0) @@ -45,8 +45,7 @@ class Fl_Help_Dialog {open } else if (view_->filename()) { - strncpy(file_[index_], view_->filename(), 255); - file_[index_][255] = '\\0'; + strlcpy(file_[index_], view_->filename(), sizeof(file_[0])); line_[index_] = view_->topline(); }} open private xywh {10 10 510 330} box DOWN_BOX resizable @@ -146,10 +145,9 @@ window_->label(view_->title());} {} } { code {window_->show();} {} } - Function {show(int argc, char **argv)} {open return_type void + Function {show(int argc, char **argv)} {return_type void } { - code {window_->show(argc, argv);} {selected - } + code {window_->show(argc, argv);} {} } Function {textsize(uchar s)} {return_type void } { |
