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

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

sync with wine20000430 + added exports for shell32

File size: 2.6 KB
Line 
1/* $Id: pathcpp.cpp,v 1.1 2000-05-18 14:07: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
40ODINDEBUGCHANNEL(SHLWAPI-SHELLPATH)
41
42/*****************************************************************************
43 * Name : LPSTR PathSkipRootA
44 * Purpose : Parses a path, ignoring the drive letter or UNC server/share path parts.
45 * Parameters: LPCSTR pszPath
46 * Variables :
47 * Result : unknown
48 * Remark : SHLWAPI.PathSkipRootA
49 * Status : UNTESTED
50 *
51 * Author : Patrick Haller [Mon, 2000/01/31 23:02]
52 *****************************************************************************/
53
54ODINFUNCTION1(LPSTR, PathSkipRootA, LPCSTR, pszPath)
55{
56 // check if "driveletter:\"
57 if (pszPath[1] == ':')
58 return (LPSTR)(pszPath + 2);
59
60 // check if UNC-style path
61 if ( (pszPath[0] == '\\') &&
62 (pszPath[1] == '\\') )
63 {
64 LPSTR pszTemp = strchr(pszPath + 2, '\\');
65 if (NULL != pszTemp)
66 // return root part, skip server/share
67 return (LPSTR)pszTemp++;
68 else
69 // UNC syntax validation, return pszPath
70 return (LPSTR)pszTemp;
71 }
72
73 // else ...
74 return (LPSTR)pszPath;
75}
76
77
78/*****************************************************************************
79 * Name : LPWSTR PathSkipRootW
80 * Purpose : Parses a path, ignoring the drive letter or UNC server/share path parts.
81 * Parameters: LPCWSTR pszPath
82 * Variables :
83 * Result : unknown
84 * Remark : SHLWAPI.PathSkipRootW
85 * Status : UNTESTED
86 *
87 * Author : Patrick Haller [Mon, 2000/01/31 23:02]
88 *****************************************************************************/
89
90ODINFUNCTION1(LPWSTR, PathSkipRootW, LPCWSTR, pszPath)
91{
92 dprintf(("not implemented"));
93
94 return (LPWSTR)pszPath;
95}
Note: See TracBrowser for help on using the repository browser.