Am 10.06.2005 um 18:27 schrieb Vlad Seryakov:
We can use
Tcl_FSConvertToPathType or Tcl_FsStat
OK. So Tcl_FSConvertToPathType won't work since it will
accept anything that looks like a valid path, even the
192.168.1.1:8000, so this is not the way to go.
The Tcl_FSStat is more appealing since it will actualy
check the thing being a file. This is much better but
will break for people having the file called
192.168.1.1:8000 in the server's home directory :-)
I guess, you can't make all happy...
Also, I see (in driver.c:436)
drvPtr = firstDrvPtr;
while (drvPtr != NULL) {
if (drvPtr->bindaddr && drvPtr->bindaddr[0] == '/') {
drvPtr->opts |= NS_DRIVER_UNIX;
}
if (drvPtr->opts & NS_DRIVER_UDP) {
Here the decision is taken on examining the bind-address.
Couldn't we move this way down where the drvPtr->bindaddr
is actually assigned to and turn the drvPtr->opts there?
This would be more logical and easy to understand.
Zoran