/*------------------------------------------------------------------------------
 src/lib/dj/djMem.h
 
 Copyright (c) 2004-2006 Darby Johnston.
 All rights reserved.
 Use is subject to license terms.
------------------------------------------------------------------------------*/

#ifndef DJ_MEM_H
#define DJ_MEM_H
#include <djStr.h>

namespace dj {

// Constants.
//
static const int kilobyte = 1024;
static const int megabyte = 1024 * 1024;

// Functions.
//
void memCopy(const void *, void *, int size);
void memSet(uint8_t, void *, int size);
void memZero(void *, int size);
int memCompare(const void *, const void *, int size);

// Endian.
//
enum ENDIAN { MSB, LSB };
ENDIAN endian();
void endian(void *, int size, int wordSize);
void endian(const void *, void *, int size, int wordSize);

// Labels.
//
inline const StrList endianStr()
  { return StrList() + Str("MSB") + Str("LSB"); }

}

#endif
