git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4605
4a8a32a2-be11-0410-ad9d-
d568d2c75423
extp = dbuf_c_str (&ext);
if (extp[1] == '\0' && (extp[0] == 'c' || extp[0] == 'C'))
{
extp = dbuf_c_str (&ext);
if (extp[1] == '\0' && (extp[0] == 'c' || extp[0] == 'C'))
{
moduleName = dbuf_detach (&ext);
for (p = moduleName; *p; ++p)
moduleName = dbuf_detach (&ext);
for (p = moduleName; *p; ++p)
+ if (!isalnum ((unsigned char)*p))
dbuf_init(&path, 128);
dbuf_splitPath(module, &path, NULL);
dbuf_init(&path, 128);
dbuf_splitPath(module, &path, NULL);
- return dbuf_c_str(&path);
+ dbuf_c_str(&path);
+ return dbuf_detach(&path);
const char *
getBinPath(const char *prel)
{
const char *
getBinPath(const char *prel)
{
const char *ret_path;
if (NULL != (ret_path = findProgramPath(prel)))
{
const char *ret_path;
if (NULL != (ret_path = findProgramPath(prel)))
{
- dbuf_splitPath(prel, path, NULL);
- free((void *)ret_path);
- return dbuf_c_str(path);
+ dbuf_splitPath(ret_path, &path, NULL);
+ free((void *)ret_path);
+ dbuf_c_str(&path);
+ return dbuf_detach(&path);
static int
has_path(const char *path)
{
static int
has_path(const char *path)
{
- return splitPath(path, NULL, 0, NULL, 0);
+ return dbuf_splitPath(path, NULL, NULL);