Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

misc.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

unsigned SwapShort (const unsigned &i)
 Swap two bytes of a word.

unsigned long SwapLong (const unsigned long &i)
 Swap byte order of a long.

void swap (int &a, int &b)
 Swap two integers a and b.

void SYS_SetSTDIOFocus (int focus)
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.

void swap int &    a,
int &    b
[inline, static]
 

Swap two integers a and b.

Definition at line 29 of file misc.h.

Referenced by GFX_LineX(), and GFX_PrintAt().

unsigned long SwapLong const unsigned long &    i [inline]
 

Swap byte order of a long.

Definition at line 17 of file misc.h.

unsigned SwapShort const unsigned &    i [inline]
 

Swap two bytes of a word.

Definition at line 8 of file misc.h.

void SYS_SetSTDIOFocus int    focus
 


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