aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1991-07-24 23:47:06 +0000
committerJim Blandy1991-07-24 23:47:06 +0000
commit9b7828a5ad16b476e9359bfbe020e0bbc6cf3831 (patch)
treedbee7356669b9f9dc41b8bd06ecaf40d51c768ca /src
parentb10a43799500bb04ab70cca9e780262fda5812fe (diff)
downloademacs-9b7828a5ad16b476e9359bfbe020e0bbc6cf3831.tar.gz
emacs-9b7828a5ad16b476e9359bfbe020e0bbc6cf3831.zip
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c12
-rw-r--r--src/fns.c24
2 files changed, 29 insertions, 7 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 7727448feb4..b6035656d09 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -63,8 +63,10 @@ extern int sys_nerr;
63 63
64#ifdef HPUX 64#ifdef HPUX
65#include <netio.h> 65#include <netio.h>
66#ifndef HPUX8
66#include <errnet.h> 67#include <errnet.h>
67#endif 68#endif
69#endif
68 70
69#ifndef O_WRONLY 71#ifndef O_WRONLY
70#define O_WRONLY 1 72#define O_WRONLY 1
@@ -2014,13 +2016,9 @@ before the error is signaled.")
2014 2016
2015 signal_after_change (point, 0, inserted); 2017 signal_after_change (point, 0, inserted);
2016 2018
2017 { 2019 RETURN_UNGCPRO (Fcons (filename,
2018 Lisp_Object result = Fcons (filename, 2020 Fcons (make_number (inserted),
2019 Fcons (make_number (inserted), 2021 Qnil)));
2020 Qnil));
2021 UNGCPRO;
2022 return result;
2023 }
2024} 2022}
2025 2023
2026DEFUN ("write-region", Fwrite_region, Swrite_region, 3, 5, 2024DEFUN ("write-region", Fwrite_region, Swrite_region, 3, 5,
diff --git a/src/fns.c b/src/fns.c
index 649bddd7142..3be50027b1c 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -51,6 +51,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
51#endif /* not VMS */ 51#endif /* not VMS */
52#endif /* LOAD_AVE_TYPE */ 52#endif /* LOAD_AVE_TYPE */
53 53
54#ifdef DGUX
55#include <sys/dg_sys_info.h> /* for load average info - DJB */
56#endif
57
54/* Note on some machines this defines `vector' as a typedef, 58/* Note on some machines this defines `vector' as a typedef,
55 so make sure we don't use that name in this file. */ 59 so make sure we don't use that name in this file. */
56#undef vector 60#undef vector
@@ -1181,6 +1185,11 @@ and can rub it out if not confirmed.")
1181} 1185}
1182 1186
1183/* Avoid static vars inside a function since in HPUX they dump as pure. */ 1187/* Avoid static vars inside a function since in HPUX they dump as pure. */
1188#ifdef DGUX
1189static struct dg_sys_info_load_info load_info; /* what-a-mouthful! */
1190
1191#else /* Not DGUX */
1192
1184static int ldav_initialized; 1193static int ldav_initialized;
1185static int ldav_channel; 1194static int ldav_channel;
1186#ifdef LOAD_AVE_TYPE 1195#ifdef LOAD_AVE_TYPE
@@ -1192,6 +1201,7 @@ static struct nlist ldav_nl[2];
1192#define channel ldav_channel 1201#define channel ldav_channel
1193#define initialized ldav_initialized 1202#define initialized ldav_initialized
1194#define nl ldav_nl 1203#define nl ldav_nl
1204#endif /* Not DGUX */
1195 1205
1196DEFUN ("load-average", Fload_average, Sload_average, 0, 0, 0, 1206DEFUN ("load-average", Fload_average, Sload_average, 0, 0, 0,
1197 "Return list of 1 minute, 5 minute and 15 minute load averages.\n\ 1207 "Return list of 1 minute, 5 minute and 15 minute load averages.\n\
@@ -1199,6 +1209,19 @@ Each of the three load averages is multiplied by 100,\n\
1199then converted to integer.") 1209then converted to integer.")
1200 () 1210 ()
1201{ 1211{
1212#ifdef DGUX
1213 /* perhaps there should be a "sys_load_avg" call in sysdep.c?! - DJB */
1214 load_info.one_minute = 0.0; /* just in case there is an error */
1215 load_info.five_minute = 0.0;
1216 load_info.fifteen_minute = 0.0;
1217 dg_sys_info (&load_info, DG_SYS_INFO_LOAD_INFO_TYPE,
1218 DG_SYS_INFO_LOAD_VERSION_0);
1219
1220 return Fcons (make_number ((int)(load_info.one_minute * 100.0)),
1221 Fcons (make_number ((int)(load_info.five_minute * 100.0)),
1222 Fcons (make_number ((int)(load_info.fifteen_minute * 100.0)),
1223 Qnil)));
1224#else /* not DGUX */
1202#ifndef LOAD_AVE_TYPE 1225#ifndef LOAD_AVE_TYPE
1203 error ("load-average not implemented for this operating system"); 1226 error ("load-average not implemented for this operating system");
1204 1227
@@ -1320,6 +1343,7 @@ then converted to integer.")
1320 Fcons (make_number (LOAD_AVE_CVT (load_ave[2])), 1343 Fcons (make_number (LOAD_AVE_CVT (load_ave[2])),
1321 Qnil))); 1344 Qnil)));
1322#endif /* LOAD_AVE_TYPE */ 1345#endif /* LOAD_AVE_TYPE */
1346#endif /* not DGUX */
1323} 1347}
1324 1348
1325#undef channel 1349#undef channel