/* TCHELP.H - Static Library Version (Clean) */
#ifndef TCHELP_H
#define TCHELP_H

#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#define MAX_L 10
#define MAX_S 100
#define MAX_LINKS 50
#define BUF_S 256
#define CONTENT_S 8192 

typedef struct {
    char name[64];
    char text[CONTENT_S];
} Section;

typedef struct {
    char key[10]; 
    char desc[128];
    Section sec[MAX_S];
    int sec_cnt;
} Lang;

typedef struct {
    char auth[64];
    char ver[32];
    Lang lang[MAX_L];
    int lang_cnt;
    char links[MAX_LINKS][64];
    int link_cnt;
} HelpData;

/* Reine C-Funktionen, kein __declspec nötig für Static Lib */
#ifdef __cplusplus
extern "C" {
#endif

    void TC_InitData(HelpData* d);
    int TC_LoadXML(const char* fname, HelpData* d);
    int TC_SaveXML(const char* fname, HelpData* d);

#ifdef __cplusplus
}
#endif

#endif