# HG changeset patch # User Matti Hamalainen # Date 1353004087 -7200 # Node ID de1af9652fef17f58742eb22280807240e0d7eb8 # Parent 6e5789cbb4d496c32fc63baf141d55dabc541bfb Update to conform to changes in th-libs ioctx API. diff -r 6e5789cbb4d4 -r de1af9652fef main.c --- a/main.c Thu Nov 15 20:27:44 2012 +0200 +++ b/main.c Thu Nov 15 20:28:07 2012 +0200 @@ -397,6 +397,21 @@ } +void nn_ioctx_errfunc(th_ioctx_t *ctx, int err, const char *msg) +{ + (void) err; + errorMsg("['%s' @ #%d]: %s", + ctx->filename, ctx->line, msg); +} + + +void nn_ioctx_msgfunc(th_ioctx_t *ctx, const char *msg) +{ + (void) ctx; + printMsgConst(NULL, LOG_STAMP | LOG_WINDOW | LOG_FILE, msg); +} + + BOOL checkNameList(qlist_t *list, const char *name) { qlist_t *node; @@ -1011,7 +1026,7 @@ int cfgfd = -1; #endif - if (!th_ioctx_init(&ctx, setConfigFile)) + if (!th_ioctx_init(&ctx, setConfigFile, nn_ioctx_errfunc, nn_ioctx_msgfunc)) { printMsgQ(currWin, "Could not initialize I/O context for configuration file writing!\n"); goto error; @@ -1852,7 +1867,7 @@ THMSG(0, "Reading configuration from '%s'.\n", setConfigFile); - if (th_ioctx_open(&ctx, setConfigFile, "r")) + if (th_ioctx_open(&ctx, setConfigFile, "r", nn_ioctx_errfunc, nn_ioctx_msgfunc)) { th_cfg_read(&ctx, cfg); th_ioctx_close(&ctx);