summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-06-28 21:24:56 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-06-28 21:24:56 (GMT)
commitc74f9acb6f1c840dc71a4ac174760c1c6b788acd (patch)
treea52adf5624e0cd6ab29cc09e78d7e6ccce96e968 /win/tclWinFile.c
parent44df239c47c8db35ef6ed2cb410ebf367a062d95 (diff)
downloadtcl-c74f9acb6f1c840dc71a4ac174760c1c6b788acd.zip
tcl-c74f9acb6f1c840dc71a4ac174760c1c6b788acd.tar.gz
tcl-c74f9acb6f1c840dc71a4ac174760c1c6b788acd.tar.bz2
* generic/tclBasic.c: Removed dead code, including the
* generic/tclExecute.c: entire file tclMathOp.c. * generic/tclInt.h: * generic/tclMathOp.c (removed): * generic/tclTestObj.c: * win/tclWinFile.c: * unix/Makefile.in: Updated to reflect deletion of tclMathOp.c. * win/Makefile.in: * win/makefile.bc: * win/makefile.vc:
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c80
1 files changed, 1 insertions, 79 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 7a276d4..2220062 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinFile.c,v 1.93 2007/05/05 07:23:18 dkf Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.94 2007/06/28 21:24:58 dgp Exp $
*/
/* #define _WIN32_WINNT 0x0500 */
@@ -2322,84 +2322,6 @@ FromCTime(
fileTime->dwHighDateTime = convertedTime.HighPart;
}
-#if 0
-/*
- *-------------------------------------------------------------------------
- *
- * TclWinResolveShortcut --
- *
- * Resolve a potential Windows shortcut to get the actual file or
- * directory in question.
- *
- * Results:
- * Returns 1 if the shortcut could be resolved, or 0 if there was an
- * error or if the filename was not a shortcut. If bufferPtr did hold the
- * name of a shortcut, it is modified to hold the resolved target of the
- * shortcut instead.
- *
- * Side effects:
- * Loads and unloads OLE package to determine if filename refers to a
- * shortcut.
- *
- *-------------------------------------------------------------------------
- */
-
-int
-TclWinResolveShortcut(
- Tcl_DString *bufferPtr) /* Holds name of file to resolve. On return,
- * holds resolved file name. */
-{
- HRESULT hres;
- IShellLink *psl;
- IPersistFile *ppf;
- WIN32_FIND_DATA wfd;
- WCHAR wpath[MAX_PATH];
- char *path, *ext;
- char realFileName[MAX_PATH];
-
- /*
- * Windows system calls do not automatically resolve shortcuts like UNIX
- * automatically will with symbolic links.
- */
-
- path = Tcl_DStringValue(bufferPtr);
- ext = strrchr(path, '.');
- if ((ext == NULL) || (stricmp(ext, ".lnk") != 0)) {
- return 0;
- }
-
- CoInitialize(NULL);
- path = Tcl_DStringValue(bufferPtr);
- realFileName[0] = '\0';
- hres = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
- &IID_IShellLink, &psl);
- if (SUCCEEDED(hres)) {
- hres = psl->lpVtbl->QueryInterface(psl, &IID_IPersistFile, &ppf);
- if (SUCCEEDED(hres)) {
- MultiByteToWideChar(CP_ACP, 0, path, -1, wpath, sizeof(wpath));
- hres = ppf->lpVtbl->Load(ppf, wpath, STGM_READ);
- if (SUCCEEDED(hres)) {
- hres = psl->lpVtbl->Resolve(psl,NULL,SLR_ANY_MATCH|SLR_NO_UI);
- if (SUCCEEDED(hres)) {
- hres = psl->lpVtbl->GetPath(psl, realFileName, MAX_PATH,
- &wfd, 0);
- }
- }
- ppf->lpVtbl->Release(ppf);
- }
- psl->lpVtbl->Release(psl);
- }
- CoUninitialize();
-
- if (realFileName[0] != '\0') {
- Tcl_DStringSetLength(bufferPtr, 0);
- Tcl_DStringAppend(bufferPtr, realFileName, -1);
- return 1;
- }
- return 0;
-}
-#endif
-
/*
*---------------------------------------------------------------------------
*