'\"macro stdmacro
.if n .pH ddi_dki.adjmsg @(#)adjmsg	40.6 of 10/10/89
.\" Copyright 1989 AT&T
.de IX
.ie '\\n(.z'' .tm .Index: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9	\\n%
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..
.nr X
.if \nX=0 .ds x} adjmsg D3DK "STREAMS" "DDI/DKI" "\&"
.if \nX=1 .ds x} adjmsg D3DK "STREAMS" "DDI/DKI"
.if \nX=2 .ds x} adjmsg D3DK "" "\&"
.if \nX=3 .ds x} adjmsg "" "" "\&"
.TH \*(x}
.IX "\f4adjmsg\fP(D3DK)"
.SH NAME
\f4adjmsg\f1 \- trim bytes from a message 
.IX "STREAMS messages"
.SH SYNOPSIS
.nf
.na
\f4#include <sys/stream.h>
.sp 0.5
int adjmsg(\f4mblk_t *\f1\f2mp, \f4int\f2 len\f4);\f1
.ad
.fi
.SH ARGUMENTS
.RS 0n
.IP "\f2*mp\f1" 10n
Pointer to the message to be trimmed.
.IP "\f2len\f1" 10n
The number of bytes to be removed.
.RE
.SH DESCRIPTION
\f4adjmsg\f1 removes bytes from a message.
|\f2len\fP\^| (the absolute value of \f2len\fP) specifies how many bytes
are to be removed.
If \f2len\f1 is greater than \f40\f1, bytes 
are removed from the head of the message.
If \f2len\f1 is less than \f40\f1, 
bytes are removed from the tail.
\f4adjmsg\f1 fails if |\f2len\fP\^| is greater than the number of
bytes in \f2mp\f1.
.SH RETURN VALUE
If the message can be trimmed successfully, \f41\f1 is returned.  Otherwise,
\f40\f1 is returned.
.SH LEVEL
Base or Interrupt
.SH SEE ALSO
\f2BCI Driver Development Guide\f1, Chapter 7, ``STREAMS''
