aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2006-10-07 04:19:29 +0800
committermiwi <miwi@FreeBSD.org>2006-10-07 04:19:29 +0800
commit9024d8a6db907492116e1d41e957f4c979c881d6 (patch)
tree0cc679b77449b38a93c1ef6d5c74921d3ee93aa1 /misc
parentc5406918f7a1c5b9190d5441880d581b57424f4f (diff)
downloadfreebsd-ports-gnome-9024d8a6db907492116e1d41e957f4c979c881d6.tar.gz
freebsd-ports-gnome-9024d8a6db907492116e1d41e957f4c979c881d6.tar.zst
freebsd-ports-gnome-9024d8a6db907492116e1d41e957f4c979c881d6.zip
- Allow both escape characters '#' and '='
PR: ports/104058 Submitted by: Simon Olofsson <simon@olofsson.de> (maintainer)
Diffstat (limited to 'misc')
-rw-r--r--misc/mmv/Makefile1
-rw-r--r--misc/mmv/files/patch-mmv.136
-rw-r--r--misc/mmv/files/patch-mmv.c61
3 files changed, 98 insertions, 0 deletions
diff --git a/misc/mmv/Makefile b/misc/mmv/Makefile
index 69d89c85fdbc..56b69820255f 100644
--- a/misc/mmv/Makefile
+++ b/misc/mmv/Makefile
@@ -7,6 +7,7 @@
PORTNAME= mmv
PORTVERSION= 1.01b.14
+PORTREVISION= 1
CATEGORIES= misc
MASTER_SITES= ${MASTER_SITE_DEBIAN_POOL}
DISTNAME= ${PORTNAME}_1.01b.orig
diff --git a/misc/mmv/files/patch-mmv.1 b/misc/mmv/files/patch-mmv.1
new file mode 100644
index 000000000000..52b46c6342a3
--- /dev/null
+++ b/misc/mmv/files/patch-mmv.1
@@ -0,0 +1,36 @@
+--- mmv.1 Thu Oct 5 19:09:58 2006
++++ mmv.1 Thu Oct 5 19:12:46 2006
+@@ -345,7 +345,7 @@
+ with embedded
+ .I wildcard
+ .IR indexes ,
+-where an index consists of the character '#'
++where an index consists of the character '#' or '='
+ followed by a string of digits.
+ When a source file matches a
+ .I from
+@@ -406,7 +406,7 @@
+ However, if "dir2\*(SLa" already exists and is itself a directory,
+ this is considered an error.
+ .PP
+-To strip any character (e.g. '*', '?', or '#')
++To strip any character (e.g. '*', '?', '#', or '=')
+ of its special meaning to
+ .IR mmv ,
+ as when the actual replacement name must contain the character '#',
+@@ -639,6 +639,15 @@
+ .SH "SEE ALSO"
+ mv(1), cp(1), ln(1), umask(1)
+ \}
++.SH "HISTORY"
++The original FreeBSD port of mmv was derived from the Usenet
++comp.sources.unix postings <2438@litchi.bbn.com>,
++<2439@litchi.bbn.com>, and <2643@litchi.bbn.com>.
++The current port is based on the comp.binaries.ibm.pc postings
++(no messageids available).
++The Unix version used '=' as the index escape character,
++while the MS-DOS version used '#'.
++This port allows both.
+ .SH "AUTHOR"
+ Vladimir Lanin
+ .br
diff --git a/misc/mmv/files/patch-mmv.c b/misc/mmv/files/patch-mmv.c
new file mode 100644
index 000000000000..6d7298853727
--- /dev/null
+++ b/misc/mmv/files/patch-mmv.c
@@ -0,0 +1,61 @@
+--- mmv.c Thu Oct 5 10:36:36 2006
++++ mmv.c Thu Oct 5 10:38:31 2006
+@@ -73,7 +73,8 @@
+ %s [-m|x|r|c|o|a|l%s] [-h] [-d|p] [-g|t] [-v|n] [from to]\n\
+ \n\
+ Use #[l|u]N in the ``to'' pattern to get the [lowercase|uppercase of the]\n\
+-string matched by the N'th ``from'' pattern wildcard.\n\
++string matched by the N'th ``from'' pattern wildcard. = can be used\n\
++instead of #.\n\
+ \n\
+ A ``from'' pattern containing wildcards should be quoted when given\n\
+ on the command line. Also you may need to quote ``to'' pattern.\n\
+@@ -976,6 +977,9 @@
+ lastname = p + 1;
+ break;
+ case '#':
++ case '=':
++ {
++ char index_char=c;
+ c = *(++p);
+ if (c == 'l' || c == 'u') {
+ #ifdef IS_MSDOS
+@@ -986,8 +990,8 @@
+ #endif
+ }
+ if (!isdigit(c)) {
+- printf("%s -> %s : expected digit (not '%c') after #.\n",
+- from, to, c);
++ printf("%s -> %s : expected digit (not '%c') after %c.\n",
++ from, to, c, index_char);
+ return(-1);
+ }
+ for(x = 0; ;x *= 10) {
+@@ -998,8 +1002,8 @@
+ p++;
+ }
+ if (x < 1 || x > totwilds) {
+- printf("%s -> %s : wildcard #%d does not exist.\n",
+- from, to, x);
++ printf("%s -> %s : wildcard %c%d does not exist.\n",
++ from, to, index_char, x);
+ return(-1);
+ }
+ #ifdef IS_MSDOS
+@@ -1007,6 +1011,7 @@
+ havedot = 1;
+ #endif
+ break;
++ }
+ case ESC:
+ if ((c = *(++p)) == '\0') {
+ printf(TRAILESC, from, to, ESC);
+@@ -2029,7 +2034,7 @@
+ repbad = 0;
+ p = fullrep;
+ for (pat = to, l = 0; (c = *pat) != '\0'; pat++, l++) {
+- if (c == '#') {
++ if (c == '#' || c == '=') {
+ c = *(++pat);
+ #ifndef IS_MSDOS
+ if (c == 'l') {