Ticket #180: patch-vfs.patch

File patch-vfs.patch, 7.2 KB (added by styx, 15 years ago)
  • configure.ac

    diff -urNb mc/configure.ac mc-modifs/configure.ac
    old new  
    607607vfs/extfs/mailfs 
    608608vfs/extfs/patchfs 
    609609vfs/extfs/rpms 
     610vfs/extfs/uace 
    610611vfs/extfs/ualz 
    611612vfs/extfs/uar 
     613vfs/extfs/uarc 
    612614vfs/extfs/uarj 
     615vfs/extfs/uc1541 
    613616vfs/extfs/uha 
    614617vfs/extfs/ulha  
    615618vfs/extfs/urar 
  • lib/mc.ext.in

    diff -urNb mc/lib/mc.ext.in mc-modifs/lib/mc.ext.in
    old new  
    512512regex/\.(rexx?|cmd)$ 
    513513       Open=rexx %f %{Enter parameters};echo "Press ENTER";read y 
    514514 
     515# Disk images for Commodore computers (VIC20, C64, C128) 
     516regex/\.(d64|D64)$ 
     517        Open=%cd %p#uc1541 
     518        View=%view{ascii} c1541 %f -list 
     519        Extract=c1541 %f -extract 
     520 
    515521 
    516522### Plain compressed files ### 
    517523 
     524# ace 
     525regex/\.(ace|ACE)$ 
     526        Open=%cd %p#uace 
     527        View=%view{ascii} unace l %f 
     528        Extract=unace x %f 
     529 
     530# arc 
     531regex/\.(arc|ARC)$ 
     532        Open=%cd %p#uarc 
     533        View=%view{ascii} arc l %f 
     534        Extract=arc x %f '*' 
     535        Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi 
     536 
    518537# zip 
    519538type/^([Zz][Ii][Pp])\ archive 
    520539        Open=%cd %p#uzip 
  • vfs/extfs/extfs.ini

    diff -urNb mc/vfs/extfs/extfs.ini mc-modifs/vfs/extfs/extfs.ini
    old new  
    1111ualz 
    1212# For arj usage you need a special patch to unarj (see unarj.diff) 
    1313uarj 
     14uarc 
     15uace 
    1416 
    1517# ar is used for static libraries 
    1618uar 
     
    2830# Hewlett Packard calculator 
    2931hp48: 
    3032 
     33# Commodore 64/128 d64/D64 files 
     34uc1541 
     35 
    3136# Break patches into chunks 
    3237patchfs 
    3338 
  • vfs/extfs/Makefile.am

    diff -urNb mc/vfs/extfs/Makefile.am mc-modifs/vfs/extfs/Makefile.am
    old new  
    2121        mailfs.in               \ 
    2222        patchfs.in              \ 
    2323        rpms.in                 \ 
     24        uace.in                 \ 
    2425        ualz.in                 \ 
    2526        uar.in                  \ 
     27        uarc.in                 \ 
    2628        uarj.in                 \ 
     29        uc1541.in               \ 
    2730        uha.in                  \ 
    2831        ulha.in                 \ 
    2932        urar.in                 \ 
     
    4548        mailfs                  \ 
    4649        patchfs                 \ 
    4750        rpms                    \ 
     51        uace                    \ 
    4852        ualz                    \ 
    4953        uar                     \ 
     54        uarc                    \ 
    5055        uarj                    \ 
     56        uc1541                  \ 
    5157        uha                     \ 
    5258        ulha                    \ 
    5359        urar                    \ 
  • vfs/extfs/uace.in

    diff -urNb mc/vfs/extfs/uace.in mc-modifs/vfs/extfs/uace.in
    old new  
     1#! /bin/sh 
     2 
     3# 
     4# ACE Virtual filesystem executive v0.1 
     5# Works with unace v2.5 
     6 
     7# Copyright (C) 2008 Jacques Pelletier 
     8# May be distributed under the terms of the GNU Public License 
     9# <jpelletier@ieee.org> 
     10# 
     11 
     12# Define your awk 
     13AWK=gawk 
     14# Define which archiver you are using with appropriate options 
     15ACE_LIST="unace l" 
     16ACE_GET="unace x" 
     17# ACE_PUT="unace ?"  not available 
     18 
     19# The 'list' command executive 
     20 
     21# Unace:        DD.MM.YY HH.MM packed size ratio file 
     22# ls: 
     23mc_ace_fs_list() 
     24{ 
     25    $ACE_LIST "$1" | gawk -v uid=${UID-0} ' 
     26BEGIN { Month="JanFebMarAprMayJunJulAugSepOctNovDec" } 
     27/%/ { 
     28  split($1,date,".") 
     29 
     30  if (date[3] > 50) 
     31    date[3]=date[3] + 1900 
     32  else 
     33    date[3]=date[3] + 2000 
     34 
     35  printf "-rw-r--r--   1 %-8d %-8d %8d %s %2d %4d %s %s\n", uid, 0, $3, substr(Month,3*(date[2]-1)+1,3),date[1],date[3], $2, $6 
     36}' 2>/dev/null 
     37    exit 0 
     38} 
     39 
     40# Command: copyout archivename storedfilename extractto 
     41mc_ace_fs_copyout() 
     42{ 
     43   $ACE_GET "$1" "$2" > /dev/null 2>&1 
     44        mv "$2" "$3" 
     45} 
     46 
     47# The main routine 
     48umask 077 
     49 
     50cmd="$1" 
     51shift 
     52 
     53case "$cmd" in 
     54   list)        mc_ace_fs_list    "$@" ;; 
     55   copyout) mc_ace_fs_copyout "$@" ;; 
     56   *)       exit 1 ;; 
     57esac 
     58exit 0 
  • vfs/extfs/uarc.in

    diff -urNb mc/vfs/extfs/uarc.in mc-modifs/vfs/extfs/uarc.in
    old new  
     1#! /bin/sh 
     2 
     3# 
     4# ARC Virtual filesystem executive 
     5# Copyright (C) 2008 Jacques Pelletier 
     6# May be distributed under the terms of the GNU Public License 
     7# <jpelletier@ieee.org> 
     8# 
     9 
     10# Define your awk 
     11AWK=gawk 
     12# Define which archiver you are using with appropriate options 
     13ARC_LIST="arc v" 
     14ARC_GET="arc x" 
     15ARC_PUT="arc a" 
     16ARC_DEL="arc d" 
     17 
     18# The 'list' command executive 
     19 
     20mc_arc_fs_list() 
     21{ 
     22    $ARC_LIST "$1" | gawk -v uid=${UID-0} ' 
     23BEGIN { } 
     24/^Name/ { next } 
     25/===/ { next } 
     26/^Total/ { next } 
     27{ 
     28        if ($8 > 50) 
     29        $8=$8 + 1900 
     30        else 
     31        $8=$8 + 2000 
     32 
     33        split($9, a, ":") 
     34 
     35        # convert AM/PM to 00-23 
     36        if (a[2] ~ /a$|p$/) 
     37        { 
     38                if (a[2] ~ /p$/) 
     39                        a[1] = a[1]+12 
     40 
     41                a[2]=substr(a[2],1,2) 
     42        } 
     43 
     44        printf "-rw-r--r--   1 %-8d %-8d %8d %s %2d %4d %02d:%02d %s\n", uid, 0, $2, $7, $6, $8, a[1], a[2], $1 
     45}' 2>/dev/null 
     46    exit 0 
     47} 
     48 
     49# Command: copyout archivename storedfilename extractto 
     50mc_arc_fs_copyout() 
     51{ 
     52   $ARC_GET "$1" "$2" 2> /dev/null 
     53        mv "$2" "$3" 
     54} 
     55 
     56# Command: copyin archivename storedfilename sourcefile 
     57mc_arc_fs_copyin() 
     58{ 
     59        mv "$3" "$2" 
     60        $ARC_PUT "$1" "$2" 2> /dev/null 
     61} 
     62 
     63# Command: rm archivename storedfilename 
     64mc_arc_fs_rm() 
     65{ 
     66        $ARC_DEL "$1" "$2" 2> /dev/null 
     67} 
     68 
     69# The main routine 
     70umask 077 
     71 
     72cmd="$1" 
     73shift 
     74 
     75case "$cmd" in 
     76   list)        mc_arc_fs_list    "$@" ;; 
     77   copyout) mc_arc_fs_copyout "$@" ;; 
     78   copyin)      mc_arc_fs_copyin  "$@" ;; 
     79   rm)          mc_arc_fs_rm      "$@" ;; 
     80   *)       exit 1 ;; 
     81esac 
     82exit 0 
  • vfs/extfs/uc1541.in

    diff -urNb mc/vfs/extfs/uc1541.in mc-modifs/vfs/extfs/uc1541.in
    old new  
     1#! /bin/sh 
     2 
     3# 
     4# UC1541 Virtual filesystem executive v0.1 
     5 
     6# This is for accessing disk image files for the Commodore VIC20/C64/C128 
     7# It requires the utility c1541 that comes bundled with Vice, the emulator 
     8# for the VIC20, C64, C128 and other computers made by Commodore. 
     9 
     10# Copyright (C) 2008 Jacques Pelletier 
     11# May be distributed under the terms of the GNU Public License 
     12# <jpelletier@ieee.org> 
     13# 
     14 
     15# Define your awk 
     16AWK=gawk 
     17# Define which archiver you are using with appropriate options 
     18C1541="c1541" 
     19 
     20# There are no time stamps in the disk image, so a bogus timestamp is displayed 
     21mc_c1541_fs_list() 
     22{ 
     23    $C1541 "$1" -list | gawk -v uid=${UID-0} ' 
     24BEGIN { FS = "\"" } 
     25/No LINES!/ { next } 
     26/BLOCKS FREE/ { next } 
     27$1 == 0 { next } 
     28{ 
     29  printf "-rw-r--r--   1 %-8d %-8d %8d Jan 01 1980 00:00 %s\n", uid, 0, $1 * 256, $2 
     30}' 2>/dev/null 
     31} 
     32 
     33# Command: copyout archivename storedfilename extractto 
     34# -read image 1541name [fsname] 
     35mc_c1541_fs_copyout() 
     36{ 
     37        $C1541 "$1" -read "$2" 2> /dev/null 
     38        mv "$2" "$3" 
     39} 
     40 
     41# FIXME mc can't do chown of the file inside the archive 
     42# Command: copyin archivename storedfilename sourcefile 
     43# -write image fsname [1541name] 
     44mc_c1541_fs_copyin() 
     45{ 
     46        mv "$3" "$2" 
     47        $C1541 "$1" -write "$2" 2> /dev/null 
     48} 
     49 
     50# Command: rm archivename storedfilename 
     51# -delete image files 
     52mc_c1541_fs_rm() 
     53{ 
     54        $C1541 "$1" -delete "$2" 2> /dev/null 
     55} 
     56 
     57# The main routine 
     58umask 077 
     59 
     60cmd="$1" 
     61shift 
     62 
     63case "$cmd" in 
     64   list)        mc_c1541_fs_list    "$@" ;; 
     65   copyout) mc_c1541_fs_copyout "$@" ;; 
     66#   copyin)     mc_c1541_fs_copyin  "$@" ;; 
     67   rm)          mc_c1541_fs_rm      "$@" ;; 
     68   *)       exit 1 ;; 
     69esac 
     70exit 0