#ifndef _MISC_H
#define _MISC_H

#include "mytypes.h"
#include "list.h"
#include <string.h>

class StrKey
{
public:
  StrKey(char *ptr) { str = ptr; }
  ~StrKey() {}

  int operator==(StrKey &key) { return strcmp(str, key.str) == 0; }
  unsigned long HashValue() {
    unsigned long hash = 0;
    for (char *ptr = str; *ptr; ++ptr) hash = (hash<<1)^*ptr;
    return hash;
  }

  char *str;
};

void AddMessage(List<charp> &l, char *format, ...);

#endif
