Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
JAM_CreateMB(3) 	     JAM subroutine library		 JAM_CreateMB(3)

NAME
     JAM_CreateMB - Create a new message base

SYNOPSIS
     #include <jamlib/jam.h>

     int JAM_CreateMB(uchar*	  Basename_PC,
		      ulong	  BaseMsg_I,
		      s_JamBase** NewBase_PPS);

DESCRIPTION
     Creates the necessary files for a new message base and writes a new message
     base header.

     If the message base already exists, its contents are destroyed.

   Arguments
     Basename_PC
	    The path and base filename of the new message base.

     BaseMsg_I
	    The  base message number (first message #) for the new message base.
	    This number is used when calculating new  messages'  unique  message
	    number. It should not be set to 0.

     NewBase_PPS
	    A pointer to a message base handle where the new message base handle
	    will  be  written.	On  error you must free(3) this memory if (*New-
	    Base_PPS) not NULL.

RETURN VALUE
     0	    if successful

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

     JAM_LOCK_FAILED
	    if the newly created message base can not be  locked.   See  JAM_Er-
	    rno(3)

     JAM_BAD_PARAM
	    if BaseMsg_I is 0 or NewBase_PPS is NULL

EXAMPLES
     int Result_I;

     Result_I = JAM_CreateMB("/some/where/mybase", 1, &Base_PS);
     if (Result_I)
       printf("JAM_CreateMB returned %d.\n", Result_I);

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_OpenMB(3), JAM_CloseMB(3), JAM_Errno(3)

				   2002-11-07			 JAM_CreateMB(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=JAM_CreateMB&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help