17#include <console-util.h>
35 char configpath[4096];
38 snprintf(configpath,
sizeof(configpath),
"/tmp/libbase_extdef.txt");
41 wchar_t tmpw[MAX_PATH] = L
"";
42 DWORD n = GetTempPathW((DWORD)(
sizeof(tmpw) /
sizeof(tmpw[0])), tmpw);
44 if (n > 0 && n < (DWORD)(
sizeof(tmpw) /
sizeof(tmpw[0])))
46 char tmpu8[MAX_PATH * 4] = {0};
47 int m = WideCharToMultiByte(CP_UTF8, 0, tmpw, -1, tmpu8, (
int)
sizeof(tmpu8), NULL, NULL);
49 snprintf(configpath,
sizeof(configpath),
"%slibbase_extdef.txt", tmpu8);
54 printf(
"configpath: %s\n", configpath);
55 printf(
"Processing will be extended if defines.\n");
56 printf(
" e.g. echo \"sample_func liboverride override_func\" > \"%s\"\n", configpath);
58 printf(
" rm \"%s\"\n\n", configpath);
60 printf(
" del \"%s\"\n\n", configpath);
63 printf(
"--- funcman info ---\n");
65 printf(
"rtc: %d\n\n", rtc);
71 fprintf(stderr,
"func failed (sample_func(1, 2, &result))\n");
75 printf(
"result: %d\n", result);
ベースライブラリ (動的リンク用) のヘッダーファイル。
BASE_EXPORT void BASE_API console_output(const char *format,...)
printf と同じ書式でコンソールに出力します。
BASE_EXPORT int BASE_API sample_func(const int a, const int b, int *result)
計算処理を行います。
BASE_EXPORT int BASE_API funcman_info_libbase(void)
libbase が管理する funcman_object ポインタ配列の内容を標準出力に表示します。
int main(void)
メインエントリポイント。