Memory File Handling

  #include <vv_sys.h>

#include <vv_wnkt.h>

All except as noted below

mf_browse ( )

   
int mf_browse (WINDOWPTR wnp)

Allows the user to view and scroll a memory file in a window

void mf_clr (MFILEPTR mfp)

Clears the contents of the memory file (i.e., frees the MFLINE structures associated with the memory file)

int mf_colq (MFILEPTR mfp)

Returns the number of columns of the longest row in the memory file

MFILEPTR mf_def (int maxrows, int maxcols)

Allocates and initializes a memory file

void mf_disp (WINDOWPTR wnp)

Displays a memory file in a window that is already set on the screen

void mf_free (MFILEPTR mfp)

Frees all memory allocated for a memory file

int mf_kwdload (UCHAR *kwdp, MFILEPTR mfp)

Loads the specified keyworded section into the memory file

int mf_kwdset (UCHAR *kwdp, MFILEPTR mfp)

Sets the memory file to operate within the section marked by the specified keyword

int mf_kwdunload (UCHAR *kwdp, MFILEPTR mfp)

Deletes the specified keyworded section (s) from the memory file

int mf_print (MFILEPTR i)

Writes the character contents of a memory file to the printer

int mf_rd (UCHAR *filespec, MFILEPTR mfp)

Reads an ASCII file from disk into a memory file

void mf_rowdel (int mf_row, MFILEPTR mfp)

Deletes a row from the memory file

int mf_rowins (UCHAR *stp, int mf_row, MFILEPTR mfp)

Inserts a new row into the memory file

int mf_rowlen (int mf_row, MFILEPTR mfp)

Returns the number of characters in the specified memory file row

UCHAR * mf_rowp (int mf_row, MFILEPTR mfp)

Returns a pointer to the string in the specified row of the memory file

int mf_rowq (MFILEPTR mfp)

Returns the number of filled rows in the memory file

int mf_rowrpl (UCHAR *stp, int mf_row, MFILEPTR mfp)

Replaces the string in the specified row of the memory file

void mf_rowtxt (UCHAR *stp, int mf_row, MFILEPTR mfp)

Copies the contents of the specified memory file row to a buffer

int mf_search (UCHAR *stp, int beg_row, MFILEPTR mfp)

Searches a memory file for the specified string

int mf_size (UCHAR *filespec, int *rowq, int *colq)

Reads an ASCII keyworded file from disk to determine how many rows and columns are required for a call to mf_def ( )

int mf_sort (UCHAR *kwdp, MFILEPTR mfp)

Sorts a memory file

int mf_txtrow (UCHAR *stp, MFILEPTR mfp)

Returns the row number corresponding to the specified string in a memory file

int mf_wr (UCHAR *filespec, UCHAR *dmode, MFILEPTR mfp)

Writes a memory file to a disk file

void smf_opt (int options, int state, MFILEPTR mfp)

Sets the options to the specified state for the memory file



Home Contents Previous Next