/* テスト */
/*
 * File: externs.h
 * Purpose: 
 * - Declare functions being used from multiple locations.
 *
 * Copyright (c) 2009 Paul Blay
 *
 * This work 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, version 2.
 */

#include <tchar.h> // TODO I don't want these here.
#include <wchar.h>
#include <cstdio>
#include <string>

// TODO I don't want these here.
#ifndef CP_UTF8 // 65001 is 'codepage' for UTF-8
#  define CP_UTF8 65001
#  define CP_ACP 0
#endif

/* utility.cpp */
bool _file_exists(const _TCHAR *fname);
std::wstring utf8_to_wstr(const std::string &utf8);
std::string wstr_to_str(const std::wstring &wstr, unsigned cp = CP_ACP);
void getprojdir(_TCHAR *projdir);

/* main-fltk.cpp */
void pbox(const _TCHAR *str);

/* angedit.cpp */
int opendatabase(_TCHAR *dbfile);

/* showtable.cpp */
int showtable(void);

extern tabledata tab; // global for 'current' table.
