Index: process.c =================================================================== RCS file: /var/cvs/UnZip/process.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- process.c 8 Mar 2005 18:16:21 -0000 1.1.1.1 +++ process.c 9 Mar 2005 19:52:55 -0000 1.2 @@ -173,6 +173,15 @@ #endif int error=0, error_in_archive=0; +#if defined(RISCOS) && defined(UNIXLIB) + struct wildnode + { + struct wildnode* next; + char* name; + }; + struct wildnode* wildhead=0; + struct wildnode* node=0; +#endif /*--------------------------------------------------------------------------- Start by allocating buffers and (re)constructing the various PK signature @@ -310,6 +319,23 @@ NumMissDirs = NumMissFiles = 0; while ((G.zipfn = do_wild(__G__ G.wildzipfn)) != (char *)NULL) { + +#if defined(RISCOS) && defined(UNIXLIB) + if (node=malloc(sizeof(struct wildnode))) + { + node->name=strdup(G.zipfn); + node->next=wildhead; + wildhead=node; + } + } /* end while-loop (wildcard zipfiles) */ + + node=wildhead; + while (node) + { + G.zipfn=node->name; + node=node->next; +#endif + Trace((stderr, "do_wild( %s ) returns %s\n", G.wildzipfn, G.zipfn)); lastzipfn = G.zipfn; Index: unzip.c =================================================================== RCS file: /var/cvs/UnZip/unzip.c,v retrieving revision 1.1.1.1 retrieving revision 1.4 diff -u -r1.1.1.1 -r1.4 --- unzip.c 8 Mar 2005 18:16:21 -0000 1.1.1.1 +++ unzip.c 10 Mar 2005 06:15:29 -0000 1.4 @@ -65,6 +65,10 @@ #include "crypt.h" #include "unzvers.h" +#ifdef UNIXLIB +#include +#endif + #ifndef WINDLL /* The WINDLL port uses windll/windll.c instead... */ /***************************/ @@ -295,8 +299,11 @@ #endif static ZCONST char Far ZipInfoUsageLine1[] = "\ -ZipInfo %d.%d%d%s of %s, by Greg Roelofs and the Info-ZIP group.\n\ -\n\ +ZipInfo %d.%d%d%s of %s, by Greg Roelofs and the Info-ZIP group.\n" +#ifdef RISCOS +"(Adapted for RISC OS Packaging Project.)\n" +#endif +"\n\ List name, date/time, attribute, size, compression method, etc., about files\n\ in list (excluding those in xlist) contained in the specified .zip archive(s).\ \n\"file[.zip]\" may be a wildcard name containing %s.\n\n\ @@ -345,7 +352,11 @@ # else static ZCONST char Far UnzipSFXBanner[] = # endif - "UnZipSFX %d.%d%d%s of %s, by Info-ZIP (http://www.info-zip.org).\n"; + "UnZipSFX %d.%d%d%s of %s, by Info-ZIP (http://www.info-zip.org).\n" +#ifdef RISCOS + "(Adapted for RISC OS Packaging Project.)\n" +#endif + ; # ifdef SFX_EXDIR static ZCONST char Far UnzipSFXOpts[] = "Valid options are -tfupcz and -d ; modifiers are -abjnoqCL%sV%s.\n"; @@ -516,6 +527,17 @@ \n\n"; # endif /* ?COPYRIGHT_CLEAN */ #else /* !VMS */ +#ifdef RISCOS + static ZCONST char Far UnzipUsageLine1[] = +# ifdef COPYRIGHT_CLEAN +"UnZip %d.%d%d%s of %s, by Info-ZIP.\n" +# else +"UnZip %d.%d%d%s of %s, by Info-ZIP. UnReduce (c) 1989 by S. H. Smith.\n" +# endif /* ?COPYRIGHT_CLEAN */ +"RISC OS Packaging Project distribution maintained by Graham Shaw.\n" +"For bug reports, go to http://www.riscpkg.org/bugs.html.\n" +"Original sources maintained by C. Spieler.\n\n"; +#else # ifdef COPYRIGHT_CLEAN static ZCONST char Far UnzipUsageLine1[] = "\ UnZip %d.%d%d%s of %s, by Info-ZIP. Maintained by C. Spieler. Send\n\ @@ -527,6 +549,7 @@ Send bug reports using //www.info-zip.org/zip-bug.html; see README for details.\ \n\n"; # endif /* ?COPYRIGHT_CLEAN */ +#endif /* ?RISCOS */ # define UnzipUsageLine1v UnzipUsageLine1 #endif /* ?VMS */ @@ -747,7 +770,7 @@ Acorn RISC OS initialization code. ---------------------------------------------------------------------------*/ -#ifdef RISCOS +#if defined(RISCOS) && !defined(UNIXLIB) set_prefix(); #endif @@ -1004,6 +1027,15 @@ Info(slide, 0x401, ((char *)slide, LoadFarString(NotExtracting))); #endif /* ?(SFX && !SFX_EXDIR) */ +#if defined(RISCOS) && defined(UNIXLIB) + if (uO.exdir) + { + char* uexdir=__unixify_std(uO.exdir,0,strlen(uO.exdir)+2, + __RISCOSIFY_FILETYPE_NOTSPECIFIED); + if (uexdir) uO.exdir=uexdir; + } +#endif + /*--------------------------------------------------------------------------- Okey dokey, we have everything we need to get started. Let's roll. ---------------------------------------------------------------------------*/ @@ -1108,7 +1140,11 @@ "error: must give extensions list")); return(PK_PARAM); /* don't extract here by accident */ } +#ifdef UNIXLIB + __sfixinit(s); +#else exts2swap = s; /* override Unzip$Exts */ +#endif s += strlen(s); break; #endif Index: unzip.h =================================================================== RCS file: /var/cvs/UnZip/unzip.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- unzip.h 8 Mar 2005 18:16:21 -0000 1.1.1.1 +++ unzip.h 9 Mar 2005 10:21:04 -0000 1.2 @@ -189,6 +189,9 @@ #ifdef __riscos # define RISCOS +#ifdef __unixlib +# define UNIXLIB +#endif #endif #if (defined(THINK_C) || defined(MPW)) @@ -451,7 +454,7 @@ #ifdef MACOS int i_flag; /* -i: [MacOS] ignore filenames stored in Mac e.f. */ #endif -#ifdef RISCOS +#if defined(RISCOS) && !defined(UNIXLIB) int scanimage; /* -I: scan image files */ #endif int jflag; /* -j: junk pathnames (unzip) */ Index: unzpriv.h =================================================================== RCS file: /var/cvs/UnZip/unzpriv.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- unzpriv.h 8 Mar 2005 18:16:21 -0000 1.1.1.1 +++ unzpriv.h 9 Mar 2005 10:21:04 -0000 1.2 @@ -272,6 +272,9 @@ ---------------------------------------------------------------------------*/ #ifdef RISCOS +#ifdef UNIXLIB +# include "acorn/unixlib.h" +#else # include "acorn/riscos.h" #endif @@ -1309,7 +1312,7 @@ # define ZSUFX "_zip" # define ALT_ZSUFX ".zip" #else -# ifdef RISCOS +# if defined(RISCOS) && !defined(UNIXLIB) # define ZSUFX "/zip" # else # define ZSUFX ".zip" Index: !UnZip/!Boot,feb =================================================================== RCS file: !UnZip/!Boot,feb diff -N !UnZip/!Boot,feb --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ !UnZip/!Boot,feb 8 Mar 2005 18:33:38 -0000 1.1 @@ -0,0 +1,11 @@ +| This file is part of the RISC OS Packaging Project distribution of UnZip. +| Copyright © 2005 Graham Shaw. +| Distribution and use are subject to the Info-ZIP licence, a copy of which +| may be found in the file ".LICENSE". + +If ""="" Then Set UnZip$Dir +If ""="" AND ""="" Then Set Alias$unzip /.unzip %%*0 +If ""="" AND ""="" Then Set Alias$funzip /.funzip %%*0 +If ""="" AND ""="" Then Set Alias$zipinfo /.unzip -Z %%*0 +If ""="" AND ""="" Then Set Alias$unzipsfx /.unzipsfx %%*0 +IconSprites .!Sprites Index: !UnZip/!Help,feb =================================================================== RCS file: !UnZip/!Help,feb diff -N !UnZip/!Help,feb --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ !UnZip/!Help,feb 8 Mar 2005 18:33:38 -0000 1.1 @@ -0,0 +1,6 @@ +| This file is part of the RISC OS Packaging Project distribution of UnZip. +| Copyright © 2005 Graham Shaw. +| Distribution and use are subject to the Info-ZIP licence, a copy of which +| may be found in the file ".LICENSE". + +Filer_Run .MANUAL Index: !UnZip/!Run,feb =================================================================== RCS file: !UnZip/!Run,feb diff -N !UnZip/!Run,feb --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ !UnZip/!Run,feb 8 Mar 2005 18:33:38 -0000 1.1 @@ -0,0 +1,11 @@ +| This file is part of the RISC OS Packaging Project distribution of UnZip. +| Copyright © 2005 Graham Shaw. +| Distribution and use are subject to the Info-ZIP licence, a copy of which +| may be found in the file ".LICENSE". + +Set UnZip$Dir +Set Alias$unzip /.unzip %%*0 +Set Alias$funzip /.funzip %%*0 +Set Alias$zipinfo /.zipinfo %%*0 +Set Alias$unzipsfx /.unzipsfx %%*0 +IconSprites .!Sprites Index: !UnZip/!Sprites.uue =================================================================== RCS file: !UnZip/!Sprites.uue diff -N !UnZip/!Sprites.uue --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ !UnZip/!Sprites.uue 10 Mar 2005 05:41:37 -0000 1.2 @@ -0,0 +1,20 @@ +begin 707 !UnZip/!Sprites,ff9 +M`0```!````#D`@``U`(``"%U;GII<`````````0````0``````````<````L +M````@`$```P````````P-$1$1$1$1$1$1$1$1````````#`T1``````````P +M1$1$````0T1$1$1$1$1$1`0``#!$1$0``````````````````````%,7`P`` +M``"`B(CP^("(^```````=3$%``````#P^``(@`"````````74P<``````(\/ +M``B`B/@``````#%U`0````#P^```"(``````````4Q<#`````("(B/#X@``` +M``````!U,04``````````````````````!=3!P```$-$1$1$1$1$1$0$```P +M1$1$````````,#1$`````````#!$1$0````````P-$1$1$1$1$1$1$1$1``` +M````````````````````,$0``````````````$-$1$1$1$1$1``````````` +M````0P0```````````````````````!#!````````````````````/#_____ +M______________\`````\/\`````````\/____________________\/``#P +M_____________________P\```#__P__________________#P```/__#___ +M______________\/````__\/_________________P\```#__P__________ +M________#P```/__#_________________\/````__\/________________ +M_P\```#__P__________________#P``\/_______P````#P_P````````#P +M________`````/#___________________\``````````````````/#_`/__ +M_P````````#___________\`____`````````/\/``````````#___\````` +0````_P\``````````/___P`` +` +end Index: !UnZip/!Sprites22.uue =================================================================== RCS file: !UnZip/!Sprites22.uue diff -N !UnZip/!Sprites22.uue --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ !UnZip/!Sprites22.uue 10 Mar 2005 05:41:37 -0000 1.2 @@ -0,0 +1,35 @@ +begin 505 !UnZip/!Sprites22,ff9 +M`0```!````",!0``?`4``"%U;GII<`````````0````A``````````<````L +M````U`(``!L``````````$-$1$1$1$1$1$1$1```````````0T1$1$1$1$1$ +M1$1$``````````!#!````````#!$1$0``````````$,$````````,$1$1``` +M`$-$1$1$1$1$1$1$!``P1$1$````0T1$1$1$1$1$1$0$`#!$1$0````````` +M`````````````%,7`P``````````````````````4Q<#`````("(B`"("("( +M^`````!U,04`````@(B(`(@(@(B(`````'4Q!0```````(\`@`"``(`````` +M%U,'````````B`"``(``@``````74P<``````(`(`(``@(B(`````#%U`0`` +M````B```@`"`B/@`````,74!`````(`(``"``(````````!3%P,`````@`\` +M`(``@````````%,7`P````"`B(@`B`B`````````=3$%`````("(B`"("(`` +M``````!U,04``````````````````````!=3!P`````````````````````` +M%U,'````0T1$1$1$1$1$1$0$`#!$1$0```!#1$1$1$1$1$1$1`0`,$1$1``` +M````````0P0````````P1$1$``````````!#!````````#!$1$0````````` +M`$-$1$1$1$1$1$1$1```````````0T1$1$1$1$1$1$1$```````````````` +M```````P1````````````````````````#!$```````````````````````` +M,$0``````````````#!$1$1$1$1$1```````````````,$1$1$1$1$1$```` +M```````````P1````````````````````````#!$```````````````````` +M````,$0`````````````````````____________________``````#_____ +M______________\``````/\/````````\/_______P``````_P\```````#P +M______________________\/`/#______________________P\`\/______ +M_P``````````````````__\/__________________\/``#__P__________ +M_________P\``/__#___________________#P``__\/________________ +M__\/``#__P___________________P\``/__#___________________#P`` +M__\/__________________\/``#__P___________________P\``/__#___ +M________________#P``__\/__________________\/``#__P__________ +M_________P\``/__#___________________#P``__\/____```````````` +M``````#__P___________________P\`\/______________________#P#P +M________``````#_#P```````/#_______\``````/\/````````\/______ +M_P``````____________________``````#___________________\````` +M`````````````/#_`/___P``````````````````\/\`____```````````` +M``````#P_P#___\`````````\/__________`/___P````````#P________ +M__\`____`````````/#_``````````#___\`````````\/\``````````/__ +5_P````````#P_P``````````____ +` +end Index: RiscPkg/Changes =================================================================== RCS file: RiscPkg/Changes diff -N RiscPkg/Changes --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ RiscPkg/Changes 10 Mar 2005 05:09:44 -0000 1.1 @@ -0,0 +1,9 @@ +This is the RISC OS Packaging Project distribution of UnZip. + +User-visible differences between package version 5.52-0 and upstream +version 5.52: + +- Modified to support UNIX-style pathnames. +- Suffix list now obtained, in ascending order of priority, from + , , , or the command + line (-/ option). Index: RiscPkg/Control =================================================================== RCS file: RiscPkg/Control diff -N RiscPkg/Control --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ RiscPkg/Control 8 Mar 2005 18:43:34 -0000 1.1 @@ -0,0 +1,19 @@ +Source: UnZip +Section: File +Priority: Important +Licence: Free +Maintainer: Graham Shaw +Standards-Version: 0.1.0 +Version: 5.52-0 +Description: A decompressor/dearchiver for zipfiles + This is the Info-ZIP file decompressor and dearchiver program, UnZip. + It can handle files which are compatible with the PKWARE programs PKZIP + and PKUNZIP. + . + The commands provided by this package are unzip, funzip, unzipsfx and + zipinfo. + . + This version supports encryption. It has been modified to support both + RISC OS- and UNIX-style pathnames using UnixLib. + +Package: UnZip Index: RiscPkg/Copyright =================================================================== RCS file: RiscPkg/Copyright diff -N RiscPkg/Copyright --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ RiscPkg/Copyright 8 Mar 2005 18:38:02 -0000 1.1 @@ -0,0 +1,71 @@ +This is part of the RISC OS Packaging Project distribution of UnZip. + +UnZip was written by the Info-ZIP project (http://www.info-zip.org). + +The upstream sources were downloaded from the URL: + +http://ftp.info-zip.org/pub/infozip/src/unzip552.zip + +on 8th March 2005. There is a homepage at the URL: + +http://www.info-zip.org/UnZip.html + +UnZip is subject to the following licence (from the file LICENSE): + +== begin == +This is version 2005-Feb-10 of the Info-ZIP copyright and license. +The definitive version of this document should be available at +ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely. + + +Copyright (c) 1990-2005 Info-ZIP. All rights reserved. + +For the purposes of this copyright and license, "Info-ZIP" is defined as +the following set of individuals: + + Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois, + Jean-loup Gailly, Hunter Goatley, Ed Gordon, Ian Gorman, Chris Herborth, + Dirk Haase, Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, + David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, + Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, + Kai Uwe Rommel, Steve Salisbury, Dave Smith, Steven M. Schweda, + Christian Spieler, Cosmin Truta, Antoine Verheijen, Paul von Behren, + Rich Wales, Mike White + +This software is provided "as is," without warranty of any kind, express +or implied. In no event shall Info-ZIP or its contributors be held liable +for any direct, indirect, incidental, special or consequential damages +arising out of the use of or inability to use this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. Redistributions of source code must retain the above copyright notice, + definition, disclaimer, and this list of conditions. + + 2. Redistributions in binary form (compiled executables) must reproduce + the above copyright notice, definition, disclaimer, and this list of + conditions in documentation and/or other materials provided with the + distribution. The sole exception to this condition is redistribution + of a standard UnZipSFX binary (including SFXWiz) as part of a + self-extracting archive; that is permitted without inclusion of this + license, as long as the normal SFX banner has not been removed from + the binary or disabled. + + 3. Altered versions--including, but not limited to, ports to new operating + systems, existing ports with new graphical interfaces, and dynamic, + shared, or static library versions--must be plainly marked as such + and must not be misrepresented as being the original source. Such + altered versions also must not be misrepresented as being Info-ZIP + releases--including, but not limited to, labeling of the altered + versions with the names "Info-ZIP" (or any variation thereof, including, + but not limited to, different capitalizations), "Pocket UnZip," "WiZ" + or "MacZip" without the explicit permission of Info-ZIP. Such altered + versions are further prohibited from misrepresentative use of the + Zip-Bugs or Info-ZIP e-mail addresses or of the Info-ZIP URL(s). + + 4. Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip," + "UnZipSFX," "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its + own source and binary releases. +== end == Index: RiscPkg/Rules =================================================================== RCS file: RiscPkg/Rules diff -N RiscPkg/Rules --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ RiscPkg/Rules 10 Mar 2005 05:15:54 -0000 1.2 @@ -0,0 +1,95 @@ +VERSION = 5.52-0 +PACKAGES = UnZip_$(VERSION) + +BIN = \ + unzip \ + funzip \ + unzipsfx + +TEXT = \ + BUGS \ + History.550 \ + History.551 \ + History.552 \ + LICENSE \ + README \ + ToDo \ + WHERE + +SPRITES = \ + !UnZip/!Sprites \ + !UnZip/!Sprites22 + +.PHONY: all +all: uudecode + make -f acorn/Makefile.riscpkg + rm -rf Temp + mkdir -p Temp/RiscPkg + cp RiscPkg/Copyright Temp/RiscPkg/ + cp RiscPkg/Changes Temp/RiscPkg/ + mkdir -p Temp/Apps/File/ + cp -r !UnZip Temp/Apps/File/ + cp $(BIN) $(TEXT) Temp/Apps/File/!UnZip/ + + chmod -R 444 Temp/Apps + cp -R SysVars Temp/SysVars/ + cp -R Sprites Temp/Sprites/ + make -C Temp -f ../RiscPkg/Rules $(PACKAGES) + rm -rf Temp + +.PHONY: clean +clean: + rm -f $(addprefix RiscPkg/,$(PACKAGES)) + make -f acorn/Makefile.riscpkg clean + +.PHONY: distclean +distclean: uuencode + rm -f $(SPRITES) + rm -f $(addprefix RiscPkg/,$(PACKAGES)) + make -f acorn/Makefile.riscpkg distclean + +.PHONY: $(PACKAGES) +$(PACKAGES): %: + riscpkg-gencontrol $(firstword $(subst _, ,$@)) < ../RiscPkg/Control > RiscPkg/Control + rm -f ../RiscPkg/$@ + zip -r ../RiscPkg/$@ * -i@../RiscPkg/$(firstword $(subst _, ,$@)).inc + +# ---------------------------------------- +# $(uu) == encode +# ---------------------------------------- + +.PHONY: uuencode + +ifeq (encode,$(uu)) + +uuencode: $(addsuffix .uue,$(SPRITES)) + +%.uue: % + uuencode $^,ff9 $^,ff9 > $@ + +else + +uuencode: + make -f RiscPkg/Rules uuencode uu=encode + +endif + +# ---------------------------------------- +# $(uu) == decode +# ---------------------------------------- + +.PHONY: uudecode + +ifeq (decode,$(uu)) + +uudecode: $(SPRITES) + +%: %.uue + uudecode -o $@,ff9 $^ + +else + +uudecode: + make -f RiscPkg/Rules uudecode uu=decode + +endif Index: RiscPkg/UnZip.inc =================================================================== RCS file: RiscPkg/UnZip.inc diff -N RiscPkg/UnZip.inc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ RiscPkg/UnZip.inc 9 Mar 2005 10:32:46 -0000 1.1 @@ -0,0 +1,16 @@ +RiscPkg/* +Sprites/!* +SysVars/*=24Dir +SysVars/Alias=24* +Apps/File/!UnZip/!* +Apps/File/!UnZip/unzip +Apps/File/!UnZip/funzip +Apps/File/!UnZip/unzipsfx +Apps/File/!UnZip/BUGS +Apps/File/!UnZip/History.550 +Apps/File/!UnZip/History.551 +Apps/File/!UnZip/History.552 +Apps/File/!UnZip/LICENSE +Apps/File/!UnZip/README +Apps/File/!UnZip/ToDo +Apps/File/!UnZip/WHERE Index: Sprites/!unzip =================================================================== RCS file: Sprites/!unzip diff -N Sprites/!unzip --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ Sprites/!unzip 8 Mar 2005 18:44:43 -0000 1.1 @@ -0,0 +1 @@ +.!Sprites \ No newline at end of file Index: SysVars/Alias=24funzip =================================================================== RCS file: SysVars/Alias=24funzip diff -N SysVars/Alias=24funzip --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ SysVars/Alias=24funzip 8 Mar 2005 18:44:21 -0000 1.1 @@ -0,0 +1 @@ +/.funzip %*0 \ No newline at end of file Index: SysVars/Alias=24unzip =================================================================== RCS file: SysVars/Alias=24unzip diff -N SysVars/Alias=24unzip --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ SysVars/Alias=24unzip 8 Mar 2005 18:44:21 -0000 1.1 @@ -0,0 +1 @@ +/.unzip %*0 \ No newline at end of file Index: SysVars/Alias=24unzipsfx =================================================================== RCS file: SysVars/Alias=24unzipsfx diff -N SysVars/Alias=24unzipsfx --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ SysVars/Alias=24unzipsfx 8 Mar 2005 18:44:21 -0000 1.1 @@ -0,0 +1 @@ +/.unzipsfx %*0 \ No newline at end of file Index: SysVars/Alias=24zipinfo =================================================================== RCS file: SysVars/Alias=24zipinfo diff -N SysVars/Alias=24zipinfo --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ SysVars/Alias=24zipinfo 8 Mar 2005 18:44:21 -0000 1.1 @@ -0,0 +1 @@ +/.unzip -Z %*0 \ No newline at end of file Index: SysVars/UnZip=24Dir =================================================================== RCS file: SysVars/UnZip=24Dir diff -N SysVars/UnZip=24Dir --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ SysVars/UnZip=24Dir 8 Mar 2005 18:44:21 -0000 1.1 @@ -0,0 +1 @@ + \ No newline at end of file Index: acorn/Makefile.riscpkg =================================================================== RCS file: acorn/Makefile.riscpkg diff -N acorn/Makefile.riscpkg --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ acorn/Makefile.riscpkg 10 Mar 2005 04:54:13 -0000 1.3 @@ -0,0 +1,109 @@ +# This file is part of the RISC OS Packaging Project distribution of Unzip. +# Copyright © 2005 Graham Shaw. +# Distribution and use are subject to the Info-ZIP licence, a copy of which +# may be found in the file ".LICENSE". + +ifndef RULES +RULES = /fixdeps:/Rules.make +endif + +include $(RULES) + +ifndef CCFLAGS +CCFLAGS = -mthrowback -munixlib -mpoke-function-name -O2 +endif + +CPPFLAGS += -I. -D__unixlib + +BIN = unzip funzip unzipsfx + +OBJ_S = \ + acorn/swiven.o + +OBJ_unzip = \ + unzip.o \ + crc32.o \ + crctab.o \ + crypt.o \ + envargs.o \ + explode.o \ + extract.o \ + fileio.o \ + globals.o \ + inflate.o \ + list.o \ + match.o \ + process.o \ + ttyio.o \ + unreduce.o \ + unshrink.o \ + zipinfo.o \ + acorn/acorn.o \ + acorn/swiven.o \ + acorn/unixlib.o + +OBJ_funzip = \ + funzip.o \ + crc32.o \ + crypt_f.o \ + globals_f.o \ + inflate_f.o \ + ttyio_f.o \ + acorn/swiven.o \ + acorn/unixlib.o + +OBJ_unzipsfx = \ + unzip_x.o \ + crc32.o \ + crctab_x.o \ + crypt_x.o \ + extract_x.o \ + fileio_x.o \ + globals_x.o \ + inflate_x.o \ + match_x.o \ + process_x.o \ + ttyio_x.o \ + acorn/acorn_x.o \ + acorn/swiven.o \ + acorn/unixlib_x.o + +OBJ_ALL = $(foreach bin,$(BIN),$(OBJ_$(bin))) + +OBJ_UNIQ = $(sort $(subst _f.o,.o,$(subst _x.o,.o,$(OBJ_ALL)))) + +OBJ_C = $(filter-out $(OBJ_S),$(OBJ_UNIQ)) + +.PHONY: all +all: $(BIN) + +.PHONY: clean +clean: + rm -f $(wildcard *.o) $(wildcard acorn/*.o) + rm -f $(wildcard *.d) $(wildcard acorn/*.d) + rm -f $(BIN) + +.PHONY: distclean +distclean: clean + +unzip: $(OBJ_unzip) + $(LD) -o $@ $^ + +funzip: $(OBJ_funzip) + $(LD) -o $@ $^ + +unzipsfx: $(OBJ_unzipsfx) + $(LD) -o $@ $^ + +%_f.o: %.c + $(CC) -c $(CPPFLAGS) -DFUNZIP $(CCFLAGS) -o $@ $< + +%_x.o: %.c + $(CC) -c $(CPPFLAGS) -DSFX $(CCFLAGS) -o $@ $< + +NODEPS = clean distclean +GOALS = $(MAKECMDGOALS) $(if $(MAKECMDGOALS),,all) + +ifneq ($(filter-out $(NODEPS),$(GOALS)),) +include $(OBJ_C:.o=.d) +endif Index: acorn/acorn.c =================================================================== RCS file: /var/cvs/UnZip/acorn/acorn.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- acorn/acorn.c 8 Mar 2005 18:16:21 -0000 1.1.1.1 +++ acorn/acorn.c 9 Mar 2005 10:21:04 -0000 1.2 @@ -27,13 +27,18 @@ #define UNZIP_INTERNAL -#include "^.unzip.h" +#include "unzip.h" + +#ifdef UNIXLIB +#include "unixlib.h" +#else #include "riscos.h" +#endif #define FTYPE_FFF (1<<17) /* set filetype to &FFF when extracting */ #ifdef WILD_STOP_AT_DIR -# define WESEP , (oU.W_flag ? '.' : '\0') +# define WESEP , (oU.W_flag ? PATHSEP : '\0') #else # define WESEP #endif @@ -42,7 +47,10 @@ static int renamed_fullpath; /* ditto */ static int has_mimemap = -1; /* used in mimemap() */ +#ifndef UNIXLIB extern int mkdir(const char *path, int mode); +#endif + static int has_NFS_ext(const char *name); static void setRISCOSexfield(ZCONST char *path, ZCONST void *ef_spark); #ifdef DEBUG @@ -76,7 +84,7 @@ notfirstcall = TRUE; /* break the wildspec into a directory part and a wildcard filename */ - if ((wildname = (ZCONST char *)strrchr(wildspec, '.')) == + if ((wildname = (ZCONST char *)strrchr(wildspec, PATHSEP)) == (ZCONST char *)NULL) { dirname = "."; @@ -410,10 +418,12 @@ checkswap=NULL; /* reset checking at start of new leafname */ break; +#ifndef UNIXLIB case '.': *pp++ = '/'; checkswap=pp; break; +#endif case ';': /* VMS version (or DEC-20 attrib?) */ lastsemi = pp; @@ -487,6 +497,7 @@ return (error & ~MPN_MASK) | MPN_ERR_SKIP; } +#ifndef UNIXLIB if (checkswap!=NULL) { if (checkext(checkswap)) { if ((error = checkdir(__G__ checkswap, APPEND_DIR)) > 1) @@ -494,6 +505,7 @@ *(checkswap-1)=0; /* remove extension from pathcomp */ } } +#endif if (!uO.acorn_nfs_ext && has_NFS_ext(pathcomp)) { /* remove the filetype extension unless requested otherwise */ @@ -607,7 +619,7 @@ /* no room for filenames: fatal */ return MPN_ERR_TOOLONG; } - *end++ = '.'; /************* was '/' *************/ + *end++ = PATHSEP; /************* was '/' *************/ *end = '\0'; Trace((stderr, "buildpath now = [%s]\n", FnFilter1(buildpath))); return MPN_OK; @@ -708,7 +720,7 @@ return MPN_NOMEM; } strcpy(tmproot, pathcomp); - if (tmproot[rootlen-1] == '.') { /****** was '/' ********/ + if (tmproot[rootlen-1] == PATHSEP) { /****** was '/' ********/ tmproot[--rootlen] = '\0'; } if (rootlen > 0 && (SSTAT(tmproot, &G.statbuf) || @@ -733,7 +745,7 @@ return MPN_ERR_SKIP; } } - tmproot[rootlen++] = '.'; /*********** was '/' *************/ + tmproot[rootlen++] = PATHSEP; /*********** was '/' *************/ tmproot[rootlen] = '\0'; if ((rootpath = (char *)realloc(tmproot, rootlen+1)) == NULL) { free(tmproot); @@ -765,7 +777,7 @@ - +#ifndef UNIXLIB /********************/ /* Function mkdir() */ @@ -782,6 +794,7 @@ return (SWI_OS_File_8((char *)path) == NULL)? 0 : -1; } +#endif Index: acorn/riscos.h =================================================================== RCS file: /var/cvs/UnZip/acorn/riscos.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- acorn/riscos.h 8 Mar 2005 18:16:21 -0000 1.1.1.1 +++ acorn/riscos.h 9 Mar 2005 10:21:04 -0000 1.2 @@ -26,6 +26,8 @@ #define MAXFILENAMELEN 64 /* should be 11 for ADFS, 13 for DOS, 64 seems a sensible value... */ #define DIR_BUFSIZE 1024 /* this should be enough to read a whole E-Format directory */ +#define PATHSEP '.' + struct stat { unsigned int st_dev; int st_ino; Index: acorn/unixlib.c =================================================================== RCS file: acorn/unixlib.c diff -N acorn/unixlib.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ acorn/unixlib.c 9 Mar 2005 10:21:04 -0000 1.1 @@ -0,0 +1,48 @@ +#include "unixlib.h" + +#define __UNIXLIB_INTERNALS + +#include +#include + +void getRISCOSexts(char *envstr) +{ + char *envptr; /* value returned by getenv */ + + envptr = getenv(envstr); + if (envptr == NULL || *envptr == 0) return; + + __sfixinit(envptr); +} + +#undef SWI_OS_File_1 +#undef SWI_OS_File_5 +#undef SWI_OS_File_7 + +static os_error not_recognised={0xcc,"File name not recognised"}; + +os_error *UL_OS_File_1(char *filename, unsigned int loadaddr, + unsigned int execaddr, int attrib) +{ + char rfilename[MAXPATHLEN]; + if (!__riscosify_std(filename,0,rfilename,MAXPATHLEN,0)) + return ¬_recognised; + return SWI_OS_File_1(rfilename,loadaddr,execaddr,attrib); +} + +os_error *UL_OS_File_5(char *filename, int *objtype, unsigned int *loadaddr, + unsigned int *execaddr, int *length, int *attrib) +{ + char rfilename[MAXPATHLEN]; + if (!__riscosify_std(filename,0,rfilename,MAXPATHLEN,0)) + return ¬_recognised; + return SWI_OS_File_5(rfilename,objtype,loadaddr,execaddr,length,attrib); +} + +os_error *UL_OS_File_7(char *filename, int loadaddr, int execaddr, int size) +{ + char rfilename[MAXPATHLEN]; + if (!__riscosify_std(filename,1,rfilename,MAXPATHLEN,0)) + return ¬_recognised; + return SWI_OS_File_7(rfilename,loadaddr,execaddr,size); +} Index: acorn/unixlib.h =================================================================== RCS file: acorn/unixlib.h diff -N acorn/unixlib.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ acorn/unixlib.h 9 Mar 2005 10:21:04 -0000 1.1 @@ -0,0 +1,52 @@ +#ifndef __unixlib_h +#define __unixlib_h + +#include +#include +#include +#include +#include +#include + +typedef struct { + int errnum; + char errmess[252]; +} os_error; + +#include "swiven.h" + +#define PATHSEP '/' +#define lenEOL 1 +#define PutNativeEOL *q++ = native(LF); +#define USE_STRM_INPUT +#define USE_FWRITE + +typedef struct { + short ID; + short size; + int ID_2; + unsigned int loadaddr; + unsigned int execaddr; + int attr; + int zero; +} extra_block; + +#define SWI_OS_FSControl_26 UL_OS_FSControl_26 +#define SWI_OS_FSControl_27 UL_OS_FSControl_27 +#define SWI_OS_GBPB_9 UL_OS_GBPB_9 +#define SWI_OS_File_1 UL_OS_File_1 +#define SWI_OS_File_5 UL_OS_File_5 +#define SWI_OS_File_6 UL_OS_File_6 +#define SWI_OS_File_7 UL_OS_File_7 +#define SWI_OS_File_8 UL_OS_File_8 +#define SWI_OS_File_18 UL_OS_File_18 +#define SWI_OS_FSControl_54 UL_OS_FSControl_54 +#define SWI_OS_FSControl_37 UL_OS_FSControl_37 + +os_error *UL_OS_File_1(char *filename, unsigned int loadaddr, + unsigned int execaddr, int attrib); +os_error *UL_OS_File_5(char *filename, int *objtype, unsigned int *loadaddr, + unsigned int *execaddr, int *length, int *attrib); +os_error *UL_OS_File_7(char *filename, int loadaddr, int execaddr, int size); + +#endif