cleanup: Use #pragma once everywhere
Remove legacy header guards, and use compiler newer features.
This commit is contained in:
parent
10945f8546
commit
2158c5e2d1
22 changed files with 22 additions and 90 deletions
|
@ -18,9 +18,7 @@
|
||||||
* 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 __STORAGE_H
|
#pragma once
|
||||||
#define __STORAGE_H
|
|
||||||
|
|
||||||
|
|
||||||
int print_data_save (FpPrint *print,
|
int print_data_save (FpPrint *print,
|
||||||
FpFinger finger);
|
FpFinger finger);
|
||||||
|
@ -30,5 +28,3 @@ FpPrint * print_create_template (FpDevice *dev,
|
||||||
FpFinger finger);
|
FpFinger finger);
|
||||||
gboolean print_image_save (FpPrint *print,
|
gboolean print_image_save (FpPrint *print,
|
||||||
const char *path);
|
const char *path);
|
||||||
|
|
||||||
#endif /* __STORAGE_H */
|
|
||||||
|
|
|
@ -18,11 +18,8 @@
|
||||||
* 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 __UTILITIES_H
|
#pragma once
|
||||||
#define __UTILITIES_H
|
|
||||||
|
|
||||||
FpDevice * discover_device (GPtrArray *devices);
|
FpDevice * discover_device (GPtrArray *devices);
|
||||||
FpFinger finger_chooser (void);
|
FpFinger finger_chooser (void);
|
||||||
const char * finger_to_string (FpFinger finger);
|
const char * finger_to_string (FpFinger finger);
|
||||||
|
|
||||||
#endif /* __UTILITIES_H */
|
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
* 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 __AES1660_H
|
#pragma once
|
||||||
#define __AES1660_H
|
|
||||||
|
|
||||||
#define AES1660_FRAME_SIZE 0x244
|
#define AES1660_FRAME_SIZE 0x244
|
||||||
|
|
||||||
|
@ -1986,5 +1985,3 @@ static const unsigned char aes1660_start_imaging_cmd[] = {
|
||||||
0x55, 0x07, 0x00, 0x80, 0x42, 0x00, 0x7f, 0x00, 0x00, 0x14,
|
0x55, 0x07, 0x00, 0x80, 0x42, 0x00, 0x7f, 0x00, 0x00, 0x14,
|
||||||
0x49, 0x03, 0x00, 0x20, 0x00, 0xc8
|
0x49, 0x03, 0x00, 0x20, 0x00, 0xc8
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -19,8 +19,7 @@
|
||||||
* 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 __AES2501_H
|
#pragma once
|
||||||
#define __AES2501_H
|
|
||||||
|
|
||||||
enum aes2501_regs {
|
enum aes2501_regs {
|
||||||
AES2501_REG_CTRL1 = 0x80,
|
AES2501_REG_CTRL1 = 0x80,
|
||||||
|
@ -172,5 +171,3 @@ enum aes2501_sensor_gain2 {
|
||||||
|
|
||||||
#define AES2501_SUM_HIGH_THRESH 1000
|
#define AES2501_SUM_HIGH_THRESH 1000
|
||||||
#define AES2501_SUM_LOW_THRESH 700
|
#define AES2501_SUM_LOW_THRESH 700
|
||||||
|
|
||||||
#endif /* __AES2501_H */
|
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
* 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 __AES2550_H
|
#pragma once
|
||||||
#define __AES2550_H
|
|
||||||
|
|
||||||
/* Registers bits */
|
/* Registers bits */
|
||||||
|
|
||||||
|
@ -110,5 +109,3 @@ enum aes2550_cmds {
|
||||||
#define AES2550_HEARTBEAT_MAGIC 0xdb
|
#define AES2550_HEARTBEAT_MAGIC 0xdb
|
||||||
|
|
||||||
#define AES2550_EP_IN_BUF_SIZE 8192
|
#define AES2550_EP_IN_BUF_SIZE 8192
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
* 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 __AES2660_H
|
#pragma once
|
||||||
#define __AES2660_H
|
|
||||||
|
|
||||||
#define AES2660_FRAME_SIZE 0x354
|
#define AES2660_FRAME_SIZE 0x354
|
||||||
|
|
||||||
|
@ -1960,5 +1959,3 @@ static const unsigned char aes2660_start_imaging_cmd[] = {
|
||||||
0x55, 0x07, 0x00, 0x80, 0x42, 0x00, 0xbf, 0x00, 0x00, 0x18,
|
0x55, 0x07, 0x00, 0x80, 0x42, 0x00, 0xbf, 0x00, 0x00, 0x18,
|
||||||
0x49, 0x03, 0x00, 0x20, 0x08, 0xc8
|
0x49, 0x03, 0x00, 0x20, 0x08, 0xc8
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
* 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 __AESLIB_H__
|
#pragma once
|
||||||
#define __AESLIB_H__
|
|
||||||
|
|
||||||
#include <fprint.h>
|
#include <fprint.h>
|
||||||
|
|
||||||
|
@ -45,5 +44,3 @@ unsigned char aes_get_pixel (struct fpi_frame_asmbl_ctx *ctx,
|
||||||
struct fpi_frame *frame,
|
struct fpi_frame *frame,
|
||||||
unsigned int x,
|
unsigned int x,
|
||||||
unsigned int y);
|
unsigned int y);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
* 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 __ELAN_H
|
#pragma once
|
||||||
#define __ELAN_H
|
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
@ -224,5 +223,3 @@ static void elan_capture (FpDevice *dev);
|
||||||
|
|
||||||
static void dev_change_state (FpImageDevice *dev,
|
static void dev_change_state (FpImageDevice *dev,
|
||||||
FpImageDeviceState state);
|
FpImageDeviceState state);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
* 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 _BMKT_H_
|
#pragma once
|
||||||
#define _BMKT_H_
|
|
||||||
|
|
||||||
/**< User ID maximum length allowed */
|
/**< User ID maximum length allowed */
|
||||||
#define BMKT_MAX_USER_ID_LEN 100
|
#define BMKT_MAX_USER_ID_LEN 100
|
||||||
|
@ -228,5 +227,3 @@ typedef struct bmkt_user_id
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _BMKT_H_ */
|
|
||||||
|
|
|
@ -16,10 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
#ifndef BMKT_MESSAGE_H_
|
|
||||||
#define BMKT_MESSAGE_H_
|
|
||||||
|
|
||||||
|
|
||||||
#define BMKT_MESSAGE_HEADER_ID 0xFE
|
#define BMKT_MESSAGE_HEADER_ID 0xFE
|
||||||
#define BMKT_MESSAGE_HEADER_LEN (4)
|
#define BMKT_MESSAGE_HEADER_LEN (4)
|
||||||
|
@ -90,4 +87,3 @@ int bmkt_parse_message_header (uint8_t *resp_buf,
|
||||||
bmkt_msg_resp_t *msg_resp);
|
bmkt_msg_resp_t *msg_resp);
|
||||||
int bmkt_parse_message_payload (bmkt_msg_resp_t *msg_resp,
|
int bmkt_parse_message_payload (bmkt_msg_resp_t *msg_resp,
|
||||||
bmkt_response_t *resp);
|
bmkt_response_t *resp);
|
||||||
#endif /* BMKT_MESSAGE_H_ */
|
|
||||||
|
|
|
@ -17,9 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
#ifndef _BMKT_RESPONSE_H_
|
|
||||||
#define _BMKT_RESPONSE_H_
|
|
||||||
|
|
||||||
#include "bmkt.h"
|
#include "bmkt.h"
|
||||||
|
|
||||||
|
@ -485,5 +483,3 @@ typedef struct bmkt_response
|
||||||
int complete; /**< Operation completion status 1: complete / 0: not completed */
|
int complete; /**< Operation completion status 1: complete / 0: not completed */
|
||||||
bmkt_response_data_t response; /**< Operation specific response union */
|
bmkt_response_data_t response; /**< Operation specific response union */
|
||||||
} bmkt_response_t;
|
} bmkt_response_t;
|
||||||
|
|
||||||
#endif /* _BMKT_RESPONSE_H_ */
|
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
* 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 _SENSOR_H_
|
#pragma once
|
||||||
#define _SENSOR_H_
|
|
||||||
|
|
||||||
#include "usb_transport.h"
|
#include "usb_transport.h"
|
||||||
#define BMKT_MAX_PENDING_SESSIONS 2
|
#define BMKT_MAX_PENDING_SESSIONS 2
|
||||||
|
@ -84,4 +83,3 @@ int bmkt_sensor_handle_response (bmkt_sensor_t *sensor,
|
||||||
bmkt_msg_resp_t *msg_resp);
|
bmkt_msg_resp_t *msg_resp);
|
||||||
|
|
||||||
int bmkt_sensor_send_async_read_command (bmkt_sensor_t *sensor);
|
int bmkt_sensor_send_async_read_command (bmkt_sensor_t *sensor);
|
||||||
#endif /* _SENSOR_H_ */
|
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
* 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 __synaptics_h__
|
#pragma once
|
||||||
#define __synaptics_h__
|
|
||||||
|
|
||||||
#include "fpi-device.h"
|
#include "fpi-device.h"
|
||||||
#include "fpi-ssm.h"
|
#include "fpi-ssm.h"
|
||||||
|
@ -126,5 +125,3 @@ struct _FpiDeviceSynaptics
|
||||||
struct syna_enroll_resp_data enroll_resp_data;
|
struct syna_enroll_resp_data enroll_resp_data;
|
||||||
syna_state_t state;
|
syna_state_t state;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__synaptics_h__
|
|
||||||
|
|
|
@ -19,8 +19,7 @@
|
||||||
* 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 __UPEKTC_H
|
#pragma once
|
||||||
#define __UPEKTC_H
|
|
||||||
|
|
||||||
#define UPEKTC_CMD_LEN 0x40
|
#define UPEKTC_CMD_LEN 0x40
|
||||||
#define IMAGE_WIDTH 208
|
#define IMAGE_WIDTH 208
|
||||||
|
@ -1936,5 +1935,3 @@ static const unsigned char scan_cmd[0x40] = {
|
||||||
0x05, 0x90, 0xf6, 0x77, 0x84, 0xf5, 0x2f, 0x01,
|
0x05, 0x90, 0xf6, 0x77, 0x84, 0xf5, 0x2f, 0x01,
|
||||||
0x05, 0x90, 0xf6, 0x00, 0xc8, 0x00, 0xec, 0x00
|
0x05, 0x90, 0xf6, 0x00, 0xc8, 0x00, 0xec, 0x00
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
* 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 __UPEKTC_IMG_H
|
#pragma once
|
||||||
#define __UPEKTC_IMG_H
|
|
||||||
|
|
||||||
static const unsigned char upek2020_init_1[] = {
|
static const unsigned char upek2020_init_1[] = {
|
||||||
'C', 'i', 'a', 'o',
|
'C', 'i', 'a', 'o',
|
||||||
|
@ -140,5 +139,3 @@ static const unsigned char upek2020_ack_frame[] = {
|
||||||
0x30,
|
0x30,
|
||||||
0xac, 0x5b /* CRC */
|
0xac, 0x5b /* CRC */
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#ifndef __VFS5011_PROTO_H
|
#pragma once
|
||||||
#define __VFS5011_PROTO_H
|
|
||||||
|
|
||||||
#define VFS5011_LINE_SIZE 240
|
#define VFS5011_LINE_SIZE 240
|
||||||
#define VFS5011_IMAGE_WIDTH 160
|
#define VFS5011_IMAGE_WIDTH 160
|
||||||
|
@ -6182,5 +6181,3 @@ static unsigned char vfs5011_prepare_04[] = { /* 2903 B */
|
||||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
|
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
|
||||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
|
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -19,8 +19,7 @@
|
||||||
* 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 __DRIVERS_API_H__
|
#pragma once
|
||||||
#define __DRIVERS_API_H__
|
|
||||||
|
|
||||||
#include "fpi-assembling.h"
|
#include "fpi-assembling.h"
|
||||||
#include "fpi-device.h"
|
#include "fpi-device.h"
|
||||||
|
@ -30,5 +29,3 @@
|
||||||
#include "fpi-print.h"
|
#include "fpi-print.h"
|
||||||
#include "fpi-usb-transfer.h"
|
#include "fpi-usb-transfer.h"
|
||||||
#include "fpi-ssm.h"
|
#include "fpi-ssm.h"
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
* 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 __FPI_ASSEMBLING_H__
|
#pragma once
|
||||||
#define __FPI_ASSEMBLING_H__
|
|
||||||
|
|
||||||
#include <fprint.h>
|
#include <fprint.h>
|
||||||
|
|
||||||
|
@ -116,5 +115,3 @@ struct fpi_line_asmbl_ctx
|
||||||
FpImage *fpi_assemble_lines (struct fpi_line_asmbl_ctx *ctx,
|
FpImage *fpi_assemble_lines (struct fpi_line_asmbl_ctx *ctx,
|
||||||
GSList *lines,
|
GSList *lines,
|
||||||
size_t num_lines);
|
size_t num_lines);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -19,8 +19,7 @@
|
||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __FPI_BYTE_READER_H__
|
#pragma once
|
||||||
#define __FPI_BYTE_READER_H__
|
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include "fpi-byte-utils.h"
|
#include "fpi-byte-utils.h"
|
||||||
|
@ -676,5 +675,3 @@ fpi_byte_reader_skip_inline (FpiByteReader * reader, guint nbytes)
|
||||||
#endif /* FPI_BYTE_READER_DISABLE_INLINES */
|
#endif /* FPI_BYTE_READER_DISABLE_INLINES */
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __FPI_BYTE_READER_H__ */
|
|
||||||
|
|
|
@ -21,9 +21,7 @@
|
||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
#ifndef __FP_UTILS_H__
|
|
||||||
#define __FP_UTILS_H__
|
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
@ -485,4 +483,3 @@ FP_WRITE_DOUBLE_BE(guint8 *data, gdouble num)
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GTK_DOC_IGNORE__ */
|
#endif /* __GTK_DOC_IGNORE__ */
|
||||||
#endif /* __FP_UTILS_H__ */
|
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __FPI_BYTE_WRITER_H__
|
#pragma once
|
||||||
#define __FPI_BYTE_WRITER_H__
|
|
||||||
|
|
||||||
#include "fpi-byte-reader.h"
|
#include "fpi-byte-reader.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -409,5 +408,3 @@ fpi_byte_writer_fill_inline (FpiByteWriter * writer, guint8 value, guint size)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __FPI_BYTE_WRITER_H__ */
|
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
* 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 __FPI_LOG_H__
|
#pragma once
|
||||||
#define __FPI_LOG_H__
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:fpi-log
|
* SECTION:fpi-log
|
||||||
|
@ -94,5 +93,3 @@
|
||||||
* Same as BUG_ON() but is always true.
|
* Same as BUG_ON() but is always true.
|
||||||
*/
|
*/
|
||||||
#define BUG() BUG_ON (1)
|
#define BUG() BUG_ON (1)
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
Loading…
Reference in a new issue