Skip to content

Commit

Permalink
标准输出流作为输出时自动于末尾输出换行, 解决linux下终端显示问题
Browse files Browse the repository at this point in the history
  • Loading branch information
undefined-ux committed Dec 27, 2023
1 parent 8e119c9 commit 3ebdd34
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ int main(const int argc, char* argv[]) {

//destoryJsonVal(json);
if (args.input != stdin) { fclose(args.input); }
else fprintf(args.input, "\n");
if (args.output != stdout) {
fclose(args.output);
}

return 0;
}

Expand Down

0 comments on commit 3ebdd34

Please sign in to comment.