1/*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 1997,2008 Oracle.  All rights reserved.
5 *
6 * $Id: os_abs.c,v 12.6 2008/01/08 20:58:46 bostic Exp $
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