From 6e59abcce2ae1ee1f09f471a78a3ca4b214a6fd6 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Wed, 27 Mar 2019 18:33:00 +0100 Subject: [PATCH] Remove file cutil.h It only contained three type definitions which fit better in other include files. Signed-off-by: Stefan Weil --- src/classify/cluster.cpp | 1 - src/classify/kdtree.cpp | 1 - src/classify/kdtree.h | 3 ++- src/cutil/Makefile.am | 2 +- src/cutil/cutil.h | 30 ------------------------------ src/cutil/oldlist.h | 5 +++-- 6 files changed, 6 insertions(+), 36 deletions(-) delete mode 100644 src/cutil/cutil.h diff --git a/src/classify/cluster.cpp b/src/classify/cluster.cpp index d2504438..0396c1b8 100644 --- a/src/classify/cluster.cpp +++ b/src/classify/cluster.cpp @@ -20,7 +20,6 @@ #include // for std::vector #include "cluster.h" -#include "cutil.h" // for void_proc #include "emalloc.h" #include "genericheap.h" #include "helpers.h" diff --git a/src/classify/kdtree.cpp b/src/classify/kdtree.cpp index 2a4b1d78..de6538a9 100644 --- a/src/classify/kdtree.cpp +++ b/src/classify/kdtree.cpp @@ -19,7 +19,6 @@ Include Files and Type Defines -----------------------------------------------------------------------------*/ #include "kdtree.h" -#include "cutil.h" // for void_proc #include "emalloc.h" #include diff --git a/src/classify/kdtree.h b/src/classify/kdtree.h index d3bee713..0aa2b1b2 100644 --- a/src/classify/kdtree.h +++ b/src/classify/kdtree.h @@ -20,10 +20,11 @@ /*----------------------------------------------------------------------------- Include Files and Type Defines -----------------------------------------------------------------------------*/ -#include "cutil.h" // for void_proc #include "host.h" #include "ocrfeatures.h" +typedef void (*void_proc)(...); + /** NOTE: All circular parameters of all keys must be in the range diff --git a/src/cutil/Makefile.am b/src/cutil/Makefile.am index 69d32ee6..f7d95869 100644 --- a/src/cutil/Makefile.am +++ b/src/cutil/Makefile.am @@ -8,7 +8,7 @@ AM_CPPFLAGS += -DTESS_EXPORTS \ endif noinst_HEADERS = \ - bitvec.h callcpp.h cutil.h cutil_class.h \ + bitvec.h callcpp.h cutil_class.h \ emalloc.h \ oldlist.h structures.h diff --git a/src/cutil/cutil.h b/src/cutil/cutil.h deleted file mode 100644 index 233b2a11..00000000 --- a/src/cutil/cutil.h +++ /dev/null @@ -1,30 +0,0 @@ -/* -*-C-*- - ****************************************************************************** - * - * File: cutil.h - * Description: General utility functions - * Author: Mark Seaman, SW Productivity - * - * (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 CUTILH -#define CUTILH - -typedef void (*void_proc)(...); - -typedef int (*int_compare)(void*, void*); -typedef void (*void_dest)(void*); - -#endif diff --git a/src/cutil/oldlist.h b/src/cutil/oldlist.h index ccf604de..7f2f00d1 100644 --- a/src/cutil/oldlist.h +++ b/src/cutil/oldlist.h @@ -63,14 +63,15 @@ #ifndef LIST_H #define LIST_H -#include "cutil.h" // for int_compare, void_dest, ... - /*---------------------------------------------------------------------- T y p e s ----------------------------------------------------------------------*/ #define NIL_LIST ((LIST)nullptr) +typedef int (*int_compare)(void*, void*); +typedef void (*void_dest)(void*); + struct list_rec { struct list_rec *node;