//This code is copyright Andrew Story (Kaslai/Aslai) All rights reserved.
//This and derivative works can be distributed as seen fit,
//so long as this notice remains unchanged and present

#pragma once
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>

struct stringList
{
    char* v;
    char* t;
    stringList* next, *parent;
    char* value;
    bool writing;
    stringList* last;
    stringList();
    ~stringList();
    void remAll();
    stringList* push( char* input, char* val );
    stringList& operator=( const char*);
    stringList& operator=( void*);



    bool operator==( char* a );
    bool operator==( stringList& a );
    char* operator*();
    operator char*();
    operator const char*();
    operator int();
    operator const int();
    operator int*();
    operator const int*();
    stringList& operator=( int a );

    bool notstring;
};

struct hashTable
{
    bool notstring;
    bool writing;
    stringList** data;
    int size;
    int load;
    int* track;
    stringList* placer;
    hashTable();
    hashTable(bool);
    ~hashTable();
    unsigned int hash( char* input);
    unsigned int hashMem( char* input, int len);
    void freeValue( char* input );
    void setValue( char* input, char* v = 0 );
    char* lookup( char* input );
    void resize( int newSize );
    stringList& operator[](const char*);
    hashTable& operator=( hashTable&);
    void constructor( bool notstrin );
};