Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update code for tprintf #4306

Merged
merged 2 commits into from
Sep 3, 2024
Merged

Update code for tprintf #4306

merged 2 commits into from
Sep 3, 2024

Conversation

stweil
Copy link
Contributor

@stweil stweil commented Aug 25, 2024

  • Remove unused macro and update comment
  • Modernize and simplify the code

In a next step a std::ofstream which can be used instead of tprintf will be added.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Comment on lines +44 to +51
// It is possible to switch between stderr and debug_file output:
// tprintf("write to configured output\n");
// debug_file = "";
// tprintf("write to stderr\n");
// debug_file = "/tmp/log";
// tprintf("write to /tmp/log\n");
// debug_file = "";
// tprintf("write to stderr\n");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether such use cases exist. We could simplify the code further if we only allow setting the desired output once before the first use of tprintf.

@stweil stweil merged commit a63e7ec into tesseract-ocr:main Sep 3, 2024
6 of 7 checks passed
@stweil stweil deleted the tprintf branch September 3, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants