Commit 23b0668c authored by Jim Blandy's avatar Jim Blandy

*** empty log message ***

parent 93a37120
/* machine description file for intel 386.
/* Machine description file for intel 386.
Copyright (C) 1987 Free Software Foundation, Inc.
This file is part of GNU Emacs.
......@@ -100,7 +100,7 @@ NOTE-END */
#define LOAD_AVE_TYPE short
/* Convert that into an integer that is 100 for a load average of 1.0 */
#define LOAD_AVE_CVT(x) ((int) (((double) (x)) * 100.0 / FSCALE))
#define LOAD_AVE_CVT(x) (((double) (x)) * 100.0 / FSCALE)
#define FSCALE 256.0 /* determined by experimentation... */
#endif
......@@ -113,9 +113,9 @@ NOTE-END */
/* Convert that into an integer that is 100 for a load average of 1.0 */
/* This is totally uncalibrated. */
#define LOAD_AVE_CVT(x) ((int) ((double) (x)) * 100.0 / FSCALE)
#define LOAD_AVE_CVT(x) ((int) (((double) (x)) * 100.0 / FSCALE))
#define FSCALE 256.0
*endif
#endif
/* Define CANNOT_DUMP on machines where unexec does not work.
Then the function dump-emacs will not be defined
......@@ -160,7 +160,9 @@ NOTE-END */
#else /* not XENIX */
#ifdef USG
#ifndef LIB_STANDARD
#define LIB_STANDARD -lPW -lc
#endif
#define HAVE_ALLOCA
#define NO_REMAP
#define TEXT_START 0
......@@ -170,7 +172,6 @@ NOTE-END */
#ifdef BSD
#define HAVE_ALLOCA
#endif /* BSD */
BSD */
/* If compiling with GCC, let GCC implement alloca. */
#if defined(__GNUC__) && !defined(alloca)
......@@ -178,5 +179,15 @@ NOTE-END */
#define HAVE_ALLOCA
#endif
/* Search these directories just in case; I'm told they might be needed. */
#define C_SWITCH_MACHINE -I/usr/X/include -I/usr/netinclude
#ifdef USG
#ifdef __STDC__
#ifndef DONT_DEFINE_SIGNAL
/* Cast the function argument to avoid warnings. */
#define signal(sig, func) (signal (sig, (void (*) (int)) (func)))
#endif
#endif
#endif
#ifdef USG5_4
#define DATA_SEG_BITS 0x08000000
#endif
......@@ -191,3 +191,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define XMARKBIT(a) ((a) < 0)
#define XSETMARKBIT(a,b) ((a) = ((a) & ~MARKBIT) | ((b) ? MARKBIT : 0))
#define XUNMARK(a) ((a) = (((unsigned)(a) << INTBITS-GCTYPEBITS-VALBITS) >> INTBITS-GCTYPEBITS-VALBITS))
/* Turn off some "helpful" error checks for type mismatches
that we can't fix without breaking other machines. */
#define C_SWITCH_MACHINE -cckr
......@@ -45,8 +45,6 @@ and this notice must be preserved on all copies. */
#define LIB_STANDARD GNULIB -lsocket -lnsl -lelf -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o
#define DATA_SEG_BITS 0x08000000
/* Use ptem.h to get structures related to windows. */
#define NEED_PTEM_H
......
......@@ -3257,19 +3257,38 @@ sys_write (fildes, buf, nbytes)
{
register char *p;
register char *e;
int retval, sum;
int sum = 0;
struct stat st;
fstat (fildes, &st);
p = buf;
sum = 0;
while (nbytes > 0)
{
e = p + min (MAXIOSIZE, nbytes) - 1;
while (*e != '\n' && e > p) e--;
if (p == e) /* Ok.. so here we add a newline... sigh. */
e = p + min (MAXIOSIZE, nbytes) - 1;
retval = write (fildes, p, e - p + 1);
if (retval != e - p + 1) return -1;
p = e + 1;
sum = sum + retval;
int len, retval;
/* Handle fixed-length files with carriage control. */
if (st.st_fab_rfm == FAB$C_FIX
&& ((st.st_fab_rat & (FAB$M_FTN | FAB$M_CR)) != 0))
{
len = st.st_fab_mrs;
retval = write (fildes, p, min (len, nbytes));
if (retval != len)
return -1;
retval++; /* This skips the implied carriage control */
}
else
{
e = p + min (MAXIOSIZE, nbytes) - 1;
while (*e != '\n' && e > p) e--;
if (p == e) /* Ok.. so here we add a newline... sigh. */
e = p + min (MAXIOSIZE, nbytes) - 1;
len = e + 1 - p;
retval = write (fildes, p, len);
if (retval != len)
return -1;
}
p += retval;
sum += retval;
nbytes -= retval;
}
return sum;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment