889f8d29a8325ed741d1466074c5371910a1fd63vboxsync/* $Id$ */
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync/** @file
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * IPRT - RTPath - Internal header that includes RTPATH_TEMPLATE_CPP_H multiple
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * times to expand the code for different path styles.
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync */
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync/*
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * Copyright (C) 2006-2013 Oracle Corporation
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync *
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * available from http://www.virtualbox.org. This file is free software;
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * you can redistribute it and/or modify it under the terms of the GNU
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * General Public License (GPL) as published by the Free Software
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync *
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * The contents of this file may alternatively be used under the terms
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * of the Common Development and Distribution License Version 1.0
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * VirtualBox OSE distribution, in which case the provisions of the
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * CDDL are applicable instead of those of the GPL.
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync *
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * You may elect to license modified versions of this file under the
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync * terms and conditions of either the GPL or the CDDL or both.
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync */
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync
e5dc0696566fc781da74690258b826515e7d496evboxsync#undef RTPATH_DELIMITER
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync/*
e5dc0696566fc781da74690258b826515e7d496evboxsync * DOS style
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync */
e5dc0696566fc781da74690258b826515e7d496evboxsync#undef RTPATH_STYLE
e5dc0696566fc781da74690258b826515e7d496evboxsync#undef RTPATH_SLASH
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#undef RTPATH_SLASH_STR
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#undef RTPATH_IS_SLASH
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#undef RTPATH_IS_VOLSEP
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#undef RTPATH_STYLE_FN
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync
e5dc0696566fc781da74690258b826515e7d496evboxsync#define RTPATH_STYLE RTPATH_STR_F_STYLE_DOS
e5dc0696566fc781da74690258b826515e7d496evboxsync#define RTPATH_SLASH '\\'
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#define RTPATH_SLASH_STR "\\"
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#define RTPATH_IS_SLASH(a_ch) ( (a_ch) == '\\' || (a_ch) == '/' )
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#define RTPATH_IS_VOLSEP(a_ch) ( (a_ch) == ':' )
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#define RTPATH_STYLE_FN(a_Name) a_Name ## StyleDos
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#include RTPATH_TEMPLATE_CPP_H
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync
e5dc0696566fc781da74690258b826515e7d496evboxsync/*
e5dc0696566fc781da74690258b826515e7d496evboxsync * Unix style.
e5dc0696566fc781da74690258b826515e7d496evboxsync */
e5dc0696566fc781da74690258b826515e7d496evboxsync#undef RTPATH_STYLE
e5dc0696566fc781da74690258b826515e7d496evboxsync#undef RTPATH_SLASH
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#undef RTPATH_SLASH_STR
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#undef RTPATH_IS_SLASH
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#undef RTPATH_IS_VOLSEP
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#undef RTPATH_STYLE_FN
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync
e5dc0696566fc781da74690258b826515e7d496evboxsync#define RTPATH_STYLE RTPATH_STR_F_STYLE_UNIX
e5dc0696566fc781da74690258b826515e7d496evboxsync#define RTPATH_SLASH '/'
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#define RTPATH_SLASH_STR "/"
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#define RTPATH_IS_SLASH(a_ch) ( (a_ch) == '/' )
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#define RTPATH_IS_VOLSEP(a_ch) ( false )
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#define RTPATH_STYLE_FN(a_Name) a_Name ## StyleUnix
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#include RTPATH_TEMPLATE_CPP_H
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync
e5dc0696566fc781da74690258b826515e7d496evboxsync/*
e5dc0696566fc781da74690258b826515e7d496evboxsync * Clean up and restore the host style.
e5dc0696566fc781da74690258b826515e7d496evboxsync */
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#undef RTPATH_STYLE_FN
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#if defined(RT_OS_OS2) || defined(RT_OS_WINDOWS)
e5dc0696566fc781da74690258b826515e7d496evboxsync# undef RTPATH_STYLE
8d930713fffc340c60a889a6d643557a750ca432vboxsync# undef RTPATH_SLASH
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync# undef RTPATH_SLASH_STR
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync# undef RTPATH_IS_SLASH
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync# undef RTPATH_IS_VOLSEP
e5dc0696566fc781da74690258b826515e7d496evboxsync# define RTPATH_STYLE RTPATH_STR_F_STYLE_DOS
e5dc0696566fc781da74690258b826515e7d496evboxsync# define RTPATH_SLASH '\\'
e5dc0696566fc781da74690258b826515e7d496evboxsync# define RTPATH_SLASH_STR "\\"
e5dc0696566fc781da74690258b826515e7d496evboxsync# define RTPATH_IS_SLASH(a_ch) ( (a_ch) == '\\' || (a_ch) == '/' )
e5dc0696566fc781da74690258b826515e7d496evboxsync# define RTPATH_IS_VOLSEP(a_ch) ( (a_ch) == ':' )
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync#endif
889f8d29a8325ed741d1466074c5371910a1fd63vboxsync