musrfit 1.10.0
mud.c File Reference
#include "mud.h"
#include <varargs.h>
Include dependency graph for mud.c:

Go to the source code of this file.

Functions

FILE * MUD_openInput (char *inFile)
 
FILE * MUD_openInOut (char *inFile)
 
FILE * MUD_openOutput (char *outFile)
 
void MUD_free (void *pMUD)
 
BOOL MUD_encode (BUF *pBuf, void *pMUD, MUD_IO_OPT io_opt)
 
void * MUD_decode (BUF *pBuf)
 
int MUD_getSize (void *pMUD)
 
void MUD_show (void *pMUD, MUD_IO_OPT io_opt)
 
void MUD_heads (void *pMUD, MUD_IO_OPT io_opt)
 
BOOL MUD_writeEnd (FILE *fout)
 
BOOL MUD_writeFile (FILE *fout, void *pMUD_head)
 
BOOL MUD_write (FILE *fout, void *pMUD, MUD_IO_OPT io_opt)
 
BOOL MUD_writeGrpStart (FILE *fout, MUD_SEC_GRP *pMUD_parentGrp, MUD_SEC_GRP *pMUD_grp, int numMems)
 
void addIndex (MUD_SEC_GRP *pMUD_grp, void *pMUD)
 
BOOL MUD_writeGrpMem (FILE *fout, MUD_SEC_GRP *pMUD_grp, void *pMUD)
 
BOOL MUD_writeGrpEnd (FILE *fout, MUD_SEC_GRP *pMUD_grp)
 
void * MUD_readFile (FILE *fin)
 
void * MUD_read (FILE *fin, MUD_IO_OPT io_opt)
 
UINT32 MUD_setSizes (void *pMUD)
 
MUD_SECMUD_peekCore (FILE *fin)
 
void * MUD_search (va_alist)
 
int MUD_fseek (va_alist)
 
MUD_SECfseekNext (FILE *fio, MUD_SEC_GRP *pMUD_parent, UINT32 secID, UINT32 instanceID)
 
int MUD_fseekFirst (FILE *fio)
 
void MUD_add (void **ppMUD_head, void *pMUD_new)
 
int MUD_totSize (void *pMUD)
 
void MUD_addToGroup (MUD_SEC_GRP *pMUD_grp, void *pMUD)
 
void MUD_assignCore (MUD_SEC *pMUD1, MUD_SEC *pMUD2)
 
int MUD_CORE_proc (MUD_OPT op, BUF *pBuf, MUD_SEC *pMUD)
 
int MUD_INDEX_proc (MUD_OPT op, BUF *pBuf, MUD_INDEX *pMUD)
 

Function Documentation

◆ addIndex()

void addIndex ( MUD_SEC_GRP * pMUD_grp,
void * pMUD )

◆ fseekNext()

◆ MUD_add()

void MUD_add ( void ** ppMUD_head,
void * pMUD_new )

Definition at line 898 of file mud.c.

References _MUD_SEC::core, NULL, and MUD_CORE::pNext.

Referenced by _ANSI_ARGS_(), and MUD_read().

◆ MUD_addToGroup()

◆ MUD_assignCore()

void MUD_assignCore ( MUD_SEC * pMUD1,
MUD_SEC * pMUD2 )

Definition at line 944 of file mud.c.

References _MUD_SEC::core, MUD_CORE_proc(), MUD_GET_SIZE, NULL, and MUD_CORE::size.

Referenced by _ANSI_ARGS_(), and MUD_decode().

◆ MUD_CORE_proc()

◆ MUD_decode()

void * MUD_decode ( BUF * pBuf)

◆ MUD_encode()

BOOL MUD_encode ( BUF * pBuf,
void * pMUD,
MUD_IO_OPT io_opt )

◆ MUD_free()

◆ MUD_fseek()

◆ MUD_fseekFirst()

int MUD_fseekFirst ( FILE * fio)

Definition at line 884 of file mud.c.

References MUD_CORE_proc(), MUD_GET_SIZE, MUD_SEC_FIXED_proc(), and NULL.

Referenced by _ANSI_ARGS_().

◆ MUD_getSize()

int MUD_getSize ( void * pMUD)

◆ MUD_heads()

void MUD_heads ( void * pMUD,
MUD_IO_OPT io_opt )

Definition at line 225 of file mud.c.

References MUD_ALL, MUD_CORE_proc(), MUD_HEADS, MUD_heads(), MUD_SEC_EOF_ID, MUD_SEC_GRP_ID, MUD_secID, and NULL.

Referenced by _ANSI_ARGS_(), and MUD_heads().

◆ MUD_INDEX_proc()

◆ MUD_openInOut()

FILE * MUD_openInOut ( char * inFile)

Definition at line 55 of file mud.c.

References NULL.

Referenced by _ANSI_ARGS_(), and MUD_openReadWrite().

◆ MUD_openInput()

FILE * MUD_openInput ( char * inFile)

Definition at line 41 of file mud.c.

References NULL.

Referenced by _ANSI_ARGS_(), and MUD_openRead().

◆ MUD_openOutput()

FILE * MUD_openOutput ( char * outFile)

Definition at line 69 of file mud.c.

References NULL.

Referenced by _ANSI_ARGS_(), MUD_closeWriteFile(), and MUD_openWrite().

◆ MUD_peekCore()

MUD_SEC * MUD_peekCore ( FILE * fin)

Definition at line 593 of file mud.c.

References BUF::buf, MUD_CORE_proc(), MUD_DECODE, MUD_GET_SIZE, NULL, and zalloc.

Referenced by _ANSI_ARGS_(), and fseekNext().

◆ MUD_read()

◆ MUD_readFile()

void * MUD_readFile ( FILE * fin)

Definition at line 398 of file mud.c.

References MUD_ALL, and MUD_read().

Referenced by _ANSI_ARGS_(), MUD_openRead(), and MUD_openReadWrite().

◆ MUD_search()

◆ MUD_setSizes()

◆ MUD_show()

void MUD_show ( void * pMUD,
MUD_IO_OPT io_opt )

◆ MUD_totSize()

int MUD_totSize ( void * pMUD)

Definition at line 913 of file mud.c.

References MUD_SEC_GRP_ID, MUD_secID, and MUD_size.

Referenced by _ANSI_ARGS_(), MUD_addToGroup(), MUD_writeGrpEnd(), and MUD_writeGrpMem().

◆ MUD_write()

BOOL MUD_write ( FILE * fout,
void * pMUD,
MUD_IO_OPT io_opt )

Definition at line 283 of file mud.c.

References _free, BUF::buf, FALSE, MUD_encode(), NULL, BUF::size, and TRUE.

Referenced by _ANSI_ARGS_(), MUD_writeEnd(), MUD_writeFile(), MUD_writeGrpEnd(), and MUD_writeGrpMem().

◆ MUD_writeEnd()

BOOL MUD_writeEnd ( FILE * fout)

Definition at line 250 of file mud.c.

References FALSE, MUD_free(), MUD_new(), MUD_ONE, MUD_SEC_EOF_ID, MUD_write(), NULL, and TRUE.

Referenced by _ANSI_ARGS_(), and MUD_writeFile().

◆ MUD_writeFile()

BOOL MUD_writeFile ( FILE * fout,
void * pMUD_head )

Definition at line 271 of file mud.c.

References FALSE, MUD_ALL, MUD_write(), and MUD_writeEnd().

Referenced by _ANSI_ARGS_(), MUD_closeWrite(), and MUD_closeWriteFile().

◆ MUD_writeGrpEnd()

BOOL MUD_writeGrpEnd ( FILE * fout,
MUD_SEC_GRP * pMUD_grp )

◆ MUD_writeGrpMem()

BOOL MUD_writeGrpMem ( FILE * fout,
MUD_SEC_GRP * pMUD_grp,
void * pMUD )

◆ MUD_writeGrpStart()

BOOL MUD_writeGrpStart ( FILE * fout,
MUD_SEC_GRP * pMUD_parentGrp,
MUD_SEC_GRP * pMUD_grp,
int numMems )