MIN -> min
authorJan-Simon Pendry <pendry@ucbvax.Berkeley.EDU>
Mon, 13 Jul 1992 08:45:27 +0000 (00:45 -0800)
committerJan-Simon Pendry <pendry@ucbvax.Berkeley.EDU>
Mon, 13 Jul 1992 08:45:27 +0000 (00:45 -0800)
SCCS-vsn: sys/net/bpf.c 7.11
SCCS-vsn: sys/netinet/ip_icmp.c 7.17
SCCS-vsn: sys/hp300/hp300/mem.c 7.10
SCCS-vsn: sys/hp300/dev/sd.c 7.14
SCCS-vsn: sys/hp300/dev/ppi.c 7.5
SCCS-vsn: sys/hp/dev/hil.c 7.13
SCCS-vsn: sys/hp/dev/hil_subr.c 7.2
SCCS-vsn: sys/hp/dev/ite.c 7.13

usr/src/sys/hp/dev/hil.c
usr/src/sys/hp/dev/hil_subr.c
usr/src/sys/hp/dev/ite.c
usr/src/sys/hp300/dev/ppi.c
usr/src/sys/hp300/dev/sd.c
usr/src/sys/hp300/hp300/mem.c
usr/src/sys/net/bpf.c
usr/src/sys/netinet/ip_icmp.c

index 602efa6..4262cc9 100644 (file)
@@ -11,7 +11,7 @@
  *
  * from: Utah $Hdr: hil.c 1.38 92/01/21$
  *
  *
  * from: Utah $Hdr: hil.c 1.38 92/01/21$
  *
- *     @(#)hil.c       7.12 (Berkeley) %G%
+ *     @(#)hil.c       7.13 (Berkeley) %G%
  */
 
 #include "sys/param.h"
  */
 
 #include "sys/param.h"
index 31c8577..0fec3f6 100644 (file)
@@ -7,10 +7,11 @@
  *
  * from: Utah $Hdr: hil_subr.c 1.1 91/11/19$
  *
  *
  * from: Utah $Hdr: hil_subr.c 1.1 91/11/19$
  *
- *     @(#)hil_subr.c  7.1 (Berkeley) %G%
+ *     @(#)hil_subr.c  7.2 (Berkeley) %G%
  */
 
 #include "sys/param.h"
  */
 
 #include "sys/param.h"
+#include "sys/systm.h"
 #include "sys/ioctl.h"
 #include "sys/tty.h"
 #include "sys/clist.h"
 #include "sys/ioctl.h"
 #include "sys/tty.h"
 #include "sys/clist.h"
@@ -49,8 +50,8 @@ hilq_to_b(q, cp, cc)
 
        while (cc) {
                nc = sizeof (struct cblock) - ((int)q->c_cf & CROUND);
 
        while (cc) {
                nc = sizeof (struct cblock) - ((int)q->c_cf & CROUND);
-               nc = MIN(nc, cc);
-               nc = MIN(nc, q->c_cc);
+               nc = min(nc, cc);
+               nc = min(nc, q->c_cc);
                (void) bcopy(q->c_cf, cp, (unsigned)nc);
                q->c_cf += nc;
                q->c_cc -= nc;
                (void) bcopy(q->c_cf, cp, (unsigned)nc);
                q->c_cf += nc;
                q->c_cc -= nc;
index 132193f..0a87596 100644 (file)
@@ -11,7 +11,7 @@
  *
  * from: Utah $Hdr: ite.c 1.24 92/01/21$
  *
  *
  * from: Utah $Hdr: ite.c 1.24 92/01/21$
  *
- *     @(#)ite.c       7.12 (Berkeley) %G%
+ *     @(#)ite.c       7.13 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -392,7 +392,7 @@ doesc:
                        switch (c) {
 
                        case 'Y':                       /* Only y coord. */
                        switch (c) {
 
                        case 'Y':                       /* Only y coord. */
-                               ip->cury = MIN(ip->pos, ip->rows-1);
+                               ip->cury = min(ip->pos, ip->rows-1);
                                ip->pos = 0;
                                ip->escape = 0;
                                (*sp->ite_cursor)(ip, MOVE_CURSOR);
                                ip->pos = 0;
                                ip->escape = 0;
                                (*sp->ite_cursor)(ip, MOVE_CURSOR);
@@ -400,13 +400,13 @@ doesc:
                                break;
 
                        case 'y':                       /* y coord first */
                                break;
 
                        case 'y':                       /* y coord first */
-                               ip->cury = MIN(ip->pos, ip->rows-1);
+                               ip->cury = min(ip->pos, ip->rows-1);
                                ip->pos = 0;
                                ip->fpd = 0;
                                break;
 
                        case 'C':                       /* x coord */
                                ip->pos = 0;
                                ip->fpd = 0;
                                break;
 
                        case 'C':                       /* x coord */
-                               ip->curx = MIN(ip->pos, ip->cols-1);
+                               ip->curx = min(ip->pos, ip->cols-1);
                                ip->pos = 0;
                                ip->escape = 0;
                                (*sp->ite_cursor)(ip, MOVE_CURSOR);
                                ip->pos = 0;
                                ip->escape = 0;
                                (*sp->ite_cursor)(ip, MOVE_CURSOR);
index 64402f0..94bb2ed 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)ppi.c       7.4 (Berkeley) %G%
+ *     @(#)ppi.c       7.5 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -15,6 +15,7 @@
 #if NPPI > 0
 
 #include "sys/param.h"
 #if NPPI > 0
 
 #include "sys/param.h"
+#include "sys/systm.h"
 #include "sys/errno.h"
 #include "sys/uio.h"
 #include "sys/malloc.h"
 #include "sys/errno.h"
 #include "sys/uio.h"
 #include "sys/malloc.h"
@@ -183,7 +184,7 @@ ppirw(dev, uio)
                       dev, uio, uio->uio_rw == UIO_READ ? 'R' : 'W',
                       sc->sc_burst, sc->sc_timo, uio->uio_resid);
 #endif
                       dev, uio, uio->uio_rw == UIO_READ ? 'R' : 'W',
                       sc->sc_burst, sc->sc_timo, uio->uio_resid);
 #endif
-       buflen = MIN(sc->sc_burst, uio->uio_resid);
+       buflen = min(sc->sc_burst, uio->uio_resid);
        buf = (char *)malloc(buflen, M_DEVBUF, M_WAITOK);
        sc->sc_flags |= PPIF_UIO;
        if (sc->sc_timo > 0) {
        buf = (char *)malloc(buflen, M_DEVBUF, M_WAITOK);
        sc->sc_flags |= PPIF_UIO;
        if (sc->sc_timo > 0) {
@@ -191,7 +192,7 @@ ppirw(dev, uio)
                timeout(ppitimo, unit, sc->sc_timo);
        }
        while (uio->uio_resid > 0) {
                timeout(ppitimo, unit, sc->sc_timo);
        }
        while (uio->uio_resid > 0) {
-               len = MIN(buflen, uio->uio_resid);
+               len = min(buflen, uio->uio_resid);
                cp = buf;
                if (uio->uio_rw == UIO_WRITE) {
                        error = uiomove(cp, len, uio);
                cp = buf;
                if (uio->uio_rw == UIO_WRITE) {
                        error = uiomove(cp, len, uio);
index 542f195..6111571 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)sd.c        7.13 (Berkeley) %G%
+ *     @(#)sd.c        7.14 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -449,7 +449,7 @@ sdlblkstrat(bp, bsize)
 
                if (boff || resid < bsize) {
                        sdstats[sdunit(bp->b_dev)].sdpartials++;
 
                if (boff || resid < bsize) {
                        sdstats[sdunit(bp->b_dev)].sdpartials++;
-                       count = MIN(resid, bsize - boff);
+                       count = min(resid, bsize - boff);
                        cbp->b_flags = B_BUSY | B_PHYS | B_READ;
                        cbp->b_blkno = bn - btodb(boff);
                        cbp->b_un.b_addr = cbuf;
                        cbp->b_flags = B_BUSY | B_PHYS | B_READ;
                        cbp->b_blkno = bn - btodb(boff);
                        cbp->b_un.b_addr = cbuf;
index 54f8570..cf4872f 100644 (file)
@@ -11,7 +11,7 @@
  *
  * from: Utah $Hdr: mem.c 1.14 90/10/12$
  *
  *
  * from: Utah $Hdr: mem.c 1.14 90/10/12$
  *
- *     @(#)mem.c       7.9 (Berkeley) %G%
+ *     @(#)mem.c       7.10 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -68,8 +68,8 @@ mmrw(dev, uio, flags)
                            VM_PROT_READ : VM_PROT_WRITE, TRUE);
                        o = (int)uio->uio_offset & PGOFSET;
                        c = (u_int)(NBPG - ((int)iov->iov_base & PGOFSET));
                            VM_PROT_READ : VM_PROT_WRITE, TRUE);
                        o = (int)uio->uio_offset & PGOFSET;
                        c = (u_int)(NBPG - ((int)iov->iov_base & PGOFSET));
-                       c = MIN(c, (u_int)(NBPG - o));
-                       c = MIN(c, (u_int)iov->iov_len);
+                       c = min(c, (u_int)(NBPG - o));
+                       c = min(c, (u_int)iov->iov_len);
                        error = uiomove((caddr_t)&vmmap[o], (int)c, uio);
                        pmap_remove(kernel_pmap, (vm_offset_t)vmmap,
                            (vm_offset_t)&vmmap[NBPG]);
                        error = uiomove((caddr_t)&vmmap[o], (int)c, uio);
                        pmap_remove(kernel_pmap, (vm_offset_t)vmmap,
                            (vm_offset_t)&vmmap[NBPG]);
@@ -77,7 +77,7 @@ mmrw(dev, uio, flags)
 
 /* minor device 1 is kernel memory */
                case 1:
 
 /* minor device 1 is kernel memory */
                case 1:
-                       c = MIN(iov->iov_len, MAXPHYS);
+                       c = min(iov->iov_len, MAXPHYS);
                        if (!kernacc((caddr_t)uio->uio_offset, c,
                            uio->uio_rw == UIO_READ ? B_READ : B_WRITE))
                                return (EFAULT);
                        if (!kernacc((caddr_t)uio->uio_offset, c,
                            uio->uio_rw == UIO_READ ? B_READ : B_WRITE))
                                return (EFAULT);
@@ -101,7 +101,7 @@ mmrw(dev, uio, flags)
                                    malloc(CLBYTES, M_TEMP, M_WAITOK);
                                bzero(zbuf, CLBYTES);
                        }
                                    malloc(CLBYTES, M_TEMP, M_WAITOK);
                                bzero(zbuf, CLBYTES);
                        }
-                       c = MIN(iov->iov_len, CLBYTES);
+                       c = min(iov->iov_len, CLBYTES);
                        error = uiomove(zbuf, (int)c, uio);
                        continue;
 
                        error = uiomove(zbuf, (int)c, uio);
                        continue;
 
index c33ee0f..0c37fd5 100644 (file)
@@ -9,7 +9,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *      @(#)bpf.c      7.10 (Berkeley) %G%
+ *      @(#)bpf.c      7.11 (Berkeley) %G%
  *
  * static char rcsid[] =
  * "$Header: bpf.c,v 1.33 91/10/27 21:21:58 mccanne Exp $";
  *
  * static char rcsid[] =
  * "$Header: bpf.c,v 1.33 91/10/27 21:21:58 mccanne Exp $";
@@ -986,7 +986,7 @@ bpf_mcopy(src, dst, len)
        while (len > 0) {
                if (m == 0)
                        panic("bpf_mcopy");
        while (len > 0) {
                if (m == 0)
                        panic("bpf_mcopy");
-               count = MIN(m->m_len, len);
+               count = min(m->m_len, len);
                bcopy(mtod(m, caddr_t), (caddr_t)dst, count);
                m = m->m_next;
                dst += count;
                bcopy(mtod(m, caddr_t), (caddr_t)dst, count);
                m = m->m_next;
                dst += count;
@@ -1043,7 +1043,7 @@ catchpacket(d, pkt, pktlen, snaplen, cpfn)
         * much.  Otherwise, transfer the whole packet (unless
         * we hit the buffer size limit).
         */
         * much.  Otherwise, transfer the whole packet (unless
         * we hit the buffer size limit).
         */
-       totlen = hdrlen + MIN(snaplen, pktlen);
+       totlen = hdrlen + min(snaplen, pktlen);
        if (totlen > d->bd_bufsize)
                totlen = d->bd_bufsize;
 
        if (totlen > d->bd_bufsize)
                totlen = d->bd_bufsize;
 
index fade13a..2f73600 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)ip_icmp.c   7.16 (Berkeley) %G%
+ *     @(#)ip_icmp.c   7.17 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -162,7 +162,7 @@ icmp_input(m, hlen)
                icmpstat.icps_tooshort++;
                goto freeit;
        }
                icmpstat.icps_tooshort++;
                goto freeit;
        }
-       i = hlen + MIN(icmplen, ICMP_ADVLENMIN);
+       i = hlen + min(icmplen, ICMP_ADVLENMIN);
        if (m->m_len < i && (m = m_pullup(m, i)) == 0)  {
                icmpstat.icps_tooshort++;
                return;
        if (m->m_len < i && (m = m_pullup(m, i)) == 0)  {
                icmpstat.icps_tooshort++;
                return;