From 44c9de2df9956dbca5a715f853186814b83e3878 Mon Sep 17 00:00:00 2001 From: gryf Date: Sun, 2 Oct 2022 12:44:14 +0200 Subject: [PATCH] Removed archive handlers, as they are on separate repos now. --- extras/unadf_separate_comment.patch | 122 ------------------ uadf | 187 ---------------------------- ulha | 182 --------------------------- ulzx | 135 -------------------- 4 files changed, 626 deletions(-) delete mode 100644 extras/unadf_separate_comment.patch delete mode 100755 uadf delete mode 100755 ulha delete mode 100755 ulzx diff --git a/extras/unadf_separate_comment.patch b/extras/unadf_separate_comment.patch deleted file mode 100644 index 83a64b7..0000000 --- a/extras/unadf_separate_comment.patch +++ /dev/null @@ -1,122 +0,0 @@ -diff -ur unadf-0.7.11a.orig/Demo/unadf.c unadf-0.7.11a/Demo/unadf.c ---- unadf-0.7.11a.orig/Demo/unadf.c 2013-05-12 17:59:51.214905177 +0200 -+++ unadf-0.7.11a/Demo/unadf.c 2013-05-12 17:50:06.843420519 +0200 -@@ -58,6 +58,7 @@ - puts(" -r : lists directory tree contents"); - puts(" -c : use dircache data (must be used with -l)"); - puts(" -s : display entries logical block pointer (must be used with -l)"); -+ puts(" -m : display file comments, if exists (must be used with -l)"); - putchar('\n'); - puts(" -v n : mount volume #n instead of default #0 volume"); - putchar('\n'); -@@ -65,7 +66,8 @@ - puts(" -d dir : extract to 'dir' directory"); - } - --void printEnt(struct Volume *vol, struct Entry* entry, char *path, BOOL sect) -+void printEnt(struct Volume *vol, struct Entry* entry, char *path, BOOL sect, -+ BOOL comment) - { - /* do not print the links entries, ADFlib do not support them yet properly */ - if (entry->type==ST_LFILE || entry->type==ST_LDIR || entry->type==ST_LSOFT) -@@ -89,7 +91,7 @@ - printf("%s/",entry->name); - else - printf("%s",entry->name); -- if (entry->comment!=NULL && strlen(entry->comment)>0) -+ if (comment && entry->comment!=NULL && strlen(entry->comment)>0) - printf(", %s",entry->comment); - putchar('\n'); - -@@ -199,13 +201,14 @@ - } - - --void printTree(struct Volume *vol, struct List* tree, char* path, BOOL sect) -+void printTree(struct Volume *vol, struct List* tree, char* path, BOOL sect, -+ BOOL comment) - { - char *buf; - struct Entry* entry; - - while(tree) { -- printEnt(vol, tree->content, path, sect); -+ printEnt(vol, tree->content, path, sect, comment); - if (tree->subdir!=NULL) { - entry = (struct Entry*)tree->content; - if (strlen(path)>0) { -@@ -215,11 +218,11 @@ - return; - } - sprintf(buf,"%s/%s", path, entry->name); -- printTree(vol, tree->subdir, buf, sect); -+ printTree(vol, tree->subdir, buf, sect, comment); - free(buf); - } - else -- printTree(vol, tree->subdir, entry->name, sect); -+ printTree(vol, tree->subdir, entry->name, sect, comment); - } - tree = tree->next; - } -@@ -370,12 +373,10 @@ - int main(int argc, char* argv[]) - { - int i, j; -- BOOL rflag, lflag, xflag, cflag, vflag, sflag, dflag, pflag, qflag; -+ BOOL rflag, lflag, xflag, cflag, vflag, sflag, dflag, pflag, qflag, mflag; - struct List* files, *rtfiles; - char *devname, *dirname; -- char strbuf[80]; - unsigned char *extbuf; -- int vInd, dInd, fInd, aInd; - BOOL nextArg; - - struct Device *dev; -@@ -389,8 +390,7 @@ - exit(0); - } - -- rflag = lflag = cflag = vflag = sflag = dflag = pflag = qflag = FALSE; -- vInd = dInd = fInd = aInd = -1; -+ rflag = lflag = cflag = vflag = sflag = dflag = pflag = qflag = mflag = FALSE; - xflag = TRUE; - dirname = NULL; - devname = NULL; -@@ -430,6 +430,9 @@ - case 's': - sflag = TRUE; - break; -+ case 'm': -+ mflag = TRUE; -+ break; - case 'c': - cflag = TRUE; - break; -@@ -522,13 +525,13 @@ - if (!rflag) { - cell = list = adfGetDirEnt(vol,vol->curDirPtr); - while(cell) { -- printEnt(vol,cell->content,"", sflag); -+ printEnt(vol,cell->content,"", sflag, mflag); - cell = cell->next; - } - adfFreeDirList(list); - } else { - cell = list = adfGetRDirEnt(vol,vol->curDirPtr,TRUE); -- printTree(vol,cell,"", sflag); -+ printTree(vol,cell,"", sflag, mflag); - adfFreeDirList(list); - } - }else if (xflag) { -diff -ur unadf-0.7.11a.orig/Demo/unadf.usage unadf-0.7.11a/Demo/unadf.usage ---- unadf-0.7.11a.orig/Demo/unadf.usage 2006-12-03 15:27:00.000000000 +0100 -+++ unadf-0.7.11a/Demo/unadf.usage 2013-05-12 17:40:23.116966854 +0200 -@@ -3,6 +3,7 @@ - -r : lists directory tree contents - -c : use dircache data (must be used with -l) - -s : display entries logical block pointer (must be used with -l) -+ -m : display file comments, if exists (must be used with -l) - - -v n : mount volume #n instead of default #0 volume - diff --git a/uadf b/uadf deleted file mode 100755 index 4dce989..0000000 --- a/uadf +++ /dev/null @@ -1,187 +0,0 @@ -#!/usr/bin/env python3 -""" -UADF Virtual filesystem - -This extfs provides quick and dirty read-only access to disk image files for -the Commodore Amiga adf or adz (gzipped adfs) and dms. - -It requires the unadf utility, unfortunately there is no original sources, -since authors page doesn't exists anymore. Luckily, there is a copy of the -source (and useful patches) in Debian repository: -http://packages.debian.org/sid/unadf - -There should be one change made to the source of unadf, though. While using -"-lr" switch it by default also displays comments, separated by the comma. -However there is no way to distinguish where filename ends and comment starts, -if comment or filename already contains any comma. - -The patched sources are available from: https://github.com/lclevy/ADFlib - -It also requires xdms utility, for optional dms support. - -Changelog: - 1.3 Switch to Python3 - 1.2 Added failsafe for filenames in archive with spaces and nodos message. - 1.1 Moved common code into extfslib library - 1.0 Initial release - -Author: Roman 'gryf' Dobosz -Date: 2019-06-30 -Version: 1.3 -Licence: BSD -""" - -import sys -import re -import os -import gzip -from subprocess import check_output, check_call, CalledProcessError -from tempfile import mkstemp, mkdtemp -import shutil - -from extfslib import Archive, parse_args - - -class UAdf(Archive): - """ - Class for interact with c1541 program and MC - """ - LINE_PAT = re.compile(b'\s*(?P\d+)?' - b'\s{2}(?P\d{4}/\d{2}/\d{2})' - b'\s{2}\s?(?P