%% options copyright owner = Dirk Krause copyright year = 2019-xxxx SPDX-License-Identifier: BSD-3-Clause %% header /** @file dk4chdird.h Change current directory. */ #ifndef DK4CONF_H_INCLUDED #if DK4_BUILDING_DKTOOLS4 #include "dk4conf.h" #else #include #endif #endif #ifndef DK4ERROR_H_INCLUDED #if DK4_BUILDING_DKTOOLS4 #include "dk4error.h" #else #include #endif #endif #ifdef __cplusplus extern "C" { #endif /** Change current working directory. @param nd Name of new directory. @param erp Error report, may be NULL. @return 1 on success, 0 on error. CRT on Windows: Optional. Error codes: - DK4_E_INVALID_ARGUMENTS
if nd is NULL, - DK4_E_NOT_SUPPORTEDy
if the operation is not supported on the current system, - DK4_E_SYSTEM
with error code in lDetails1 or iDetails1 if the operation is supported but did fail. */ int dk4chdir(dkChar const *nd, dk4_er_t *erp); #ifdef __cplusplus } #endif /* vim: set ai sw=4 ts=4 : */ %% module #include "dk4conf.h" #include "dk4chdird.h" #if DK4_CHAR_SIZE > 1 #include "dk4chdirw.h" #else #include "dk4chdir8.h" #endif #if DK4_HAVE_ASSERT_H #ifndef ASSERT_H_INCLUDED #include #define ASSERT_H_INCLUDED 1 #endif #endif int dk4chdir(dkChar const *nd, dk4_er_t *erp) { #if DK4_USE_ASSERT assert(NULL != nd); #endif #if DK4_CHAR_SIZE > 1 return ( dk4chdir_wc(nd, erp) ); #else return ( dk4chdir_c8(nd, erp) ); #endif } /* vim: set ai sw=4 ts=4 : */