changeset 350:80a890dbbeb5

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Wed, 24 Jul 1991 23:47:06 +0000
parents feacf757c5b2
children 5729b1cc3942
files src/fileio.c src/fns.c
diffstat 2 files changed, 29 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Wed Jul 24 04:35:23 1991 +0000
+++ b/src/fileio.c	Wed Jul 24 23:47:06 1991 +0000
@@ -63,8 +63,10 @@
 
 #ifdef HPUX
 #include <netio.h>
+#ifndef HPUX8
 #include <errnet.h>
 #endif
+#endif
 
 #ifndef O_WRONLY
 #define O_WRONLY 1
@@ -2014,13 +2016,9 @@
 
   signal_after_change (point, 0, inserted);
   
-  {
-    Lisp_Object result = Fcons (filename,
-				Fcons (make_number (inserted),
-				       Qnil));
-    UNGCPRO;
-    return result;
-  }
+  RETURN_UNGCPRO (Fcons (filename,
+			 Fcons (make_number (inserted),
+				Qnil)));
 }
 
 DEFUN ("write-region", Fwrite_region, Swrite_region, 3, 5,
--- a/src/fns.c	Wed Jul 24 04:35:23 1991 +0000
+++ b/src/fns.c	Wed Jul 24 23:47:06 1991 +0000
@@ -51,6 +51,10 @@
 #endif /* not VMS */
 #endif /* LOAD_AVE_TYPE */
 
+#ifdef DGUX
+#include <sys/dg_sys_info.h>  /* for load average info - DJB */
+#endif
+
 /* Note on some machines this defines `vector' as a typedef,
    so make sure we don't use that name in this file.  */
 #undef vector
@@ -1181,6 +1185,11 @@
 }
 
 /* Avoid static vars inside a function since in HPUX they dump as pure.  */
+#ifdef DGUX
+static struct dg_sys_info_load_info load_info;  /* what-a-mouthful! */
+
+#else /* Not DGUX */
+
 static int ldav_initialized;
 static int ldav_channel;
 #ifdef LOAD_AVE_TYPE
@@ -1192,6 +1201,7 @@
 #define channel ldav_channel
 #define initialized ldav_initialized
 #define nl ldav_nl
+#endif /* Not DGUX */
 
 DEFUN ("load-average", Fload_average, Sload_average, 0, 0, 0,
   "Return list of 1 minute, 5 minute and 15 minute load averages.\n\
@@ -1199,6 +1209,19 @@
 then converted to integer.")
   ()
 {
+#ifdef DGUX
+  /* perhaps there should be a "sys_load_avg" call in sysdep.c?! - DJB */
+  load_info.one_minute     = 0.0;	/* just in case there is an error */
+  load_info.five_minute    = 0.0;
+  load_info.fifteen_minute = 0.0;
+  dg_sys_info (&load_info, DG_SYS_INFO_LOAD_INFO_TYPE,
+	       DG_SYS_INFO_LOAD_VERSION_0);
+
+  return Fcons (make_number ((int)(load_info.one_minute * 100.0)),
+		Fcons (make_number ((int)(load_info.five_minute * 100.0)),
+		       Fcons (make_number ((int)(load_info.fifteen_minute * 100.0)),
+			      Qnil)));
+#else /* not DGUX */
 #ifndef LOAD_AVE_TYPE
   error ("load-average not implemented for this operating system");
 
@@ -1320,6 +1343,7 @@
 		       Fcons (make_number (LOAD_AVE_CVT (load_ave[2])),
 			      Qnil)));
 #endif /* LOAD_AVE_TYPE */
+#endif /* not DGUX */
 }
 
 #undef channel