static size_t mkpath(const char *dir, const char *name, char *out);
static void updateselbuf(const char *path, char *newpath);
static char *xgetenv(const char *name, char *fallback);
-static void run_plugin(const char *plugin, char *newpath, const uchar flags);
+static void plugscript(const char *plugin, char *newpath, uchar flags);
/* Functions */
if (selbufpos) { /* File path(s) written to the buffer */
writesel(pselbuf, selbufpos - 1); /* Truncate NULL from end */
if (cfg.x11)
- run_plugin(utils[UTIL_CBCP], newpath, F_NOWAIT | F_NOTRACE);
+ plugscript(utils[UTIL_CBCP], newpath, F_NOWAIT | F_NOTRACE);
}
}
}
return TRUE;
}
-static void run_plugin(const char *plugin, char *newpath, const uchar flags)
+static void plugscript(const char *plugin, char *newpath, uchar flags)
{
mkpath(plugindir, plugin, newpath);
if (!access(newpath, X_OK))
appendfpath(newpath, mkpath(path, dents[cur].name, newpath));
writesel(pselbuf, selbufpos - 1); /* Truncate NULL from end */
if (cfg.x11)
- run_plugin(utils[UTIL_CBCP], newpath, F_NOWAIT | F_NOTRACE);
+ plugscript(utils[UTIL_CBCP], newpath, F_NOWAIT | F_NOTRACE);
lastappendpos = selbufpos;
selbufpos = utmp;
}
if (selbufpos != utmp) {
writesel(pselbuf, selbufpos - 1); /* Truncate NULL from end */
if (cfg.x11)
- run_plugin(utils[UTIL_CBCP], newpath, F_NOWAIT | F_NOTRACE);
+ plugscript(utils[UTIL_CBCP], newpath, F_NOWAIT | F_NOTRACE);
/* Restore current selection buffer position */
lastappendpos = selbufpos;
selbufpos = utmp;
printwait(msg, &presel);
goto nochange;
} else if (cfg.x11)
- run_plugin(utils[UTIL_CBCP], newpath, F_NOWAIT | F_NOTRACE);
+ plugscript(utils[UTIL_CBCP], newpath, F_NOWAIT | F_NOTRACE);
break;
case SEL_CP: // fallthrough
case SEL_MV: // fallthrough
/* Show notification on operation complete */
if (cfg.x11)
- run_plugin(utils[UTIL_NTFY], newpath, F_NOWAIT | F_NOTRACE);
+ plugscript(utils[UTIL_NTFY], newpath, F_NOWAIT | F_NOTRACE);
if (ndents)
copycurname();