3 ### uumerge --- merging split uu files for Mew
11 chdir($opt_d) || die "$opt_d: $!\n";
15 $sawbegin++, last if ($mode,$file) = /^begin\s*(\d*)\s*(\S*)/;
17 die "uumerge: missing begin\n" unless $sawbegin;
18 open(OUT,"> $file") if $file ne "";
21 $sawend++, last if /^end/;
22 s/[a-z]+$//; # handle stupid trailing lowercase letters
24 next unless int((((ord() - 32) & 077) + 2) / 3) == int(length() / 4);
25 print OUT unpack("u", $_);
28 chmod oct($mode), $file;
29 die "uumerge: missing end\n" unless $sawend;
34 ## Copyright (C) 1994, 1995, 1996, 1997 Mew developing team.
35 ## All rights reserved.
37 ## Redistribution and use in source and binary forms, with or without
38 ## modification, are permitted provided that the following conditions
41 ## 1. Redistributions of source code must retain the above copyright
42 ## notice, this list of conditions and the following disclaimer.
43 ## 2. Redistributions in binary form must reproduce the above copyright
44 ## notice, this list of conditions and the following disclaimer in the
45 ## documentation and/or other materials provided with the distribution.
46 ## 3. Neither the name of the team nor the names of its contributors
47 ## may be used to endorse or promote products derived from this software
48 ## without specific prior written permission.
50 ## THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND
51 ## ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
52 ## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
53 ## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE
54 ## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
55 ## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
56 ## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
57 ## BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
58 ## WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
59 ## OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
60 ## IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.