/*
* Copyright (C) 2000-2001 Marc Wandschneider <mw@kiltdown.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation.
*
* For more information look at the file COPYRIGHT in this package
*
*/
#ifndef _MISCUTIL_H_
#define _MISCUTIL_H_
//
// These are just some random functions that people will hopefully find useful.
//
#ifdef K_DEBUG
/**
* This routine copies a string using localAlloc -- The CALLER is responsible
* for freeing it when they're done with it.
*/
#define copyString(ptr) copyStringImpl(ptr, __FILE__, __LINE__)
#else // K_DEBUG
#define copyString(ptr) copyStringImpl(ptr)
#endif // K_DEBUG
char *copyStringImpl(const char *ptr, const char * fn = 0, int ln = -1);
/**
* Prints the given count as a friendly string with bytes, kb, or mb as
* appropriate.
*/
void printByteCount(char *, int max, int valueToConvert);
#endif // _MISCUTIL_H_
syntax highlighted by Code2HTML, v. 0.9.1