Skip to content

Commit 4b3bbd9

Browse files
committed
Remove EXTERN macro
Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent ac999b2 commit 4b3bbd9

File tree

6 files changed

+55
-67
lines changed

6 files changed

+55
-67
lines changed

src/textord/drawtord.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@
2929
#define TO_WIN_NAME "Textord"
3030
//title of window
3131

32-
#define EXTERN
33-
34-
EXTERN BOOL_VAR (textord_show_fixed_cuts, false,
32+
BOOL_VAR (textord_show_fixed_cuts, false,
3533
"Draw fixed pitch cell boundaries");
3634

37-
EXTERN ScrollView* to_win = nullptr;
35+
ScrollView* to_win = nullptr;
3836

3937
/**********************************************************************
4038
* create_to_win

src/textord/fpchop.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@
2828
#include "config_auto.h"
2929
#endif
3030

31-
#define EXTERN
32-
33-
EXTERN INT_VAR (textord_fp_chop_error, 2,
31+
INT_VAR (textord_fp_chop_error, 2,
3432
"Max allowed bending of chop cells");
35-
EXTERN double_VAR (textord_fp_chop_snap, 0.5,
33+
double_VAR (textord_fp_chop_snap, 0.5,
3634
"Max distance of chop pt from vertex");
3735

3836
ELISTIZE(C_OUTLINE_FRAG)

src/textord/oldbasel.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@
3434

3535
#include <algorithm>
3636

37-
#define EXTERN
38-
3937
static BOOL_VAR (textord_really_old_xheight, false,
4038
"Use original wiseowl xheight");
41-
EXTERN BOOL_VAR (textord_oldbl_debug, false, "Debug old baseline generation");
39+
BOOL_VAR (textord_oldbl_debug, false, "Debug old baseline generation");
4240
static BOOL_VAR (textord_debug_baselines, false, "Debug baseline generation");
4341
static BOOL_VAR (textord_oldbl_paradef, true, "Use para default mechanism");
4442
static BOOL_VAR (textord_oldbl_split_splines, true, "Split stepped splines");

src/textord/topitch.cpp

+9-11
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,23 @@
3434

3535
#include <memory>
3636

37-
#define EXTERN
38-
3937
static BOOL_VAR (textord_all_prop, false, "All doc is proportial text");
40-
EXTERN BOOL_VAR (textord_debug_pitch_test, false,
38+
BOOL_VAR (textord_debug_pitch_test, false,
4139
"Debug on fixed pitch test");
4240
static BOOL_VAR (textord_disable_pitch_test, false,
4341
"Turn off dp fixed pitch algorithm");
44-
EXTERN BOOL_VAR (textord_fast_pitch_test, false,
42+
BOOL_VAR (textord_fast_pitch_test, false,
4543
"Do even faster pitch algorithm");
46-
EXTERN BOOL_VAR (textord_debug_pitch_metric, false,
44+
BOOL_VAR (textord_debug_pitch_metric, false,
4745
"Write full metric stuff");
48-
EXTERN BOOL_VAR (textord_show_row_cuts, false, "Draw row-level cuts");
49-
EXTERN BOOL_VAR (textord_show_page_cuts, false, "Draw page-level cuts");
50-
EXTERN BOOL_VAR (textord_pitch_cheat, false,
46+
BOOL_VAR (textord_show_row_cuts, false, "Draw row-level cuts");
47+
BOOL_VAR (textord_show_page_cuts, false, "Draw page-level cuts");
48+
BOOL_VAR (textord_pitch_cheat, false,
5149
"Use correct answer for fixed/prop");
52-
EXTERN BOOL_VAR (textord_blockndoc_fixed, false,
50+
BOOL_VAR (textord_blockndoc_fixed, false,
5351
"Attempt whole doc/block fixed pitch");
54-
EXTERN double_VAR (textord_projection_scale, 0.200, "Ding rate for mid-cuts");
55-
EXTERN double_VAR (textord_balance_factor, 1.0,
52+
double_VAR (textord_projection_scale, 0.200, "Ding rate for mid-cuts");
53+
double_VAR (textord_balance_factor, 1.0,
5654
"Ding rate for unbalanced char cells");
5755

5856
#define BLOCK_STATS_CLUSTERS 10

src/textord/tovars.cpp

+38-40
Original file line numberDiff line numberDiff line change
@@ -20,64 +20,62 @@
2020
#include "tovars.h"
2121
#include "params.h"
2222

23-
#define EXTERN
24-
25-
EXTERN BOOL_VAR (textord_show_initial_words, false, "Display separate words");
26-
EXTERN BOOL_VAR (textord_show_new_words, false, "Display separate words");
27-
EXTERN BOOL_VAR (textord_show_fixed_words, false,
23+
BOOL_VAR (textord_show_initial_words, false, "Display separate words");
24+
BOOL_VAR (textord_show_new_words, false, "Display separate words");
25+
BOOL_VAR (textord_show_fixed_words, false,
2826
"Display forced fixed pitch words");
29-
EXTERN BOOL_VAR (textord_blocksall_fixed, false, "Moan about prop blocks");
30-
EXTERN BOOL_VAR (textord_blocksall_prop, false,
27+
BOOL_VAR (textord_blocksall_fixed, false, "Moan about prop blocks");
28+
BOOL_VAR (textord_blocksall_prop, false,
3129
"Moan about fixed pitch blocks");
32-
EXTERN BOOL_VAR (textord_blocksall_testing, false, "Dump stats when moaning");
33-
EXTERN BOOL_VAR (textord_test_mode, false, "Do current test");
34-
EXTERN INT_VAR (textord_dotmatrix_gap, 3,
30+
BOOL_VAR (textord_blocksall_testing, false, "Dump stats when moaning");
31+
BOOL_VAR (textord_test_mode, false, "Do current test");
32+
INT_VAR (textord_dotmatrix_gap, 3,
3533
"Max pixel gap for broken pixed pitch");
36-
EXTERN INT_VAR (textord_debug_block, 0, "Block to do debug on");
37-
EXTERN INT_VAR (textord_pitch_range, 2, "Max range test on pitch");
38-
EXTERN double_VAR (textord_wordstats_smooth_factor, 0.05,
34+
INT_VAR (textord_debug_block, 0, "Block to do debug on");
35+
INT_VAR (textord_pitch_range, 2, "Max range test on pitch");
36+
double_VAR (textord_wordstats_smooth_factor, 0.05,
3937
"Smoothing gap stats");
40-
EXTERN double_VAR (textord_width_smooth_factor, 0.10,
38+
double_VAR (textord_width_smooth_factor, 0.10,
4139
"Smoothing width stats");
42-
EXTERN double_VAR (textord_words_width_ile, 0.4,
40+
double_VAR (textord_words_width_ile, 0.4,
4341
"Ile of blob widths for space est");
44-
EXTERN double_VAR (textord_words_maxspace, 4.0, "Multiple of xheight");
45-
EXTERN double_VAR (textord_words_default_maxspace, 3.5,
42+
double_VAR (textord_words_maxspace, 4.0, "Multiple of xheight");
43+
double_VAR (textord_words_default_maxspace, 3.5,
4644
"Max believable third space");
47-
EXTERN double_VAR (textord_words_default_minspace, 0.6,
45+
double_VAR (textord_words_default_minspace, 0.6,
4846
"Fraction of xheight");
49-
EXTERN double_VAR (textord_words_min_minspace, 0.3, "Fraction of xheight");
50-
EXTERN double_VAR (textord_words_default_nonspace, 0.2,
47+
double_VAR (textord_words_min_minspace, 0.3, "Fraction of xheight");
48+
double_VAR (textord_words_default_nonspace, 0.2,
5149
"Fraction of xheight");
52-
EXTERN double_VAR(textord_words_initial_lower, 0.25,
50+
double_VAR(textord_words_initial_lower, 0.25,
5351
"Max initial cluster size");
54-
EXTERN double_VAR (textord_words_initial_upper, 0.15,
52+
double_VAR (textord_words_initial_upper, 0.15,
5553
"Min initial cluster spacing");
56-
EXTERN double_VAR (textord_words_minlarge, 0.75,
54+
double_VAR (textord_words_minlarge, 0.75,
5755
"Fraction of valid gaps needed");
58-
EXTERN double_VAR (textord_words_pitchsd_threshold, 0.040,
56+
double_VAR (textord_words_pitchsd_threshold, 0.040,
5957
"Pitch sync threshold");
60-
EXTERN double_VAR (textord_words_def_fixed, 0.016,
58+
double_VAR (textord_words_def_fixed, 0.016,
6159
"Threshold for definite fixed");
62-
EXTERN double_VAR (textord_words_def_prop, 0.090,
60+
double_VAR (textord_words_def_prop, 0.090,
6361
"Threshold for definite prop");
64-
EXTERN INT_VAR (textord_words_veto_power, 5,
62+
INT_VAR (textord_words_veto_power, 5,
6563
"Rows required to outvote a veto");
66-
EXTERN double_VAR (textord_pitch_rowsimilarity, 0.08,
64+
double_VAR (textord_pitch_rowsimilarity, 0.08,
6765
"Fraction of xheight for sameness");
68-
EXTERN BOOL_VAR (textord_pitch_scalebigwords, false,
66+
BOOL_VAR (textord_pitch_scalebigwords, false,
6967
"Scale scores on big words");
70-
EXTERN double_VAR(words_initial_lower, 0.5, "Max initial cluster size");
71-
EXTERN double_VAR (words_initial_upper, 0.15, "Min initial cluster spacing");
72-
EXTERN double_VAR (words_default_prop_nonspace, 0.25, "Fraction of xheight");
73-
EXTERN double_VAR (words_default_fixed_space, 0.75, "Fraction of xheight");
74-
EXTERN double_VAR (words_default_fixed_limit, 0.6, "Allowed size variance");
75-
EXTERN double_VAR (textord_words_definite_spread, 0.30,
68+
double_VAR(words_initial_lower, 0.5, "Max initial cluster size");
69+
double_VAR (words_initial_upper, 0.15, "Min initial cluster spacing");
70+
double_VAR (words_default_prop_nonspace, 0.25, "Fraction of xheight");
71+
double_VAR (words_default_fixed_space, 0.75, "Fraction of xheight");
72+
double_VAR (words_default_fixed_limit, 0.6, "Allowed size variance");
73+
double_VAR (textord_words_definite_spread, 0.30,
7674
"Non-fuzzy spacing region");
77-
EXTERN double_VAR (textord_spacesize_ratiofp, 2.8,
75+
double_VAR (textord_spacesize_ratiofp, 2.8,
7876
"Min ratio space/nonspace");
79-
EXTERN double_VAR (textord_spacesize_ratioprop, 2.0,
77+
double_VAR (textord_spacesize_ratioprop, 2.0,
8078
"Min ratio space/nonspace");
81-
EXTERN double_VAR (textord_fpiqr_ratio, 1.5, "Pitch IQR/Gap IQR threshold");
82-
EXTERN double_VAR (textord_max_pitch_iqr, 0.20, "Xh fraction noise in pitch");
83-
EXTERN double_VAR (textord_fp_min_width, 0.5, "Min width of decent blobs");
79+
double_VAR (textord_fpiqr_ratio, 1.5, "Pitch IQR/Gap IQR threshold");
80+
double_VAR (textord_max_pitch_iqr, 0.20, "Xh fraction noise in pitch");
81+
double_VAR (textord_fp_min_width, 0.5, "Min width of decent blobs");

src/textord/wordseg.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@
3333
#include "config_auto.h"
3434
#endif
3535

36-
#define EXTERN
37-
38-
EXTERN BOOL_VAR(textord_fp_chopping, true, "Do fixed pitch chopping");
39-
EXTERN BOOL_VAR(textord_force_make_prop_words, false,
36+
BOOL_VAR(textord_fp_chopping, true, "Do fixed pitch chopping");
37+
BOOL_VAR(textord_force_make_prop_words, false,
4038
"Force proportional word segmentation on all rows");
41-
EXTERN BOOL_VAR(textord_chopper_test, false,
39+
BOOL_VAR(textord_chopper_test, false,
4240
"Chopper is being tested.");
4341

4442
#define BLOCK_STATS_CLUSTERS 10

0 commit comments

Comments
 (0)