changeset 1466:2f85a175308f

[project @ 1995-09-22 07:48:59 by jwe]
author jwe
date Fri, 22 Sep 1995 07:56:05 +0000
parents 3bb3848031a0
children 7f008dfdc5a5
files src/dirfns.cc src/file-io.cc src/help.cc src/input.cc src/sysdep.cc src/sysdep.h
diffstat 6 files changed, 12 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/src/dirfns.cc	Fri Sep 22 07:45:28 1995 +0000
+++ b/src/dirfns.cc	Fri Sep 22 07:56:05 1995 +0000
@@ -46,6 +46,8 @@
 
 #include <strstream.h>
 
+#include <readline/tilde.h>
+
 #include "defun.h"
 #include "dirfns.h"
 #include "error.h"
@@ -65,12 +67,6 @@
 #include "unwind-prot.h"
 #include "utils.h"
 
-extern "C"
-{
-#include <readline/tilde.h>
-extern char *strerror (int);
-}
-
 // Temp storage for a path.
 static char tdir[MAXPATHLEN];
 
--- a/src/file-io.cc	Fri Sep 22 07:45:28 1995 +0000
+++ b/src/file-io.cc	Fri Sep 22 07:56:05 1995 +0000
@@ -48,6 +48,8 @@
 
 #include <fcntl.h>
 
+#include <readline/tilde.h>
+
 #include <DLList.h>
 
 #include "dMatrix.h"
@@ -69,12 +71,7 @@
 #include "utils.h"
 #include "variables.h"
 
-extern "C"
-{
-#include <readline/tilde.h>
-
-extern void mode_string ();
-}
+extern "C" void mode_string ();
 
 // keeps a count of args sent to printf or scanf
 static int fmt_arg_count = 0;
--- a/src/help.cc	Fri Sep 22 07:45:28 1995 +0000
+++ b/src/help.cc	Fri Sep 22 07:56:05 1995 +0000
@@ -37,6 +37,8 @@
 #include <unistd.h>
 #endif
 
+#include <readline/tilde.h>
+
 #include "defun.h"
 #include "dirfns.h"
 #include "error.h"
@@ -44,6 +46,7 @@
 #include "oct-obj.h"
 #include "octave.h"
 #include "pager.h"
+#include "pathsearch.h"
 #include "sighandlers.h"
 #include "symtab.h"
 #include "tree-const.h"
@@ -53,15 +56,6 @@
 #include "utils.h"
 #include "variables.h"
 
-extern "C"
-{
-// XXX FIXME XXX
-#undef __FUNCTION_DEF
-#include <readline/tilde.h>
-}
-
-#include "pathsearch.h"
-
 static help_list operators[] =
 {
   { "!",
--- a/src/input.cc	Fri Sep 22 07:45:28 1995 +0000
+++ b/src/input.cc	Fri Sep 22 07:56:05 1995 +0000
@@ -54,15 +54,10 @@
 
 // This must come before anything that includes iostream.h...
 // (This is apparently no longer true...)
-extern "C"
-{
+
 #include "readline/readline.h"
 #include "readline/history.h"
 
-extern void free_undo_list ();
-
-extern char *xmalloc ();
-
 // Yes, this sucks, but it avoids a conflict with another readline
 // function declared in iostream.h.
 // (Apparently, there isn't one there now...)
@@ -93,7 +88,6 @@
 #endif
     return readline (s);
 }
-}
 
 #include "defun.h"
 #include "dirfns.h"
@@ -832,7 +826,7 @@
 	  if (strncmp (name, hint, hint_len) == 0)
 	    {
 	      int len = 2 + prefix_len + strlen (name);
-	      char *buf = (char *) xmalloc (len);
+	      char *buf = (char *) malloc (len);
 
 	      if (prefix)
 		{
--- a/src/sysdep.cc	Fri Sep 22 07:45:28 1995 +0000
+++ b/src/sysdep.cc	Fri Sep 22 07:56:05 1995 +0000
@@ -293,6 +293,7 @@
 
   return 1;
 }
+#endif
 
 void
 sysdep_init (void)
--- a/src/sysdep.h	Fri Sep 22 07:45:28 1995 +0000
+++ b/src/sysdep.h	Fri Sep 22 07:56:05 1995 +0000
@@ -32,10 +32,7 @@
 extern char *octave_getcwd (char *, int);
 extern int octave_chdir (const char *);
 
-extern "C"
-{
-extern int gethostname ();
-}
+extern "C" int gethostname ();
 
 // Octave's idea of infinity.
 extern double octave_Inf;