• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/db-4.8.30/os_windows/
1/*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 1997-2009 Oracle.  All rights reserved.
5 *
6 * $Id$
7 */
8
9#include "db_config.h"
10
11#include "db_int.h"
12
13/*
14 * __os_abspath --
15 *	Return if a path is an absolute path.
16 */
17int
18__os_abspath(path)
19	const char *path;
20{
21	/*
22	 * !!!
23	 * Check for drive specifications, e.g., "C:".  In addition, the path
24	 * separator used by the win32 DB (PATH_SEPARATOR) is \; look for both
25	 * / and \ since these are user-input paths.
26	 */
27	if (isalpha(path[0]) && path[1] == ':')
28		path += 2;
29	return (path[0] == '/' || path[0] == '\\');
30}
31