GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  JAM_READMSGTEXT (3)

NAME

JAM_ReadMsgText - Read a message's text

CONTENTS

Synopsis
Description
     Arguments
Examples
Author
See Also

SYNOPSIS


#include <jamlib/jam.h> 

int JAM_ReadMsgText(s_JamBase* Base_PS, ulong Offset_I, ulong Length_I, uchar* Buffer_PC);

DESCRIPTION

Reads the body text associated with a message.

    Arguments

Base_PS
  The message base to use
Offset_I
  The text position in the text file. This information is stored in the message header.
Length_I
  The text length. This information is stored in the message header.
Buffer_PC
  A pointer to where the text should be stored.

RETURN VALUE

0 if successful
JAM_IO_ERROR
  if an I/O error occured. See JAM_Errno(3)

EXAMPLES

s_JamMsgHeader Header_S;
uchar*         Buffer_PC;
int            Result_I;

/* read msg header */ Result_I = JAM_ReadMsgHeader(Base_PS, 0, &Header_S, &SubPack_PS); if (Result_I) { printf("JAM_ReadMsgHeader returned %d.\n", Result_I); return; }

/* allocate buffer text */ Buffer_PC = (uchar*) malloc(Header_S.TxtLen); if (!Buffer_PC) { printf("malloc failed.\n"); return; }

/* read text */ Result_I = JAM_ReadMsgText(Base_PS, Header_S.TxtOffset, Header_S.TxtLen, Buffer_PC); if (Result_I) printf("JAM_ReadMsgText returned %d.\n", Result_I);

free(Buffer_PC);

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>.

SEE ALSO

jamlib(3), JAM_ReadMsgHeader(3), JAM_Errno(3)
Search for    or go to Top of page |  Section 3 |  Main Index


JAM_READMSGTEXT (3) 2002-11-07

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.