59 lines
1.7 KiB
Groff
59 lines
1.7 KiB
Groff
.\" $Id: JAM_GetSubfield_R.3,v 1.1 2002/11/09 00:37:16 raorn Exp $
|
|
.\"
|
|
.TH JAM_GetSubfield_R 3 2002-11-07 "" "JAM subroutine library"
|
|
.SH NAME
|
|
JAM_GetSubfield_R \- Get a subfield from a subfield packet (reentrant)
|
|
.SH SYNOPSIS
|
|
.nf
|
|
.B #include <jamlib/jam.h>
|
|
|
|
.BI "s_JamSubfield* JAM_GetSubfield(s_JamSubPacket* " SubPack_PS ","
|
|
.BI " ulong* " Count_PI ");"
|
|
.RE
|
|
.fi
|
|
.SH DESCRIPTION
|
|
Returns a pointer to the first/next subfield struct in the subfield
|
|
packet.
|
|
.PP
|
|
This function is a reentrant replacement for
|
|
.BR JAM_GetSubfield (3).
|
|
.SS Arguments
|
|
.TP
|
|
.I SubPack_PS
|
|
The subfield packet to use.
|
|
.TP
|
|
.I Count_PI
|
|
Pointer to a variable that contains the number of the subfield to retrieve. The
|
|
variable should be set to zero the first time the function is called and is
|
|
then automatically increased by the function for any subsequent calls.
|
|
.SH "RETURN VALUE"
|
|
A pointer to a subfield, if successful, or NULL if there are no
|
|
more subfields in the packet.
|
|
.SH EXAMPLES
|
|
.nf
|
|
s_JamSubPacket* SubPack_PS;
|
|
s_JamSubfield* Subfield_PS;
|
|
s_JamMsgHeader Header_S;
|
|
ulong Count_I;
|
|
int Result_I;
|
|
|
|
Result_I = JAM_ReadMsgHeader(0, &Header_S, &SubPack_PS);
|
|
if (Result_I)
|
|
printf("JAM_ReadMsgHeader returned %d.\\n", Result_I);
|
|
|
|
Count_I = 0;
|
|
|
|
while((Subfield_PS = JAM_GetSubfield_R(SubPack_PS , &Count_I)))
|
|
printf("Subfield id %d\\n", Subfield_PS\->LoID);
|
|
|
|
JAM_DelSubPacket(SubPack_PS);
|
|
.fi
|
|
.SH AUTHOR
|
|
This manual page was created by Sir Raorn <raorn@altlinux.ru>,
|
|
based on original JAMlib documentation by Bjorn Stenberg
|
|
<bjorn@haxx.nu> and Johan Billing <billing@df.lth.se>.
|
|
.SH SEE ALSO
|
|
.BR jamlib (3),
|
|
.BR JAM_GetSubfield (3)
|
|
.\" vim: ft=nroff
|