1 /* 2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 3 * Copyright (C) 2007 - INRIA - Sylvestre LEDRU 4 * Copyright (C) 2008 - INRIA - Allan CORNET 5 * 6 * Copyright (C) 2012 - 2016 - Scilab Enterprises 7 * 8 * This file is hereby licensed under the terms of the GNU GPL v2.0, 9 * pursuant to article 5.3.4 of the CeCILL v.2.1. 10 * This file was originally licensed under the terms of the CeCILL v2.1, 11 * and continues to be available under such terms. 12 * For more information, see the COPYING file which you should have received 13 * along with this program. 14 * 15 */ 16 17 #ifndef __GETENVC_H__ 18 #define __GETENVC_H__ 19 20 #include <wchar.h> 21 #include "dynlib_io.h" 22 #include "machine.h" 23 24 /** 25 * Retrieve a system variable 26 * @param[out] ierr the error code 27 * @param[in] var the name of the variable 28 * @param[out] buf the value of the variable 29 * @param[out] buflen the length of the variable 30 * @param[in] iflag 31 */ 32 IO_IMPEXP void getenvc(int *ierr, const char *var, char *buf, int *buflen, int *iflag); 33 34 /** 35 * Searches for a file using environment paths 36 * @param[in] filename 37 * @param[in] environment variable where we search 38 * @return path found 39 */ 40 IO_IMPEXP char *searchEnv(const char *name, const char *env_var); 41 IO_IMPEXP wchar_t* searchEnvW(const wchar_t* _pwstName, const wchar_t* _pwstEnv); 42 43 44 45 #endif /* __GETENVC_H__ */ 46