Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

misc.cpp File Reference

#include <stdlib.h>
#include <io.h>
#include <dos.h>
#include <math.h>
#include <stdio.h>
#include <assert.h>
#include <ctype.h>
#include "misc.h"

Go to the source code of this file.

Functions

char * ProgressBar (float v, float min, float max)
 Generate a text-mode progress bar.

void HexDump (void *mem, unsigned length)
 Generates a nice hexdump of a memory area.

void * loadfile (char *fn, unsigned *len)
 Load a file from disk.


Function Documentation

void HexDump void *    mem,
unsigned    length
 

Generates a nice hexdump of a memory area.

This function is most useful for debugging.

Parameters:
mem  pointer to memory to dump
length  how many bytes to dump

Definition at line 63 of file misc.cpp.

References src.

void* loadfile char *    fn,
unsigned *    len
 

Load a file from disk.

Parameters:
fn  filename to load
len  pointer to variable receiving the length of the loaded file. (may be NULL)
Returns:
pointer to malloc'd memory, or NULL if some error occured.

Definition at line 111 of file misc.cpp.

char* ProgressBar float    v,
float    min,
float    max
 

Generate a text-mode progress bar.

Parameters:
v  current value
min  minimum value
max  maximum value

Definition at line 33 of file misc.cpp.


Generated on Sun Aug 4 21:47:39 2002 for k/os mp3v2 by doxygen1.2.16