cleanup: Don't make nbis depend on libfprint built-sources
Now that nbis is a static library it should be possible to compile it without any fprint-built dependency, although since it included fp_internal there was a compile-time dependency on the fp-enums that can be generated at later times. So: - Move nbis-helpers to nbis includes (and remove inclusion in fp_internal) - Move the Minutiae definitions inside a standalone fpi-minutiae header - Include fpi-minutiae.h in fp_internal.h - Include nbis-hepers.h and fpi-minutiae.h in nbis' lfs.h - Adapt missing definitions in libfprint
This commit is contained in:
parent
6a090656b6
commit
7ed9b0c2f9
7 changed files with 59 additions and 39 deletions
|
@ -19,6 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fpi-image.h"
|
#include "fpi-image.h"
|
||||||
|
#include "fpi-log.h"
|
||||||
|
|
||||||
#include <nbis.h>
|
#include <nbis.h>
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include "fpi-print.h"
|
#include "fpi-print.h"
|
||||||
#include "fpi-image.h"
|
#include "fpi-image.h"
|
||||||
|
#include "fpi-log.h"
|
||||||
#include "fpi-device.h"
|
#include "fpi-device.h"
|
||||||
|
|
||||||
#include <nbis.h>
|
#include <nbis.h>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Internal/private definitions for libfprint
|
* Internal/private definitions for libfprint
|
||||||
* Copyright (C) 2007-2008 Daniel Drake <dsd@gentoo.org>
|
* Copyright (C) 2019 Marco Trevisan <marco.trevisan@canonical.com>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -17,38 +17,9 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __FPRINT_INTERNAL_H__
|
#pragma once
|
||||||
#define __FPRINT_INTERNAL_H__
|
|
||||||
|
|
||||||
#include "fpi-log.h"
|
#include "fpi-log.h"
|
||||||
#include "nbis-helpers.h"
|
|
||||||
#include "fpi-image.h"
|
#include "fpi-image.h"
|
||||||
#include "fpi-image-device.h"
|
#include "fpi-image-device.h"
|
||||||
|
#include "fpi-minutiae.h"
|
||||||
/* fp_minutia structure definition */
|
|
||||||
struct fp_minutia
|
|
||||||
{
|
|
||||||
int x;
|
|
||||||
int y;
|
|
||||||
int ex;
|
|
||||||
int ey;
|
|
||||||
int direction;
|
|
||||||
double reliability;
|
|
||||||
int type;
|
|
||||||
int appearing;
|
|
||||||
int feature_id;
|
|
||||||
int *nbrs;
|
|
||||||
int *ridge_counts;
|
|
||||||
int num_nbrs;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* fp_minutiae structure definition */
|
|
||||||
struct fp_minutiae
|
|
||||||
{
|
|
||||||
int alloc;
|
|
||||||
int num;
|
|
||||||
struct fp_minutia **list;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
45
libfprint/fpi-minutiae.h
Normal file
45
libfprint/fpi-minutiae.h
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
/*
|
||||||
|
* Internal/private definitions for libfprint
|
||||||
|
* Copyright (C) 2007-2008 Daniel Drake <dsd@gentoo.org>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* fp_minutia structure definition */
|
||||||
|
struct fp_minutia
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
int ex;
|
||||||
|
int ey;
|
||||||
|
int direction;
|
||||||
|
double reliability;
|
||||||
|
int type;
|
||||||
|
int appearing;
|
||||||
|
int feature_id;
|
||||||
|
int *nbrs;
|
||||||
|
int *ridge_counts;
|
||||||
|
int num_nbrs;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* fp_minutiae structure definition */
|
||||||
|
struct fp_minutiae
|
||||||
|
{
|
||||||
|
int alloc;
|
||||||
|
int num;
|
||||||
|
struct fp_minutia **list;
|
||||||
|
};
|
|
@ -66,7 +66,8 @@ of the software.
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fp_internal.h>
|
#include <nbis-helpers.h>
|
||||||
|
#include <fpi-minutiae.h>
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* OUTPUT FILE EXTENSIONS */
|
/* OUTPUT FILE EXTENSIONS */
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
--- include/lfs.h 2018-08-24 15:31:54.535579623 +0200
|
--- include/lfs.h
|
||||||
+++ include/lfs.h.orig 2018-08-24 15:31:48.781587933 +0200
|
+++ include/lfs.h
|
||||||
@@ -66,7 +43,7 @@ of the software.
|
@@ -66,7 +66,8 @@ of the software.
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
-#include <an2k.h> /* Needed by to_type9.c */
|
-#include <an2k.h> /* Needed by to_type9.c */
|
||||||
+#include <fp_internal.h>
|
+#include <nbis-helpers.h>
|
||||||
|
+#include <fpi-minutiae.h>
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* OUTPUT FILE EXTENSIONS */
|
/* OUTPUT FILE EXTENSIONS */
|
||||||
@@ -154,26 +131,8 @@ typedef struct rotgrids{
|
@@ -154,26 +155,8 @@ typedef struct rotgrids{
|
||||||
#define DISAPPEARING 0
|
#define DISAPPEARING 0
|
||||||
#define APPEARING 1
|
#define APPEARING 1
|
||||||
|
|
||||||
|
@ -38,7 +39,7 @@
|
||||||
|
|
||||||
typedef struct feature_pattern{
|
typedef struct feature_pattern{
|
||||||
int type;
|
int type;
|
||||||
@@ -1185,17 +1185,6 @@ extern void bubble_sort_double_inc_2(double *, int *, const int);
|
@@ -1203,17 +1186,6 @@ extern void bubble_sort_double_inc_2(double *, int *, const int);
|
||||||
extern void bubble_sort_double_dec_2(double *, int *, const int);
|
extern void bubble_sort_double_dec_2(double *, int *, const int);
|
||||||
extern void bubble_sort_int_inc(int *, const int);
|
extern void bubble_sort_int_inc(int *, const int);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue