From d59f14c70a9caf484466e7df3d2716d8e63f82e3 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 12 Oct 2018 11:18:58 +0200 Subject: [PATCH 1/2] Remove gradechop.h It only defines the macro partial_split_priority which is only used in findseam.cpp, so move it to that file. Signed-off-by: Stefan Weil --- src/wordrec/Makefile.am | 1 - src/wordrec/findseam.cpp | 12 +++++++++- src/wordrec/gradechop.cpp | 2 +- src/wordrec/gradechop.h | 49 --------------------------------------- src/wordrec/tface.cpp | 1 - src/wordrec/wordrec.h | 1 - 6 files changed, 12 insertions(+), 54 deletions(-) delete mode 100644 src/wordrec/gradechop.h diff --git a/src/wordrec/Makefile.am b/src/wordrec/Makefile.am index 8f8ccbae73..f8c09f23cb 100644 --- a/src/wordrec/Makefile.am +++ b/src/wordrec/Makefile.am @@ -25,7 +25,6 @@ noinst_HEADERS += \ chopper.h \ drawfx.h \ findseam.h \ - gradechop.h \ language_model.h \ lm_consistency.h \ lm_pain_points.h \ diff --git a/src/wordrec/findseam.cpp b/src/wordrec/findseam.cpp index 97df547b70..81055392ee 100644 --- a/src/wordrec/findseam.cpp +++ b/src/wordrec/findseam.cpp @@ -26,7 +26,6 @@ I n c l u d e s ----------------------------------------------------------------------*/ #include "findseam.h" -#include "gradechop.h" #include "plotedges.h" #include "outlines.h" #include "seam.h" @@ -37,6 +36,17 @@ #include "config_auto.h" #endif +/********************************************************************** + * partial_split_priority + * + * Assign a priority to this split based on the features that it has. + * Grade it according to the different rating schemes and return the + * value of its goodness. + **********************************************************************/ + +#define partial_split_priority(split) \ + (grade_split_length(split) + grade_sharpness(split)) + /*---------------------------------------------------------------------- T y p e s ----------------------------------------------------------------------*/ diff --git a/src/wordrec/gradechop.cpp b/src/wordrec/gradechop.cpp index 8dc6edb950..55df37561a 100644 --- a/src/wordrec/gradechop.cpp +++ b/src/wordrec/gradechop.cpp @@ -25,7 +25,7 @@ /*---------------------------------------------------------------------- I n c l u d e s ----------------------------------------------------------------------*/ -#include "gradechop.h" + #include "wordrec.h" #include "chop.h" #include diff --git a/src/wordrec/gradechop.h b/src/wordrec/gradechop.h deleted file mode 100644 index efaa10ca00..0000000000 --- a/src/wordrec/gradechop.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -*-C-*- - ******************************************************************************** - * - * File: gradechop.h (Formerly gradechop.h) - * Description: - * Author: Mark Seaman, SW Productivity - * Created: Fri Oct 16 14:37:00 1987 - * Modified: Tue Jul 9 16:40:39 1991 (Mark Seaman) marks@hpgrlt - * Language: C - * Package: N/A - * Status: Reusable Software Component - * - * (c) Copyright 1987, Hewlett-Packard Company. - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** http://www.apache.org/licenses/LICENSE-2.0 - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - * - *********************************************************************************/ - -#ifndef GRADECHOP_H -#define GRADECHOP_H - -/*---------------------------------------------------------------------- - I n c l u d e s -----------------------------------------------------------------------*/ -#include "seam.h" - -/*---------------------------------------------------------------------- - M a c r o s -----------------------------------------------------------------------*/ -/********************************************************************** - * partial_split_priority - * - * Assign a priority to this split based on the features that it has. - * Grade it according to the different rating schemes and return the - * value of its goodness. - **********************************************************************/ - -#define partial_split_priority(split) \ -(grade_split_length (split) + \ - grade_sharpness (split)) \ - -#endif diff --git a/src/wordrec/tface.cpp b/src/wordrec/tface.cpp index 28d2da8414..0b1aa5e08e 100644 --- a/src/wordrec/tface.cpp +++ b/src/wordrec/tface.cpp @@ -21,7 +21,6 @@ #include "chop.h" #include "chopper.h" #include "globals.h" -#include "gradechop.h" #include "pageres.h" #include "wordrec.h" #include "featdefs.h" diff --git a/src/wordrec/wordrec.h b/src/wordrec/wordrec.h index c4599655d9..a0aaa16814 100644 --- a/src/wordrec/wordrec.h +++ b/src/wordrec/wordrec.h @@ -93,7 +93,6 @@ class Wordrec : public Classify { #include "language_model.h" #include "ratngs.h" #include "matrix.h" -#include "gradechop.h" #include "seam.h" #include "findseam.h" #include "callcpp.h" From d86d520fd0569e7debc30a3e0cd65f13c8983438 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 12 Oct 2018 11:20:38 +0200 Subject: [PATCH 2/2] Remove tab character in source files Signed-off-by: Stefan Weil --- Makefile.am | 6 ++--- src/api/baseapi.cpp | 2 +- src/classify/blobclass.h | 14 +++++------ src/classify/cutoffs.h | 10 ++++---- src/classify/featdefs.h | 15 ++++++------ src/classify/float2int.h | 10 ++++---- src/classify/mf.h | 14 +++++------ src/classify/normmatch.h | 10 ++++---- src/classify/outfeat.h | 14 +++++------ src/cutil/bitvec.cpp | 11 ++++----- src/cutil/emalloc.h | 14 +++++------ src/dict/hyphen.cpp | 6 +---- src/opencl/openclwrapper.cpp | 2 +- src/textord/drawtord.cpp | 7 +++--- src/textord/drawtord.h | 3 +-- src/textord/edgblob.h | 3 +-- src/textord/fpchop.h | 3 +-- src/textord/makerow.h | 3 +-- src/textord/oldbasel.h | 3 +-- src/textord/scanedg.cpp | 3 +-- src/textord/scanedg.h | 3 +-- src/textord/sortflts.cpp | 3 +-- src/textord/sortflts.h | 3 +-- src/textord/topitch.h | 3 +-- src/textord/tordmain.h | 3 +-- src/textord/underlin.cpp | 3 +-- src/textord/underlin.h | 3 +-- src/textord/wordseg.h | 3 +-- src/training/Makefile.am | 4 ++-- src/training/tessopt.h | 3 +-- src/viewer/svpaint.cpp | 8 +++---- src/wordrec/drawfx.cpp | 3 +-- src/wordrec/drawfx.h | 11 ++++----- src/wordrec/outlines.h | 46 ++++++++++++++++++------------------ src/wordrec/plotedges.h | 8 +++---- 35 files changed, 119 insertions(+), 141 deletions(-) diff --git a/Makefile.am b/Makefile.am index c9a123f62a..7d439ee712 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,9 +22,9 @@ SUBDIRS = src/arch src/ccutil src/viewer src/cutil src/opencl src/ccstruct SUBDIRS += src/dict src/classify src/wordrec src/textord src/lstm SUBDIRS += src/ccmain src/api . tessdata doc unittest -EXTRA_DIST = README.md\ - aclocal.m4 config configure.ac autogen.sh \ - tesseract.pc.in $(TRAINING_SUBDIR) java doc langtests unlvtests +EXTRA_DIST = README.md +EXTRA_DIST += aclocal.m4 config configure.ac autogen.sh +EXTRA_DIST += tesseract.pc.in $(TRAINING_SUBDIR) java doc langtests unlvtests DIST_SUBDIRS = $(SUBDIRS) $(TRAINING_SUBDIR) diff --git a/src/api/baseapi.cpp b/src/api/baseapi.cpp index fa27a5462c..9f2822e4ac 100644 --- a/src/api/baseapi.cpp +++ b/src/api/baseapi.cpp @@ -617,7 +617,7 @@ void TessBaseAPI::SetImage(Pix* pix) { pixSetSpp(p1, 3); pix = pixCopy(nullptr, p1); pixDestroy(&p1); - } + } thresholder_->SetImage(pix); SetInputImage(thresholder_->GetPixRect()); } diff --git a/src/classify/blobclass.h b/src/classify/blobclass.h index be09465bd4..bb839e9c5c 100644 --- a/src/classify/blobclass.h +++ b/src/classify/blobclass.h @@ -1,10 +1,9 @@ /****************************************************************************** - ** Filename: blobclass.h - ** Purpose: Interface to high level classification and training. - ** Author: Dan Johnson - ** History: 5/29/89, DSJ, Created. + ** Filename: blobclass.h + ** Purpose: Interface to high level classification and training. + ** Author: Dan Johnson ** - ** (c) Copyright Hewlett-Packard Company, 1988. + ** (c) Copyright Hewlett-Packard Company, 1988. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at @@ -15,8 +14,9 @@ ** See the License for the specific language governing permissions and ** limitations under the License. ******************************************************************************/ -#ifndef BLOBCLASS_H -#define BLOBCLASS_H + +#ifndef BLOBCLASS_H +#define BLOBCLASS_H /**---------------------------------------------------------------------------- Include Files and Type Defines diff --git a/src/classify/cutoffs.h b/src/classify/cutoffs.h index c29551c78f..ebc67e27f6 100644 --- a/src/classify/cutoffs.h +++ b/src/classify/cutoffs.h @@ -1,10 +1,9 @@ /****************************************************************************** - ** Filename: cutoffs.h - ** Purpose: Routines to manipulate an array of class cutoffs. - ** Author: Dan Johnson - ** History: Wed Feb 20 09:34:20 1991, DSJ, Created. + ** Filename: cutoffs.h + ** Purpose: Routines to manipulate an array of class cutoffs. + ** Author: Dan Johnson ** - ** (c) Copyright Hewlett-Packard Company, 1988. + ** (c) Copyright Hewlett-Packard Company, 1988. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at @@ -15,6 +14,7 @@ ** See the License for the specific language governing permissions and ** limitations under the License. ******************************************************************************/ + #ifndef CUTOFFS_H #define CUTOFFS_H diff --git a/src/classify/featdefs.h b/src/classify/featdefs.h index 9cc60f94f3..6996898cb5 100644 --- a/src/classify/featdefs.h +++ b/src/classify/featdefs.h @@ -1,10 +1,10 @@ /****************************************************************************** - ** Filename: featdefs.h - ** Purpose: Definitions of currently defined feature types. - ** Author: Dan Johnson - ** History: Mon May 21 08:28:01 1990, DSJ, Created. + ** Filename: featdefs.h + ** Purpose: Definitions of currently defined feature types. + ** Author: Dan Johnson + ** History: Mon May 21 08:28:01 1990, DSJ, Created. ** - ** (c) Copyright Hewlett-Packard Company, 1988. + ** (c) Copyright Hewlett-Packard Company, 1988. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at @@ -15,8 +15,9 @@ ** See the License for the specific language governing permissions and ** limitations under the License. ******************************************************************************/ -#ifndef FEATDEFS_H -#define FEATDEFS_H + +#ifndef FEATDEFS_H +#define FEATDEFS_H /**---------------------------------------------------------------------------- Include Files and Type Defines diff --git a/src/classify/float2int.h b/src/classify/float2int.h index 4f0a21bec9..70a05ab6b1 100644 --- a/src/classify/float2int.h +++ b/src/classify/float2int.h @@ -1,10 +1,9 @@ /****************************************************************************** - ** Filename: float2int.h - ** Purpose: Routines for converting float features to int features - ** Author: Dan Johnson - ** History: Wed Mar 13 08:06:41 1991, DSJ, Created. + ** Filename: float2int.h + ** Purpose: Routines for converting float features to int features + ** Author: Dan Johnson ** - ** (c) Copyright Hewlett-Packard Company, 1988. + ** (c) Copyright Hewlett-Packard Company, 1988. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at @@ -15,6 +14,7 @@ ** See the License for the specific language governing permissions and ** limitations under the License. ******************************************************************************/ + #ifndef FLOAT2INT_H #define FLOAT2INT_H diff --git a/src/classify/mf.h b/src/classify/mf.h index 4c06a5625b..90115eeb33 100644 --- a/src/classify/mf.h +++ b/src/classify/mf.h @@ -1,10 +1,9 @@ /****************************************************************************** - ** Filename: mf.h - ** Purpose: Micro-feature interface to flexible feature extractor. - ** Author: Dan Johnson - ** History: Thu May 24 09:39:56 1990, DSJ, Created. + ** Filename: mf.h + ** Purpose: Micro-feature interface to flexible feature extractor. + ** Author: Dan Johnson ** - ** (c) Copyright Hewlett-Packard Company, 1988. + ** (c) Copyright Hewlett-Packard Company, 1988. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at @@ -15,8 +14,9 @@ ** See the License for the specific language governing permissions and ** limitations under the License. ******************************************************************************/ -#ifndef MF_H -#define MF_H + +#ifndef MF_H +#define MF_H /**---------------------------------------------------------------------------- Include Files and Type Defines diff --git a/src/classify/normmatch.h b/src/classify/normmatch.h index cdec0fd966..89f625d8b2 100644 --- a/src/classify/normmatch.h +++ b/src/classify/normmatch.h @@ -1,10 +1,9 @@ /****************************************************************************** - ** Filename: normmatch.h - ** Purpose: Simple matcher based on character normalization features. - ** Author: Dan Johnson - ** History: Thu Dec 20 08:55:05 1990, DSJ, Created. + ** Filename: normmatch.h + ** Purpose: Simple matcher based on character normalization features. + ** Author: Dan Johnson ** - ** (c) Copyright Hewlett-Packard Company, 1988. + ** (c) Copyright Hewlett-Packard Company, 1988. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at @@ -15,6 +14,7 @@ ** See the License for the specific language governing permissions and ** limitations under the License. ******************************************************************************/ + #ifndef NORMMATCH_H #define NORMMATCH_H diff --git a/src/classify/outfeat.h b/src/classify/outfeat.h index e7a36476ef..a3c8897525 100644 --- a/src/classify/outfeat.h +++ b/src/classify/outfeat.h @@ -1,10 +1,9 @@ /****************************************************************************** - ** Filename: outfeat.h - ** Purpose: Definition of outline features. - ** Author: Dan Johnson - ** History: 11/13/90, DSJ, Created. + ** Filename: outfeat.h + ** Purpose: Definition of outline features. + ** Author: Dan Johnson ** - ** (c) Copyright Hewlett-Packard Company, 1988. + ** (c) Copyright Hewlett-Packard Company, 1988. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at @@ -15,8 +14,9 @@ ** See the License for the specific language governing permissions and ** limitations under the License. ******************************************************************************/ -#ifndef OUTFEAT_H -#define OUTFEAT_H + +#ifndef OUTFEAT_H +#define OUTFEAT_H /**---------------------------------------------------------------------------- Include Files and Type Defines diff --git a/src/cutil/bitvec.cpp b/src/cutil/bitvec.cpp index 0ecef3f75c..b84d6b7990 100644 --- a/src/cutil/bitvec.cpp +++ b/src/cutil/bitvec.cpp @@ -1,10 +1,9 @@ /****************************************************************************** - ** Filename: bitvec.c - ** Purpose: Routines for manipulating bit vectors - ** Author: Dan Johnson - ** History: Thu Mar 15 10:37:27 1990, DSJ, Created. + ** Filename: bitvec.c + ** Purpose: Routines for manipulating bit vectors + ** Author: Dan Johnson ** - ** (c) Copyright Hewlett-Packard Company, 1988. + ** (c) Copyright Hewlett-Packard Company, 1988. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at @@ -74,7 +73,7 @@ void FreeBitVector(BIT_VECTOR BitVector) { * hold the specified number of bits. * * Globals: - * - BitVectorCount number of bit vectors allocated + * - BitVectorCount number of bit vectors allocated * * @param NumBits number of bits in new bit vector * diff --git a/src/cutil/emalloc.h b/src/cutil/emalloc.h index 1da42c139c..23483bd8e5 100644 --- a/src/cutil/emalloc.h +++ b/src/cutil/emalloc.h @@ -1,10 +1,9 @@ /****************************************************************************** - ** Filename: emalloc.h - ** Purpose: Definition of memory allocation routines. - ** Author: Dan Johnson - ** History: 4/3/89, DSJ, Created. + ** Filename: emalloc.h + ** Purpose: Definition of memory allocation routines. + ** Author: Dan Johnson ** - ** (c) Copyright Hewlett-Packard Company, 1988. + ** (c) Copyright Hewlett-Packard Company, 1988. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at @@ -15,8 +14,9 @@ ** See the License for the specific language governing permissions and ** limitations under the License. ******************************************************************************/ -#ifndef EMALLOC_H -#define EMALLOC_H + +#ifndef EMALLOC_H +#define EMALLOC_H void *Emalloc(int Size); diff --git a/src/dict/hyphen.cpp b/src/dict/hyphen.cpp index 829a177f2e..9f0feec281 100644 --- a/src/dict/hyphen.cpp +++ b/src/dict/hyphen.cpp @@ -1,12 +1,8 @@ /* -*-C-*- ******************************************************************************** - * File: hyphen.cpp (Formerly hyphen.c) + * File: hyphen.cpp (Formerly hyphen.c) * Description: Functions for maintaining information about hyphenated words. * Author: Mark Seaman, OCR Technology - * Created: Fri Oct 16 14:37:00 1987 - * Modified: Thu Mar 14 11:09:43 1991 (Mark Seaman) marks@hpgrlt - * Language: C - * Package: N/A * Status: Reusable Software Component * * (c) Copyright 1987, Hewlett-Packard Company. diff --git a/src/opencl/openclwrapper.cpp b/src/opencl/openclwrapper.cpp index e835d4b978..db53ca7093 100644 --- a/src/opencl/openclwrapper.cpp +++ b/src/opencl/openclwrapper.cpp @@ -2562,7 +2562,7 @@ ds_device OpenclDevice::getDeviceSelection() { int bestDeviceIdx = -1; for (unsigned d = 0; d < profile->numDevices; d++) { ds_device device = profile->devices[d]; - if (device.score == nullptr) continue; + if (device.score == nullptr) continue; TessDeviceScore score = *device.score; float time = score.time; diff --git a/src/textord/drawtord.cpp b/src/textord/drawtord.cpp index c0d1382142..8cf62f4319 100644 --- a/src/textord/drawtord.cpp +++ b/src/textord/drawtord.cpp @@ -1,8 +1,7 @@ /********************************************************************** * File: drawtord.cpp (Formerly drawto.c) * Description: Draw things to do with textord. - * Author: Ray Smith - * Created: Thu Jul 30 15:40:57 BST 1992 + * Author: Ray Smith * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); @@ -181,13 +180,13 @@ int32_t thresholds[] //for drop out if (occupation[line_index - min_y] < thresholds[line_index - min_y]) { if (colour != ScrollView::BLUE) { colour = ScrollView::BLUE; - to_win->Pen(colour); + to_win->Pen(colour); } } else { if (colour != ScrollView::WHITE) { colour = ScrollView::WHITE; - to_win->Pen(colour); + to_win->Pen(colour); } } to_win->DrawTo(fleft + occupation[line_index - min_y] / 10.0, (float) line_index); diff --git a/src/textord/drawtord.h b/src/textord/drawtord.h index 1e79252d0f..5296e5f3d4 100644 --- a/src/textord/drawtord.h +++ b/src/textord/drawtord.h @@ -1,8 +1,7 @@ /********************************************************************** * File: drawtord.h (Formerly drawto.h) * Description: Draw things to do with textord. - * Author: Ray Smith - * Created: Thu Jul 30 15:40:57 BST 1992 + * Author: Ray Smith * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/textord/edgblob.h b/src/textord/edgblob.h index e82f5194f7..e59bea2f5e 100644 --- a/src/textord/edgblob.h +++ b/src/textord/edgblob.h @@ -1,8 +1,7 @@ /********************************************************************** * File: edgblob.h (Formerly edgeloop.h) * Description: Functions to clean up an outline before approximation. - * Author: Ray Smith - * Created: Tue Mar 26 16:56:25 GMT 1991 + * Author: Ray Smith * * (C) Copyright 1991, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/textord/fpchop.h b/src/textord/fpchop.h index 6f7c488552..0bcfb2cf33 100644 --- a/src/textord/fpchop.h +++ b/src/textord/fpchop.h @@ -1,8 +1,7 @@ /********************************************************************** * File: fpchop.h (Formerly fp_chop.h) * Description: Code to chop fixed pitch text into character cells. - * Author: Ray Smith - * Created: Thu Sep 16 11:14:15 BST 1993 + * Author: Ray Smith * * (C) Copyright 1993, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/textord/makerow.h b/src/textord/makerow.h index 10e623c02e..ff010a6988 100644 --- a/src/textord/makerow.h +++ b/src/textord/makerow.h @@ -1,8 +1,7 @@ /********************************************************************** * File: makerow.h (Formerly makerows.h) * Description: Code to arrange blobs into rows of text. - * Author: Ray Smith - * Created: Mon Sep 21 14:34:48 BST 1992 + * Author: Ray Smith * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/textord/oldbasel.h b/src/textord/oldbasel.h index ae583a1dd8..e27afa799e 100644 --- a/src/textord/oldbasel.h +++ b/src/textord/oldbasel.h @@ -1,8 +1,7 @@ /********************************************************************** * File: oldbasel.h (Formerly oldbl.h) * Description: A re-implementation of the old baseline algorithm. - * Author: Ray Smith - * Created: Wed Oct 6 09:41:48 BST 1993 + * Author: Ray Smith * * (C) Copyright 1993, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/textord/scanedg.cpp b/src/textord/scanedg.cpp index b0fc38caad..2e7e4ab828 100644 --- a/src/textord/scanedg.cpp +++ b/src/textord/scanedg.cpp @@ -1,8 +1,7 @@ /********************************************************************** * File: scanedg.cpp (Formerly scanedge.c) * Description: Raster scanning crack based edge extractor. - * Author: Ray Smith - * Created: Fri Mar 22 16:11:50 GMT 1991 + * Author: Ray Smith * * (C) Copyright 1991, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/textord/scanedg.h b/src/textord/scanedg.h index 678305c729..0a8367c2ea 100644 --- a/src/textord/scanedg.h +++ b/src/textord/scanedg.h @@ -1,8 +1,7 @@ /********************************************************************** * File: scanedg.h (Formerly scanedge.h) * Description: Raster scanning crack based edge extractor. - * Author: Ray Smith - * Created: Fri Mar 22 16:11:50 GMT 1991 + * Author: Ray Smith * * (C) Copyright 1991, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/textord/sortflts.cpp b/src/textord/sortflts.cpp index 07ed684ade..72604d76b6 100644 --- a/src/textord/sortflts.cpp +++ b/src/textord/sortflts.cpp @@ -1,8 +1,7 @@ /********************************************************************** * File: sortflts.cpp (Formerly sfloats.c) * Description: Code to maintain a sorted list of floats. - * Author: Ray Smith - * Created: Mon Oct 4 16:15:40 BST 1993 + * Author: Ray Smith * * (C) Copyright 1993, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/textord/sortflts.h b/src/textord/sortflts.h index 40824b5777..882ab746a1 100644 --- a/src/textord/sortflts.h +++ b/src/textord/sortflts.h @@ -1,8 +1,7 @@ /********************************************************************** * File: sortflts.h (Formerly sfloats.h) * Description: Code to maintain a sorted list of floats. - * Author: Ray Smith - * Created: Mon Oct 4 16:15:40 BST 1993 + * Author: Ray Smith * * (C) Copyright 1993, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/textord/topitch.h b/src/textord/topitch.h index 82d70a8876..0c5c397067 100644 --- a/src/textord/topitch.h +++ b/src/textord/topitch.h @@ -1,8 +1,7 @@ /********************************************************************** * File: topitch.h (Formerly to_pitch.h) * Description: Code to determine fixed pitchness and the pitch if fixed. - * Author: Ray Smith - * Created: Tue Aug 24 16:57:29 BST 1993 + * Author: Ray Smith * * (C) Copyright 1993, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/textord/tordmain.h b/src/textord/tordmain.h index 6a6f32b1d8..a0ed6264b6 100644 --- a/src/textord/tordmain.h +++ b/src/textord/tordmain.h @@ -1,8 +1,7 @@ /********************************************************************** * File: tordmain.h (Formerly textordp.h) * Description: C++ top level textord code. - * Author: Ray Smith - * Created: Tue Jul 28 17:12:33 BST 1992 + * Author: Ray Smith * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/textord/underlin.cpp b/src/textord/underlin.cpp index 980c50b4c8..af26203216 100644 --- a/src/textord/underlin.cpp +++ b/src/textord/underlin.cpp @@ -1,8 +1,7 @@ /********************************************************************** * File: underlin.cpp (Formerly undrline.c) * Description: Code to chop blobs apart from underlines. - * Author: Ray Smith - * Created: Mon Aug 8 11:14:00 BST 1994 + * Author: Ray Smith * * (C) Copyright 1994, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/textord/underlin.h b/src/textord/underlin.h index c3b4b47a43..eb0051acbb 100644 --- a/src/textord/underlin.h +++ b/src/textord/underlin.h @@ -1,8 +1,7 @@ /********************************************************************** * File: underlin.h (Formerly undrline.h) * Description: Code to chop blobs apart from underlines. - * Author: Ray Smith - * Created: Mon Aug 8 11:14:00 BST 1994 + * Author: Ray Smith * * (C) Copyright 1994, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/textord/wordseg.h b/src/textord/wordseg.h index 3acc8c9447..4877f90c87 100644 --- a/src/textord/wordseg.h +++ b/src/textord/wordseg.h @@ -1,8 +1,7 @@ /********************************************************************** * File: wordseg.h (Formerly wspace.h) * Description: Code to segment the blobs into words. - * Author: Ray Smith - * Created: Fri Oct 16 11:32:28 BST 1992 + * Author: Ray Smith * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/training/Makefile.am b/src/training/Makefile.am index 541a3b59c6..5df6fe9ccb 100644 --- a/src/training/Makefile.am +++ b/src/training/Makefile.am @@ -209,8 +209,8 @@ text2image_LDADD = \ $(ICU_I18N_LIBS) $(ICU_UC_LIBS) text2image_LDADD += \ ../api/libtesseract.la -text2image_LDADD += $(ICU_UC_LIBS) -lpango-1.0 -lpangocairo-1.0 \ - -lgobject-2.0 -lglib-2.0 -lcairo -lpangoft2-1.0 -lfontconfig +text2image_LDADD += $(ICU_UC_LIBS) -lpango-1.0 -lpangocairo-1.0 +text2image_LDADD += -lgobject-2.0 -lglib-2.0 -lcairo -lpangoft2-1.0 -lfontconfig unicharset_extractor_SOURCES = unicharset_extractor.cpp #unicharset_extractor_LDFLAGS = -static diff --git a/src/training/tessopt.h b/src/training/tessopt.h index 865e39807f..925f8f6d5a 100644 --- a/src/training/tessopt.h +++ b/src/training/tessopt.h @@ -1,8 +1,7 @@ /********************************************************************** * File: tessopt.h * Description: Re-implementation of the unix code. - * Author: Ray Smith - * Created: Tue Nov 28 05:52:50 MST 1995 + * Author: Ray Smith * * (C) Copyright 1995, Hewlett-Packard Co. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/viewer/svpaint.cpp b/src/viewer/svpaint.cpp index 105f6114a7..d8f3a53e1a 100644 --- a/src/viewer/svpaint.cpp +++ b/src/viewer/svpaint.cpp @@ -180,7 +180,7 @@ SVPaint::SVPaint(const char *server_name) { window_ = new ScrollView("ScrollView Paint Example", // window caption 0, 0, // x,y window position 500, 500, // window size - 500, 500, // canvas size + 500, 500, // canvas size false, // whether the Y axis is inversed. // this is included due to legacy // reasons for tesseract and enables @@ -228,8 +228,8 @@ SVPaint::SVPaint(const char *server_name) { // If a parameter is given, we try to connect to the given server. // This enables us to test the remote capabilities of ScrollView. int main(int argc, char** argv) { - const char* server_name; - if (argc > 1) { server_name = argv[1]; } else { server_name = "localhost"; } - SVPaint svp(server_name); + const char* server_name; + if (argc > 1) { server_name = argv[1]; } else { server_name = "localhost"; } + SVPaint svp(server_name); } #endif // GRAPHICS_DISABLED diff --git a/src/wordrec/drawfx.cpp b/src/wordrec/drawfx.cpp index 32604668eb..0577c87c18 100644 --- a/src/wordrec/drawfx.cpp +++ b/src/wordrec/drawfx.cpp @@ -1,8 +1,7 @@ /********************************************************************** * File: drawfx.cpp (Formerly drawfx.c) * Description: Draw things to do with feature extraction. - * Author: Ray Smith - * Created: Mon Jan 27 11:02:16 GMT 1992 + * Author: Ray Smith * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/wordrec/drawfx.h b/src/wordrec/drawfx.h index bf08c3b4e6..5947390a4b 100644 --- a/src/wordrec/drawfx.h +++ b/src/wordrec/drawfx.h @@ -1,8 +1,7 @@ /********************************************************************** * File: drawfx.h (Formerly drawfx.h) * Description: Draw things to do with feature extraction. - * Author: Ray Smith - * Created: Mon Jan 27 11:02:16 GMT 1992 + * Author: Ray Smith * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,11 +16,11 @@ * **********************************************************************/ -#ifndef DRAWFX_H -#define DRAWFX_H +#ifndef DRAWFX_H +#define DRAWFX_H -#include "params.h" -#include "scrollview.h" +#include "params.h" +#include "scrollview.h" extern STRING_VAR_H (fx_debugfile, DEBUG_WIN_NAME, "Name of debugfile"); extern ScrollView* fx_win; diff --git a/src/wordrec/outlines.h b/src/wordrec/outlines.h index 9d5725c6ba..893fb5c809 100644 --- a/src/wordrec/outlines.h +++ b/src/wordrec/outlines.h @@ -47,9 +47,9 @@ * Return TRUE if the point values are the same. The parameters must * be of type POINT. **********************************************************************/ -#define same_point(p1,p2) \ - ((abs (p1.x - p2.x) < chop_same_distance) && \ - (abs (p1.y - p2.y) < chop_same_distance)) +#define same_point(p1,p2) \ + ((abs (p1.x - p2.x) < chop_same_distance) && \ + (abs (p1.y - p2.y) < chop_same_distance)) /********************************************************************** * dist_square @@ -58,9 +58,9 @@ * parameters must be of type POINT. **********************************************************************/ -#define dist_square(p1,p2) \ - ((p2.x - p1.x) * (p2.x - p1.x) + \ - (p2.y - p1.y) * (p2.y - p1.y)) +#define dist_square(p1,p2) \ + ((p2.x - p1.x) * (p2.x - p1.x) + \ + (p2.y - p1.y) * (p2.y - p1.y)) /********************************************************************** * closest @@ -70,14 +70,14 @@ **********************************************************************/ #define closest(test_p,p1,p2) \ -(p1 ? \ - (p2 ? \ - ((dist_square (test_p->pos, p1->pos) < \ - dist_square (test_p->pos, p2->pos)) ? \ - p1 : \ - p2) : \ - p1) : \ - p2) +(p1 ? \ + (p2 ? \ + ((dist_square (test_p->pos, p1->pos) < \ + dist_square (test_p->pos, p2->pos)) ? \ + p1 : \ + p2) : \ + p1) : \ + p2) /********************************************************************** * edgept_dist @@ -95,11 +95,11 @@ * outline. **********************************************************************/ -#define is_exterior_point(edge,point) \ -(same_point (edge->prev->pos, point->pos) || \ - same_point (edge->next->pos, point->pos) || \ - (angle_change (edge->prev, edge, edge->next) - \ - angle_change (edge->prev, edge, point) > 20)) +#define is_exterior_point(edge,point) \ +(same_point (edge->prev->pos, point->pos) || \ + same_point (edge->next->pos, point->pos) || \ + (angle_change (edge->prev, edge, edge->next) - \ + angle_change (edge->prev, edge, point) > 20)) /********************************************************************** * is_equal @@ -118,9 +118,9 @@ * parameters must be of type POINT. **********************************************************************/ -#define is_on_line(p,p0,p1) \ - (within_range ((p).x, (p0).x, (p1).x) && \ - within_range ((p).y, (p0).y, (p1).y)) +#define is_on_line(p,p0,p1) \ + (within_range ((p).x, (p0).x, (p1).x) && \ + within_range ((p).y, (p0).y, (p1).y)) /********************************************************************** * within_range @@ -130,6 +130,6 @@ **********************************************************************/ #define within_range(x,x0,x1) \ - (((x0 <= x) && (x <= x1)) || ((x1 <= x) && (x <= x0))) + (((x0 <= x) && (x <= x1)) || ((x1 <= x) && (x <= x0))) #endif diff --git a/src/wordrec/plotedges.h b/src/wordrec/plotedges.h index 21b3fb8da0..ef7993900d 100644 --- a/src/wordrec/plotedges.h +++ b/src/wordrec/plotedges.h @@ -46,10 +46,10 @@ extern ScrollView *edge_window; /* Window for edges */ * * Refresh the display of the edge window. **********************************************************************/ -#define update_edge_window() \ -if (wordrec_display_splits) { \ - c_make_current (edge_window); \ -} \ +#define update_edge_window() \ +if (wordrec_display_splits) { \ + c_make_current (edge_window); \ +} /**********************************************************************