summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichal Domonkos <mdomonko@redhat.com>2022-04-21 17:01:47 +0200
committerPanu Matilainen <pmatilai@redhat.com>2022-10-04 10:11:32 +0300
commit2cdbf4af0bae4fc6a343e360089fadc77e17f973 (patch)
treef705a2b0b0957426e40616660ac7e1f5468e350b /include
parentf400d50c7d87d04412c9a917522e4546aa025b8f (diff)
downloadrpm-2cdbf4af0bae4fc6a343e360089fadc77e17f973.tar.gz
Add support for whitespace escaping in %files
Right now, literal whitespace is only possible by enclosing the filename in quotes, but we're going to change the semantics of quotes so that they also turn off any metacharacters, meaning that a combination of globs and literal whitespace would no longer be possible, unless we enable the backslash to also work for whitespace, so do that now. This will also make the next commit easier to implement.
Diffstat (limited to 'include')
-rw-r--r--include/rpm/rpmfileutil.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/rpm/rpmfileutil.h b/include/rpm/rpmfileutil.h
index a2396d494..9d195e020 100644
--- a/include/rpm/rpmfileutil.h
+++ b/include/rpm/rpmfileutil.h
@@ -145,6 +145,13 @@ int rpmGlob(const char * pattern, int * argcPtr, ARGV_t * argvPtr);
char * rpmEscapeSpaces(const char * s);
/** \ingroup rpmfileutil
+ * Unescape each char listed in accept by removing a backslash preceding it.
+ * @param s string
+ * @param accept chars to unescape (NULL for all)
+ */
+void rpmUnescape(char *s, const char *accept);
+
+/** \ingroup rpmfileutil
* Return type of compression used in file.
* @param file name of file
* @param[out] compressed address of compression type