OSDN Git Service

* config.h.in: Regen.
authormdejong <mdejong>
Thu, 2 Aug 2001 21:48:17 +0000 (21:48 +0000)
committermdejong <mdejong>
Thu, 2 Aug 2001 21:48:17 +0000 (21:48 +0000)
* configure: Regen.
* configure.in: Don't check for strdup since it
is no longer used in libgui.
* src/tclhelp.c (help_initialize_command): Replace
use of strdup with calls to malloc and strcpy.

libgui/ChangeLog
libgui/config.h.in
libgui/configure
libgui/configure.in
libgui/src/tclhelp.c

index 674edc4..8b1fc9b 100644 (file)
@@ -1,5 +1,14 @@
 2001-08-02  Mo DeJong  <mdejong@redhat.com>
 
+       * config.h.in: Regen.
+       * configure: Regen.
+       * configure.in: Don't check for strdup since it
+       is no longer used in libgui.
+       * src/tclhelp.c (help_initialize_command): Replace
+       use of strdup with calls to malloc and strcpy.
+
+2001-08-02  Mo DeJong  <mdejong@redhat.com>
+
        * src/tclhelp.c (help_command_deleted): Free the
        help_command_data->help_dir member allocated in
        help_initialize_command.
index 74ec9e3..c3779f1 100644 (file)
@@ -40,9 +40,6 @@
 /* Define if you have the random function.  */
 #undef HAVE_RANDOM
 
-/* Define if you have the strdup function.  */
-#undef HAVE_STRDUP
-
 /* Define if you have the <fcntl.h> header file.  */
 #undef HAVE_FCNTL_H
 
index e9390aa..bb2ece3 100755 (executable)
@@ -1567,7 +1567,7 @@ else
 fi
 done
 
-for ac_func in raise strdup
+for ac_func in raise
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 echo "configure:1574: checking for $ac_func" >&5
index b37a2bf..cd65e4a 100644 (file)
@@ -15,7 +15,7 @@ AC_PROG_RANLIB
 
 AC_FUNC_ALLOCA
 AC_HAVE_HEADERS(stddef.h stdlib.h getopt.h unistd.h fcntl.h sys/file.h sys/wait.h string.h strings.h)
-AC_CHECK_FUNCS(raise strdup)
+AC_CHECK_FUNCS(raise)
 
 AC_ARG_ENABLE(ide, [  --enable-ide            Enable IDE support],
 [case "${enableval}" in
index 45f9125..d0a2355 100644 (file)
@@ -223,8 +223,10 @@ help_initialize_command (ClientData cd, Tcl_Interp *interp, int argc,
 {
   struct help_command_data *hdata = (struct help_command_data *) cd;
 
-  hdata->filename = strdup (argv[2]);
-  hdata->header_filename = strdup (argv[3]);
+  hdata->filename = malloc (strlen (argv[2]) + 1);
+  strcpy (hdata->filename, argv[2]);
+  hdata->header_filename = malloc (strlen (argv[3]) + 1);
+  strcpy (hdata->header_filename, argv[3]);
   return TCL_OK;
 }
 
@@ -407,9 +409,12 @@ help_initialize_command (ClientData cd, Tcl_Interp *interp, int argc,
 {
   struct help_command_data *hdata = (struct help_command_data *) cd;
 
-  hdata->filename = strdup (argv[2]);
-  hdata->header_filename = strdup (argv[3]);
-  hdata->help_dir = strdup (argv[4]);
+  hdata->filename = malloc (strlen (argv[2]) + 1);
+  strcpy (hdata->filename, argv[2]);
+  hdata->header_filename = malloc (strlen (argv[3]) + 1);
+  strcpy (hdata->header_filename, argv[3]);
+  hdata->help_dir = malloc (strlen (argv[4]) + 1);
+  strcpy (hdata->help_dir, argv[4]);
   return TCL_OK;
 }