Skip to content

Commit d28bc4e

Browse files
cfsmp3claude
andcommitted
style: Fix formatting issues in ocr.c and options.rs
- Use tabs for continuation indentation in C code (clang-format) - Remove extra trailing spaces in Rust code (rustfmt) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 8c586bc commit d28bc4e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/lib_ccx/ocr.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,9 @@ struct line_bounds
381381
* @return 0 on success, -1 on failure
382382
*/
383383
static int detect_text_lines(png_byte *alpha, unsigned char *indata,
384-
int w, int h,
385-
struct line_bounds **lines, int *num_lines,
386-
int min_gap)
384+
int w, int h,
385+
struct line_bounds **lines, int *num_lines,
386+
int min_gap)
387387
{
388388
if (!alpha || !indata || !lines || !num_lines || w <= 0 || h <= 0)
389389
return -1;
@@ -675,7 +675,7 @@ char *ocr_bitmap(void *arg, png_color *palette, png_byte *alpha, unsigned char *
675675

676676
// Extract line region from the grayscale image
677677
BOX *line_box = boxCreate(0, lines[line_idx].start_y,
678-
pixGetWidth(cpix_gs), line_h);
678+
pixGetWidth(cpix_gs), line_h);
679679
PIX *line_pix_raw = pixClipRectangle(cpix_gs, line_box, NULL);
680680
boxDestroy(&line_box);
681681

@@ -696,8 +696,8 @@ char *ocr_bitmap(void *arg, png_color *palette, png_byte *alpha, unsigned char *
696696
// Trim trailing whitespace from line
697697
size_t line_len = strlen(line_text);
698698
while (line_len > 0 && (line_text[line_len - 1] == '\n' ||
699-
line_text[line_len - 1] == '\r' ||
700-
line_text[line_len - 1] == ' '))
699+
line_text[line_len - 1] == '\r' ||
700+
line_text[line_len - 1] == ' '))
701701
{
702702
line_text[--line_len] = '\0';
703703
}

src/rust/lib_ccxr/src/common/options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ impl Default for Options {
589589
psm: 3,
590590
ocr_quantmode: 0, // No quantization - better OCR accuracy for DVB subtitles
591591
ocr_line_split: false, // Don't split images into lines by default
592-
ocr_blacklist: true, // Use character blacklist by default to prevent | vs I errors
592+
ocr_blacklist: true, // Use character blacklist by default to prevent | vs I errors
593593
mkvlang: Default::default(),
594594
analyze_video_stream: Default::default(),
595595
hardsubx_ocr_mode: Default::default(),

0 commit comments

Comments
 (0)