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
JAM_ReadMsgText(3) JAM subroutine library JAM_ReadMsgText(3)

JAM_ReadMsgText - Read a message´s text

#include <jamlib/jam.h>
int JAM_ReadMsgText(s_JamBase* Base_PS,
                    ulong      Offset_I,
                    ulong      Length_I,
                    uchar*     Buffer_PC);

Reads the body text associated with a message.

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.

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

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);

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

jamlib(3), JAM_ReadMsgHeader(3), JAM_Errno(3)
2002-11-07

Search for    or go to Top of page |  Section 3 |  Main Index

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