Mercurial > retraceit
view src/util.h @ 7:c11fe56aa4a2
Disable error if an image cannot be loaded
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 25 Mar 2015 14:25:10 +0100 |
parents | 147b08bc7d64 |
children | 098a10fc2e83 |
line wrap: on
line source
/* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik * Software engineering by Intevation GmbH * * This file is Free Software under the GNU GPL (v>=2) * and comes with ABSOLUTELY NO WARRANTY! * See LICENSE.txt for details. */ #ifndef COMMON_UTIL_H #define COMMON_UTIL_H /* @file util.h * @brief The usual useful stuff that fit nowhere else */ #include <stdbool.h> #ifdef __cplusplus extern "C" { #endif /**@brief Get the directory in which the current process resides in * * Look up the directory in which the current process is placed. * If the path is longer then MAX_PATH NULL is returned. * * Returns a utf-8 encoded string that has to be freed by the caller * on linux the path is returned as is including the last /. * * @returns The directory of the current process */ char * get_install_dir(); #ifndef WIN32 /**@def Some value to use as equivalent as MAX_PATH on windows */ #define MAX_PATH_LINUX 4000 /**@brief Get the directory in which the process proc resides in * * Look up the directory in which the process proc is placed. * If the path is longer then MAX_PATH NULL is returned. * * Returns a utf-8 encoded string that has to be freed by the caller * on linux the path is returned as is including the last /. * * @param[in] A process id or special name from the proc file system. * * @returns The directory of the process */ char * get_proc_install_dir(const char *proc); #endif #ifdef __cplusplus } #endif #endif // COMMON_UTIL_H