[Pcsclite-cvs-commit] PCSC/src configfile.l,1.13,1.14
rousseau@haydn.debian.org
rousseau@haydn.debian.org
Update of /cvsroot/pcsclite/PCSC/src
In directory haydn:/tmp/cvs-serv22990/src
Modified Files:
configfile.l
Log Message:
- allow ':' in DEVICENAME
- use ':' to indicate a non-real device (do not test for its existence
as a file).
You can use this in something like "net://1.2.3.4/foobar" to indicate
a reader on a remote machine like an X11 terminal.
Index: configfile.l
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/configfile.l,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- configfile.l 30 Mar 2004 15:08:59 -0000 1.13
+++ configfile.l 24 May 2004 06:36:19 -0000 1.14
@@ -32,8 +32,8 @@
#.* {}
"\n" { iLinenumber++; }
(\"[^"\n]*["\n])|(\'[^'\n]*['\n]) { evaluatetoken( yytext); }
-[ \t] {}
-([A-Z]|[a-z]|[0-9]|[\\\/\-\.\_\@])+ { evaluatetoken( yytext ); }
+[ \t] {}
+([A-Z]|[a-z]|[0-9]|[\\\/\-\.\_\@:])+ { evaluatetoken( yytext ); }
. { tok_error( yytext ); }
%%
@@ -89,7 +89,8 @@
struct stat fStatBuf;
pcDevicename = strdup(pcCurrent);
- if (SYS_Stat(pcDevicename, &fStatBuf) != 0)
+ if ((NULL == strchr(pcDevicename, ':'))
+ && (SYS_Stat(pcDevicename, &fStatBuf) != 0))
{
DebugLogC("Error with device %s: %s",
pcDevicename, strerror(errno));