source: trunk/src/shlwapi/pathcpp.cpp@ 4391

Last change on this file since 4391 was 4391, checked in by sandervl, 25 years ago

fixes for FS macro changes

File size: 2.7 KB
Line 
1/* $Id: pathcpp.cpp,v 1.5 2000-10-02 19:01:23 sandervl Exp $ */
2
3/*
4 * Win32 SHELL32 for OS/2
5 *
6 * Copyright 1997 Marcus Meissner
7 * Copyright 1999 Patrick Haller (haller@zebra.fh-weingarten.de)
8 * Project Odin Software License can be found in LICENSE.TXT
9 *
10 * Path Functions
11 *
12 * Many of this functions are in SHLWAPI.DLL also
13 *
14 * Corel WINE 20000324 level (without CRTDLL_* calls)
15 */
16
17/*****************************************************************************
18 * Remark *
19 *****************************************************************************
20
21 */
22
23
24/*****************************************************************************
25 * Includes *
26 *****************************************************************************/
27
28#include <odin.h>
29#include <odinwrap.h>
30#include <os2sel.h>
31
32#include <string.h>
33#include <ctype.h>
34#include <wctype.h>
35#include <wcstr.h>
36#define HAVE_WCTYPE_H
37
38#include "debugtools.h"
39
40#include <winreg.h>
41
42#include <heapstring.h>
43#include <misc.h>
44
45ODINDEBUGCHANNEL(SHLWAPI-SHELLPATH)
46
47/*****************************************************************************
48 * Name : LPSTR PathSkipRootA
49 * Purpose : Parses a path, ignoring the drive letter or UNC server/share path parts.
50 * Parameters: LPCSTR pszPath
51 * Variables :
52 * Result : unknown
53 * Remark : SHLWAPI.PathSkipRootA
54 * Status : COMPLETELY IMPLEMENTED ? UNTESTED
55 *
56 * Author : Patrick Haller [Mon, 2000/01/31 23:02]
57 *****************************************************************************/
58
59ODINFUNCTION1(LPSTR, PathSkipRootA, LPCSTR, pszPath)
60{
61 // check if "driveletter:\"
62 if (pszPath[1] == ':')
63 return (LPSTR)(pszPath + 2);
64
65 // check if UNC-style path
66 if ( (pszPath[0] == '\\') &&
67 (pszPath[1] == '\\') )
68 {
69 LPSTR pszTemp = strchr(pszPath + 2, '\\');
70 if (NULL != pszTemp)
71 // return root part, skip server/share
72 return (LPSTR)pszTemp++;
73 else
74 // UNC syntax validation, return pszPath
75 return (LPSTR)pszTemp;
76 }
77
78 // else ...
79 return (LPSTR)pszPath;
80}
81
82
83/*****************************************************************************
84 * Name : LPWSTR PathSkipRootW
85 * Purpose : Parses a path, ignoring the drive letter or UNC server/share path parts.
86 * Parameters: LPCWSTR pszPath
87 * Variables :
88 * Result : unknown
89 * Remark : SHLWAPI.PathSkipRootW
90 * Status : STUB UNTESTED
91 *
92 * Author : Patrick Haller [Mon, 2000/01/31 23:02]
93 *****************************************************************************/
94
95ODINFUNCTION1(LPWSTR, PathSkipRootW, LPCWSTR, pszPath)
96{
97 dprintf(("not implemented"));
98
99 return (LPWSTR)pszPath;
100}
Note: See TracBrowser for help on using the repository browser.