[PR #2018] [MERGED] [FIX] Resolve output artifact on Linux/WSL (line clearing) #2819

Open
opened 2026-01-29 17:24:04 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/2018
Author: @niscollect
Created: 1/11/2026
Status: Merged
Merged: 1/17/2026
Merged by: @cfsmp3

Base: masterHead: fix/linux-display-artifact


📝 Commits (5)

  • e55b8eb [CLI] Fix output artifacts on Linux/WSL by clearing line on \r
  • c515578 docs: update changelog
  • 7159d0b fix: resolve merge conflict in changelog
  • 8fbfd68 style: fix formatting alignment
  • b7b1041 style: fix formatting alignment

📊 Changes

2 files changed (+14 additions, -8 deletions)

View changed files

📝 docs/CHANGES.TXT (+1 -0)
📝 src/lib_ccx/utility.c (+13 -8)

📄 Description

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.
  • I have mentioned this change in the changelog.

My familiarity with the project is as follows (check one):

  • I absolutely love CCExtractor, but have not contributed previously.

Fixes #2017

Description
This PR fixes a display artifact on Linux/WSL where the status message "Analyzing data in general mode" would not fully overwrite the previous text on the line, resulting in corrupted output like modetream instead of mode.

Technical Details
The mprint function in src/lib_ccx/utility.c was updated to explicitly send the clear-line sequence (\033[K) when handling a carriage return (\r) on Linux. This ensures the line is wiped clean before the new status is printed, matching the behavior expected on other platforms.

Verification

  • Tested on WSL (Ubuntu).
  • Confirmed that the "modetream" artifact is gone and the status line updates cleanly.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/2018 **Author:** [@niscollect](https://github.com/niscollect) **Created:** 1/11/2026 **Status:** ✅ Merged **Merged:** 1/17/2026 **Merged by:** [@cfsmp3](https://github.com/cfsmp3) **Base:** `master` ← **Head:** `fix/linux-display-artifact` --- ### 📝 Commits (5) - [`e55b8eb`](https://github.com/CCExtractor/ccextractor/commit/e55b8eb7640a2f39bf3fd91594b1bdfe0c88923c) [CLI] Fix output artifacts on Linux/WSL by clearing line on \r - [`c515578`](https://github.com/CCExtractor/ccextractor/commit/c515578e37b02b55c651867431be6c5217ce6c24) docs: update changelog - [`7159d0b`](https://github.com/CCExtractor/ccextractor/commit/7159d0b6d081066c43299ef051350dd9d58bdd3b) fix: resolve merge conflict in changelog - [`8fbfd68`](https://github.com/CCExtractor/ccextractor/commit/8fbfd68426f95e28dc9d65c7fa46cc0c1d93cd6d) style: fix formatting alignment - [`b7b1041`](https://github.com/CCExtractor/ccextractor/commit/b7b10419ec87ca7abcc8fcd67bc96f613705d47d) style: fix formatting alignment ### 📊 Changes **2 files changed** (+14 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `docs/CHANGES.TXT` (+1 -0) 📝 `src/lib_ccx/utility.c` (+13 -8) </details> ### 📄 Description **In raising this pull request, I confirm the following (please check boxes):** - [x] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md). - [x] I have checked that another pull request for this purpose does not exist. - [x] I have considered, and confirmed that this submission will be valuable to others. - [x] I accept that this submission may not be used, and the pull request closed at the will of the maintainer. - [x] I give this submission freely, and claim no ownership to its content. - [x] **I have mentioned this change in the [changelog](https://github.com/CCExtractor/ccextractor/blob/master/docs/CHANGES.TXT).** **My familiarity with the project is as follows (check one):** - [x] I absolutely love CCExtractor, but have not contributed previously. --- Fixes #2017 **Description** This PR fixes a display artifact on Linux/WSL where the status message "Analyzing data in general mode" would not fully overwrite the previous text on the line, resulting in corrupted output like `modetream` instead of `mode`. **Technical Details** The `mprint` function in `src/lib_ccx/utility.c` was updated to explicitly send the clear-line sequence (`\033[K`) when handling a carriage return (`\r`) on Linux. This ensures the line is wiped clean before the new status is printed, matching the behavior expected on other platforms. **Verification** - Tested on WSL (Ubuntu). - Confirmed that the "modetream" artifact is gone and the status line updates cleanly. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 17:24:04 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2819