Skip to content

Commit

Permalink
Remove EXTERN macro
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed May 26, 2019
1 parent ac999b2 commit 4b3bbd9
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 67 deletions.
6 changes: 2 additions & 4 deletions src/textord/drawtord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@
#define TO_WIN_NAME "Textord"
//title of window

#define EXTERN

EXTERN BOOL_VAR (textord_show_fixed_cuts, false,
BOOL_VAR (textord_show_fixed_cuts, false,
"Draw fixed pitch cell boundaries");

EXTERN ScrollView* to_win = nullptr;
ScrollView* to_win = nullptr;

/**********************************************************************
* create_to_win
Expand Down
6 changes: 2 additions & 4 deletions src/textord/fpchop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@
#include "config_auto.h"
#endif

#define EXTERN

EXTERN INT_VAR (textord_fp_chop_error, 2,
INT_VAR (textord_fp_chop_error, 2,
"Max allowed bending of chop cells");
EXTERN double_VAR (textord_fp_chop_snap, 0.5,
double_VAR (textord_fp_chop_snap, 0.5,
"Max distance of chop pt from vertex");

ELISTIZE(C_OUTLINE_FRAG)
Expand Down
4 changes: 1 addition & 3 deletions src/textord/oldbasel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@

#include <algorithm>

#define EXTERN

static BOOL_VAR (textord_really_old_xheight, false,
"Use original wiseowl xheight");
EXTERN BOOL_VAR (textord_oldbl_debug, false, "Debug old baseline generation");
BOOL_VAR (textord_oldbl_debug, false, "Debug old baseline generation");
static BOOL_VAR (textord_debug_baselines, false, "Debug baseline generation");
static BOOL_VAR (textord_oldbl_paradef, true, "Use para default mechanism");
static BOOL_VAR (textord_oldbl_split_splines, true, "Split stepped splines");
Expand Down
20 changes: 9 additions & 11 deletions src/textord/topitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,23 @@

#include <memory>

#define EXTERN

static BOOL_VAR (textord_all_prop, false, "All doc is proportial text");
EXTERN BOOL_VAR (textord_debug_pitch_test, false,
BOOL_VAR (textord_debug_pitch_test, false,
"Debug on fixed pitch test");
static BOOL_VAR (textord_disable_pitch_test, false,
"Turn off dp fixed pitch algorithm");
EXTERN BOOL_VAR (textord_fast_pitch_test, false,
BOOL_VAR (textord_fast_pitch_test, false,
"Do even faster pitch algorithm");
EXTERN BOOL_VAR (textord_debug_pitch_metric, false,
BOOL_VAR (textord_debug_pitch_metric, false,
"Write full metric stuff");
EXTERN BOOL_VAR (textord_show_row_cuts, false, "Draw row-level cuts");
EXTERN BOOL_VAR (textord_show_page_cuts, false, "Draw page-level cuts");
EXTERN BOOL_VAR (textord_pitch_cheat, false,
BOOL_VAR (textord_show_row_cuts, false, "Draw row-level cuts");
BOOL_VAR (textord_show_page_cuts, false, "Draw page-level cuts");
BOOL_VAR (textord_pitch_cheat, false,
"Use correct answer for fixed/prop");
EXTERN BOOL_VAR (textord_blockndoc_fixed, false,
BOOL_VAR (textord_blockndoc_fixed, false,
"Attempt whole doc/block fixed pitch");
EXTERN double_VAR (textord_projection_scale, 0.200, "Ding rate for mid-cuts");
EXTERN double_VAR (textord_balance_factor, 1.0,
double_VAR (textord_projection_scale, 0.200, "Ding rate for mid-cuts");
double_VAR (textord_balance_factor, 1.0,
"Ding rate for unbalanced char cells");

#define BLOCK_STATS_CLUSTERS 10
Expand Down
78 changes: 38 additions & 40 deletions src/textord/tovars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,64 +20,62 @@
#include "tovars.h"
#include "params.h"

#define EXTERN

EXTERN BOOL_VAR (textord_show_initial_words, false, "Display separate words");
EXTERN BOOL_VAR (textord_show_new_words, false, "Display separate words");
EXTERN BOOL_VAR (textord_show_fixed_words, false,
BOOL_VAR (textord_show_initial_words, false, "Display separate words");
BOOL_VAR (textord_show_new_words, false, "Display separate words");
BOOL_VAR (textord_show_fixed_words, false,
"Display forced fixed pitch words");
EXTERN BOOL_VAR (textord_blocksall_fixed, false, "Moan about prop blocks");
EXTERN BOOL_VAR (textord_blocksall_prop, false,
BOOL_VAR (textord_blocksall_fixed, false, "Moan about prop blocks");
BOOL_VAR (textord_blocksall_prop, false,
"Moan about fixed pitch blocks");
EXTERN BOOL_VAR (textord_blocksall_testing, false, "Dump stats when moaning");
EXTERN BOOL_VAR (textord_test_mode, false, "Do current test");
EXTERN INT_VAR (textord_dotmatrix_gap, 3,
BOOL_VAR (textord_blocksall_testing, false, "Dump stats when moaning");
BOOL_VAR (textord_test_mode, false, "Do current test");
INT_VAR (textord_dotmatrix_gap, 3,
"Max pixel gap for broken pixed pitch");
EXTERN INT_VAR (textord_debug_block, 0, "Block to do debug on");
EXTERN INT_VAR (textord_pitch_range, 2, "Max range test on pitch");
EXTERN double_VAR (textord_wordstats_smooth_factor, 0.05,
INT_VAR (textord_debug_block, 0, "Block to do debug on");
INT_VAR (textord_pitch_range, 2, "Max range test on pitch");
double_VAR (textord_wordstats_smooth_factor, 0.05,
"Smoothing gap stats");
EXTERN double_VAR (textord_width_smooth_factor, 0.10,
double_VAR (textord_width_smooth_factor, 0.10,
"Smoothing width stats");
EXTERN double_VAR (textord_words_width_ile, 0.4,
double_VAR (textord_words_width_ile, 0.4,
"Ile of blob widths for space est");
EXTERN double_VAR (textord_words_maxspace, 4.0, "Multiple of xheight");
EXTERN double_VAR (textord_words_default_maxspace, 3.5,
double_VAR (textord_words_maxspace, 4.0, "Multiple of xheight");
double_VAR (textord_words_default_maxspace, 3.5,
"Max believable third space");
EXTERN double_VAR (textord_words_default_minspace, 0.6,
double_VAR (textord_words_default_minspace, 0.6,
"Fraction of xheight");
EXTERN double_VAR (textord_words_min_minspace, 0.3, "Fraction of xheight");
EXTERN double_VAR (textord_words_default_nonspace, 0.2,
double_VAR (textord_words_min_minspace, 0.3, "Fraction of xheight");
double_VAR (textord_words_default_nonspace, 0.2,
"Fraction of xheight");
EXTERN double_VAR(textord_words_initial_lower, 0.25,
double_VAR(textord_words_initial_lower, 0.25,
"Max initial cluster size");
EXTERN double_VAR (textord_words_initial_upper, 0.15,
double_VAR (textord_words_initial_upper, 0.15,
"Min initial cluster spacing");
EXTERN double_VAR (textord_words_minlarge, 0.75,
double_VAR (textord_words_minlarge, 0.75,
"Fraction of valid gaps needed");
EXTERN double_VAR (textord_words_pitchsd_threshold, 0.040,
double_VAR (textord_words_pitchsd_threshold, 0.040,
"Pitch sync threshold");
EXTERN double_VAR (textord_words_def_fixed, 0.016,
double_VAR (textord_words_def_fixed, 0.016,
"Threshold for definite fixed");
EXTERN double_VAR (textord_words_def_prop, 0.090,
double_VAR (textord_words_def_prop, 0.090,
"Threshold for definite prop");
EXTERN INT_VAR (textord_words_veto_power, 5,
INT_VAR (textord_words_veto_power, 5,
"Rows required to outvote a veto");
EXTERN double_VAR (textord_pitch_rowsimilarity, 0.08,
double_VAR (textord_pitch_rowsimilarity, 0.08,
"Fraction of xheight for sameness");
EXTERN BOOL_VAR (textord_pitch_scalebigwords, false,
BOOL_VAR (textord_pitch_scalebigwords, false,
"Scale scores on big words");
EXTERN double_VAR(words_initial_lower, 0.5, "Max initial cluster size");
EXTERN double_VAR (words_initial_upper, 0.15, "Min initial cluster spacing");
EXTERN double_VAR (words_default_prop_nonspace, 0.25, "Fraction of xheight");
EXTERN double_VAR (words_default_fixed_space, 0.75, "Fraction of xheight");
EXTERN double_VAR (words_default_fixed_limit, 0.6, "Allowed size variance");
EXTERN double_VAR (textord_words_definite_spread, 0.30,
double_VAR(words_initial_lower, 0.5, "Max initial cluster size");
double_VAR (words_initial_upper, 0.15, "Min initial cluster spacing");
double_VAR (words_default_prop_nonspace, 0.25, "Fraction of xheight");
double_VAR (words_default_fixed_space, 0.75, "Fraction of xheight");
double_VAR (words_default_fixed_limit, 0.6, "Allowed size variance");
double_VAR (textord_words_definite_spread, 0.30,
"Non-fuzzy spacing region");
EXTERN double_VAR (textord_spacesize_ratiofp, 2.8,
double_VAR (textord_spacesize_ratiofp, 2.8,
"Min ratio space/nonspace");
EXTERN double_VAR (textord_spacesize_ratioprop, 2.0,
double_VAR (textord_spacesize_ratioprop, 2.0,
"Min ratio space/nonspace");
EXTERN double_VAR (textord_fpiqr_ratio, 1.5, "Pitch IQR/Gap IQR threshold");
EXTERN double_VAR (textord_max_pitch_iqr, 0.20, "Xh fraction noise in pitch");
EXTERN double_VAR (textord_fp_min_width, 0.5, "Min width of decent blobs");
double_VAR (textord_fpiqr_ratio, 1.5, "Pitch IQR/Gap IQR threshold");
double_VAR (textord_max_pitch_iqr, 0.20, "Xh fraction noise in pitch");
double_VAR (textord_fp_min_width, 0.5, "Min width of decent blobs");
8 changes: 3 additions & 5 deletions src/textord/wordseg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@
#include "config_auto.h"
#endif

#define EXTERN

EXTERN BOOL_VAR(textord_fp_chopping, true, "Do fixed pitch chopping");
EXTERN BOOL_VAR(textord_force_make_prop_words, false,
BOOL_VAR(textord_fp_chopping, true, "Do fixed pitch chopping");
BOOL_VAR(textord_force_make_prop_words, false,
"Force proportional word segmentation on all rows");
EXTERN BOOL_VAR(textord_chopper_test, false,
BOOL_VAR(textord_chopper_test, false,
"Chopper is being tested.");

#define BLOCK_STATS_CLUSTERS 10
Expand Down

0 comments on commit 4b3bbd9

Please sign in to comment.