# HG changeset patch # User Matti Hamalainen # Date 1583852482 -7200 # Node ID 11eb7c30889edf8441057cabc94ef098a38eaa5f # Parent 4426bbf3264b26c1537e4fe64c547b905bbff5de Adjust to fit new th_ioctx API. diff -r 4426bbf3264b -r 11eb7c30889e main.c --- a/main.c Sat Feb 29 12:23:53 2020 +0200 +++ b/main.c Tue Mar 10 17:01:22 2020 +0200 @@ -1278,7 +1278,7 @@ goto error; } - if ((ctx = th_io_new(&th_stdio_io_ops, setConfigFile)) == NULL) + if ((ctx = th_io_new(&th_stdio_io_ops, setConfigFile, "w")) == NULL) { printMsgQ(currWin, "Could not initialize I/O context for configuration file writing!\n"); goto error; @@ -1293,11 +1293,11 @@ S_IRUSR | S_IWUSR #endif )) == -1 || - (ctx->data = (void *) fdopen(cfgfd, "w")) == NULL) + (ctx->data = (void *) fdopen(cfgfd, ctx->mode)) == NULL) { int err = th_get_error(); - printMsgQ(currWin, "Could not create configuration to file '%s', %d: %s\n", - ctx->filename, err, th_error_str(err)); + printMsgQ(currWin, "Could not create configuration to file '%s': %s\n", + ctx->filename, th_error_str(err)); goto error; }