mirror of
https://git.freebsd.org/ports.git
synced 2025-06-29 16:40:31 -04:00
This is a port of the Seiko/Epson Epsonscan2 scanner engine and GUI[1]. It provides a complete alternative to sane/xsane with its own scanner engine and GUI. It also provides a sane back-end library (libsane-epsonscan2.so) so that it works with the sane package. There are two parts to this port: - graphics/epsonscan2 - the main scanner engine and GUI that works with (most) USB scanners - graphics/epsonscan2-non-free-plugin - support for Epson's Linux binary that adds network access to scanners and usb access to some particular scanners Please read the file %%PREFIX%%/lib/epsonscan2/Read_me.FreeBSD for notes on how to set this up and use it. [1] https://download.ebz.epson.net/man/linux/epsonscan2_e.html PR: 261891 Reviewed by: (partly) Tatsuki Makino <tatsuki_makino@hotmail.com>, diizzy@
28 lines
2 KiB
C++
28 lines
2 KiB
C++
--- src/CommonUtility/utils/ESAnyCastUtils.h.orig 2021-11-25 00:56:55 UTC
|
|
+++ src/CommonUtility/utils/ESAnyCastUtils.h
|
|
@@ -141,7 +141,11 @@ const T* SafeAnyDataCPtr( const ESAny& anyIn )
|
|
template< typename T >
|
|
T* SafeAnyDataPtr_WithLog( ESAny& anyIn, ES_CHAR_CPTR lpszFile = __ES_FILE__, const int nLine = __LINE__ )
|
|
{
|
|
- if( anyIn.empty() || (anyIn.type() != typeid(T)) ){
|
|
+ // XXX changed to a string comparison of the type name here because, on FreeBSD, the hash_code()s for anyIn.type() and typeid(T) are differing for T = ESDictionary
|
|
+ // even though the names of the types are the same!
|
|
+ // It should work as it was. It is not efficient now. Why are the type hash_code()s different on FreeBSD??
|
|
+ // was: if( anyIn.empty() || (anyIn.type() != typeid(T)) ){
|
|
+ if( anyIn.empty() || ES_CMN_FUNCS::STRING::ToESString(anyIn.type().name()).compare(ES_CMN_FUNCS::STRING::ToESString(typeid(T).name())) != 0 ){
|
|
if(anyIn.empty()){
|
|
ES_Warning_Log3( __ES_FUNCTION__, lpszFile, nLine, ES_STRING("Boost Any Cast Warning Empty!!"));
|
|
} else {
|
|
@@ -167,7 +171,11 @@ T* SafeAnyDataPtr_WithLog( ESAny& anyIn, ES_CHAR_CPTR
|
|
template< typename T >
|
|
const T* SafeAnyDataCPtr_WithLog( const ESAny& anyIn, ES_CHAR_CPTR lpszFile = __ES_FILE__, const int nLine = __LINE__ )
|
|
{
|
|
- if( anyIn.empty() || (anyIn.type() != typeid(T)) ){
|
|
+ // XXX changed to a string comparison of the type name here because, on FreeBSD, the hash_code()s for anyIn.type() and typeid(T) are differing for T = ESDictionary
|
|
+ // even though the names of the types are the same!
|
|
+ // It should work as it was. It is not efficient now. Why are the type hash_code()s different on FreeBSD??
|
|
+ // was: if( anyIn.empty() || (anyIn.type() != typeid(T)) ){
|
|
+ if( anyIn.empty() || ES_CMN_FUNCS::STRING::ToESString(anyIn.type().name()).compare(ES_CMN_FUNCS::STRING::ToESString(typeid(T).name())) != 0 ){
|
|
if(anyIn.empty()){
|
|
ES_Warning_Log3( __ES_FUNCTION__, lpszFile, nLine, ES_STRING("Boost Any Cast Warning Empty!!"));
|
|
} else {
|