[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nmh-commits] nmh ChangeLog sbr/discard.c sbr/m_getfld.c uip/...
From: |
Eric Gillespie |
Subject: |
[Nmh-commits] nmh ChangeLog sbr/discard.c sbr/m_getfld.c uip/... |
Date: |
Fri, 08 Aug 2008 23:45:24 +0000 |
CVSROOT: /sources/nmh
Module name: nmh
Changes by: Eric Gillespie <epg> 08/08/08 23:45:24
Modified files:
. : ChangeLog
sbr : discard.c m_getfld.c
uip : scansbr.c
Log message:
* sbr/discard.c, sbr/m_getfld.c, uip/scansbr.c: Add support for
DragonFlyBSD stdio (from NetBSD pkgsrc).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/nmh/ChangeLog?cvsroot=nmh&r1=1.286&r2=1.287
http://cvs.savannah.gnu.org/viewcvs/nmh/sbr/discard.c?cvsroot=nmh&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/nmh/sbr/m_getfld.c?cvsroot=nmh&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/nmh/uip/scansbr.c?cvsroot=nmh&r1=1.12&r2=1.13
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/nmh/nmh/ChangeLog,v
retrieving revision 1.286
retrieving revision 1.287
diff -u -b -r1.286 -r1.287
--- ChangeLog 5 Aug 2008 21:06:00 -0000 1.286
+++ ChangeLog 8 Aug 2008 23:45:24 -0000 1.287
@@ -1,3 +1,8 @@
+2008-08-08 Eric Gillespie <address@hidden>
+
+ * sbr/discard.c, sbr/m_getfld.c, uip/scansbr.c: Add support for
+ DragonFlyBSD stdio (from NetBSD pkgsrc).
+
2008-08-05 Eric Gillespie <address@hidden>
* uip/folder.c: chdir(nmhdir) in main rather than in dodir, which
Index: sbr/discard.c
===================================================================
RCS file: /sources/nmh/nmh/sbr/discard.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- sbr/discard.c 2 Jul 2002 22:09:14 -0000 1.2
+++ sbr/discard.c 8 Aug 2008 23:45:24 -0000 1.3
@@ -2,7 +2,7 @@
/*
* discard.c -- discard output on a file pointer
*
- * $Id: discard.c,v 1.2 2002/07/02 22:09:14 kenh Exp $
+ * $Id: discard.c,v 1.3 2008/08/08 23:45:24 epg Exp $
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
@@ -55,7 +55,7 @@
# endif
#endif
-#ifdef _FSTDIO
+#if defined(_FSTDIO) || defined(__DragonFly__)
fpurge (io);
#else
# ifdef LINUX_STDIO
Index: sbr/m_getfld.c
===================================================================
RCS file: /sources/nmh/nmh/sbr/m_getfld.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- sbr/m_getfld.c 5 Apr 2008 18:41:37 -0000 1.13
+++ sbr/m_getfld.c 8 Aug 2008 23:45:24 -0000 1.14
@@ -2,7 +2,7 @@
/*
* m_getfld.c -- read/parse a message
*
- * $Id: m_getfld.c,v 1.13 2008/04/05 18:41:37 pm215 Exp $
+ * $Id: m_getfld.c,v 1.14 2008/08/08 23:45:24 epg Exp $
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
@@ -266,6 +266,9 @@
bp = sp = (unsigned char *) iob->_IO_read_ptr - 1;
j = (cnt = ((long) iob->_IO_read_end -
(long) iob->_IO_read_ptr) + 1) < i ? cnt : i;
+#elif defined(__DragonFly__)
+ bp = sp = (unsigned char *) ((struct __FILE_public *)iob)->_p -
1;
+ j = (cnt = ((struct __FILE_public *)iob)->_r+1) < i ? cnt : i;
#else
bp = sp = (unsigned char *) iob->_ptr - 1;
j = (cnt = iob->_cnt+1) < i ? cnt : i;
@@ -278,6 +281,8 @@
#ifdef LINUX_STDIO
iob->_IO_read_ptr = iob->_IO_read_end;
if (__underflow(iob) == EOF) {
+#elif defined(__DragonFly__)
+ if (__srget(iob) == EOF) {
#else
if (_filbuf(iob) == EOF) {
#endif
@@ -291,6 +296,9 @@
} else {
#ifdef LINUX_STDIO
iob->_IO_read_ptr = bp + 1;
+#elif defined(__DragonFly__)
+ ((struct __FILE_public *)iob)->_p = bp + 1;
+ ((struct __FILE_public *)iob)->_r = cnt - 1;
#else
iob->_ptr = bp + 1;
iob->_cnt = cnt - 1;
@@ -335,6 +343,9 @@
#ifdef LINUX_STDIO
cnt = (long) iob->_IO_read_end - (long) iob->_IO_read_ptr;
bp = (unsigned char *) --iob->_IO_read_ptr;
+#elif defined(__DragonFly__)
+ cnt = ((struct __FILE_public *)iob)->_r++;
+ bp = (unsigned char *) --((struct __FILE_public *)iob)->_p;
#else
cnt = iob->_cnt++;
bp = (unsigned char *) --iob->_ptr;
@@ -349,6 +360,11 @@
j = ep - (unsigned char *) iob->_IO_read_ptr;
memcpy (cp, iob->_IO_read_ptr, j);
iob->_IO_read_ptr = ep;
+#elif defined(__DragonFly__)
+ j = ep - (unsigned char *) ((struct __FILE_public
*)iob)->_p;
+ memcpy (cp, ((struct __FILE_public *)iob)->_p, j);
+ ((struct __FILE_public *)iob)->_p = ep;
+ ((struct __FILE_public *)iob)->_r -= j;
#else
j = ep - (unsigned char *) iob->_ptr;
memcpy (cp, iob->_ptr, j);
@@ -368,6 +384,9 @@
#ifdef LINUX_STDIO
c += bp - (unsigned char *) iob->_IO_read_ptr;
memcpy( cp, iob->_IO_read_ptr, c);
+#elif defined(__DragonFly__)
+ c += bp - (unsigned char *) ((struct __FILE_public *)iob)->_p;
+ memcpy( cp, ((struct __FILE_public *)iob)->_p, c);
#else
c += bp - (unsigned char *) iob->_ptr;
memcpy( cp, iob->_ptr, c);
@@ -378,6 +397,9 @@
/* the dest buffer is full */
#ifdef LINUX_STDIO
iob->_IO_read_ptr += c;
+#elif defined(__DragonFly__)
+ ((struct __FILE_public *)iob)->_r -= c;
+ ((struct __FILE_public *)iob)->_p += c;
#else
iob->_cnt -= c;
iob->_ptr += c;
@@ -397,6 +419,9 @@
iob->_IO_read_ptr = iob->_IO_read_end;
c = __underflow(iob);
iob->_IO_read_ptr++; /* NOT automatic! */
+#elif defined(__DragonFly__)
+ *cp++ =j = *(((struct __FILE_public *)iob)->_p + c);
+ c = __srget(iob);
#else
*cp++ = j = *(iob->_ptr + c);
c = _filbuf(iob);
@@ -406,6 +431,9 @@
if (c != EOF) {
#ifdef LINUX_STDIO
--iob->_IO_read_ptr;
+#elif defined(__DragonFly__)
+ --((struct __FILE_public *)iob)->_p;
+ ++((struct __FILE_public *)iob)->_r;
#else
--iob->_ptr;
++iob->_cnt;
@@ -429,6 +457,9 @@
#ifdef LINUX_STDIO
bp = (unsigned char *) --iob->_IO_read_ptr;
cnt = (long) iob->_IO_read_end - (long) iob->_IO_read_ptr;
+#elif defined(__DragonFly__)
+ bp = (unsigned char *) --((struct __FILE_public *)iob)->_p;
+ cnt = ++((struct __FILE_public *)iob)->_r;
#else
bp = (unsigned char *) --iob->_ptr;
cnt = ++iob->_cnt;
@@ -491,6 +522,9 @@
memcpy( buf, bp, c );
#ifdef LINUX_STDIO
iob->_IO_read_ptr += c;
+#elif defined(__DragonFly__)
+ ((struct __FILE_public *)iob)->_r -= c;
+ ((struct __FILE_public *)iob)->_p += c;
#else
iob->_cnt -= c;
iob->_ptr += c;
Index: uip/scansbr.c
===================================================================
RCS file: /sources/nmh/nmh/uip/scansbr.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- uip/scansbr.c 22 May 2008 10:37:55 -0000 1.12
+++ uip/scansbr.c 8 Aug 2008 23:45:24 -0000 1.13
@@ -2,7 +2,7 @@
/*
* scansbr.c -- routines to help scan along...
*
- * $Id: scansbr.c,v 1.12 2008/05/22 10:37:55 pm215 Exp $
+ * $Id: scansbr.c,v 1.13 2008/08/08 23:45:24 epg Exp $
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
@@ -256,6 +256,8 @@
while (state == BODY) {
#ifdef LINUX_STDIO
if (scnout->_IO_write_ptr == scnout->_IO_write_end) {
+#elif defined(__DragonFly__)
+ if (((struct __FILE_public *)scnout)->_w <= 0) {
#else
if (scnout->_cnt <= 0) {
#endif
@@ -266,6 +268,10 @@
state = m_getfld(state, name, scnout->_IO_write_ptr,
(long)scnout->_IO_write_ptr-(long)scnout->_IO_write_end
, inb);
scnout->_IO_write_ptr += msg_count;
+#elif defined(__DragonFly__)
+ state = m_getfld( state, name, ((struct __FILE_public
*)scnout)->_p, -(((struct __FILE_public *)scnout)->_w), inb );
+ ((struct __FILE_public *)scnout)->_w -= msg_count;
+ ((struct __FILE_public *)scnout)->_p += msg_count;
#else
state = m_getfld( state, name, scnout->_ptr,
-(scnout->_cnt), inb );
scnout->_cnt -= msg_count;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nmh-commits] nmh ChangeLog sbr/discard.c sbr/m_getfld.c uip/...,
Eric Gillespie <=