[Hp5400backend-cvs-update] hp5400/hp5400 Makefile,1.4,1.5 hp5400.c,1.18,1.19
Status: Alpha
Brought to you by:
soumarmt
|
From: <sou...@us...> - 2003-03-07 22:42:13
|
Update of /cvsroot/hp5400backend/hp5400/hp5400
In directory sc8-pr-cvs1:/tmp/cvs-serv25494
Modified Files:
Makefile hp5400.c
Log Message:
Patch to have easy desactivation of the version string match test. It might be useful while we don't know all the versions that works with this scanner
Index: Makefile
===================================================================
RCS file: /cvsroot/hp5400backend/hp5400/hp5400/Makefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Makefile 26 Feb 2003 12:16:21 -0000 1.4
--- Makefile 7 Mar 2003 22:42:07 -0000 1.5
***************
*** 19,22 ****
--- 19,25 ----
LDFLAGS = -lm
+ # uncomment this line if you want to remove the version string match test
+ # when connecting to the scanner
+ #CFLAGS = $(CFLAGS) -DNO_STRING_VERSION_MATCH
# Other utilities
Index: hp5400.c
===================================================================
RCS file: /cvsroot/hp5400backend/hp5400/hp5400/hp5400.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** hp5400.c 6 Mar 2003 14:00:28 -0000 1.18
--- hp5400.c 7 Mar 2003 22:42:08 -0000 1.19
***************
*** 1081,1085 ****
goto hp5400_close_exit;
}
!
/* Match on everything except the version number */
if( memcmp( szVersion+1, MatchVersion, sizeof(MatchVersion)-4 ) )
--- 1081,1087 ----
goto hp5400_close_exit;
}
!
!
! #ifndef NO_STRING_VERSION_MATCH
/* Match on everything except the version number */
if( memcmp( szVersion+1, MatchVersion, sizeof(MatchVersion)-4 ) )
***************
*** 1088,1095 ****
{
DBG(DBG_MSG, "Sorry, unknown scanner version. Attempted match on '%s' and '%s'\n", MatchVersion, MatchVersion2 );
! DBG(DBG_MSG, "Vesion is '%s'", szVersion );
goto hp5400_close_exit;
}
}
params->iXferHandle = iHandle;
--- 1090,1100 ----
{
DBG(DBG_MSG, "Sorry, unknown scanner version. Attempted match on '%s' and '%s'\n", MatchVersion, MatchVersion2 );
! DBG(DBG_MSG, "Vesion is '%s'\n", szVersion );
goto hp5400_close_exit;
}
}
+ #else
+ DBG(DBG_MSG, "Warning, Version match is disabled. Version is '%s'\n", szVersion );
+ #endif /* NO_STRING_VERSION_MATCH */
params->iXferHandle = iHandle;
***************
*** 1130,1134 ****
goto hp5400_close_exit;
}
!
if( memcmp( szVersion+1, MatchVersion, sizeof(MatchVersion)-1 ) )
{
--- 1135,1140 ----
goto hp5400_close_exit;
}
!
! #ifndef NO_STRING_VERSION_MATCH
if( memcmp( szVersion+1, MatchVersion, sizeof(MatchVersion)-1 ) )
{
***************
*** 1136,1144 ****
{
DBG(DBG_MSG, "Sorry, unknown scanner version. Attempted match on '%s' and '%s'\n", MatchVersion, MatchVersion2 );
! DBG(DBG_MSG, "Vesion is '%s'", szVersion );
ret = -1;
goto hp5400_close_exit;
}
}
if( _ReportDevice )
--- 1142,1153 ----
{
DBG(DBG_MSG, "Sorry, unknown scanner version. Attempted match on '%s' and '%s'\n", MatchVersion, MatchVersion2 );
! DBG(DBG_MSG, "Vesion is '%s'\n", szVersion );
ret = -1;
goto hp5400_close_exit;
}
}
+ #else
+ DBG(DBG_MSG, "Warning, Version match is disabled. Version is '%s'\n", szVersion );
+ #endif /* NO_STRING_VERSION_MATCH */
if( _ReportDevice )
|