ports/104058: [MAINTAINER] misc/mmv: Restore old escape char

Simon Olofsson simon at olofsson.de
Fri Oct 6 13:00:37 UTC 2006


>Number:         104058
>Category:       ports
>Synopsis:       [MAINTAINER] misc/mmv: Restore old escape char
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 06 13:00:34 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Simon Olofsson
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD gul.lan.gath3n.de 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #35: Tue Oct  3 20:51:07 CEST
>Description:
Allow both escape characters '#' (the Debian/DOS Way) and '=' (the FreeBSD/Unix
one).
Kudos to Dan Nelson <dnelson at allantgroup.com> for the patch.

Added file(s):
- files/patch-mmv.1
- files/patch-mmv.c

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- mmv-1.01b.14_1.patch begins here ---
diff -ruN -ruN --exclude=CVS /usr/ports/misc/mmv/Makefile /usr/home/simon/src/ports/misc/mmv/Makefile
--- /usr/ports/misc/mmv/Makefile	Wed Oct  4 12:02:08 2006
+++ /usr/home/simon/src/ports/misc/mmv/Makefile	Thu Oct  5 19:47:53 2006
@@ -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 -ruN -ruN --exclude=CVS /usr/ports/misc/mmv/files/patch-mmv.1 /usr/home/simon/src/ports/misc/mmv/files/patch-mmv.1
--- /usr/ports/misc/mmv/files/patch-mmv.1	Thu Jan  1 01:00:00 1970
+++ /usr/home/simon/src/ports/misc/mmv/files/patch-mmv.1	Thu Oct  5 19:14:06 2006
@@ -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 at litchi.bbn.com>,
++<2439 at litchi.bbn.com>, and <2643 at 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 -ruN -ruN --exclude=CVS /usr/ports/misc/mmv/files/patch-mmv.c /usr/home/simon/src/ports/misc/mmv/files/patch-mmv.c
--- /usr/ports/misc/mmv/files/patch-mmv.c	Thu Jan  1 01:00:00 1970
+++ /usr/home/simon/src/ports/misc/mmv/files/patch-mmv.c	Thu Oct  5 19:07:51 2006
@@ -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') {
--- mmv-1.01b.14_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list