|
@@ -234,7 +234,6 @@ void save_stop_handler (void);
|
|
|
char *tilde_expand (const char *directory);
|
|
|
|
|
|
void canonicalize_pathname_custom (char *path, canon_path_flags_t flags);
|
|
|
-void canonicalize_pathname (char *path);
|
|
|
|
|
|
char *mc_realpath (const char *path, char *resolved_path);
|
|
|
|
|
@@ -279,7 +278,9 @@ void mc_replace_error (GError ** dest, int code, const char *format, ...) G_GNUC
|
|
|
|
|
|
gboolean mc_time_elapsed (gint64 * timestamp, gint64 delay);
|
|
|
|
|
|
-/*** inline functions **************************************************/
|
|
|
+/* --------------------------------------------------------------------------------------------- */
|
|
|
+/*** inline functions ****************************************************************************/
|
|
|
+/* --------------------------------------------------------------------------------------------- */
|
|
|
|
|
|
static inline gboolean
|
|
|
exist_file (const char *name)
|
|
@@ -287,10 +288,31 @@ exist_file (const char *name)
|
|
|
return (access (name, R_OK) == 0);
|
|
|
}
|
|
|
|
|
|
+/* --------------------------------------------------------------------------------------------- */
|
|
|
+
|
|
|
static inline gboolean
|
|
|
is_exe (mode_t mode)
|
|
|
{
|
|
|
return ((mode & (S_IXUSR | S_IXGRP | S_IXOTH)) != 0);
|
|
|
}
|
|
|
|
|
|
+/* --------------------------------------------------------------------------------------------- */
|
|
|
+/**
|
|
|
+ * Canonicalize path with CANON_PATH_ALL.
|
|
|
+ *
|
|
|
+ * @param path path to file
|
|
|
+ * @param flags canonicalization flags
|
|
|
+ *
|
|
|
+ * All modifications of @path are made in place.
|
|
|
+ * Well formed UNC paths are modified only in the local part.
|
|
|
+ */
|
|
|
+
|
|
|
+static inline void
|
|
|
+canonicalize_pathname (char *path)
|
|
|
+{
|
|
|
+ canonicalize_pathname_custom (path, CANON_PATH_ALL);
|
|
|
+}
|
|
|
+
|
|
|
+/* --------------------------------------------------------------------------------------------- */
|
|
|
+
|
|
|
#endif /* MC_UTIL_H */
|