]> git.deb.at Git - pkg/mmv.git/blob - debian/patches/patches-as-of-mmv-1.01b-15.diff
b99d45beeea37d63eb03dd451dd44f08259bb7c1
[pkg/mmv.git] / debian / patches / patches-as-of-mmv-1.01b-15.diff
1 Description: Patches as of mmv 1.01b-15
2  This patch contains the patches as of mmv 1.01b-15 when it has been
3  converted to the source format "3.0 (quilt)"
4 Author: Multiple Authors. See changelog for details.
5 Reviewed-By: Axel Beckert <abe@debian.org>
6 Last-Update: 2012-09-16
7
8 --- mmv-1.01b.orig/mmv.c
9 +++ mmv-1.01b/mmv.c
10 @@ -62,7 +62,8 @@ static char USAGE[] =
11  %s [-m|x%s|c|o|a|z] [-h] [-d|p] [-g|t] [-v|n] [from to]\n\
12  \n\
13  Use #N in the ``to'' pattern to get the string matched\n\
14 -by the N'th ``from'' pattern wildcard.\n";
15 +by the N'th ``from'' pattern wildcard.\n\
16 +Use -- as the end of options.\n";
17  
18  #define OTHEROPT (_osmajor < 3 ? "" : "|r")
19  
20 @@ -75,7 +76,9 @@ Use #[l|u]N in the ``to'' pattern to get
21  string matched by the N'th ``from'' pattern wildcard.\n\
22  \n\
23  A ``from'' pattern containing wildcards should be quoted when given\n\
24 -on the command line.\n";
25 +on the command line. Also you may need to quote ``to'' pattern.\n\
26 +\n\
27 +Use -- as the end of options.\n";
28  
29  #ifdef IS_SYSV
30  #define OTHEROPT ""
31 @@ -85,6 +88,7 @@ on the command line.\n";
32  
33  #endif
34  
35 +#include <unistd.h>
36  #include <stdio.h>
37  #include <ctype.h>
38  
39 @@ -120,14 +124,12 @@ extern unsigned _stklen = 10000;
40  #else
41  /* for various flavors of UN*X */
42  
43 +#include <libgen.h>
44 +#include <stdlib.h>
45  #include <sys/types.h>
46  #include <sys/stat.h>
47  #include <sys/file.h>
48  
49 -extern char *getenv();
50 -extern long lseek();
51 -extern char *malloc();
52 -
53  #ifdef HAS_DIRENT
54  #include <dirent.h>
55  typedef struct dirent DIRENTRY;
56 @@ -390,7 +392,7 @@ static int movealias(/* REP *first, REP
57  static int snap(/* REP *first, REP *p */);
58  static void showdone(/* REP *fin */);
59  static void breakout(/*  */);
60 -static int breakrep(/* */);
61 +static void breakrep(int);
62  static void breakstat(/* */);
63  static void quit(/*  */);
64  static int copymove(/* REP *p */);
65 @@ -436,9 +438,11 @@ static CHUNK *freechunks = NULL;
66  static SLICER slicer[2] = {{NULL, NULL, 0}, {NULL, NULL, 0}};
67  
68  static int badreps = 0, paterr = 0, direrr, failed = 0, gotsig = 0, repbad;
69 -static FILE *outfile = stdout;
70 +static FILE *outfile;
71  
72 +#ifdef IS_MSDOS
73  static char IDF[] = "$$mmvdid.";
74 +#endif
75  static char TEMP[] = "$$mmvtmp.";
76  static char TOOLONG[] = "(too long)";
77  static char EMPTY[] = "(empty)";
78 @@ -456,12 +460,12 @@ char pathbuf[MAXPATH];
79  char fullrep[MAXPATH + 1];
80  static char *(start[MAXWILD]);
81  static int len[MAXWILD];
82 -static char hasdot[MAXWILD];
83  static REP mistake;
84  #define MISTAKE (&mistake)
85  
86  #ifdef IS_MSDOS
87  
88 +static char hasdot[MAXWILD];
89  static int olddevflag, curdisk, maxdisk;
90  static struct {
91         char ph_banner[30];
92 @@ -497,6 +501,8 @@ int main(argc, argv)
93  {
94         char *frompat, *topat;
95  
96 +       outfile = stdout;
97 +
98         init();
99         procargs(argc, argv, &frompat, &topat);
100         domatch(frompat, topat);
101 @@ -560,7 +566,7 @@ static void procargs(argc, argv, pfrompa
102         char **pfrompat, **ptopat;
103  {
104         char *p, c;
105 -       char *cmdname = argv[0];
106 +       char *cmdname = basename(argv[0]);
107  
108  #ifdef IS_MSDOS
109  #define CMDNAME (patch.ph_name)
110 @@ -575,6 +581,11 @@ static void procargs(argc, argv, pfrompa
111         for (argc--, argv++; argc > 0 && **argv == '-'; argc--, argv++)
112                 for (p = *argv + 1; *p != '\0'; p++) {
113                         c = mylower(*p);
114 +                       if (c == '-') {
115 +                               argc--;
116 +                               argv++;
117 +                               goto endargs;
118 +                       }
119                         if (c == 'v' && !noex)
120                                 verbose = 1;
121                         else if (c == 'n' && !verbose)
122 @@ -618,7 +629,8 @@ static void procargs(argc, argv, pfrompa
123                         }
124                 }
125  
126 -       if (op == DFLT)
127 +endargs:
128 +       if (op == DFLT) {
129                 if (strcmp(cmdname, MOVENAME) == 0)
130                         op = XMOVE;
131                 else if (strcmp(cmdname, COPYNAME) == 0)
132 @@ -629,6 +641,8 @@ static void procargs(argc, argv, pfrompa
133                         op = HARDLINK;
134                 else
135                         op = DFLTOP;
136 +       }
137 +       
138         if (
139                 op & DIRMOVE &&
140  #ifdef IS_MSDOS
141 @@ -775,7 +789,7 @@ static void matchpat()
142  static int parsepat()
143  {
144         char *p, *lastname, c;
145 -       int totwilds, instage, x, havedot;
146 +       int totwilds, instage, x;
147         static char TRAILESC[] = "%s -> %s : trailing %c is superfluous.\n";
148  
149         lastname = from;
150 @@ -999,20 +1013,16 @@ static int parsepat()
151                                 printf(TRAILESC, from, to, ESC);
152                                 return(-1);
153                         }
154 +#ifdef IS_MSDOS
155                 default:
156                         if (
157 -#ifdef IS_MSDOS
158                                 c <= ' ' || c >= 127 ||
159                                 strchr(":/\\*?[]=+;,\"|<>", c) != NULL
160 -#else
161 -                               c & 0x80
162 -#endif
163                         ) {
164                                 printf("%s -> %s : illegal character '%c' (0x%02X).\n",
165                                         from, to, c, c);
166                                 return(-1);
167                         }
168 -#ifdef IS_MSDOS
169                         if (isupper(c))
170                                 *p = c + ('a' - 'A');
171  #endif
172 @@ -1042,7 +1052,7 @@ static int dostage(lastend, pathend, sta
173         DIRINFO *di;
174         HANDLE *h, *hto;
175         int prelen, litlen, nfils, i, k, flags, try;
176 -       FILEINFO **pf, *fdel;
177 +       FILEINFO **pf, *fdel = NULL;
178         char *nto, *firstesc;
179         REP *p;
180         int wantdirs, ret = 1, laststage = (stage + 1 == nstages);
181 @@ -1172,11 +1182,12 @@ static int trymatch(ffrom, pat)
182         if (*p == '.' || (!matchall && ffrom->fi_attrib & (FA_HIDDEN | FA_SYSTEM)))
183                 return(strcmp(pat, p) == 0);
184  #else
185 -       if (*p == '.')
186 +       if (*p == '.') {
187                 if (p[1] == '\0' || (p[1] == '.' && p[2] == '\0'))
188                         return(strcmp(pat, p) == 0);
189                 else if (!matchall && *pat != '.')
190                         return(0);
191 +       }
192  #endif
193         return(-1);
194  }
195 @@ -1312,7 +1323,7 @@ static int checkto(hfrom, f, phto, pnto,
196  {
197         char tpath[MAXPATH + 1];
198         char *pathend;
199 -       FILEINFO *fdel;
200 +       FILEINFO *fdel = NULL;
201         int hlen, tlen;
202  
203         if (op & DIRMOVE) {
204 @@ -1405,7 +1416,9 @@ static char *getpath(tpath)
205  static int badname(s)
206         char *s;
207  {
208 +#ifdef IS_MSDOS
209         char *ext;
210 +#endif
211  
212         return (
213  #ifdef IS_MSDOS
214 @@ -1715,20 +1728,19 @@ static HANDLE *checkdir(p, pathend, whic
215         struct stat dstat;
216         DIRID d;
217         DEVID v;
218 -       DIRINFO **newdirs, *di;
219 -       int nfils;
220 -       FILEINFO **fils;
221 +       DIRINFO *di = NULL;
222         char *myp, *lastslash = NULL;
223         int sticky;
224         HANDLE *h;
225  
226 -       if (hsearch(p, which, &h))
227 +       if (hsearch(p, which, &h)) {
228                 if (h->h_di == NULL) {
229                         direrr = h->h_err;
230                         return(NULL);
231                 }
232                 else
233                         return(h);
234 +       }
235  
236         if (*p == '\0')
237                 myp = ".";
238 @@ -1899,7 +1911,10 @@ static int match(pat, s, start1, len1)
239         char *pat, *s, **start1;
240         int *len1;
241  {
242 -       char c, *olds;
243 +       char c;
244 +#ifdef IS_MSDOS
245 +       char *olds;
246 +#endif
247  
248         *start1 = 0;
249         for(;;)
250 @@ -2376,9 +2391,9 @@ static void goonordie()
251  static void doreps()
252  {
253         char *fstart;
254 -       int k, printaliased = 0, alias;
255 +       int k, printaliased = 0, alias = 0;
256         REP *first, *p;
257 -       long aliaslen;
258 +       long aliaslen = 0l;
259  
260  #ifdef IS_MSDOS
261         ctrlbrk(breakrep);
262 @@ -2396,11 +2411,12 @@ static void doreps()
263                         }
264                         strcpy(fullrep, p->r_hto->h_name);
265                         strcat(fullrep, p->r_nto);
266 -                       if (!noex && (p->r_flags & R_ISCYCLE))
267 +                       if (!noex && (p->r_flags & R_ISCYCLE)) {
268                                 if (op & APPEND)
269                                         aliaslen = appendalias(first, p, &printaliased);
270                                 else
271                                         alias = movealias(first, p, &printaliased);
272 +                       }
273                         strcpy(pathbuf, p->r_hfrom->h_name);
274                         fstart = pathbuf + strlen(pathbuf);
275                         if ((p->r_flags & R_ISALIASED) && !(op & APPEND))
276 @@ -2459,7 +2475,7 @@ static long appendalias(first, p, pprint
277         REP *first, *p;
278         int *pprintaliased;
279  {
280 -       long ret;
281 +       long ret = 0l;
282  
283  #ifdef IS_MSDOS
284         int fd;
285 @@ -2578,10 +2594,10 @@ static void breakout()
286  }
287  
288  
289 -static int breakrep()
290 +static void breakrep(int signum)
291  {
292         gotsig = 1;
293 -       return(1);
294 +       return;
295  }
296  
297  
298 @@ -2624,11 +2640,12 @@ static int copymove(p)
299  
300  static int copy(ff, len)
301         FILEINFO *ff;
302 -       long len;
303 +       off_t len;
304  {
305 -       char buf[BUFSIZE], c;
306 +       char buf[BUFSIZE];
307         int f, t, k, mode, perm;
308  #ifdef IS_MSDOS
309 +        char c;
310         struct ftime tim;
311  #else
312  #ifdef IS_SYSV
313 @@ -2672,7 +2689,7 @@ static int copy(ff, len)
314                 return(-1);
315         }
316         if (op & APPEND)
317 -               lseek(t, 0L, 2);
318 +               lseek(t, (off_t)0, SEEK_END);
319  #ifdef IS_MSDOS
320         if (op & ZAPPEND && filelength(t) != 0) {
321                 if (lseek(t, -1L, 1) == -1L || read(t, &c, 1) != 1) {
322 @@ -2684,10 +2701,10 @@ static int copy(ff, len)
323                         lseek(t, -1L, 1);
324         }
325  #endif
326 -       if ((op & APPEND) && len != -1L) {
327 +       if ((op & APPEND) && len != (off_t)-1) {
328                 while (
329                         len != 0 &&
330 -                       (k = read(f, buf, len > BUFSIZE ? BUFSIZE : (unsigned)len)) > 0 &&
331 +                       (k = read(f, buf, (len > BUFSIZE) ? BUFSIZE : (size_t)len)) > 0 &&
332                         write(t, buf, k) == k
333                 )
334                         len -= k;
335 @@ -2711,7 +2728,9 @@ static int copy(ff, len)
336                                 tim.modtime = fstat.st_mtime,
337  #else
338                                 tim[0].tv_sec = fstat.st_atime,
339 +                               tim[0].tv_usec = 0,
340                                 tim[1].tv_sec = fstat.st_mtime,
341 +                               tim[1].tv_usec = 0,
342  #endif
343                                 utimes(fullrep, tim)
344                         )
345 --- mmv-1.01b.orig/mmv.1
346 +++ mmv-1.01b/mmv.1
347 @@ -2,7 +2,7 @@
348  .\" To print the MS-DOS version, use option -rO2.
349  .\" Under System V, take out the '.\"  ' from the next line.
350  .\" .nr O 1
351 -.TH MMV 1 "November 20, 1989 (v1.0)"
352 +.TH MMV 1 "November 20, 2001 (v1.0lfs)"
353  .ie !'\nO'2' \{\
354  .SH NAME
355  mmv \- move/copy/append/link multiple files by wildcard patterns
356 @@ -21,13 +21,14 @@ mmv \- move/copy/append multiple files b
357  \}
358  .SH SYNOPSIS
359  .B mmv
360 -.if '\nO'2' [\fB-m\fP|\fBx\fP|\fBr\fP|\fBc\fP|\fBo\fP|\fBa\fP|\fBz\fP]
361 -.if '\nO'0' [\fB-m\fP|\fBx\fP|\fBr\fP|\fBc\fP|\fBo\fP|\fBa\fP|\fBl\fP|\fBs\fP]
362 -.if '\nO'1' [\fB-m\fP|\fBx\fP|\fBr\fP|\fBc\fP|\fBo\fP|\fBa\fP|\fBl\fP]
363 -[\fB-h\fP]
364 -[\fB-d\fP|\fBp\fP]
365 -[\fB-g\fP|\fBt\fP]
366 -[\fB-v\fP|\fBn\fP]
367 +.if '\nO'2' [\fB\-m\fP|\fBx\fP|\fBr\fP|\fBc\fP|\fBo\fP|\fBa\fP|\fBz\fP]
368 +.if '\nO'0' [\fB\-m\fP|\fBx\fP|\fBr\fP|\fBc\fP|\fBo\fP|\fBa\fP|\fBl\fP|\fBs\fP]
369 +.if '\nO'1' [\fB\-m\fP|\fBx\fP|\fBr\fP|\fBc\fP|\fBo\fP|\fBa\fP|\fBl\fP]
370 +[\fB\-h\fP]
371 +[\fB\-d\fP|\fBp\fP]
372 +[\fB\-g\fP|\fBt\fP]
373 +[\fB\-v\fP|\fBn\fP]
374 +[\fB\-\-\fP]
375  [\fBfrom to\fP]
376  .if '\nO'2' \{\
377  .br
378 @@ -56,6 +57,9 @@ from the entire set of actions specified
379  and gives the user the choice of either
380  proceeding by avoiding the offending parts
381  or aborting.
382 +.I mmv
383 +does support large files (LFS) but it does *NOT* support 
384 +sparse files (i.e. it explodes them).
385  
386  .ce
387  The Task Options
388 @@ -71,7 +75,7 @@ If none of these are specified,
389  .ie '\nO'2' \{\
390  a default (patchable by
391  .IR mmvpatch ,
392 -and initially -x)
393 +and initially \-x)
394  determines the task.
395  \}
396  .el \{\
397 @@ -81,18 +85,18 @@ was invoked (argv[0]):
398  
399         command name    default task
400  
401 -       mmv                     -x
402 +       mmv                     \-x
403  .br
404 -       mcp                     -c
405 +       mcp                     \-c
406  .br
407 -       mad                     -a
408 +       mad                     \-a
409  .br
410 -       mln                     -l
411 +       mln                     \-l
412  \}
413  .PP
414  The task option choices are:
415  .TP
416 --m :
417 +\-m :
418  move source file to target name.
419  Both must be on the same device.
420  Will not move directories.
421 @@ -102,8 +106,8 @@ moves the link without checking if the l
422  directory is different than the old.
423  \}
424  .TP
425 --x :
426 -same as -m, except cross-device moves are done
427 +\-x :
428 +same as \-m, except cross-device moves are done
429  by copying, then deleting source.
430  When copying, sets the
431  .ie !'\nO'2' permission bits
432 @@ -111,7 +115,7 @@ When copying, sets the
433  and file modification time
434  of the target file to that of the source file.
435  .TP
436 --r :
437 +\-r :
438  rename source file or directory to target name.
439  The target name must not include a path:
440  the file remains in the same directory in all cases.
441 @@ -119,7 +123,7 @@ This option is the only way of renaming
442  .IR mmv .
443  .if '\nO'2' It is only available under DOS version 3.0 or higher.
444  .TP
445 --c :
446 +\-c :
447  copy source file to target name.
448  Sets the file modification time and
449  .ie !'\nO'2' permission bits
450 @@ -128,7 +132,7 @@ of the target file to that of the source
451  regardless of whether the target file already exists.
452  Chains and cycles (to be explained below) are not allowed.
453  .TP
454 --o :
455 +\-o :
456  overwrite target name with source file.
457  .ie '\nO'2' \{\
458  If target file exists, its attributes are left unchanged.
459 @@ -146,38 +150,38 @@ and the execute permission bits copied f
460  In either case, the file modification time is set to the current time.
461  \}
462  .TP
463 --a :
464 +\-a :
465  append contents of source file to target name.
466  Target file modification time is set to the current time.
467  If target file does not exist,
468  it is created with
469  .ie '\nO'2' attributes
470  .el permission bits
471 -set as under -o.
472 -Unlike all other options, -a allows multiple source files to have the
473 -same target name, e.g. "mmv -a
474 +set as under \-o.
475 +Unlike all other options, \-a allows multiple source files to have the
476 +same target name, e.g. "mmv \-a
477  .ie '\nO'2' *.c
478  .el \\*.c
479  big" will append all ".c" files to "big".
480 -Chains and cycles are also allowed, so "mmv -a f f" will double up "f".
481 +Chains and cycles are also allowed, so "mmv \-a f f" will double up "f".
482  .ie '\nO'2' \{\
483  .TP
484 --z :
485 -same as -a, but if the target file exists, and its last character is a ^Z,
486 +\-z :
487 +same as \-a, but if the target file exists, and its last character is a ^Z,
488  and the source file is not empty,
489  this ^Z is truncated before doing the append.
490  \}
491  .el \{\
492  .TP
493 --l :
494 +\-l :
495  link target name to source file.
496  Both must be on the same device,
497  and the source must not be a directory.
498  Chains and cycles are not allowed.
499  .if '\nO'0' \{\
500  .TP
501 --s :
502 -same as -l, but use symbolic links instead of hard links.
503 +\-s :
504 +same as \-l, but use symbolic links instead of hard links.
505  For the resulting link to aim back at the source,
506  either the source name must begin with a '/',
507  or the target must reside in either the current or the source directory.
508 @@ -190,7 +194,7 @@ and the source can be a directory.
509  Only one of these option may be given,
510  and it applies to all matching files.
511  Remaining options need not be given separately,
512 -i.e. "mmv -mk" is allowed.
513 +i.e. "mmv \-mk" is allowed.
514  
515  .ce
516  Multiple Pattern Pairs
517 @@ -232,7 +236,7 @@ a b
518  a c
519  .in -3
520  
521 -would give the error message "a -> c : no match" because file "a"
522 +would give the error message "a \-> c : no match" because file "a"
523  (even if it exists)
524  was already matched by the first pattern pair.
525  
526 @@ -255,10 +259,10 @@ matching any single character,
527  and matching any one of a set of characters.
528  .PP
529  Between the '[' and ']', a range from character 'a' through character 'z'
530 -is specified with "a-z".
531 +is specified with "a\-z".
532  The set of matching characters can be negated by inserting
533  a '^' after the '['.
534 -Thus, "[^b-e2-5_]"
535 +Thus, "[^b\-e2\-5_]"
536  will match any character but 'b' through 'e', '2' through '5', and '_'.
537  .if '\nO'2' \{\
538  .PP
539 @@ -305,13 +309,13 @@ However, the '~' is not treated as a wil
540  in the sense that it is not assigned a wildcard index (see below).
541  \}
542  .PP
543 -Since matching a directory under a task option other than -r or -s
544 +Since matching a directory under a task option other than \-r or \-s
545  would result in an error,
546 -tasks other than -r and -s
547 +tasks other than \-r and \-s
548  match directories only against completely explicit
549  .I from
550  patterns (i.e. not containing wildcards).
551 -Under -r and -s, this applies only to "." and "..".
552 +Under \-r and \-s, this applies only to "." and "..".
553  .PP
554  .ie '\nO'2' \{\
555  Hidden and system files are also only matched
556 @@ -324,7 +328,7 @@ Files beginning with '.' are only matche
557  .I from
558  patterns that begin with an explicit '.'.
559  \}
560 -However, if -h is specified, they are matched normally.
561 +However, if \-h is specified, they are matched normally.
562  .if !'\nO'2' \{\
563  .PP
564  Warning: since the shell normally expands wildcards
565 @@ -332,8 +336,9 @@ before passing the command-line argument
566  .IR mmv ,
567  it is usually necessary to enclose the command-line
568  .I from
569 -pattern
570 -in quotes.
571 +and
572 +.I to
573 +patterns in quotes.
574  \}
575  
576  .ce
577 @@ -363,7 +368,7 @@ pattern is "abc*.*" and the
578  pattern is "xyz#2.#1",
579  then "abc.txt" is targeted to "xyztxt.".
580  (The first '*' matched "", and the second matched "txt".)
581 -Similarly, for the pattern pair ";*.[clp]" -> "#1#3\*(SL#2",
582 +Similarly, for the pattern pair ";*.[clp]" \-> "#1#3\*(SL#2",
583  "foo1\*(SLfoo2\*(SLprog.c" is targeted to "foo1\*(SLfoo2\*(SLc\*(SLprog".
584  Note that there is no '\*(SL' following the "#1" in the
585  .I to
586 @@ -397,7 +402,7 @@ expands the '~' in the exact same manner
587  does not expand it at all).
588  \}
589  .PP
590 -For all task options other than -r, if the target name is a directory,
591 +For all task options other than \-r, if the target name is a directory,
592  the real target name is formed by appending
593  a '\*(SL' followed by the last component
594  of the source file name.
595 @@ -434,7 +439,7 @@ a b
596  .br
597  b c
598  
599 -specifies the chain "a" -> "b" -> "c".
600 +specifies the chain "a" \-> "b" \-> "c".
601  A cycle is a chain where the last target name
602  refers back to the first source file,
603  e.g. "mmv a a".
604 @@ -461,9 +466,9 @@ Furthermore,
605  .I mmv
606  checks if any of its actions will result
607  in the destruction of existing files.
608 -If the -d (delete) option is specified,
609 +If the \-d (delete) option is specified,
610  all file deletions or overwrites are done silently.
611 -Under -p (protect), all deletions or overwrites
612 +Under \-p (protect), all deletions or overwrites
613  (except those specified with "(*)" on the standard input, see below)
614  are treated as errors.
615  And if neither option is specified,
616 @@ -487,16 +492,16 @@ Once all errors are detected,
617  queries the user whether he wishes
618  to continue by avoiding the erroneous actions or to abort altogether.
619  This and all other queries may be avoided by specifying either the
620 --g (go) or -t (terminate) option.
621 +\-g (go) or \-t (terminate) option.
622  The former will resolve all difficulties by avoiding the erroneous actions;
623  the latter will abort
624  .I mmv
625  if any errors are detected.
626  Specifying either of them defaults
627  .I mmv
628 -to -p, unless -d is specified
629 +to \-p, unless \-d is specified
630  (see above).
631 -Thus, -g and -t are most useful when running
632 +Thus, \-g and \-t are most useful when running
633  .I mmv
634  in the background or in
635  a shell script,
636 @@ -508,28 +513,28 @@ Reports
637  Once the actions to be performed are determined,
638  .I mmv
639  performs them silently,
640 -unless either the -v (verbose) or -n (no-execute) option is specified.
641 +unless either the \-v (verbose) or \-n (no-execute) option is specified.
642  The former causes
643  .I mmv
644  to report each performed action
645  on the standard output as
646  
647 -a -> b : done.
648 +a \-> b : done.
649  
650  Here, "a" and "b" would be replaced by the source and target names,
651  respectively.
652  If the action deletes the old target,
653  a "(*)" is inserted after the the target name.
654 -Also, the "->" symbol is modified when a cycle has to be broken:
655 +Also, the "\->" symbol is modified when a cycle has to be broken:
656  the '>' is changed to a '^' on the action prior to which the old target
657  is renamed to a temporary,
658 -and the '-' is changed to a '=' on the action where the temporary is used.
659 +and the '\-' is changed to a '=' on the action where the temporary is used.
660  .PP
661 -Under -n, none of the actions are performed,
662 +Under \-n, none of the actions are performed,
663  but messages like the above are printed on the standard output
664  with the ": done." omitted.
665  .PP
666 -The output generated by -n can (after editing, if desired)
667 +The output generated by \-n can (after editing, if desired)
668  be fed back to
669  .I mmv
670  on the standard input
671 @@ -545,9 +550,9 @@ To facilitate this,
672  ignores lines on the standard input that look
673  like its own error and "done" messages,
674  as well as all lines beginning with white space,
675 -and will accept pattern pairs with or without the intervening "->"
676 -(or "-^", "=>", or "=^").
677 -Lines with "(*)" after the target pattern have the effect of enabling -d
678 +and will accept pattern pairs with or without the intervening "\->"
679 +(or "\-^", "=>", or "=^").
680 +Lines with "(*)" after the target pattern have the effect of enabling \-d
681  for the files matching this pattern only,
682  so that such deletions are done silently.
683  When feeding
684 @@ -596,11 +601,11 @@ on a copy of
685  .I mmv
686  named as follows:
687  
688 -       -x, -m, -r              mmv.exe
689 +       \-x, \-m, \-r           mmv.exe
690  .br
691 -       -c, -o                  mcp.exe
692 +       \-c, \-o                        mcp.exe
693  .br
694 -       -a, -z                  mad.exe
695 +       \-a, \-z                        mad.exe
696  .PP
697  .I Mmvpatch
698  also determines the best way to uniquely identify directories.
699 --- mmv-1.01b.orig/Makefile
700 +++ mmv-1.01b/Makefile
701 @@ -1,10 +1,10 @@
702  # Possible defines in CONF:
703  #      IS_MSDOS IS_SYSV IS_V7 IS_BSD HAS_DIRENT HAS_RENAME MV_DIR
704  
705 -CC             =gcc -traditional
706 +CC             =gcc
707  LD             =$(CC)
708  CONF           =-DIS_SYSV -DHAS_DIRENT -DHAS_RENAME
709 -CFLAGS         =-O2 -m486 $(CONF)
710 +CFLAGS         =-O2 $(CONF)
711  LDFLAGS                =-s -N
712  
713  #IBIN          =$(LOCAL)$(ARCH)/bin