YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
#include"mysys_priv.h" #include <m_string.h>
/* Finds where program can find it's files. pre_pathnameisfoundbyfirstlockingatprogname(argv[0]). ifprognamecontainspaththepathisreturned. elseifprognameisfoundinpath,returnit elseifprognameisgivenandPOSIXenvironmentvariable"_"isset thenpathistakenfrom"_". Iffilenamedoesn'tcontainapathappendMY_BASEDIR_VERSIONor MY_BASEDIRifdefined,elseappend"/my/running". own_path_name_partisconcatinatedtoresult.
my_path puts result in to and returns to */
if (!(path=getenv("PATH"))) return NullS;
dir[0]=FN_LIBCHAR; dir[1]=0; #ifdef PROGRAM_EXTENSION if (!fn_ext(name)[0])
ext=PROGRAM_EXTENSION; #endif
for (pos=path ; (pos=strchr(pos,PATH_SEP)) ; path= ++pos)
{ if (path != pos)
{
strxmov(strnmov(to,path,(uint) (pos-path)),dir,name,ext,NullS); if (!access(to,F_OK))
{
to[(uint) (pos-path)+1]=0; /* Return path only */ return to;
}
}
} #ifdef _WIN32
to[0]=FN_CURLIB;
strxmov(to+1,dir,name,ext,NullS); if (!access(to,F_OK)) /* Test in current dir */
{
to[2]=0; /* Leave ".\" */ return to;
} #endif return NullS; /* File not found */
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.10Bemerkung:
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.