extfs patchfs update
Hello. I've noticed, that patchfs is quite useless right now. I've updated it to handle unified diffs (the most popular patch format), and I'm working on the context diff format. Now I work on fixing mailfs... I'm including new patchfs as an attachment - if you want to, add it to mc distribution. Regards alpha ps. I've just subscribed to this list. I want to say I'm really happy, that GNOME support has been thrown out of mc, and that the real mc is now actively developed. Hope I can help... -- _.|._ |_ _.: Adam Byrtek, alpha@(irc.pl|debian.org) (_|||_)| |(_|: gg 1802819, pgp 0xB25952C0 |: jid alpha.jabberpl.org #! /bin/sh # Peter Daum <[EMAIL PROTECTED]> (Jan 1998, mc-4.1.22) # modified to work with unified diffs, some additional fixes # Adam Byrtek <[EMAIL PROTECTED]>, 4 Dec 2002 # WARNING: look out for TAB (0x09) chars in sed patterns! # (sed does not accept \t) LC_ALL=C export LC_ALL # paths to used programs: ncat=cat # regular cat zcat=zcat # gunzip to stdout bzcat="bzip2 -dc" # bunzip2 to stdout file=file # "file" command sed=sed filelist=FILELIST # names for "special" files patchfs_list () { # default attributes date=`date +"%b %d %H:%M"` perm="-r--r--r--" uid= gid= size= nlink=" 1" # filelist virtual file echo "$perm $nlink $uid $gid $size $date $filelist" $cat $1 | $sed -ne "/^--- / { s/^--- \([^ ]*\).*/$perm $nlink $uid $gid $size $date \1/gp }" } patchfs_copyout () { if [ "$2" = "$filelist" ]; then # list of all affected files $cat $1 | $sed -ne "/^--- / { s/^--- \([^ ]*\).*/\1/gp }" > $3 else # escape '/' in filename fn=`echo $2 | $sed 's|/|\\\/|g'` $cat $1 | $sed -ne "/^--- $fn/,/^--- / { /^--- / { /^--- $fn/p d } p }" > $3 fi exit 0 } patchfs_run () { exit 0 } type=`$file $2` case $type in *bzip*) cat=$bzcat ;; *gzip*) cat=$zcat ;; *text*) cat=$ncat ;; *) exit 1 esac umask 077 case "$1" in list) patchfs_list $2; exit 0;; copyout) patchfs_copyout $2 $3 $4; exit 0;; run) patchfs_run; exit 0;; esac exit 1
[Regression] Editting stale symlink removes symlink and creates filesymlink points to
Hello, Max Derzhak reported new regression in mcedit. If you type F4 on stale symlink and press Esc-Esc or F10 after it (no editting at all) mcedit creates empty file symlink points to and removes original symlink. This bug is more than annoing, and it was introduced after 4.5.55. Current behaviour should be changed, but resolve_symlink() is very expensive, especially over VFS, as far as new algorithm for file saving when backup is doing by copying original file to new file and then saving new edition to original filename. Lines below are from edit/Changelog. 2002-06-24 Pavel Roskin <[EMAIL PROTECTED]> * edit.c (check_file_access): Return 1 on all errors, document this behavior. Set edit->delete_file to 1 for newly created files. (edit_open_file): Don't set edit->delete_file, it's now done in check_file_access(). Reported by Saso <[EMAIL PROTECTED]> -- Regards, Andrew V. Samoilov ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: MC Hints: F13 == Shift-F3 ?
On Wed, 4 Dec 2002 14:26:46 +0100 (CET) David Sterba <[EMAIL PROTECTED]> wrote: > in hint files (all languages) is a mistake: > Hint: F13 (or Shift-F3) invokes the viewer in raw mode. > > There should be Shift-F1. > Patch attached. It depends on the terminal IIRC, so it may be Shift-F1 or Shift-F3. Regards, Nerijus ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
MC Hints: F13 == Shift-F3 ?
Hi, in hint files (all languages) is a mistake: Hint: F13 (or Shift-F3) invokes the viewer in raw mode. There should be Shift-F1. Patch attached. bye Dave --- lib/mc.hint.cs +++ lib/mc.hint.cs @@ -29,7 +29,7 @@ Poznámka: Pøíkazy shellu nefungují, pokud nepracujete na lokální systému souborù. Tip: Smazaný text obnovíte C-y. Tip: Pokud nìkteré klávesy nefunfují, pou¾ijte menu Nastavení/uèení kláves. -Tip: F13 (nebo Shift-F3) vyvolá prohlí¾ení bez zpracování obsahu souboru. +Tip: F13 (nebo Shift-F1) vyvolá prohlí¾ení bez zpracování obsahu souboru. Tip: Pokud v xtermu nepracují klávesy, zkuste soubory xterm.ad, .ti a .tcap. Tip: Editor pro klávesu F4 urèíte pomocí promìnné prostøedí EDITOR. Tip: Externí prohlí¾eè urèíte promìnnou PAGER. --- lib/mc.hint.es +++ lib/mc.hint.es @@ -32,7 +32,7 @@ Ayudita: Con C-y puede recuperar texto eliminado. Ayudita: ¿Alguna tecla rebelde? Puede educarla con "Redefinir teclas". Ayudita: Para ver la salida de un comando por el visor M-! -Ayudita: F13 (o Mayúsculas-F3) invoca el visor en modo primitivo, sin formatos. +Ayudita: F13 (o Mayúsculas-F1) invoca el visor en modo primitivo, sin formatos. Ayudita: ¿Problemas de teclas en terminales X? Use xterm.ad, .ti y .tcap Ayudita: F4 puede usar cualquier editor que indiquemos en la variable EDITOR. Ayudita: Se puede usar un visor externo indicado en la variable PAGER. --- lib/mc.hint.hu +++ lib/mc.hint.hu @@ -31,7 +31,7 @@ Tipp: A pufferben levõ (például "C-k"-val oda tett) szöveg visszahozása: C-y Tipp: Ha nem mûködnek bizonyos billentyûk: "Beállítások/Billentyûk megtanulása". Tipp: Egy parancs kimenetének megjelenítése a fájlmegjelenítõben: M-! -Tipp: Az F13 (vagy Shift-F3) a fájlmegjelenítõt "nyers" módban indítja el. +Tipp: Az F13 (vagy Shift-F1) a fájlmegjelenítõt "nyers" módban indítja el. Tipp: X-terminálon nem mûködõ billentyûk? Lásd "xterm.ad", ".ti", ".tcap" fájlok. Tipp: Az F4-re használandó szerkesztõt az EDITOR shell-változóval lehet megadni. Tipp: A külsõ fájlmegjelenítõt a PAGER shell-változóval lehet megadni. --- lib/mc.hint.it +++ lib/mc.hint.it @@ -31,7 +31,7 @@ Dritta: riesuma il testo nell'editor integrato con C-u. Dritta: non ti funzionano alcuni tasti? Guarda in Opzioni/Impara tasti. Dritta: per vedere il risultato di un comando nel visualizzatore, usa M-! -Dritta: F13 (o Shift-F3) invoca il visualizzatore in modo 'raw'. +Dritta: F13 (o Shift-F1) invoca il visualizzatore in modo 'raw'. Dritta: tasti non funzionanti in xterms? Usa i file xterm.ad, .ti e .tcap di mc. Dritta: puoi specificare l'editor per F4 con la variabile shell EDITOR. Dritta: puoi specificare il visualizzatore esterno con la variabile shell PAGER. --- lib/mc.hint.nl +++ lib/mc.hint.nl @@ -31,7 +31,7 @@ Hint: Laat tekst herleven met C-y. Hint: Werken sommige toetsen niet? Kijk naar Opties/Leer toetsen. Hint: Om naar de uitvoer van een commando in d viewer te kijken, drukke men M-! -Hint: F13 (of Shift-F3) roept de viewer aan in ruwe modus. +Hint: F13 (of Shift-F1) roept de viewer aan in ruwe modus. Hint: Werken toetsen in xterms niet? Gebruik onze xterm.ad, .ti en .tcap! Hint: Je kunt een editor onder F4 specificeren met de shell variabele EDITOR. Hint: Je kunt een externe viewer specificeren met de shell variabele PAGER. --- lib/mc.hint +++ lib/mc.hint @@ -30,7 +30,7 @@ Hint: Bring text back from the dead with C-y. Hint: Are some of your keys not working? Look at Options/Learn keys. Hint: To look at the output of a command in the viewer, use M-! -Hint: F13 (or Shift-F1) invokes the viewer in raw mode. +Hint: F13 (or Shift-F3) invokes the viewer in raw mode. Hint: Keys not working in xterms? Use our xterm.ad, .ti and .tcap files. Hint: You may specify the editor for F4 with the shell variable EDITOR. Hint: You may specify the external viewer with the shell variable PAGER. --- lib/mc.hint.pl +++ lib/mc.hint.pl @@ -31,7 +31,7 @@ Porada: Przywróæ skasowany tekst za pomoc± C-y. Porada: Niektóre klawisze nie dzia³aj±? Patrz menu Opcje|Definiuj klawisze... Porada: Aby obejrzeæ wyj¶cie polecenia w przegl±darce u¿yj M-! -Porada: F13 (lub Shift-F3) wywo³uje przegl±darkê w trybie surowym. +Porada: F13 (lub Shift-F1) wywo³uje przegl±darkê w trybie surowym. Porada: Nie dzia³aj± klawisze w xterm? U¿yj naszych plików xterm.ad, .ti i .tcap Porada: Mo¿esz okre¶liæ edytor pod F4 przez zmienn± pow³oki EDITOR. Porada: Mo¿esz okre¶liæ zewnêtrzn± przegl±darkê przez zmienn± pow³oki PAGER. --- lib/mc.hint.ru +++ lib/mc.hint.ru @@ -30,7 +30,7 @@ óÏ×ÅÔ: õÄÁÌÅÎÎÙÊ ÔÅËÓÔ ÍÏÖÎÏ ×ÅÒÎÕÔØ Ó ÐÏÍÏÝØÀ C-y. óÏ×ÅÔ: îÅËÏÔÏÒÙÅ ËÌÁ×ÉÛÉ ÎÅ ÒÁÂÏÔÁÀÔ? úÁÊÄÉÔÅ × îÁÓÔÒÏÊËÉ/òÁÓÐÏÚÎÁ×ÁÎÉÅ ËÌÁ×ÉÛ. óÏ×ÅÔ: äÌÑ ÐÏÌÕÞÅÎÉÑ ×Ù×ÏÄÁ ËÏÍÁÎÄÙ × ÏËÎÅ ÐÒÏÓÍÏÔÒÁ, ÎÁÂÅÒÉÔÅ M-! -óÏ×ÅÔ: F13 (ÉÌÉ Shift-F3) ×ÙÚÙ×ÁÀÔ ÐÒÏÓÍÏÔÒÝÉË × ÒÅÖÉÍÅ ÎÅÏÂÒÁÂÏÔÁÎÎÙÈ ÄÁÎÎÙÈ. +óÏ×ÅÔ: F13 (ÉÌÉ Shift-F1) ×ÙÚÙ×ÁÀÔ ÐÒÏÓÍÏÔÒÝÉË × ÒÅÖÉÍÅ ÎÅÏÂÒÁÂÏÔÁÎÎÙÈ ÄÁÎÎÙÈ. óÏ×ÅÔ: îÅ ÒÁÂÏÔÁÀÔ ËÌÁ×ÉÛÉ × xterm? ðÏ
Re: New #mtools extfs?
Hi! On Wed, 4 Dec 2002, Pavel Roskin wrote: > I don't understand why you need to disable this check. I don't think it's > right to reuse the archive filename as the disk name. Actually, what I > suggested was "/#dos:a/" - this syntax doesn't need your patch. Yes, it does although need quite more extensive patch that would send the part after colon to the extfs script. I'm telling you that this was the most least affecting patch I can think of... > I don't like this coding style. mystat is actually used later. If you > ignore the return value of mc_stat, then current_archive->extfsstat will > point to invalid data. No, it is _not_ a pointer it is only a structure that is copied into current_archive->extfsstat. Actually if the filesystem is marked so that it doesn't need an archive name (the 'a' mtools extfs you have in CVS) than the current_archive->extfsstat would contain the same (possibly invalid) data as for the case of invalid (nonexistent) archive filename. > In fact, mystat is allocated on the stack, so current_archive->extfsstat > becomes invalid in any case as soon as open_archive() returns. > current_archive is allocated by g_new() and is returned by open_archive() > using the pparc argument. I'll have to debug mc to understand why it > doesn't crash later. Nope. It should not crash ... it is not a pointer ... look into the code more carefuly. > The code is ugly already, let's not make is even worse. I would like to not to make it worse. I just see this as very easy implementation where the archive stat() is not needed at all. It just prevents the extfs script to be called in case the archive name is not valid. But the script (or the apps called from in there) do these checks too, don't they? > I'm not going to apply it in this form. Do it in the right way, i.e. by > using flags after ":", like it's done in fish. Hmm, so should I change the extfs.c so that it would send some extra parameters into the script along the list command? Or what way would you like it to be done? > > > What if we implement something like this: > > > > > > VFS namemtools/dos name > > > > > > /#dos:a/ a:\ > > > /#dos:c/dos/sys.com c:\dos\sys.com > > Please quote only relevant parts of the messages you are replying to. > You didn't consider my suggestion and didn't even explain the reason. I did, but as I've written for the second time (just look through my mails) it is not that extfs.c sends any attributes to the script along the 'list' command... Actually, in the case of this patch (disable the stat() result check) appliance, I can't see any reason to have the ':' flags in the extfs.ini configuration. If the archive does exist then this will be ok and the stat() information will be valid. Otherwise either the script would fail (e.g. on unzip -Z archiveName) because of that the archive doesn't exist or the script (like my #mtools) would use the archive name for something different or not use this at all. I see this as a matter of simplification rather than making code more unreadable. Sure I can comment the changes more to be more selfdescriptive. If you don't like to dig into the code then leave it to others so they can judge the patch effect. It seems to me that it is not me who did not play with the code. Please, take this only as a suggestions and thoughts that are emerging in my head. I appreciate your effort on mc... I intend _not_ to offense anyone, I just read the code and see this as a good, not harming, change. _best_ regards STan ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel