From dmi_a at qnx.org.ru Sat Mar 1 13:25:40 2003 From: dmi_a at qnx.org.ru (Dmitry Alexeyev) Date: Sat, 1 Mar 2003 16:25:40 +0300 Subject: Keyboard modifiers in Photon 2.x (QNX 6.x) Message-ID: <165251872.20030301162540@qnx.org.ru> Hello! Attached is patch to allow modifiers detection in QNX Photon pterm. (diff against key.c from yesterday's CVS snap) WBR, Dmitry -------------- next part -------------- A non-text attachment was scrubbed... Name: qnxnto_key_c.diff Type: application/octet-stream Size: 2573 bytes Desc: not available URL: From tavx at mail.ru Sat Mar 1 14:11:54 2003 From: tavx at mail.ru (Dmitriy Taviksov) Date: Sat, 1 Mar 2003 17:11:54 +0300 Subject: fix for save/load cursor and display position (mc 4.6.0) Message-ID: <20030301171154.4811aa8a.tavx@mail.ru> -------------- next part -------------- A non-text attachment was scrubbed... Name: mc-4.6.0-fixpos.patch.gz Type: application/octet-stream Size: 1092 bytes Desc: not available URL: From alpha at student.uci.agh.edu.pl Sun Mar 2 14:42:39 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Sun, 2 Mar 2003 15:42:39 +0100 Subject: Xterm title format string Message-ID: <20030302144239.GA5354@mentat.localdomain> Hi, I'm implementing the feature (from TODO list) which allows to set the xterm window title using the user-specified format string like: "%f - mc" which will be replaced (for example) with: "/home/alpha/cvs - mc" I just like to ask you, what other format variables might be useful for users (pid, edited/viewed file name...)? I will appreciate any suggestions. Regards -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 From alpha at student.uci.agh.edu.pl Sun Mar 2 19:09:01 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Sun, 2 Mar 2003 20:09:01 +0100 Subject: Xterm title format string In-Reply-To: <20030302144239.GA5354@mentat.localdomain> References: <20030302144239.GA5354@mentat.localdomain> Message-ID: <20030302190901.GA3865@mentat.localdomain> On Sun, Mar 02, 2003 at 03:42:39PM +0100, Adam Byrtek / alpha wrote: > I just like to ask you, what other format variables might be useful > for users (pid, edited/viewed file name...)? I will appreciate any > suggestions. Nevermind. I decided to support standard bash PS1 substitutions (but begginning with '%', not '\', because it is more mc-ish) to make configuration easier for those familiar with bash PS1. If you want to test it, try the patch. This command gives you everything you could have in the title: MC_XTITLE="%%%$ %u@%h(%H) %w(%W) <%p> mc %V [%t]" mc Documentation: %% - percent '%' character %$ - '#' for root, '$' for normal user %w - working directory %W - working directory (last component only) %p - process id (pid) %u - username %h - hostname %H - hostname.domainname %t - tty connected to stdin %V - mc version The default is "%w - mc" Regards -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 -------------- next part -------------- Index: main.c =================================================================== RCS file: /cvs/gnome/mc/src/main.c,v retrieving revision 1.281 diff -u -r1.281 main.c --- main.c 27 Feb 2003 05:09:35 -0000 1.281 +++ main.c 2 Mar 2003 19:07:53 -0000 @@ -1839,17 +1839,95 @@ void update_xterm_title_path (void) { + int i = 0; unsigned char *p, *s; + unsigned char title [BUF_MEDIUM+1]; if (xterm_flag && xterm_title) { - p = s = g_strdup (strip_home_and_password (cpanel->cwd)); + /* Use special environment variable to format title */ + if ((p = getenv ("MC_XTITLE")) == NULL) { + p = "%w - mc"; + } + do { + if (*p != '%') { + title [i++] = *p; + continue; + } + if (!*++p) + break; + + /* Substitute '%' special characters + * (meaning the same as for bash, but preceded by '%', not '\') + */ + s = NULL; + switch (*p) { + case '%' : /* %% - percent '%' character */ + title [i++] = '%'; + break; + case '$' : /* %$ - '#' for root, '$' for normal user */ + title [i++] = (geteuid()==0 ? '#' : '$'); + break; + case 'w' : /* %w - working directory */ + s = g_strdup (strip_home_and_password (cpanel->cwd)); + break; + case 'W' : /* %W - working directory (last component only) */ + s = g_strdup (x_basename (strip_home_and_password (cpanel->cwd))); + break; + case 'p' : /* %p - process id (pid) */ + s = g_strdup_printf ("%d", getpid ()); + break; + case 'u' : /* %u - username */ + s = g_strdup (getpwuid (getuid ()) -> pw_name); + break; + case 'h' : /* %h - hostname */ + if (gethostname (title+i, BUF_MEDIUM-i) == 0) { + title [BUF_MEDIUM] = '\0'; + i = strlen (title); + } + break; + case 'H' : /* %H - hostname.domainname */ + if (gethostname (title+i, BUF_MEDIUM-i) == 0) { + title [BUF_MEDIUM] = '\0'; + i = strlen (title); + } + if (i < BUF_MEDIUM-1) { + title[i++]='.'; + if (getdomainname (title+i, BUF_MEDIUM-i) == 0) { + title [BUF_MEDIUM] = '\0'; + i = strlen (title); + } + } + break; + case 't' : /* %t - tty connected to stdin */ + s = g_strdup (ttyname (0)); + break; + case 'V' : /* %V - mc version */ + s = g_strdup (VERSION); + break; + } + + /* Append substituted string */ + if (s) { + strncpy (title+i, s, BUF_MEDIUM-i); + title [BUF_MEDIUM] = '\0'; + i = strlen (title); + g_free (s); + } + } while (*++p && i + + * main.c (update_xterm_title_path): Support for format string + in MC_XTITLE environment variable added. + From pthomas at suse.de Mon Mar 3 09:32:15 2003 From: pthomas at suse.de (Philipp Thomas) Date: Mon, 3 Mar 2003 10:32:15 +0100 Subject: Some patches for mc Message-ID: <20030303093215.GB5760@paradies.suse.de> Here are some patches for mc that SuSE has been applying for some time now and which could possibly be included in the official mc: mc-4.5.51-palmsupport.patch Allows to transfer various files to a Palm by using pilot-xfer and install-memo. mc-4.6.0-asmsyntax.patch Syntax highlighting for Intel style assembly language. This was done by a former collegue of mine. mc-4.6.0-tempfile.patch Security fix that uses the external mktemp to make the use of temporyry files more secure. mc-4.6.0-x11browser.diff This, together with the x11_browser script gets rid of hardcoding the webbrowser but instead use whatever's available. -- Philipp Thomas SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nuremberg, Germany -------------- next part -------------- --- mc-4.5.55/lib/mc.menu +++ mc-4.5.55/lib/mc.menu @@ -186,6 +186,33 @@ fi echo "Please test the output file before deleting anything" ++ & t r & ! t t +m Install as MEMO on palm pilot + echo "Installing MEMO..." + install-memo %f + +=+ f \.pdb$ | f \.prc$ | f \.pqa$ | f \.PDB$ | f \.PRC$ | f \.PQA$ & t r & ! t t +p Install on palm pilot (programs or databases) + echo "Installing file on PALM" + pilot-xfer -i %f + ++ t t +M Install tagged files as MEMOs on palm pilot + for i in %t + do + echo "Installing MEMO: $i" + done + install-memo -t %t + ++ t t +P Install tagged files on palm pilot (programs or databases) + echo "Installing files on PALM" + for i in %t + do + echo "Installing file: $i" + done + pilot-xfer -i %t + =+ f \.tar\.gz$ | f \.tar\.z$ | f \.tgz$ | f \.tpz$ | f \.tar\.Z$| f \.tar\.bz2$ & t r x Extract the contents of a compressed tar file unset EXT -------------- next part -------------- --- syntax/Makefile.am +++ syntax/Makefile.am @@ -3,6 +3,7 @@ syntax_DATA = \ Syntax \ ada95.syntax \ + asm.syntax \ c.syntax \ changelog.syntax \ diff.syntax \ --- syntax/Syntax +++ syntax/Syntax @@ -56,6 +56,9 @@ file ..\*\\.(sl|SL)$ S-Lang\sProgram include slang.syntax +file ..\*\\.(asm|ASM|as|AS)$ Assembly\sLanguage +include asm.syntax + file ..\*\\.tex$ LaTeX\s2.09\sDocument include latex.syntax --- syntax/asm.syntax +++ syntax/asm.syntax @@ -0,0 +1,167 @@ +# Syntax highlighting for Intel style assembly language +# Author: Christian Steinruecken, 2000 + +context default yellow/24 +# +# keywords common to all (or most) assemblers +# + + keyword whole db white/25 + keyword whole dw white/25 + keyword whole dd white/25 + + keyword whole org white/25 + + keyword whole macro brightred/25 + keyword whole endm brightred/25 + +# +# keywords for 8051 assembler +# + + keyword whole add white/25 + keyword whole addc white/25 + keyword whole subb white/25 + keyword whole inc white/25 + keyword whole dec white/25 + keyword whole mul white/25 + keyword whole div white/25 + keyword whole da white/25 + + keyword whole anl white/25 + keyword whole orl white/25 + keyword whole xrl white/25 + keyword whole clr white/25 + keyword whole cpl white/25 + keyword whole rr white/25 + keyword whole rrc white/25 + keyword whole rl white/25 + keyword whole rlc white/25 + keyword whole swap white/25 + + keyword whole mov white/25 + keyword whole movc white/25 + keyword whole movx white/25 + keyword whole push white/25 + keyword whole pop white/25 + keyword whole xch white/25 + keyword whole xchd white/25 + + keyword whole setb white/25 + + keyword whole call white/25 + keyword whole acall white/25 + keyword whole lcall white/25 + keyword whole ret white/25 + keyword whole reti white/25 + keyword whole jmp white/25 + keyword whole ajmp white/25 + keyword whole ljmp white/25 + keyword whole sjmp white/25 + + keyword whole jz white/25 + keyword whole jnz white/25 + keyword whole jc white/25 + keyword whole jnc white/25 + keyword whole jb white/25 + keyword whole jnb white/25 + keyword whole jbc white/25 + keyword whole cjne white/25 + keyword whole djnz white/25 + + keyword whole nop white/25 + keyword whole asm white/25 + +# +# some keywords for 8086 assembler +# (note: please only include mnemonics not yet defined further above) +# + keyword whole and white/25 + keyword whole or white/25 + keyword whole xor white/25 + keyword whole not white/25 + + keyword whole mod white/25 + keyword whole imul white/25 + keyword whole idiv white/25 + + keyword whole ror white/25 + keyword whole rol white/25 + keyword whole shl white/25 + keyword whole shr white/25 + + keyword whole int white/25 + keyword whole iret white/25 + + keyword whole rep white/25 + keyword whole sub white/25 + + keyword whole jc white/25 + keyword whole jcxz white/25 + keyword whole je white/25 + keyword whole jne white/25 + keyword whole jg white/25 + keyword whole jge white/25 + keyword whole jng white/25 + keyword whole jl white/25 + keyword whole jle white/25 + keyword whole jnl white/25 + + keyword whole setc white/25 + keyword whole test white/25 + keyword whole bound white/25 + keyword whole stosb white/25 + keyword whole stosw white/25 + keyword whole movsb white/25 + keyword whole movsw white/25 + +# +# special keywords for the ASL assembler by Alfred Arnold +# + + keyword whole if brightgreen/25 + keyword whole ifexist brightgreen/25 + keyword whole ifnexist brightgreen/25 + keyword whole endif brightgreen/25 + keyword whole else brightgreen/25 + keyword whole ifdef brightgreen/25 + keyword whole ifndef brightgreen/25 + keyword whole elseif brightgreen/25 + keyword whole ifdefined brightgreen/25 + keyword whole include brightgreen/25 + + keyword whole section brightgreen/25 + keyword whole endsection brightgreen/25 + keyword whole SECTION brightgreen/25 + keyword whole ENDSECTION brightgreen/25 + + keyword > green/5 + keyword < green/5 + keyword \+ yellow/5 + keyword - green/5 + keyword / green/5 + keyword % green/5 + keyword = green/5 + keyword [ yellow/5 + keyword ] yellow/5 + keyword ( yellow/5 + keyword ) yellow/5 + keyword , yellow/5 + keyword . yellow/5 + keyword : yellow/5 + keyword {$*} brightred/19 + + keyword whole +\: brightred/22 + keyword whole @+ brightmagenta/22 + keyword whole \#* cyan/25 + +# +# this is for comments (and smiley-highlighting!) +# +context \; \n lightgray/24 + keyword ;-) white/25 + keyword :-) white/25 + keyword :-( brightblue/25 +spellcheck + + -------------- next part -------------- --- doc/mc.1.in +++ doc/mc.1.in @@ -1385,8 +1385,9 @@ od -c %f B Edit a bug report and send it to root - vi /tmp/mail.$$ - mail -s "Midnight Commander bug" root < /tmp/mail.$$ + I=`mktemp /tmp/mailXXXXXX`; export I + vi $I + mail -s "Midnight Commander bug" root < $I M Read mail emacs -f rmail --- lib/mc.menu +++ lib/mc.menu @@ -14,9 +14,10 @@ 0 Edit a bug report and send it to root - ${EDITOR-vi} /tmp/mail.$$ - test -r /tmp/mail.$$ && mail root < /tmp/mail.$$ - rm -f /tmp/mail.$$ + I=`mktemp /tmp/mail.XXXXXX`; export I + ${EDITOR-vi} $I + test -r $I && mail root < $I + rm -f $I =+ f \.1$ | f \.3$ | f \.4$ | f \.5$ | f \.6$ | f \.7$ | f \.8$ | f \.man$ & t r 1 Display the file with roff -man @@ -112,8 +113,8 @@ CHECK=`awk '{print $1 ; exit}' %f` 2>/dev/null case $CHECK in Newsgroups:|Path:) - cp %f /tmp/%f.$$ && sed '/^'"$CHECK"' /,/^$/d' /tmp/%f.$$ > %f - [ "$?" = "0" ] && rm /tmp/%f.$$ + I=`mktemp /tmp/news.XXXXXX`; export I;cp %f $I && sed '/^'"$CHECK"' /,/^$/d' $I > %f + [ "$?" = "0" ] && rm $I echo %f: header removed ;; *) @@ -126,7 +127,7 @@ set %t while [ -n "$1" ]; do CHECK=`awk '{print $1 ; exit}' $1` 2>/dev/null - WFILE=/tmp/${1}.$$ + WFILE=`mktemp /tmp/news.XXXXXX`; export WFILE; case $CHECK in Newsgroups:|Path:) cp $1 $WFILE && sed '/^'"$CHECK"' /,/^$/d' $WFILE > $1 -------------- next part -------------- --- lib/Makefile.am +++ lib/Makefile.am @@ -21,7 +21,7 @@ SCRIPTS_IN = mc.csh.in mc.sh.in mc-wrapper.csh.in mc-wrapper.sh.in SCRIPTS_OUT = mc.csh mc.sh mc-wrapper.csh mc-wrapper.sh -suppbin_SCRIPTS = $(SCRIPTS_OUT) +suppbin_SCRIPTS = $(SCRIPTS_OUT) x11_browser ti_DATA = README.xterm linux.ti xterm.ad xterm.ti ansi.ti vt100.ti xterm.tcap pkgdata_DATA = $(LIBFILES_CONST) $(LIBFILES_ADD) $(LIBFILES_OUT) @@ -35,6 +35,7 @@ $(ti_DATA) \ $(noinst_DATA) \ $(noinst_SCRIPTS) \ + x11_browser \ mc.charsets mc.csh: $(srcdir)/mc.csh.in --- lib/mc.ext.in +++ lib/mc.ext.in @@ -300,8 +300,8 @@ # html regex/\.([Hh]tml?|HTML?)$ - Open=if test -n "@X11_WWW@" && test -n "$DISPLAY"; then (@X11_WWW@ file://%d/%p &) >/dev/null 2>&1; else links %f 2>/dev/null || lynx -force_html %f; fi - View=%view{ascii} lynx -dump -force_html %f + Open=(@libdir@/mc/bin/x11_browser %f &) + View=%view{ascii} w3m -dump -T text/html %f; # StarOffice 5.2 shell/.sdw -------------- next part -------------- #!/bin/bash # # Call appropriate brower # # Copyright (c) 2001 Philipp Thomas # # Borrowed heavily from url_handler.sh by Werner Fink # url="$1" method="${1%%:*}" if test "$url" = "$method" ; then case "${url%%.*}" in www|web|w3) method=http ;; *) case "${url}" in */*.htm|*/*.html) method=http ;; */*.htmls) method=https ;; /*) if test -r "${url}" ; then method=file fi ;; *) ;; esac ;; esac case "$method" in file) url="${method}:$url" ;; *) url="${method}://$url" ;; esac fi shift case "$method" in file|http|https) http= type -p lynx >& /dev/null && http=lynx type -p links >& /dev/null && http=links type -p w3m >& /dev/null && http=w3m test -n "$DISPLAY" && type -p netscape >& /dev/null && http=netscape test -n "$DISPLAY" && type -p Netscape >& /dev/null && http=Netscape test -n "$DISPLAY" && type -p opera >& /dev/null && http=opera test -n "$DISPLAY" && type -p mozilla >& /dev/null && http=mozilla case "$http" in [nN]etscape|opera|mozilla) $http -remote "openURL($url)" || $http "$url" ;; lynx|w3m|links) exec $http "$url" ;; *) echo "No HTTP browser found." read -p "Press return to continue: " exit 0 # No error return ;; esac ;; *) echo "URL type \"$method\" not known" read -p "Press return to continue: " exit 0 # No error return ;; esac From sav at bcs.zp.ua Mon Mar 3 14:03:57 2003 From: sav at bcs.zp.ua (Andrew V. Samoilov) Date: Mon, 03 Mar 2003 16:03:57 +0200 Subject: Backspace doesn't work in filename search (C-s) in xterm Message-ID: <3E6360CD.2050700@bcs.zp.ua> Also M-Backspace works now as simple Backspace in command line in xterm instead of previous word deleting as before. Well, these shortcuts were working in xterm before, and they work fine in the linux console now. P.S. There is working delete_word_left in the built-in editor, but I cannot find how to define M-Backspace in editkeys.c. -- Regards, Andrew V. Samoilov From sav at bcs.zp.ua Mon Mar 3 19:16:12 2003 From: sav at bcs.zp.ua (Andrew V. Samoilov) Date: Mon, 03 Mar 2003 21:16:12 +0200 Subject: [PATCH]: define keyword to substitute colors in syntax files In-Reply-To: References: <20030225081621.GA20320@itws8.gca.usb.zp.ua> Message-ID: <3E63A9FC.7080402@bcs.zp.ua> Pavel Roskin wrote: > Hello! > > >>this patch allows new "define" keyword in builtin editor syntax files. >>Now only colors can be substituted, but it can be improved on request. > > > Thank you! I'm applying it. > > What would really be nice is: . . . > 2) Make it possible to put defines in a separate file: > > Syntax: > include defines.syntax > file ..\*\\.sh$ Shell\sScript ^#!\s\*/.\*/([a-z]?|ba|pdk)sh > include sh.syntax > > defines.syntax: > define comment brown black > > sh.syntax: > context # \n comment It implemented too but requires "context default" line in the defines.syntax. Attached patch must be used with today's syntax.c. Also defines variable should be moved to WEdit structure. -- Regards, Andrew V. Samoilov -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: syntax.patch URL: From proski at gnu.org Mon Mar 3 20:09:21 2003 From: proski at gnu.org (Pavel Roskin) Date: Mon, 3 Mar 2003 15:09:21 -0500 (EST) Subject: [PATCH]: define keyword to substitute colors in syntax files In-Reply-To: <3E63A9FC.7080402@bcs.zp.ua> References: <20030225081621.GA20320@itws8.gca.usb.zp.ua> <3E63A9FC.7080402@bcs.zp.ua> Message-ID: Hello, Andrew! > > defines.syntax: > > define comment brown black > > > > sh.syntax: > > context # \n comment > > It implemented too but requires "context default" line in the > defines.syntax. Attached patch must be used with today's syntax.c. > Also defines variable should be moved to WEdit structure. Please apply your patch. I see that you have applied some changes already, so it's better that you apply the rest. It's important to get it right because some people have problems reading brown on blue. On the other hand, the highlighting used for Pascal is too bright for me. I'll be in a better position to change it to a more traditional color scheme if the color scheme is configurable. The defines that we need are (it's just the first approximation): define example in sh example in C comment # Comment /* Comment */ comment_bold # FIXME /* FIXME */ keyword for if stdfunction find printf stdtype N/A char string "abc" "abc" string_verbatim 'abc' 'a' string_literal "\n" "%d" variable $abc N/A syntax_separator ; ; syntax_group { ( syntax_operator + == syntax_special ;; -> Colors specific to the programming language (e.g. EOF for shell, new_text for diff) should be defined at the beginning of the corresponding syntax files. -- Regards, Pavel Roskin From dmartina at excite.com Tue Mar 4 10:04:50 2003 From: dmartina at excite.com (David Martin) Date: Tue, 4 Mar 2003 05:04:50 -0500 (EST) Subject: User Menu localization Message-ID: <20030304100450.2AD29B6DA@xmxpita.excite.com> Any feedback? _______________________________________________ Join Excite! - http://www.excite.com The most personalized portal on the Web! From proski at gnu.org Tue Mar 4 15:01:13 2003 From: proski at gnu.org (Pavel Roskin) Date: Tue, 04 Mar 2003 10:01:13 -0500 (EST) Subject: Mongolian midnight commander translation finished! In-Reply-To: References: <37a141de.41de37a1@post.rwth-aachen.de> Message-ID: Hello! > > Hi, All! How can I add the mongolian? We have translated MC to > > mongolian. My CVS access is for Gnome. I think that I couldn't commit > > it or? If yes, where is the Branch and directory. If no, how can I add > > it. Who is the maintainer? > > Yes, please commit the translation to the head branch. Don't make any > changes in other files - I'll do it for you. Thank you! There are errors in your translation: mn.po:2361: format specifications in 'msgid' and 'msgstr' for argument 2 are not the same mn.po:3296: format specifications in 'msgid' and 'msgstr' for argument 1 are not the same mn.po:3301: format specifications in 'msgid' and 'msgstr' for argument 1 are not the same mn.po:4280: format specifications in 'msgid' and 'msgstr' for argument 1 are not the same If you need to reorder the format specifications, use "$number", like it's done in the Turkish translation: msgid "" "Warning: Invalid flag %c in %s:\n" "%s\n" msgstr "" "Uyar?: %2$s i?indeki %1$c se?ene?i ge?ersiz:\n" "%3$s\n" %2$s means "take argument 2 and print it using %s" -- Regards, Pavel Roskin From pthomas at suse.de Tue Mar 4 16:05:23 2003 From: pthomas at suse.de (Philipp Thomas) Date: Tue, 4 Mar 2003 17:05:23 +0100 Subject: Mongolian midnight commander translation finished! In-Reply-To: References: <37a141de.41de37a1@post.rwth-aachen.de> Message-ID: <20030304160523.GH7529@paradies.suse.de> * Pavel Roskin (proski at gnu.org) [20030304 16:03]: > msgid "" > "Warning: Invalid flag %c in %s:\n" > "%s\n" > msgstr "" > "Uyar?: %2$s i?indeki %1$c se?ene?i ge?ersiz:\n" > "%3$s\n" > > %2$s means "take argument 2 and print it using %s" And remember that *all* parameters must be numbered if numbering is used. Philipp -- Philipp Thomas SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nuremberg, Germany From sav at bcs.zp.ua Tue Mar 4 16:57:13 2003 From: sav at bcs.zp.ua (Andrew V. Samoilov) Date: Tue, 04 Mar 2003 18:57:13 +0200 Subject: [PATCH]: define keyword to substitute colors in syntax files In-Reply-To: References: <20030225081621.GA20320@itws8.gca.usb.zp.ua> <3E63A9FC.7080402@bcs.zp.ua> Message-ID: <3E64DAE9.5030506@bcs.zp.ua> Pavel Roskin wrote: > Hello, Andrew! > > >>>defines.syntax: >>>define comment brown black >>> >>>sh.syntax: >>>context # \n comment >> >>It implemented too but requires "context default" line in the >>defines.syntax. Attached patch must be used with today's syntax.c. >>Also defines variable should be moved to WEdit structure. > > > Please apply your patch. I see that you have applied some changes > already, so it's better that you apply the rest. Applied. > It's important to get it right because some people have problems reading > brown on blue. On the other hand, the highlighting used for Pascal is too > bright for me. I'll be in a better position to change it to a more > traditional color scheme if the color scheme is configurable. Color themes... > The defines that we need are (it's just the first approximation): > > define example in sh example in C > > comment # Comment /* Comment */ > comment_bold # FIXME /* FIXME */ > keyword for if ^^^^^^^^^ It can confuse us later if not only colors will be expanded. Default context and ` ` in sh.syntax with a lot of repeated words are good example. May be merging of convert() and subst_defines() is not so bad idea. > stdfunction find printf > stdtype N/A char > string "abc" "abc" > string_verbatim 'abc' 'a' > string_literal "\n" "%d" > variable $abc N/A > syntax_separator ; ; > syntax_group { ( > syntax_operator + == > syntax_special ;; -> > > Colors specific to the programming language (e.g. EOF for shell, new_text > for diff) should be defined at the beginning of the corresponding syntax > files. I agree. -- Regards, Andrew V. Samoilov From proski at gnu.org Tue Mar 4 17:04:21 2003 From: proski at gnu.org (Pavel Roskin) Date: Tue, 4 Mar 2003 12:04:21 -0500 (EST) Subject: Mongolian midnight commander translation finished! In-Reply-To: References: <37a141de.41de37a1@post.rwth-aachen.de> Message-ID: Hello again! > If you need to reorder the format specifications, use "$number", like it's > done in the Turkish translation: I meant "number$" I have fixed all 4 strings because it was clear what order it they should be using. However, there are cases that gettext cannot catch, e.g. when the interchanged arguments use the same format string. I don't want "1024 bytes in 2 files" to be translated as "1024 files contain 2 bytes". Please make sure you didn't accidentally change the ordering in such strings. -- Regards, Pavel Roskin From proski at gnu.org Tue Mar 4 17:57:37 2003 From: proski at gnu.org (Pavel Roskin) Date: Tue, 4 Mar 2003 12:57:37 -0500 (EST) Subject: User Menu localization In-Reply-To: <20030304100450.2AD29B6DA@xmxpita.excite.com> References: <20030304100450.2AD29B6DA@xmxpita.excite.com> Message-ID: Hi, David! > Any feedback? I'm very busy at work and I don't have much time at home, but as long as the patch is on Savannah I remember about it. As soon as I have time I'll work on the entries in the patch queue. -- Regards, Pavel Roskin From Dmitry.Semyonov at oktet.ru Tue Mar 4 19:32:41 2003 From: Dmitry.Semyonov at oktet.ru (Dmitry Semyonov) Date: Tue, 4 Mar 2003 22:32:41 +0300 (MSK) Subject: Error message window size bug Message-ID: Hi! - run mc (4.6.0, 4.5.55) - create dummy folder, sub-folder, sub-sub-folder, etc. so that full name is more than width of your console (80 normally) - on _another_ console remove your dummy tree completely - press TAB, TAB on the first console Window with error message displayed does not fit screen width. ...Bye..Dmitry. From alpha at student.uci.agh.edu.pl Tue Mar 4 19:39:58 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Tue, 4 Mar 2003 20:39:58 +0100 Subject: Error message window size bug In-Reply-To: References: Message-ID: <20030304193957.GA2576@mentat.localdomain> On Tue, Mar 04, 2003 at 10:32:41PM +0300, Dmitry Semyonov wrote: > - run mc (4.6.0, 4.5.55) > - create dummy folder, sub-folder, sub-sub-folder, etc. so that full > name is more than width of your console (80 normally) > - on _another_ console remove your dummy tree completely > - press TAB, TAB on the first console > > Window with error message displayed does not fit screen width. Does any (sane) person use such a long pathname? I think no... So I would not treat this as a bug, as this doesn't break anything and doesn't disturb in (normal) work. Regards -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 From avarakin00 at hotmail.com Wed Mar 5 02:16:04 2003 From: avarakin00 at hotmail.com (Alexander Varakin) Date: Tue, 4 Mar 2003 21:16:04 -0500 Subject: Announcement: mc 4.6.0 AIX, HP-UX, Solaris binaries are available References: Message-ID: Hi, mc 4.6.0 AIX, HP-UX, Solaris binaries are available on http://www.ibiblio.org/mc/ They do not require glib installed, and can be insalled by user without root access (see README) . Let's hope mc will be shipped with every Unix box :-) Alex From proski at gnu.org Wed Mar 5 09:36:57 2003 From: proski at gnu.org (Pavel Roskin) Date: Wed, 05 Mar 2003 04:36:57 -0500 (EST) Subject: cons.handler.c for FreeBSD In-Reply-To: References: <20030226230049.A12370@iclub.nsu.ru> <20030227014902.C16292@iclub.nsu.ru> Message-ID: Hello! > I had a chance to test the code, and it works just fine. I forgot to test > the "output lines" option (i.e. restoring just part of the text), but I'll > do it next time I boot into FreeBSD. It didn't work, but I have fixed it. Sorry, but you cannot use escape sequences directly when the screen library (S-Lang or ncurses) is active, otherwise you get ugly artifacts when parts of the screen are not redrawn. This also means that you cannot restore color attributes without allocating color pairs. It should be possible to allocate the pairs dynamically. It's already done by the editor. I have only tested "output lines" on FreeBSD 5.0. If anybody has FreeBSD 4.x or older, please test Ctrl-O and "output lines" on the console. Sorry, I don't have enough partitions to keep several versions of FreeBSD installed. -- Regards, Pavel Roskin From fjoe at iclub.nsu.ru Wed Mar 5 10:05:54 2003 From: fjoe at iclub.nsu.ru (Max Khon) Date: Wed, 5 Mar 2003 16:05:54 +0600 Subject: cons.handler.c for FreeBSD In-Reply-To: ; from proski@gnu.org on Wed, Mar 05, 2003 at 04:36:57AM -0500 References: <20030226230049.A12370@iclub.nsu.ru> <20030227014902.C16292@iclub.nsu.ru> Message-ID: <20030305160554.A21708@iclub.nsu.ru> hi, there! On Wed, Mar 05, 2003 at 04:36:57AM -0500, Pavel Roskin wrote: > > I had a chance to test the code, and it works just fine. I forgot to test > > the "output lines" option (i.e. restoring just part of the text), but I'll > > do it next time I boot into FreeBSD. > > It didn't work, but I have fixed it. Sorry, but you cannot use escape > sequences directly when the screen library (S-Lang or ncurses) is active, > otherwise you get ugly artifacts when parts of the screen are not redrawn. > > This also means that you cannot restore color attributes without > allocating color pairs. It should be possible to allocate the pairs > dynamically. It's already done by the editor. > > I have only tested "output lines" on FreeBSD 5.0. If anybody has FreeBSD > 4.x or older, please test Ctrl-O and "output lines" on the console. > Sorry, I don't have enough partitions to keep several versions of FreeBSD > installed. can you send me diff against 4.6.0 cons.handler.c? and it is still not obvious to me how I can test "output lines" with Ctrl-O. thanks, /fjoe From Loc.Huu.To at Defence.Bombardier.Com Wed Mar 5 15:18:12 2003 From: Loc.Huu.To at Defence.Bombardier.Com (To, Loc Huu) Date: Wed, 5 Mar 2003 10:18:12 -0500 Subject: mc Message-ID: Hi, I try to install Midnight Commnader on my home local Sun machine and run it but I got an error, can you help on this. "ld.so.1: mc: fatal: libgen.so.1: open failed: No such file or directory" Thanks P-TAS : Publications Technology Advancement Specialists. Loc To Bombardier Aerospace - Defence Services off: (450) 476-6232 Home: (450) 619-9431 loc.huu.to at defence.bombardier.com From fjoe at iclub.nsu.ru Wed Mar 5 16:34:21 2003 From: fjoe at iclub.nsu.ru (Max Khon) Date: Wed, 5 Mar 2003 22:34:21 +0600 Subject: cons.handler.c for FreeBSD In-Reply-To: <20030305160554.A21708@iclub.nsu.ru>; from fjoe@iclub.nsu.ru on Wed, Mar 05, 2003 at 04:05:54PM +0600 References: <20030226230049.A12370@iclub.nsu.ru> <20030227014902.C16292@iclub.nsu.ru> <20030305160554.A21708@iclub.nsu.ru> Message-ID: <20030305223421.A34368@iclub.nsu.ru> hi, there! On Wed, Mar 05, 2003 at 04:05:54PM +0600, Max Khon wrote: > > > I had a chance to test the code, and it works just fine. I forgot to test > > > the "output lines" option (i.e. restoring just part of the text), but I'll > > > do it next time I boot into FreeBSD. > > > > It didn't work, but I have fixed it. Sorry, but you cannot use escape > > sequences directly when the screen library (S-Lang or ncurses) is active, > > otherwise you get ugly artifacts when parts of the screen are not redrawn. > > > > This also means that you cannot restore color attributes without > > allocating color pairs. It should be possible to allocate the pairs > > dynamically. It's already done by the editor. > > > > I have only tested "output lines" on FreeBSD 5.0. If anybody has FreeBSD > > 4.x or older, please test Ctrl-O and "output lines" on the console. > > Sorry, I don't have enough partitions to keep several versions of FreeBSD > > installed. > > can you send me diff against 4.6.0 cons.handler.c? ok, I've got the patch from cvs. can you set up something like cvsweb (I can't get how to obtain unified diff using LXR or Bonsai). > and it is still not obvious to me how I can test "output lines" > with Ctrl-O. another question is about non-standard console modes. I (and other users) are getting core dumps when console video mode is not 80x25. E.g. after 'vidcontrol 80x30' mc dumps core somewhere inside ncurses. The backtrace is: fjoe at husky:/usr/ports/misc/mc/work/mc-4.6.0/src$gdb mc mc.core GNU gdb 4.18 (FreeBSD) Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read called at /usr/fbsd/RELENG_4/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 2627 in elfstab_build_psymtabs Deprecated bfd_read called at /usr/fbsd/RELENG_4/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 933 in fill_symbuf Core was generated by `mc'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libncurses.so.5...done. Reading symbols from /usr/local/lib/libintl.so.4...done. Reading symbols from /usr/local/lib/libglib-2.0.so.200...done. Reading symbols from /usr/local/lib/libiconv.so.3...done. Reading symbols from /usr/X11R6/lib/libSM.so.6...done. Reading symbols from /usr/X11R6/lib/libICE.so.6...done. Reading symbols from /usr/X11R6/lib/libX11.so.6...done. Reading symbols from /usr/local/lib/libslang.so...done. Reading symbols from /usr/lib/libc.so.4...done. Reading symbols from /usr/X11R6/lib/libXThrStub.so.6...done. Reading symbols from /usr/lib/libm.so.2...done. Reading symbols from /usr/libexec/ld-elf.so.1...done. #0 0x281118bf in tgetstr () from /usr/lib/libncurses.so.5 (gdb) bt #0 0x281118bf in tgetstr () from /usr/lib/libncurses.so.5 #1 0x28372532 in SLtt_tgetstr () from /usr/local/lib/libslang.so #2 0x807b8dd in slang_keypad (set=0) at slint.c:308 #3 0x8052950 in view_other_cmd () at cmd.c:993 #4 0x806b288 in midnight_callback (h=0x810f380, id=16399, msg=10) at main.c:1816 #5 0x8058605 in dlg_key_event (h=0x810f380, d_key=16399) at dlg.c:667 #6 0x80588fd in dlg_process_event (h=0x810f380, key=16399, event=0xbfbff9c0) at dlg.c:779 #7 0x80589ca in run_dlg (h=0x810f380) at dlg.c:813 #8 0x806b4ac in setup_panels_and_run_mc () at main.c:1912 #9 0x806b688 in do_nc () at main.c:1985 #10 0x806beca in main (argc=1, argv=0xbfbffaa4) at main.c:2520 (gdb) can you take a look at this bug? /fjoe From fjoe at iclub.nsu.ru Wed Mar 5 17:15:13 2003 From: fjoe at iclub.nsu.ru (Max Khon) Date: Wed, 5 Mar 2003 23:15:13 +0600 Subject: cons.handler.c for FreeBSD In-Reply-To: <20030305223421.A34368@iclub.nsu.ru>; from fjoe@iclub.nsu.ru on Wed, Mar 05, 2003 at 10:34:21PM +0600 References: <20030226230049.A12370@iclub.nsu.ru> <20030227014902.C16292@iclub.nsu.ru> <20030305160554.A21708@iclub.nsu.ru> <20030305223421.A34368@iclub.nsu.ru> Message-ID: <20030305231513.A35679@iclub.nsu.ru> hi, there! On Wed, Mar 05, 2003 at 10:34:21PM +0600, Max Khon wrote: > > and it is still not obvious to me how I can test "output lines" > > with Ctrl-O. > > another question is about non-standard console modes. > I (and other users) are getting core dumps when console video mode > is not 80x25. E.g. after 'vidcontrol 80x30' mc dumps core somewhere > inside ncurses. The backtrace is: [...] > can you take a look at this bug? I have fixed the bug. Diff against trunk is attached /fjoe -------------- next part -------------- Index: cons.handler.c =================================================================== RCS file: /cvs/gnome/mc/src/cons.handler.c,v retrieving revision 1.17 diff -u -p -r1.17 cons.handler.c --- cons.handler.c 5 Mar 2003 09:29:31 -0000 1.17 +++ cons.handler.c 5 Mar 2003 17:13:17 -0000 @@ -403,7 +403,7 @@ console_init (void) screen_shot.xsize = screen_info.mv_csz; screen_shot.ysize = screen_info.mv_rsz; if ((screen_shot.buf = - g_malloc (screen_info.mv_csz * screen_info.mv_rsz)) == NULL) + g_malloc (screen_info.mv_csz * screen_info.mv_rsz * 2)) == NULL) return; console_flag = 1; @@ -499,7 +499,7 @@ console_save (void) if (ioctl (FD_OUT, GIO_SCRNMAP, &map) == -1) { console_shutdown (); - exit (1); + return; } for (i = 0; i < 256; i++) { From proski at gnu.org Wed Mar 5 17:53:17 2003 From: proski at gnu.org (Pavel Roskin) Date: Wed, 5 Mar 2003 12:53:17 -0500 (EST) Subject: cons.handler.c for FreeBSD In-Reply-To: <20030305231513.A35679@iclub.nsu.ru> References: <20030226230049.A12370@iclub.nsu.ru> <20030227014902.C16292@iclub.nsu.ru> <20030305160554.A21708@iclub.nsu.ru> <20030305223421.A34368@iclub.nsu.ru> <20030305231513.A35679@iclub.nsu.ru> Message-ID: Hello, Max! > I have fixed the bug. Diff against trunk is attached Applied. Thank you! -- Regards, Pavel Roskin From sav at bcs.zp.ua Wed Mar 5 19:21:41 2003 From: sav at bcs.zp.ua (Andrew V. Samoilov) Date: Wed, 05 Mar 2003 21:21:41 +0200 Subject: cons.handler.c for FreeBSD In-Reply-To: <20030305231513.A35679@iclub.nsu.ru> References: <20030226230049.A12370@iclub.nsu.ru> <20030227014902.C16292@iclub.nsu.ru> <20030305160554.A21708@iclub.nsu.ru> <20030305223421.A34368@iclub.nsu.ru> <20030305231513.A35679@iclub.nsu.ru> Message-ID: <3E664E45.6070707@bcs.zp.ua> Max Khon wrote: > hi, there! > > On Wed, Mar 05, 2003 at 10:34:21PM +0600, Max Khon wrote: > > >>>and it is still not obvious to me how I can test "output lines" >>>with Ctrl-O. >> >>another question is about non-standard console modes. >>I (and other users) are getting core dumps when console video mode >>is not 80x25. E.g. after 'vidcontrol 80x30' mc dumps core somewhere >>inside ncurses. The backtrace is: > > > [...] > > >>can you take a look at this bug? > > > I have fixed the bug. Diff against trunk is attached > Index: cons.handler.c > =================================================================== > RCS file: /cvs/gnome/mc/src/cons.handler.c,v > retrieving revision 1.17 > diff -u -p -r1.17 cons.handler.c > --- cons.handler.c 5 Mar 2003 09:29:31 -0000 1.17 > +++ cons.handler.c 5 Mar 2003 17:13:17 -0000 > @@ -403,7 +403,7 @@ console_init (void) > screen_shot.xsize = screen_info.mv_csz; > screen_shot.ysize = screen_info.mv_rsz; > if ((screen_shot.buf = > - g_malloc (screen_info.mv_csz * screen_info.mv_rsz)) == NULL) > + g_malloc (screen_info.mv_csz * screen_info.mv_rsz * 2)) == NULL) > return; > > console_flag = 1; Well, I think this fix is not enough. It shall be SIGWINCH catched and screen_shot.buf reallocated dynamically or vidcontrol 132x60 will crash mc again. -- Regards, Andrew V. Samoilov From proski at gnu.org Wed Mar 5 20:35:52 2003 From: proski at gnu.org (Pavel Roskin) Date: Wed, 5 Mar 2003 15:35:52 -0500 (EST) Subject: Running mc from mc Message-ID: Hello! Adam asked me in private if it's possible to disable running one mc from another. I have committed a patch that implements this check. The patch prevents running two copies of mc with subshells in the same login session. It is still possible to run mcview or mcedit from mc because they don't need the subshell. It's also possible to run xterm from mc and run mc in it, because it would be in a different session. It's still possible to run su from mc and run mc in it. It's not a bug, although one could make a big mess by using Ctrl-O. The session id is set in the environment variable MC_SID. It can be used as an indicator that we are running from mc, directly or indirectly. -- Regards, Pavel Roskin From fjoe at iclub.nsu.ru Wed Mar 5 20:54:15 2003 From: fjoe at iclub.nsu.ru (Max Khon) Date: Thu, 6 Mar 2003 02:54:15 +0600 Subject: cons.handler.c for FreeBSD In-Reply-To: <3E664E45.6070707@bcs.zp.ua>; from sav@bcs.zp.ua on Wed, Mar 05, 2003 at 09:21:41PM +0200 References: <20030226230049.A12370@iclub.nsu.ru> <20030227014902.C16292@iclub.nsu.ru> <20030305160554.A21708@iclub.nsu.ru> <20030305223421.A34368@iclub.nsu.ru> <20030305231513.A35679@iclub.nsu.ru> <3E664E45.6070707@bcs.zp.ua> Message-ID: <20030306025415.A41833@iclub.nsu.ru> hi, there! On Wed, Mar 05, 2003 at 09:21:41PM +0200, Andrew V. Samoilov wrote: > Well, I think this fix is not enough. It shall be SIGWINCH catched and > screen_shot.buf reallocated dynamically or vidcontrol 132x60 will crash > mc again. screen_shot.buf is reallocated in console_save() /fjoe From arpi at thot.banki.hu Thu Mar 6 22:23:00 2003 From: arpi at thot.banki.hu (Arpi) Date: Thu, 6 Mar 2003 23:23:00 +0100 Subject: Running mc from mc In-Reply-To: Message-ID: <200303062223.h26MN0Vp025296@mail.mplayerhq.hu> Hi, > Adam asked me in private if it's possible to disable running one mc from > another. I have committed a patch that implements this check. Great! I have it in AMC since the beginning... always wondered why is it good to allow mc from mc. Btw, what about my AMC #1 patch, it contained some code to (optinally) prevent pressing ctrl+o while the shell is running a command. It's the another way to mess up things with ctrl+o... A'rpi / Astral & ESP-team -- Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu "However, many people beg for its inclusion in Debian. Why?" - Gabucino "Because having new software in Debian is good." - Josselin Mouette "Because having good software in Debian is new." - Gabucino From aliakc at web.de Fri Mar 7 09:44:27 2003 From: aliakc at web.de (Ali Akcaagac) Date: 07 Mar 2003 10:44:27 +0100 Subject: rename improvement Message-ID: <1047030267.15960.9.camel@localhost> hi, i would like to ask, if it's possible to change the way 'rename' works in midnight commander i think you gonna agree to me when i go into details that this may be a big improvement. look, how often does it happen that we like to rename single files and get totally upset that the rename field is empty and we need to enter the whole name again while we only need to rename 1-2 characters of the old name. is it possible to have the rename function for single files act somehow like the 'symlink' function ? i mean that whenever you like to rename one single file that the old filename get's written in the field and when we press space or start typing then the rename field is being blanked. but as soon as we press the cursor keys (which indicates that we like to change single letters) it then keeps the contents so we can change only single stuff ? the way rename is done yet is highly annoying specially when you deal with names that are easily 10-15 chars of length. hope it's clear what i like to point out. From alpha at student.uci.agh.edu.pl Fri Mar 7 09:58:16 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Fri, 7 Mar 2003 10:58:16 +0100 Subject: rename improvement In-Reply-To: <1047030267.15960.9.camel@localhost> References: <1047030267.15960.9.camel@localhost> Message-ID: <20030307095815.GA915@mentat.localdomain> On Fri, Mar 07, 2003 at 10:44:27AM +0100, Ali Akcaagac wrote: > look, how often does it happen that we like to rename single files and > get totally upset that the rename field is empty and we need to enter > the whole name again while we only need to rename 1-2 characters of the Try using Shift-F6. Regards -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 From arpi at mplayerhq.hu Fri Mar 7 10:13:45 2003 From: arpi at mplayerhq.hu (Arpi) Date: Fri, 7 Mar 2003 11:13:45 +0100 Subject: rename improvement In-Reply-To: <1047030267.15960.9.camel@localhost> Message-ID: <200303071013.h27ADjWd017322@mail.mplayerhq.hu> Hi, > i would like to ask, if it's possible to change the way 'rename' works > in midnight commander i think you gonna agree to me when i go into > details that this may be a big improvement. > > look, how often does it happen that we like to rename single files and > get totally upset that the rename field is empty and we need to enter > the whole name again while we only need to rename 1-2 characters of the > old name. is it possible to have the rename function for single files > act somehow like the 'symlink' function ? i mean that whenever you like > to rename one single file that the old filename get's written in the > field and when we press space or start typing then the rename field is > being blanked. but as soon as we press the cursor keys (which indicates > that we like to change single letters) it then keeps the contents so we > can change only single stuff ? the way rename is done yet is highly it's like that in AMC since the beginning, because i also liked it that way. another thing is Copy (F5) / Move (F6), it should copy the filename to the field for single file moves, together with the path, so if you want to copy/move and rename at the same time (for example because there is already file with same name in the other panel) you can change the name without having to re-type it. Common use of it is when you have 2 versions of a source code tree, and want to copy out a file from the original to the patched version with .orig suffix. A'rpi / Astral & ESP-team -- Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu "However, many people beg for its inclusion in Debian. Why?" - Gabucino "Because having new software in Debian is good." - Josselin Mouette "Because having good software in Debian is new." - Gabucino From gabucino at mplayerhq.hu Fri Mar 7 10:21:52 2003 From: gabucino at mplayerhq.hu (Gabucino) Date: Fri, 7 Mar 2003 11:21:52 +0100 Subject: rename improvement In-Reply-To: <200303071013.h27ADjWd017322@mail.mplayerhq.hu> References: <1047030267.15960.9.camel@localhost> <200303071013.h27ADjWd017322@mail.mplayerhq.hu> Message-ID: <20030307102152.GB5248@woodstock.localdomain> Arpi wrote: > it's like that in AMC since the beginning, because i also liked it that way. Are you sure? I use AMC-4.6 CVS and I get the pathname instead of filename. Unfortunately :( -- Gabucino MPlayer Core Team - Debian? - "This is our project and we can do whatever we want with it." Michael Stone -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 232 bytes Desc: not available URL: From gabucino at mplayerhq.hu Fri Mar 7 10:20:36 2003 From: gabucino at mplayerhq.hu (Gabucino) Date: Fri, 7 Mar 2003 11:20:36 +0100 Subject: rename improvement In-Reply-To: <20030307095815.GA915@mentat.localdomain> References: <1047030267.15960.9.camel@localhost> <20030307095815.GA915@mentat.localdomain> Message-ID: <20030307102036.GA5248@woodstock.localdomain> Adam Byrtek / alpha wrote: > Try using Shift-F6. Doesn't work either in console or wterm (AMC-4.6 CVS) -- Gabucino MPlayer Core Team - Debian? - "This is our project and we can do whatever we want with it." Michael Stone -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 232 bytes Desc: not available URL: From alpha at student.uci.agh.edu.pl Fri Mar 7 11:05:11 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Fri, 7 Mar 2003 12:05:11 +0100 Subject: [OT] Re: rename improvement In-Reply-To: <20030307102152.GB5248@woodstock.localdomain> References: <1047030267.15960.9.camel@localhost> <200303071013.h27ADjWd017322@mail.mplayerhq.hu> <20030307102152.GB5248@woodstock.localdomain> Message-ID: <20030307110511.GA1583@mentat.localdomain> ---cut--- Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu "However, many people beg for its inclusion in Debian. Why?" - Gabucino "Because having new software in Debian is good." - Josselin Mouette "Because having good software in Debian is new." - Gabucino ---cut--- MPlayer Core Team - Debian? - "This is our project and we can do whatever we want with it." Michael Stone ---cut--- You MPlayer people are SO ridiculous. Yes, I use MPlayer and I think its a great piece of software, but your overall attitude is quite amusing... Wage your silly war if you really need it. Sorry for OT. Regards -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From aliakc at web.de Fri Mar 7 11:35:45 2003 From: aliakc at web.de (Ali Akcaagac) Date: 07 Mar 2003 12:35:45 +0100 Subject: [OT] Re: rename improvement In-Reply-To: <20030307110511.GA1583@mentat.localdomain> References: <1047030267.15960.9.camel@localhost> <200303071013.h27ADjWd017322@mail.mplayerhq.hu> <20030307102152.GB5248@woodstock.localdomain> <20030307110511.GA1583@mentat.localdomain> Message-ID: <1047036944.16923.4.camel@localhost> On Fri, 2003-03-07 at 12:05, Adam Byrtek / alpha wrote: > You MPlayer people are SO ridiculous. Yes, I use MPlayer and I think > its a great piece of software, but your overall attitude is quite > amusing... Wage your silly war if you really need it. And you think your overall attitude right now justifies your reply ? Sorry my friend for me Shift+F6 doesn't work either but that's no reason pissing people off. Yes I use MPlayer too and It's obviously the best and only serious MediaPlayer available for Linux. I don't care what attitude someone has and what he or she is into privately. But I have high respect and I'm thankful to Gabucino and all the one who contributed for MPlayer. Without them we probably still deal with halfassed implementations of slow mediaplayers for the next 10 years. And now friendly back to the request. I still like to see that feature in Midnight Commander and this is a serious request. From arpi at mplayerhq.hu Fri Mar 7 11:58:13 2003 From: arpi at mplayerhq.hu (Arpi) Date: Fri, 7 Mar 2003 12:58:13 +0100 Subject: rename improvement In-Reply-To: <20030307102152.GB5248@woodstock.localdomain> Message-ID: <200303071158.h27BwDBl028622@mail.mplayerhq.hu> Hi, > Arpi wrote: > > it's like that in AMC since the beginning, because i also liked it that way. > Are you sure? I use AMC-4.6 CVS and I get the pathname instead of filename. > Unfortunately :( try the AMC 4.1 series :) 4.6 is far from being ready, i haven't ported all patches from 4.1 yet and as 4.6 already contains such thing (shift+f6) it would be better to fix in the main tree instead of my patch. A'rpi / Astral & ESP-team -- Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu "However, many people beg for its inclusion in Debian. Why?" - Gabucino "Because having new software in Debian is good." - Josselin Mouette "Because having good software in Debian is new." - Gabucino From alpha at student.uci.agh.edu.pl Fri Mar 7 12:23:27 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Fri, 7 Mar 2003 13:23:27 +0100 Subject: [OT] Re: rename improvement In-Reply-To: <1047036944.16923.4.camel@localhost> References: <1047030267.15960.9.camel@localhost> <200303071013.h27ADjWd017322@mail.mplayerhq.hu> <20030307102152.GB5248@woodstock.localdomain> <20030307110511.GA1583@mentat.localdomain> <1047036944.16923.4.camel@localhost> Message-ID: <20030307122326.GA2079@mentat.localdomain> On Fri, Mar 07, 2003 at 12:35:45PM +0100, Ali Akcaagac wrote: > But I have high respect and I'm thankful to Gabucino and all the one > who contributed for MPlayer. Yes, I'm also thankful to all MPlayer developers - you have made a lot of good work. I'm also thankful to all those people who created and develop Debian. Thats why I fell obligated to act when someone is trying to discredit Debian on a public forum, as I would act if somebody was trying to dicredit MPlayer or MC. If you want to speak with me about this subject, please mail me privately. > I still like to see that feature in Midnight Commander and this is a > serious request. So go and patch it. It should be very simple to patch. Regards Adam -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 From sav at bcs.zp.ua Fri Mar 7 13:02:20 2003 From: sav at bcs.zp.ua (Andrew V. Samoilov) Date: Fri, 07 Mar 2003 15:02:20 +0200 Subject: cons.handler.c for FreeBSD In-Reply-To: <20030306025415.A41833@iclub.nsu.ru> References: <20030226230049.A12370@iclub.nsu.ru> <20030227014902.C16292@iclub.nsu.ru> <20030305160554.A21708@iclub.nsu.ru> <20030305223421.A34368@iclub.nsu.ru> <20030305231513.A35679@iclub.nsu.ru> <3E664E45.6070707@bcs.zp.ua> <20030306025415.A41833@iclub.nsu.ru> Message-ID: <3E68985C.3050004@bcs.zp.ua> Max Khon wrote: > hi, there! > > On Wed, Mar 05, 2003 at 09:21:41PM +0200, Andrew V. Samoilov wrote: > > >>Well, I think this fix is not enough. It shall be SIGWINCH catched and >>screen_shot.buf reallocated dynamically or vidcontrol 132x60 will crash >>mc again. > > > screen_shot.buf is reallocated in console_save() > Do you want to say vidcontrol 132x62 does not crash patched mc in 80x25 mode? -- Regards, Andrew V. Samoilov From proski at gnu.org Fri Mar 7 16:30:28 2003 From: proski at gnu.org (Pavel Roskin) Date: Fri, 7 Mar 2003 11:30:28 -0500 (EST) Subject: [OT] Re: rename improvement In-Reply-To: <1047036944.16923.4.camel@localhost> References: <1047030267.15960.9.camel@localhost> <200303071013.h27ADjWd017322@mail.mplayerhq.hu> <20030307102152.GB5248@woodstock.localdomain> <20030307110511.GA1583@mentat.localdomain> <1047036944.16923.4.camel@localhost> Message-ID: Hello, Ali! > And now friendly back to the request. I still like to see that feature > in Midnight Commander and this is a serious request. Which request? If you mean Shift-F6, try Options -> Learn Keys and configure F16. If it doesn't work, report the problem with all usual details ("mc -V", OS, $TERM, the actual terminal name and version, what you do, what you expect to get and what you actually get). -- Regards, Pavel Roskin From pthomas at suse.de Fri Mar 7 17:32:50 2003 From: pthomas at suse.de (Philipp Thomas) Date: Fri, 7 Mar 2003 18:32:50 +0100 Subject: Some patches for mc In-Reply-To: <20030303093215.GB5760@paradies.suse.de> References: <20030303093215.GB5760@paradies.suse.de> Message-ID: <20030307173250.GI10337@paradies.suse.de> Pavel, * Philipp Thomas (pthomas at suse.de) [20030303 10:33]: > Here are some patches for mc that SuSE has been applying for some time now > and which could possibly be included in the official mc: Any status on these? Philipp -- Philipp Thomas SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nuremberg, Germany From aliakc at web.de Fri Mar 7 17:33:42 2003 From: aliakc at web.de (Ali Akcaagac) Date: 07 Mar 2003 18:33:42 +0100 Subject: [OT] Re: rename improvement In-Reply-To: References: <1047030267.15960.9.camel@localhost> <200303071013.h27ADjWd017322@mail.mplayerhq.hu> <20030307102152.GB5248@woodstock.localdomain> <20030307110511.GA1583@mentat.localdomain> <1047036944.16923.4.camel@localhost> Message-ID: <1047058422.5584.5.camel@localhost> On Fri, 2003-03-07 at 17:30, Pavel Roskin wrote: > > And now friendly back to the request. I still like to see that feature > > in Midnight Commander and this is a serious request. > > Which request? If you mean Shift-F6, try Options -> Learn Keys and > configure F16. hm, should it do something ? i don't see the point to learn my shift key since it is a common key used on 100% of all machines, no fancy things that need to be learned. on the otherhand i don't see anything under learn keys that should bring me the requested rename feature. gabucino here on this list obviously has the same issues with mc than i have. > If it doesn't work, report the problem with all usual details ("mc -V", > OS, $TERM, the actual terminal name and version, what you do, what you > expect to get and what you actually get). ;------------------------ mc -V GNU Midnight Commander 4.6.0a Virtual File System: tarfs, extfs, cpiofs, ftpfs, fish, undelfs With builtin Editor Using included S-Lang library with terminfo database With subshell support as default With support for background operations With mouse support on xterm With support for X11 events With internationalization support ;------------------------ OS Linux ulixys 2.4.20-xfs #2 Thu Feb 13 06:11:31 CET 2003 i686 unknown unknown GNU/Linux ;------------------------ TERM linux ;------------------------ When pressing Shift in console I don't get any switched options e.g. pressing Shift+F6 over an file does nothing here. I recall that Shift+Something used to do something but I never cared actually. Other programs for console does Shift support correctly on switching options. Such as Biew. From proski at gnu.org Fri Mar 7 18:20:43 2003 From: proski at gnu.org (Pavel Roskin) Date: Fri, 7 Mar 2003 13:20:43 -0500 (EST) Subject: [OT] Re: rename improvement In-Reply-To: <1047058422.5584.5.camel@localhost> References: <1047030267.15960.9.camel@localhost> <200303071013.h27ADjWd017322@mail.mplayerhq.hu> <20030307102152.GB5248@woodstock.localdomain> <20030307110511.GA1583@mentat.localdomain> <1047036944.16923.4.camel@localhost> <1047058422.5584.5.camel@localhost> Message-ID: Hello! > > Which request? If you mean Shift-F6, try Options -> Learn Keys and > > configure F16. > > hm, should it do something ? i don't see the point to learn my shift key > since it is a common key used on 100% of all machines, no fancy things > that need to be learned. on the otherhand i don't see anything under > learn keys that should bring me the requested rename feature. Not quite. Linux console may think that Shift-F4 is F16 in some keyboard layouts. It would be nice to discover this situation and adjust to it, but it has not been done. In fact, it has never been requested. -- Regards, Pavel Roskin From ossi at kde.org Fri Mar 7 18:26:32 2003 From: ossi at kde.org (Oswald Buddenhagen) Date: Fri, 7 Mar 2003 19:26:32 +0100 Subject: [OT] Re: rename improvement In-Reply-To: <1047058422.5584.5.camel@localhost> References: <1047030267.15960.9.camel@localhost> <200303071013.h27ADjWd017322@mail.mplayerhq.hu> <20030307102152.GB5248@woodstock.localdomain> <20030307110511.GA1583@mentat.localdomain> <1047036944.16923.4.camel@localhost> <1047058422.5584.5.camel@localhost> Message-ID: <20030307182632.GA18117@ugly.local> On Fri, Mar 07, 2003 at 06:33:42PM +0100, Ali Akcaagac wrote: > On Fri, 2003-03-07 at 17:30, Pavel Roskin wrote: > > > And now friendly back to the request. I still like to see that feature > > > in Midnight Commander and this is a serious request. > > > > Which request? If you mean Shift-F6, try Options -> Learn Keys and > > configure F16. > > hm, should it do something ? i don't see the point to learn my shift key > since it is a common key used on 100% of all machines, no fancy things > that need to be learned. > the entire problem is that the linux console maps shift-f1 to f13 and so on - i consider this a major braindamage. recently i remapped shift-f1 to f11, etc. up to shift-f8. shift-f9 & shift-f10 don't produce keycodes, so i mapped f11 to f19 and f12 to f20. whatever. anyway, i just noticed that this mapping is now gone because of the poor concurrency behaviour wrt. writing out config files. *grmbl* how about a bit merging and checkpointing? greetings -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Chaos, panic, and disorder - my work here is done. From proski at gnu.org Fri Mar 7 20:51:20 2003 From: proski at gnu.org (Pavel Roskin) Date: Fri, 7 Mar 2003 15:51:20 -0500 (EST) Subject: [OT] Re: rename improvement In-Reply-To: <20030307182632.GA18117@ugly.local> References: <1047030267.15960.9.camel@localhost> <200303071013.h27ADjWd017322@mail.mplayerhq.hu> <20030307102152.GB5248@woodstock.localdomain> <20030307110511.GA1583@mentat.localdomain> <1047036944.16923.4.camel@localhost> <1047058422.5584.5.camel@localhost> <20030307182632.GA18117@ugly.local> Message-ID: Hi, Oswald! > > > Which request? If you mean Shift-F6, try Options -> Learn Keys and > > > configure F16. > > > > hm, should it do something ? i don't see the point to learn my shift key > > since it is a common key used on 100% of all machines, no fancy things > > that need to be learned. > > > the entire problem is that the linux console maps shift-f1 to f13 and so > on - i consider this a major braindamage. That's only part of the problem, and we could easily deal with it if it was consistent. The real problem is that it's done differently in different keymaps. The default keymap in the kernel maps Shift-F1 to F11, but the default keymap loaded by loadkeys maps Shift-F1 to F13. I'm looking at the source of dumpkeys now. I think it's possible to read the mapping using KDGKBENT ioctl. I'm adding this to the TODO list. > recently i remapped shift-f1 to f11, etc. up to shift-f8. shift-f9 & > shift-f10 don't produce keycodes, so i mapped f11 to f19 and f12 to f20. > whatever. That's what I normally do. Or I set "ru1" keyboard, which does the right thing. > anyway, i just noticed that this mapping is now gone because of the poor > concurrency behavior wrt. writing out config files. *grmbl* how about a > bit merging and checkpointing? You mean that mc killed the config file? Yes, it's a major problem and needs to be fixed. It's already in TODO. -- Regards, Pavel Roskin From proski at gnu.org Fri Mar 7 21:30:01 2003 From: proski at gnu.org (Pavel Roskin) Date: Fri, 7 Mar 2003 16:30:01 -0500 (EST) Subject: mc In-Reply-To: References: Message-ID: Hello! > I try to install Midnight Commnader on my home local Sun machine and run > it but I got an error, can you help on this. > > "ld.so.1: mc: fatal: libgen.so.1: open failed: No such file or > directory" Not enough information. Please read this: http://www.ibiblio.org/mc/MAILING_LISTS You may want to compile the latest version instead of downloading some binaries from "undisclosed locations" for unknown versions of SunOS. -- Regards, Pavel Roskin From proski at gnu.org Fri Mar 7 22:05:29 2003 From: proski at gnu.org (Pavel Roskin) Date: Fri, 7 Mar 2003 17:05:29 -0500 (EST) Subject: Backspace doesn't work in filename search (C-s) in xterm In-Reply-To: <3E6360CD.2050700@bcs.zp.ua> References: <3E6360CD.2050700@bcs.zp.ua> Message-ID: Hello! > Also M-Backspace works now as simple Backspace in command line in xterm > instead of previous word deleting as before. It works for me on the command line in all 4 terminals (xterm, rxvt, Konsole, gnome-terminal) on Red Hat 8.0. I'm using Alt-Backspace. XFree86 4.2.0. Keyboard configuration: Option "XkbOptions" "grp:caps_toggle" Option "XkbRules" "xfree86" Option "XkbModel" "pc105" Option "XkbLayout" "ru" > Well, these shortcuts were working in xterm before, and they work fine > in the linux console now. OK, I think I know. Try this patch: =========================== --- widget.c +++ widget.c @@ -1420,7 +1420,7 @@ static const struct { { XCTRL('d'), delete_char }, { ALT('d'), kill_word }, { ALT(KEY_BACKSPACE), back_kill_word }, - { ALT(XCTRL('h')), back_kill_word }, + { KEY_M_ALT | ('h' & 31), back_kill_word }, { ALT(127), back_kill_word }, /* Region manipulation */ =========================== > P.S. There is working delete_word_left in the built-in editor, but I > cannot find how to define M-Backspace in editkeys.c. I've applied a patch (too early, before I realized what your problem is) and it works for me. You may need to add KEY_M_ALT | ('h' & 31) to the table. We need to find a better way to detect backspace. -- Regards, Pavel Roskin From aliakc at web.de Sat Mar 8 02:26:32 2003 From: aliakc at web.de (Ali Akcaagac) Date: 08 Mar 2003 03:26:32 +0100 Subject: [OT] Re: rename improvement In-Reply-To: References: <1047030267.15960.9.camel@localhost> <200303071013.h27ADjWd017322@mail.mplayerhq.hu> <20030307102152.GB5248@woodstock.localdomain> <20030307110511.GA1583@mentat.localdomain> <1047036944.16923.4.camel@localhost> <1047058422.5584.5.camel@localhost> Message-ID: <1047090392.482.0.camel@localhost> On Fri, 2003-03-07 at 19:20, Pavel Roskin wrote: > > hm, should it do something ? i don't see the point to learn my shift key > > since it is a common key used on 100% of all machines, no fancy things > > that need to be learned. on the otherhand i don't see anything under > > learn keys that should bring me the requested rename feature. > > Not quite. Linux console may think that Shift-F4 is F16 in some keyboard > layouts. It would be nice to discover this situation and adjust to it, > but it has not been done. In fact, it has never been requested. shift+f1 ... shift+f4 works normally here after shift+f5 not. From proski at gnu.org Mon Mar 10 07:33:25 2003 From: proski at gnu.org (Pavel Roskin) Date: Mon, 10 Mar 2003 02:33:25 -0500 (EST) Subject: Some patches for mc In-Reply-To: <20030307173250.GI10337@paradies.suse.de> References: <20030303093215.GB5760@paradies.suse.de> <20030307173250.GI10337@paradies.suse.de> Message-ID: Hi, Philipp! > > Here are some patches for mc that SuSE has been applying for some time now > > and which could possibly be included in the official mc: > > Any status on these? Sorry, I'm getting much more patches than I can process. There is a patch manager on savannah.gnu.org to make sure that the patches don't get lost: https://savannah.gnu.org/patch/?group=mc I'm looking at your patches right now. mc-4.5.51-palmsupport.patch: It's too specific to a certain device. The menu doesn't scale well, so it's better to have only entries useful for many users. I don't think I'll apply it unless the menu code is redesigned in some way. Patch for making the menu entries translatable is pending. That's another reason it's better to keep the menu short - the entries will be translated, so every entry is additional work. mc-4.6.0-asmsyntax.patch: Basically the same problems - too device-specific and the Syntax file doesn't scale well. There is no way to switch between different highlight modes while in the editor, so if you are editing an assembly file for some other architecture, the highlighting will look wrong. Besides, some keywords are missing. In particular, I don't see "daa" (Decimal Adjust the contents of Accumulator). I would be more inclined to apply a syntax file that is complete. mc-4.6.0-tempfile.patch: I don't understand what's the point in creating any temporary files under /tmp for sending mail. I think the home directory is suited better for that purpose. mc-4.6.0-x11browser.diff You forgot to attach the script. By the way, if Mozilla is the default browser and the file is called "www.foo.com", will "x11browser www.foo.com" load that file in Mozilla? If it doesn't work, please fix it first. -- Regards, Pavel Roskin From proski at gnu.org Mon Mar 10 08:36:11 2003 From: proski at gnu.org (Pavel Roskin) Date: Mon, 10 Mar 2003 03:36:11 -0500 (EST) Subject: Some patches for mc In-Reply-To: References: <20030303093215.GB5760@paradies.suse.de> <20030307173250.GI10337@paradies.suse.de> Message-ID: > mc-4.6.0-x11browser.diff > > You forgot to attach the script. Sorry, I was wrong. The script was attached. > By the way, if Mozilla is the default browser and the file is called > "www.foo.com", will "x11browser www.foo.com" load that file in Mozilla? > If it doesn't work, please fix it first. It doesn't work for me. Even the files ending with .html don't display properly if I specify them with the full path: ./x11_browser /home/proski/bookmarks.html x11browser decides to run Mozilla, which tells me that it cannot find www.home.com -- Regards, Pavel Roskin From proski at gnu.org Mon Mar 10 08:41:05 2003 From: proski at gnu.org (Pavel Roskin) Date: Mon, 10 Mar 2003 03:41:05 -0500 (EST) Subject: fix for save/load cursor and display position (mc 4.6.0) In-Reply-To: <20030301171154.4811aa8a.tavx@mail.ru> References: <20030301171154.4811aa8a.tavx@mail.ru> Message-ID: Hello! I don't think the display position needs to be saved. Next time please write some comments about your changes. -- Regards, Pavel Roskin From proski at gnu.org Mon Mar 10 08:50:03 2003 From: proski at gnu.org (Pavel Roskin) Date: Mon, 10 Mar 2003 03:50:03 -0500 (EST) Subject: Keyboard modifiers in Photon 2.x (QNX 6.x) In-Reply-To: <165251872.20030301162540@qnx.org.ru> References: <165251872.20030301162540@qnx.org.ru> Message-ID: Hello! > Attached is patch to allow modifiers detection in QNX Photon > pterm. (diff against key.c from yesterday's CVS snap) Applied. Thank you! -- Regards, Pavel Roskin From protector330 at hotmail.com Mon Mar 10 11:03:02 2003 From: protector330 at hotmail.com (Protector 330) Date: Mon, 10 Mar 2003 11:03:02 +0000 Subject: ouch -> undelete on ext3 Message-ID: RedHat 7.3 i386 MC 4.6.0-1 Hello list, I've really a bad problem. The backup was killed (did just see it now) and because you never get into troubles... without getting into more troubles... I've accidentaly deleted some files on my server with mc (located on hda2, var/www/html/website/). I'm running the system and mc as above, but I can not unmount the partition because I have no remote access to my server. Is there a way to run a undelete without unmounting? Right now MC undelete is unable to find the inodes. Thanks indeed for your help and for any hint you may give me! chris _________________________________________________________________ Hotmail? - ?Absolut kostenfrei! Der weltweit gr??te E-Mail-Anbieter im Netz: http://www.msn.at/hotmail From aliakc at web.de Mon Mar 10 11:34:58 2003 From: aliakc at web.de (Ali Akcaagac) Date: 10 Mar 2003 12:34:58 +0100 Subject: ouch -> undelete on ext3 In-Reply-To: References: Message-ID: <1047296097.3402.3.camel@localhost> On Mon, 2003-03-10 at 12:03, Protector 330 wrote: > I'm running the system and mc as above, but I can not unmount the partition > because I have no remote access to my server. Is there a way to run a > undelete without unmounting? I make it short for you. Depending on your filesystem which may be ext2, ext3, reiser, xfs, jfs your files are totally lost and not recoverable. What you can try as last hope is to 'cat' that partition to a different harddisk and grep for contents inside that for important data. Everything else is just a waste of time. I bet as for now most entries on your harddisk are overwritten already. From proski at gnu.org Mon Mar 10 14:40:51 2003 From: proski at gnu.org (Pavel Roskin) Date: Mon, 10 Mar 2003 09:40:51 -0500 (EST) Subject: Keyboard modifiers in Photon 2.x (QNX 6.x) In-Reply-To: References: <165251872.20030301162540@qnx.org.ru> Message-ID: On Mon, 10 Mar 2003, Pavel Roskin wrote: > Hello! > > > Attached is patch to allow modifiers detection in QNX Photon > > pterm. (diff against key.c from yesterday's CVS snap) > > Applied. Thank you! By the way, you are using fstat() incorrectly. The first argument should be an open file descriptor. fstat returns 0 on success. I'm removing that check - it's not required. dlopen() will return NULL on non-existent files. -- Regards, Pavel Roskin From proski at gnu.org Mon Mar 10 20:38:33 2003 From: proski at gnu.org (Pavel Roskin) Date: Mon, 10 Mar 2003 15:38:33 -0500 (EST) Subject: Backspace doesn't work in filename search (C-s) in xterm In-Reply-To: References: <3E6360CD.2050700@bcs.zp.ua> Message-ID: Hello! > > Also M-Backspace works now as simple Backspace in command line in xterm > > instead of previous word deleting as before. > > to the table. We need to find a better way to detect backspace. Done. correct_key_code() in key.c converts Ctrl-h and '\0177' to Backspace and Ctrl-d to Delete. This is done after the screen library and the key table (i.e. Learn Keys), so the standard terminal settings and the users preferences are fully respected. Ctrl-h, Ctrl-d and '\0177' have been removed from other parts of the code. ALT(XCTRL('h')) is now replaced by ALT(KEY_BACKSPACE). -- Regards, Pavel Roskin From proski at gnu.org Tue Mar 11 00:43:02 2003 From: proski at gnu.org (Pavel Roskin) Date: Mon, 10 Mar 2003 19:43:02 -0500 (EST) Subject: Retain orig. filename as suffix for tmp. filename In-Reply-To: References: <20030224003943.GA6102@mentat.localdomain> <20030224101347.GB1548@mentat.localdomain> Message-ID: Hello, Adam! > I've applied your patch with minimal changes. Thank you! Actually, your patch has created a security hole, but not where I expected. extfs_cmd() doesn't quote the local filename. It was OK before. But since the local name is now based on the entry name, it must be quoted. Try opening in the viewer a file inside a zip archive if that file contains "&" in the filename. touch "run&xterm" zip exploit.zip "run&xterm" Now look inside :-) Fortunately, version 4.6.0 is not affected, or I would have to make an emergency release. If anybody is running CVS mc or a post-4.6.0 snapshot and security is of any concern, upgrade to the current snapshot or CVS is highly recommended. -- Regards, Pavel Roskin From alpha at student.uci.agh.edu.pl Tue Mar 11 00:58:18 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Tue, 11 Mar 2003 01:58:18 +0100 Subject: Retain orig. filename as suffix for tmp. filename In-Reply-To: References: <20030224003943.GA6102@mentat.localdomain> <20030224101347.GB1548@mentat.localdomain> Message-ID: <20030311005818.GA2363@mentat.localdomain> On Mon, Mar 10, 2003 at 07:43:02PM -0500, Pavel Roskin wrote: > Actually, your patch has created a security hole, but not where I > expected. extfs_cmd() doesn't quote the local filename. It was OK > before. But since the local name is now based on the entry name, it must > be quoted. Please note that is not the case with plain VFS. Unfortunately I've just tested it with VFSes. A lesson for me I should not make any assumptions... and that mc design is still a bit mysterious for me. Regards Adam -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 From proski at gnu.org Tue Mar 11 07:50:28 2003 From: proski at gnu.org (Pavel Roskin) Date: Tue, 11 Mar 2003 02:50:28 -0500 (EST) Subject: QNX 6.2 patch In-Reply-To: <13725344363.20030223235036@qnx.org.ru> References: <51291238.20030221002913@qnx.org.ru> <13725344363.20030223235036@qnx.org.ru> Message-ID: Hello! > >> - zombie processes when mcview or mcedit is started Could you please describe in more details how you create zombies? I don't see any zombies with CVS mc and QNX Neutrino 6.2.0. Even if they are created, I don't like the approach used for SCO. Waiting for any process and discarding the exit status is not a good idea. If I had access to SCO, I would probably use something safer. I also wrote a test for popen and pclose (attached), and it works in the same way on Linux and QNX - waitpid() after pclose() fails. If waitpid() is used before pclose() in the signal handler, pclose() returns -1 instead of the exit status. This means that pclose() uses waitpid() internally and doesn't like if the caller gets the exit status itself. I guess that the SCO pclose was using just one waitpid() for two fork()s in popen() or something like that. That's not what I see in QNX. > Like what ? Making a wrapper function for pclose() or smth like that ? > I haven't discovered deeply why those zombie processes occure, but > I'll try to find what happens. Maybe a wrapper, although waiting for WAIT_ANY and discarding the status is risky - important events for other processes can be lost. In particular, the subshell stops itself to tell mc that it's ready. I would prefer to identify bogus processes and acknowledge them explicitly, possibly in the SIGCHLD handler. -- Regards, Pavel Roskin -------------- next part -------------- #include #include #include #include void sigchld_handler (int signum) { int pid, status, serrno; serrno = errno; while (1) { pid = waitpid (-1, &status, WNOHANG | WUNTRACED); if (pid < 0) { perror ("waitpid error"); break; } if (pid == 0) break; printf ("waitpid returned pid %d, status %d\n", pid, status); } errno = serrno; } int main () { int c; FILE *file; int ret; #if 0 signal (SIGCHLD, sigchld_handler); #endif file = popen ("echo 123; exit 1", "r"); while ((c = getc (file)) != EOF) { printf ("%c\n", c); } ret = pclose (file); printf ("pclose returned %d\n", ret); printf ("press enter\n"); getc (stdin); printf ("manually calling sigchld_handler\n"); sigchld_handler (0); return 0; } From dmi_a at qnx.org.ru Tue Mar 11 12:45:46 2003 From: dmi_a at qnx.org.ru (Dmitry Alexeyev) Date: Tue, 11 Mar 2003 15:45:46 +0300 Subject: QNX 6.2 patch In-Reply-To: References: <51291238.20030221002913@qnx.org.ru> <13725344363.20030223235036@qnx.org.ru> Message-ID: <92140482.20030311154546@qnx.org.ru> Hello, Pavel! >> >> - zombie processes when mcview or mcedit is started PR> Could you please describe in more details how you create zombies? I don't PR> see any zombies with CVS mc and QNX Neutrino 6.2.0. Yes, I do not see any zombies with CVS mc. It seems you have already fixed it, cause 4.6.0 release do produce zombies when you view or edit file. Glad to hear that! Your test works for me as expected, pclose() returns 256, "No error". PR> By the way, you are using fstat() incorrectly. The first argument should PR> be an open file descriptor. fstat returns 0 on success. I'm removing PR> that check - it's not required. dlopen() will return NULL on non-existent PR> files. Sorry, that was my mistake. Thank you for pointing and fixing it. I have messed it up with stat() call. And agreed, it is not needed, can't even say why I've put it there... There's one more bug with mc in QNX, which I can't track down due to my poor knoledge of teminals and slang library. Those bugs appear only if mcslang used and no termcap is used (default configuration). All 3 are not mc related, but qnx terminal related, all appear only in "qansi-m" terminal. Even if I do "TERM=xterm ./mc" and stay in console, doing same things, I never get them. 1) When I drop (pressing down key) first(left) pulldown menu, it spreads all over the screen, line by line, adding 2 additional weird symbols instead of '\n'(?) to each line, and continuing printing without any '\n'`s. Those symbols seems to be 0xec and 0xe8. 2) When y=16, menu line is shifted (x) far from its real place. It is truth with only first(left) and second menus. "Left" menu has bottom line shifted shifted, "File" menu has "Mkdir" line shifted. [ if I turn off SLsmg_draw_vline() first(left side) call, those bugs do not appear ] 3) When I drop second or third menu, and press down key, the first menu item appeares shifted on 2 positions, one stange character and a space a printed before it. That only happens to first item. QNX terminal is known to be a bit brain-damaged, some escape sequences produces rubbish, some never actually work. Those problems were reported times and times since 2000 to QSS, but they have never been fixed, even internally. Almost messy is cursor positioning sequence. I have to use termcap's one, but I've got the same results. What could it mean? How to track down such bugs? Have someone seen something similar? Pavel: How was that bug with reversed colors in qansi-m fixed ? (it was reported by Pavel Shirshov, IIRC). Could I roll back somehow those changes? Dmitry From rgr at sdf.lonestar.org Tue Mar 11 17:25:10 2003 From: rgr at sdf.lonestar.org (Rob Ristroph) Date: 11 Mar 2003 11:25:10 -0600 Subject: ftpfs, creating directories Message-ID: <874r69g6ix.fsf@rgristroph-austin.ath.cx> Hi all, I am running Slackware 8.1, and I have install MC 4.6.0 from source. mc --version gives me: GNU Midnight Commander 4.6.0 Virtual File System: tarfs, extfs, cpiofs, ftpfs, fish With builtin Editor Using the ncurses library With support for background operations With mouse support on xterm When I connect to an ftp server ( I am running stupid-ftpd on a non standard port on the same machine, so I connect to localhost:8021 ) and try to make a new directory, it says "operation not permitted." If I ftp to the same place with the command line ftp client, it lets me make directories, so I know it is not the server. I will try the cvs version of MC also, but I won't be able to get back to this little project for a week or so. Thanks in advance for any suggestions. --Rob I would prefer to use mcserv instead of ftpd. The reason is that I am doing this to build a floppy linux that can have the functionality of the DOS Laplink diskettes -- that is, you connect two computers with a parallel port and boot each from the floppy, and MC automatically starts and allows you to list the remote harddisk in one window and the local in the other, and copy things back and forth. Mcserv is considerably smaller than even my trimmed-down ftpd, as long as it will work without requiring the portmapper. When I get back to this project next week I will try to run mcserv in gdb and start tracing through to find out why it doesn't seem to work. Does anyone know what the last version of mcserv that worked is ? Did directory creation work on an mcserv filesystem ? You can check out what I have so far on the floppy at http://rgr.freeshell.org/flinux, if you are interested. From proski at gnu.org Tue Mar 11 21:58:45 2003 From: proski at gnu.org (Pavel Roskin) Date: Tue, 11 Mar 2003 16:58:45 -0500 (EST) Subject: QNX 6.2 patch In-Reply-To: <92140482.20030311154546@qnx.org.ru> References: <51291238.20030221002913@qnx.org.ru> <13725344363.20030223235036@qnx.org.ru> <92140482.20030311154546@qnx.org.ru> Message-ID: Hello, Dmitry! > PR> Could you please describe in more details how you create zombies? I don't > PR> see any zombies with CVS mc and QNX Neutrino 6.2.0. > > Yes, I do not see any zombies with CVS mc. It seems you have already > fixed it, cause 4.6.0 release do produce zombies when you view or edit > file. Glad to hear that! I cannot fix of anything that could affect that bug. I'll have a look. > There's one more bug with mc in QNX, which I can't track down due to > my poor knowledge of terminals and slang library. Those bugs appear only > if mcslang used and no termcap is used (default configuration). OK, I'll have a look, but I was testing mc on the QNX console yesterday and didn't see anything wrong. > 1) When I drop (pressing down key) first(left) pulldown menu, it > spreads all over the screen, line by line, adding 2 additional weird > symbols instead of '\n'(?) to each line, and continuing printing > without any '\n'`s. Those symbols seems to be 0xec and 0xe8. I'm sure I would have noticed it. Are you using QNX 6.2.0 (Momentics)? > 2) When y=16, menu line is shifted (x) far from its real place. It is > truth with only first(left) and second menus. "Left" menu has bottom > line shifted shifted, "File" menu has "Mkdir" line shifted. [ if I turn > off SLsmg_draw_vline() first(left side) call, those bugs do not appear ] I don't understand anything. What is "y"? Anyway, when something is displayed incorrectly, it's usually sufficient to reproduce just 1 problem. > What could it mean? How to track down such bugs? Have someone seen > something similar? If you want to solve this problem, translate the terminfo entry to termcap using infocmp, use mc compiled with termcap and use binary search to find the option responsible for the breakage. > Pavel: How was that bug with reversed colors in qansi-m fixed ? (it > was reported by Pavel Shirshov, IIRC). setf and setb were incorrectly interpreted. Unlike the ANSI standard colors, they specify color in BGR (blue=1, green=2, red=4). This translation wasn't done in older version of S-Lang. Look for BGR in S-Lang 1.4.8 sources. > Could I roll back somehow those changes? Why do you want that? Is there anything wrong with them? -- Regards, Pavel Roskin From proski at gnu.org Tue Mar 11 22:20:39 2003 From: proski at gnu.org (Pavel Roskin) Date: Tue, 11 Mar 2003 17:20:39 -0500 (EST) Subject: ftpfs, creating directories In-Reply-To: <874r69g6ix.fsf@rgristroph-austin.ath.cx> References: <874r69g6ix.fsf@rgristroph-austin.ath.cx> Message-ID: Hello, Rob! > When I connect to an ftp server ( I am running stupid-ftpd on a non > standard port on the same machine, so I connect to localhost:8021 ) and > try to make a new directory, it says "operation not permitted." If I ftp > to the same place with the command line ftp client, it lets me make > directories, so I know it is not the server. I couldn't reproduce this problem with vsftpd 1.1.1 and CVS mc. > I will try the cvs version of MC also, but I won't be able to get back > to this little project for a week or so. I'm not aware of any changes since version 4.6.0 that would affect this anyhow. Try "--ftplog" option to see what is going on between the server and mc. > Mcserv is considerably smaller than even my trimmed-down ftpd, as long > as it will work without requiring the portmapper. It can if you specify the port. > When I get back to this project next week I will try to run mcserv in > gdb and start tracing through to find out why it doesn't seem to work. > Does anyone know what the last version of mcserv that worked is ? If mcserv was broken, I would make that very clear in the documentation (like it's done for the defunct PC port). There have been no bugreports about mcserv since the 4.6.0 release. > Did directory creation work on an mcserv filesystem ? It should work. The code is there. -- Regards, Pavel Roskin From dmi_a at qnx.org.ru Tue Mar 11 22:34:39 2003 From: dmi_a at qnx.org.ru (Dmitry Alexeyev) Date: Wed, 12 Mar 2003 01:34:39 +0300 Subject: QNX 6.2 patch In-Reply-To: References: <51291238.20030221002913@qnx.org.ru> <13725344363.20030223235036@qnx.org.ru> <92140482.20030311154546@qnx.org.ru> Message-ID: <11317602631.20030312013439@qnx.org.ru> Hello! PR> Hello, Dmitry! PR> OK, I'll have a look, but I was testing mc on the QNX console yesterday PR> and didn't see anything wrong. Try playing with pulldown menus (especially move between them). I can upload some screenshots with corrupted screen. I may also upload my binaries, maybe i just have made something wrong. >> 1) When I drop (pressing down key) first(left) pulldown menu, it >> spreads all over the screen, line by line, adding 2 additional weird >> symbols instead of '\n'(?) to each line, and continuing printing >> without any '\n'`s. Those symbols seems to be 0xec and 0xe8. PR> I'm sure I would have noticed it. Are you using QNX 6.2.0 (Momentics)? Yes. People who have 6.2.1 PE beta and 6.1.0(a) have the same problem. >> 2) When y=16, menu line is shifted (x) far from its real place. It is >> truth with only first(left) and second menus. "Left" menu has bottom >> line shifted shifted, "File" menu has "Mkdir" line shifted. [ if I turn >> off SLsmg_draw_vline() first(left side) call, those bugs do not appear ] PR> I don't understand anything. What is "y"? "y" is the number of row on the screen. That's why I thought the problem is in setting the cursor position. PR> Anyway, when something is displayed incorrectly, it's usually sufficient to PR> reproduce just 1 problem. I just do not know how to reproduce it. But everyone who has binaries made by me, see that problem. I have tried to reproduce it outside of mc, but had no luck. >> What could it mean? How to track down such bugs? Have someone seen >> something similar? PR> If you want to solve this problem, translate the terminfo entry to termcap PR> using infocmp, use mc compiled with termcap and use binary search to find PR> the option responsible for the breakage. Ok, I'll try that. >> Pavel: How was that bug with reversed colors in qansi-m fixed ? (it >> was reported by Pavel Shirshov, IIRC). PR> setf and setb were incorrectly interpreted. Unlike the ANSI standard PR> colors, they specify color in BGR (blue=1, green=2, red=4). This PR> translation wasn't done in older version of S-Lang. PR> Look for BGR in S-Lang 1.4.8 sources. >> Could I roll back somehow those changes? PR> Why do you want that? Is there anything wrong with them? I just thought this patch might have broken something. I do not remember those bugs when the screen was coloured red ;) Maybe I am wrong. WBR, Dmitry From dmi_a at qnx.org.ru Wed Mar 12 00:17:13 2003 From: dmi_a at qnx.org.ru (Dmitry Alexeyev) Date: Wed, 12 Mar 2003 03:17:13 +0300 Subject: QNX 6.2 patch In-Reply-To: References: <51291238.20030221002913@qnx.org.ru> <13725344363.20030223235036@qnx.org.ru> <92140482.20030311154546@qnx.org.ru> Message-ID: <68331847.20030312031713@qnx.org.ru> Hello! I have found the problem. It is kinda funny... Tricky SLsmg_goto_rc() function tries to print '\n' where possible, and in qasni* terminals that doesn't work correctly. So, my temporary [and so ugly] hack is: --- sldisply.c.orig Thu Nov 28 20:35:34 2002 +++ sldisply.c Wed Mar 12 03:08:21 2003 @@ -759,8 +759,9 @@ #endif } } - if (s != NULL) tt_write_string(s); - else tt_printf(Curs_Pos_Str, r, c); +// if (s != NULL) tt_write_string(s); +// else + tt_printf(Curs_Pos_Str, r, c); Cursor_c = c; Cursor_r = r; Cursor_Set = 1; } Maybe this function should exclude qansi* terminals from the list of "tricky" terminals? WBR, Dmitry <..> PR> OK, I'll have a look, but I was testing mc on the QNX console yesterday PR> and didn't see anything wrong. <..> From proski at gnu.org Wed Mar 12 00:44:45 2003 From: proski at gnu.org (Pavel Roskin) Date: Tue, 11 Mar 2003 19:44:45 -0500 (EST) Subject: QNX 6.2 patch In-Reply-To: <68331847.20030312031713@qnx.org.ru> References: <51291238.20030221002913@qnx.org.ru> <13725344363.20030223235036@qnx.org.ru> <92140482.20030311154546@qnx.org.ru> <68331847.20030312031713@qnx.org.ru> Message-ID: Hello! > So, my temporary [and so ugly] hack is: > > - if (s != NULL) tt_write_string(s); > - else tt_printf(Curs_Pos_Str, r, c); > +// if (s != NULL) tt_write_string(s); > +// else > + tt_printf(Curs_Pos_Str, r, c); So, s is set, but you don't want to print it? But s is only set if Automatic_Margins is 0. You don't have the "am" capability, but you probably should have it. Both termcap and terminfo on Red Hat Linux have the "am" capability for qansi-m. If that's correct, QNX developers should fix the terminfo database they put in the OS. The local workaround is to create $HOME/.terminfo, fix and recompile qansi-m: mkdir $HOME/.terminfo infocmp qansi-m >qansi-m.ti cat qansi-m.ti | sed 's/acsc/am, acsc/' >qansi-m-fixed.ti tic qansi-m-fixed.ti -- Regards, Pavel Roskin From dmi_a at qnx.org.ru Wed Mar 12 01:15:05 2003 From: dmi_a at qnx.org.ru (Dmitry Alexeyev) Date: Wed, 12 Mar 2003 04:15:05 +0300 Subject: QNX 6.2 patch In-Reply-To: References: <51291238.20030221002913@qnx.org.ru> <13725344363.20030223235036@qnx.org.ru> <92140482.20030311154546@qnx.org.ru> <68331847.20030312031713@qnx.org.ru> Message-ID: <199827870.20030312041505@qnx.org.ru> Hello! PR> So, s is set, but you don't want to print it? But s is only set if PR> Automatic_Margins is 0. You don't have the "am" capability, but you PR> probably should have it. Both termcap and terminfo on Red Hat Linux have PR> the "am" capability for qansi-m. qansi-m does have "am" capability in QNX, but it seems it doesn't actualy work. PR> If that's correct, QNX developers should fix the terminfo database they PR> put in the OS. That bug probably resides a bit deeper, in devc-con driver, and it is closed source. In 6.2.1 this driver is totally rewritten, but the bug still present. It was reported already, and was not fixed. I shall try to report it once more, but it will be fixed only in 6.3, which will be relased probably at the end of the year. So, in MHO, the best way to work around this bug. Maybe the whole SLsmg_goto_rc could be put into "#ifndef __QNXNTO__" block with only tt_printf line remaining? Or, better way, not increasing overhead in other terminals - just to turn off Automatic_Margins for qansi* terminals? PR> The local workaround is to create $HOME/.terminfo, fix and PR> recompile qansi-m: PR> mkdir $HOME/.terminfo infocmp qansi-m >>qansi-m.ti PR> cat qansi-m.ti | sed 's/acsc/am, acsc/' >qansi-m-fixed.ti PR> tic qansi-m-fixed.ti Thank you, I have tried it, but it didn't work. Something in the console driver is broken, and I can't say what. And the problem is worse: I can't contact developers who maintain this driver. WBR, Dmitry From proski at gnu.org Wed Mar 12 01:24:41 2003 From: proski at gnu.org (Pavel Roskin) Date: Tue, 11 Mar 2003 20:24:41 -0500 (EST) Subject: QNX 6.2 patch In-Reply-To: <199827870.20030312041505@qnx.org.ru> References: <51291238.20030221002913@qnx.org.ru> <13725344363.20030223235036@qnx.org.ru> <92140482.20030311154546@qnx.org.ru> <68331847.20030312031713@qnx.org.ru> <199827870.20030312041505@qnx.org.ru> Message-ID: > PR> So, s is set, but you don't want to print it? But s is only set if > PR> Automatic_Margins is 0. You don't have the "am" capability, but you > PR> probably should have it. Both termcap and terminfo on Red Hat Linux have > PR> the "am" capability for qansi-m. > > qansi-m does have "am" capability in QNX, but it seems it doesn't > actualy work. Sorry, I misread that code in SLtt_goto_rc(). Indeed, s can be defined even if Automatic_Margins is 1. Then you could find the exact place where s is assigned a value. Perhaps it's better to move this discussion to the S-Lang mailing list slang-workers-subscribe at babayaga.math.fu-berlin.de -- Regards, Pavel Roskin From lzsiga at mail.ahiv.hu Wed Mar 12 08:14:54 2003 From: lzsiga at mail.ahiv.hu (Lorinczy Zsigmond) Date: Wed, 12 Mar 2003 09:14:54 +0100 Subject: Account in FTP Message-ID: <3E6EEC7D.91C0D28C@mail.ahiv.hu> Hello! My BS2000 mainframe wants account when connecting via FTP, (332 Account required.) but mc do not prompts the user for it. I think I could add this feature if this could be useful for someone else too... Lorinczy, Zsigmond From alpha at student.uci.agh.edu.pl Wed Mar 12 10:35:54 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Wed, 12 Mar 2003 11:35:54 +0100 Subject: Account in FTP In-Reply-To: <3E6EEC7D.91C0D28C@mail.ahiv.hu> References: <3E6EEC7D.91C0D28C@mail.ahiv.hu> Message-ID: <20030312103554.GA1619@mentat.localdomain> On Wed, Mar 12, 2003 at 09:14:54AM +0100, Lorinczy Zsigmond wrote: > My BS2000 mainframe wants account when connecting via FTP, > (332 Account required.) but mc do not prompts the user for it. Try cd /#ftp:account at example.org Regards -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 From lzsiga at mail.ahiv.hu Wed Mar 12 10:56:04 2003 From: lzsiga at mail.ahiv.hu (Lorinczy Zsigmond) Date: Wed, 12 Mar 2003 11:56:04 +0100 Subject: Account in FTP References: <3E6EEC7D.91C0D28C@mail.ahiv.hu> <20030312103554.GA1619@mentat.localdomain> Message-ID: <3E6F1244.A816D496@mail.ahiv.hu> Adam Byrtek / alpha wrote: > > On Wed, Mar 12, 2003 at 09:14:54AM +0100, Lorinczy Zsigmond wrote: > > My BS2000 mainframe wants account when connecting via FTP, > > (332 Account required.) but mc do not prompts the user for it. > > Try > cd /#ftp:account at example.org Thanks, but the host asks for accout _after_ password, not _instead_ ftplog: 220 hs222022 FTP server (Version V02.2A00, Jul 29 1998 14:34:26) ready. MC -- remote_is_amiga = 0 USER helios 331 Password required for helios. PASS 332 Account required. QUIT From pavel at ucw.cz Tue Mar 11 19:31:58 2003 From: pavel at ucw.cz (Pavel Machek) Date: Tue, 11 Mar 2003 20:31:58 +0100 Subject: ouch -> undelete on ext3 In-Reply-To: References: Message-ID: <20030311193157.GA839@elf.ucw.cz> Hi! > RedHat 7.3 i386 > MC 4.6.0-1 > > Hello list, > > I've really a bad problem. The backup was killed (did just see it now) and > because you never get into troubles... without getting into more > troubles... I've accidentaly deleted some files on my server with mc > (located on hda2, var/www/html/website/). > > I'm running the system and mc as above, but I can not unmount the partition > because I have no remote access to my server. Is there a way to run a > undelete without unmounting? > > Right now MC undelete is unable to find the inodes. undelete is impossible on ext3 because ext3 zeros indirect blocks. Pavel -- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] From dmi_a at qnx.org.ru Wed Mar 12 13:50:04 2003 From: dmi_a at qnx.org.ru (Dmitry Alexeyev) Date: Wed, 12 Mar 2003 16:50:04 +0300 Subject: mc.qpg - package description file for mc (QNX 6.x) Message-ID: <135542970.20030312165004@qnx.org.ru> Hello! Attached is description file for package generation under QNX 6.x. usage: # packager mc.qpg The resulting file will be mc-4.6.0-public.qpr suitable for QNX package installer. WBR, Dmitry -------------- next part -------------- A non-text attachment was scrubbed... Name: mc.qpg Type: application/octet-stream Size: 13875 bytes Desc: not available URL: From proski at gnu.org Wed Mar 12 21:20:06 2003 From: proski at gnu.org (Pavel Roskin) Date: Wed, 12 Mar 2003 16:20:06 -0500 (EST) Subject: Account in FTP In-Reply-To: <3E6EEC7D.91C0D28C@mail.ahiv.hu> References: <3E6EEC7D.91C0D28C@mail.ahiv.hu> Message-ID: Hello! > My BS2000 mainframe wants account when connecting via FTP, > (332 Account required.) but mc do not prompts the user for it. > I think I could add this feature if this could be useful > for someone else too... Yes, it shouldn't be too much code. See login_server() in vfs/ftpfs.c: if (command (me, super, WAIT_REPLY, "PASS %s", pass) != COMPLETE) break; Add check for CONTINUE at this point and send the account. Also look for this string in the same file: /* "account" is followed by a token which we ignore */ You'll need to modify xdirentry.h to add a field for FTP account if .netrc support is desired. -- Regards, Pavel Roskin From sav at bcs.zp.ua Fri Mar 14 12:46:34 2003 From: sav at bcs.zp.ua (Andrew V. Samoilov) Date: Fri, 14 Mar 2003 14:46:34 +0200 Subject: src/TODO Message-ID: <3E71CF2A.5060605@bcs.zp.ua> Hi, Pavel! src/TODO: Hard links in cpio archives have 0 length. These links have normal size for binary format. Can you specify format(s) with problems? canonicalize_pathname() doesn't strip leading "./" As far as I can see in ChangeLog this item can be removed. -- Regards, Andrew V. Samoilov From lzsiga at mail.ahiv.hu Fri Mar 14 15:59:38 2003 From: lzsiga at mail.ahiv.hu (Lorinczy Zsigmond) Date: Fri, 14 Mar 2003 16:59:38 +0100 Subject: Account in FTP References: <3E6EEC7D.91C0D28C@mail.ahiv.hu> Message-ID: <3E71FC6A.632919D2@mail.ahiv.hu> Pavel Roskin wrote: > > Hello! > > > My BS2000 mainframe wants account when connecting via FTP, > > (332 Account required.) but mc do not prompts the user for it. > > I think I could add this feature if this could be useful > > for someone else too... > > Yes, it shouldn't be too much code. See login_server() in vfs/ftpfs.c: > > if (command (me, super, WAIT_REPLY, "PASS %s", pass) != COMPLETE) > break; > > Add check for CONTINUE at this point and send the account.  Well I happened to hack something, could someone please check it? Lorinczy, Zsigmond -------------- next part -------------- --- ftpfs.bak Thu Dec 26 03:21:43 2002 +++ ftpfs.c Fri Mar 14 16:58:08 2003 @@ -469,7 +469,21 @@ switch (code){ case CONTINUE: print_vfs_message (_("ftpfs: sending user password")); - if (command (me, super, WAIT_REPLY, "PASS %s", pass) != COMPLETE) + code= command (me, super, WAIT_REPLY, "PASS %s", pass); + if (code==CONTINUE) { + char *p; + + p = g_strconcat (_(" FTP: Account required for "), SUP.user, + " ", NULL); + op = input_dialog (p, _("Account:"), ""); + g_free (p); + if (op == NULL) + ERRNOR (EPERM, 0); + print_vfs_message (_("ftpfs: sending user account")); + code= command (me, super, WAIT_REPLY, "ACCT %s", op); + g_free (op); + } + if (code != COMPLETE) break; case COMPLETE: From proski at gnu.org Fri Mar 14 16:31:38 2003 From: proski at gnu.org (Pavel Roskin) Date: Fri, 14 Mar 2003 11:31:38 -0500 (EST) Subject: Account in FTP In-Reply-To: <3E71FC6A.632919D2@mail.ahiv.hu> References: <3E6EEC7D.91C0D28C@mail.ahiv.hu> <3E71FC6A.632919D2@mail.ahiv.hu> Message-ID: Hello! > Well I happened to hack something, could someone please check it? Applied. Thank you! As you probably realize, accounts in .netrc are still unsupported, but it's such a rare feature that we probably can live without it. -- Regards, Pavel Roskin From proski at gnu.org Fri Mar 14 17:10:10 2003 From: proski at gnu.org (Pavel Roskin) Date: Fri, 14 Mar 2003 12:10:10 -0500 (EST) Subject: src/TODO In-Reply-To: <3E71CF2A.5060605@bcs.zp.ua> References: <3E71CF2A.5060605@bcs.zp.ua> Message-ID: Hello! > src/TODO: > Hard links in cpio archives have 0 length. Example attached. > canonicalize_pathname() doesn't strip leading "./" > As far as I can see in ChangeLog this item can be removed. Yes. -- Regards, Pavel Roskin -------------- next part -------------- A non-text attachment was scrubbed... Name: gcc.cpio.bz2 Type: application/x-bzip2 Size: 36279 bytes Desc: URL: From gvanem at broadpark.no Sun Mar 16 04:05:35 2003 From: gvanem at broadpark.no (Gisle Vanem) Date: Sun, 16 Mar 2003 05:05:35 +0100 Subject: MC for Win32 Message-ID: <036601c2eb71$4c087650$0600000a@broadpark.no> Hi all, I tried for a few hours to compile MC under MingWin, but gave up. The state of the Win32 port is a total mess. So have anybody succeeded building a binary? Any where can i d/l it? Thanks. --gv From avarakin00 at hotmail.com Sun Mar 16 04:34:37 2003 From: avarakin00 at hotmail.com (Aexander Varakin) Date: Sat, 15 Mar 2003 23:34:37 -0500 Subject: MC for Win32 References: <036601c2eb71$4c087650$0600000a@broadpark.no> Message-ID: Hi Gisle, I would suggest that you will try cygwin port. It is very stable and works well, and also gives very good unix feeling even on windows box :-) If you are looking for a native Win32 norton commander clone , better try FAR or Dos Davigator (DN is also open source AFAIK). Alex ----- Original Message ----- From: "Gisle Vanem" To: Sent: Saturday, March 15, 2003 11:05 PM Subject: MC for Win32 > Hi all, > > I tried for a few hours to compile MC under MingWin, but > gave up. The state of the Win32 port is a total mess. > So have anybody succeeded building a binary? Any where > can i d/l it? > > Thanks. > --gv > > _______________________________________________ > Mc-devel mailing list > Mc-devel at gnome.org > http://mail.gnome.org/mailman/listinfo/mc-devel > From gvanem at broadpark.no Sun Mar 16 05:22:42 2003 From: gvanem at broadpark.no (Gisle Vanem) Date: Sun, 16 Mar 2003 06:22:42 +0100 Subject: MC for Win32 References: <036601c2eb71$4c087650$0600000a@broadpark.no> Message-ID: <03a401c2eb7c$1203b4a0$0600000a@broadpark.no> "Aexander Varakin" said: > I would suggest that you will try cygwin port. It is very stable and works > well, and also gives very good unix feeling even on windows box :-) Well, I don't want that feeling. I want the old Norton Commander feeling back.. :-) But I managed to compile and run it with some tweaks. But it crashes if I try to change the drive. I guess MC is too hung up on Unix. --gv From zstingx at hotmail.com Sat Mar 15 15:29:32 2003 From: zstingx at hotmail.com (sting sting) Date: Sat, 15 Mar 2003 17:29:32 +0200 Subject: Colours in mcedit Message-ID: Hello, I want that whenever I open with mcedit a file (on RH 8.0 Linux ; no matter which extension) if it will include a certailn word (like "error") ,all the instances of this word will be colored in red ; Is there a simple way to do it? reagards sting _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus From biro_arpad at yahoo.com Sat Mar 15 16:14:30 2003 From: biro_arpad at yahoo.com (Arpad Biro) Date: Sat, 15 Mar 2003 08:14:30 -0800 (PST) Subject: Bug or feature? Message-ID: <20030315161430.83769.qmail@web13707.mail.yahoo.com> Hi, A large VFS timeout can cause strange behaviour in archive file handling: after replacing an archive file with another one of the same name but different contents, MC 4.6.0 "remembers" the contents of the previous archive for a while. To see what I mean: >test1 zip test.zip test1 Now press Enter on test.zip: it shows "test1". Exit from the archive (press Enter) and type: >test2 rm test.zip zip test.zip test1 test2 Press Enter again on test.zip. MC still thinks the archive has 1 file in it. A good workaround is to reduce the "Timeout for freeing VFSs" value. So, is this a bug or a feature? Should it remain like this? Arpad Biro __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com From zlatko at gmx.at Sun Mar 16 09:29:44 2003 From: zlatko at gmx.at (Thomas Zajic) Date: Sun, 16 Mar 2003 10:29:44 +0100 Subject: Bug or feature? In-Reply-To: <20030315161430.83769.qmail@web13707.mail.yahoo.com> References: <20030315161430.83769.qmail@web13707.mail.yahoo.com> Message-ID: <20030316092944.GN4505@sphere.fdns.net> * Arpad Biro , 15/03/2003, 08:14 > A large VFS timeout can cause strange behaviour in archive file > handling: > [...] > A good workaround is to reduce the "Timeout for freeing VFSs" value. > So, is this a bug or a feature? Should it remain like this? This is what F9 - c - e (Menu -> Command -> Free VFSs now) is for. ;-) HTH, Thomas -- =-------------------------------------------------------------------------= - Thomas "ZlatkO" Zajic Linux-2.4.19 & Mutt-1.4i - - "It is not easy to cut through a human head with a hacksaw." (M. C.) - =-------------------------------------------------------------------------= From oskar at osk.mine.nu Sun Mar 16 09:42:20 2003 From: oskar at osk.mine.nu (Oskar Liljeblad) Date: Sun, 16 Mar 2003 10:42:20 +0100 Subject: extfs/uzip bug In-Reply-To: <200301252103.h0PL3YoC010696@mail.mplayerhq.hu> References: <200301252103.h0PL3YoC010696@mail.mplayerhq.hu> Message-ID: <20030316094220.GA4029@oskar> On Saturday, January 25, 2003 at 22:34, Arpi wrote: Hey Arpi, > While testing new uzip i've found that it's still(!, it didn't worked 3 > years ago neither) unabel to handle zip files containing subdirs/fis with > extra chars (space etc) in the name. [..] > but in mc if i enter i can only see ftpfs.h > > after changing line 22 of extfs/uzip to: > my $op_has_zipinfo = 0; I tested with and without $op_has_zipinfo set, but I still can't reproduce this problem... What version of UnZip do you use? Oskar (oskar at osk.mine.nu) From biro_arpad at yahoo.com Sun Mar 16 11:42:28 2003 From: biro_arpad at yahoo.com (Arpad Biro) Date: Sun, 16 Mar 2003 03:42:28 -0800 (PST) Subject: Bug or feature? Message-ID: <20030316114228.88470.qmail@web13708.mail.yahoo.com> Hi, > > A large VFS timeout can cause strange behaviour in archive file > > handling: > > This is what F9 - c - e (Menu -> Command -> Free VFSs now) is for. ;-) Correct, but try telling this to users. They will consider this a bug when they encounter this situation. How should they know about VFS and such? Arpad Biro __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com From zlatko at gmx.at Sun Mar 16 16:00:36 2003 From: zlatko at gmx.at (Thomas Zajic) Date: Sun, 16 Mar 2003 17:00:36 +0100 Subject: Bug or feature? In-Reply-To: <20030316114228.88470.qmail@web13708.mail.yahoo.com> References: <20030316114228.88470.qmail@web13708.mail.yahoo.com> Message-ID: <20030316160036.GR4505@sphere.fdns.net> * Arpad Biro , 16/03/2003, 03:42 > > > A large VFS timeout can cause strange behaviour in archive file > > > handling: > > > > This is what F9 - c - e (Menu -> Command -> Free VFSs now) is for. > > Correct, but try telling this to users. They will consider this a bug > when they encounter this situation. How should they know about VFS and > such? A quick shot in the dark, without looking at the code: would it be possible to add an mtime based sanity check for "file-based" VFSs (eg. archives, patchfs, debfs, rpmfs ... as opposed to ftpfs, smbfs, fish, ...), and enforce a "Free VFS now" if the original file has been modified since it (or its contents) was cached? Thomas -- =-------------------------------------------------------------------------= - Thomas "ZlatkO" Zajic Linux-2.4.19 & Mutt-1.4i - - "It is not easy to cut through a human head with a hacksaw." (M. C.) - =-------------------------------------------------------------------------= From proski at gnu.org Sun Mar 16 20:38:25 2003 From: proski at gnu.org (Pavel Roskin) Date: Sun, 16 Mar 2003 15:38:25 -0500 (EST) Subject: Colours in mcedit In-Reply-To: References: Message-ID: Hello! > I want that whenever I open with mcedit a file (on RH 8.0 Linux ; > no matter which extension) > if it will include a certailn word (like "error") ,all the instances > of this word will be colored in red ; Is there a simple way to do it? Create file ~/.mc/cedit/unknown.syntax and write following to it: context default keyword whole error red Unfortunately, this rule will apply only to the files where no other syntax highlighting is used. -- Regards, Pavel Roskin From proski at gnu.org Sun Mar 16 21:11:16 2003 From: proski at gnu.org (Pavel Roskin) Date: Sun, 16 Mar 2003 16:11:16 -0500 (EST) Subject: Bug or feature? In-Reply-To: <20030316160036.GR4505@sphere.fdns.net> References: <20030316114228.88470.qmail@web13708.mail.yahoo.com> <20030316160036.GR4505@sphere.fdns.net> Message-ID: Hello, Thomas! > A quick shot in the dark, without looking at the code: would it be > possible to add an mtime based sanity check for "file-based" VFSs (eg. > archives, patchfs, debfs, rpmfs ... as opposed to ftpfs, smbfs, fish, > ...), and enforce a "Free VFS now" if the original file has been > modified since it (or its contents) was cached? Yes. This would require some common code called from open_archive() for tar, cpio and extfs filesystems. In addition to mtime, we may want to use more attributes (inode, size). I'm adding this to the TODO list for version 4.6.1. -- Regards, Pavel Roskin From rgr at sdf.lonestar.org Sun Mar 16 21:53:32 2003 From: rgr at sdf.lonestar.org (Rob Ristroph) Date: 16 Mar 2003 15:53:32 -0600 Subject: User menu auto-launch Message-ID: <877kazc71f.fsf@rgristroph-austin.ath.cx> How can I configure MC so that when it is launched, the user menu (usually called up with F2) comes up automatically ? MC has this behaviour on one computer I have and not on several others, but in examining the diff's of the .mc/ini files I don't see the flag that is responsible. Thanks in advance, --Rob From proski at gnu.org Mon Mar 17 01:52:11 2003 From: proski at gnu.org (Pavel Roskin) Date: Sun, 16 Mar 2003 20:52:11 -0500 (EST) Subject: User menu auto-launch In-Reply-To: <877kazc71f.fsf@rgristroph-austin.ath.cx> References: <877kazc71f.fsf@rgristroph-austin.ath.cx> Message-ID: Hello, Rob! > How can I configure MC so that when it is launched, the user menu > (usually called up with F2) comes up automatically ? Options->Configuration->Auto Menus In .mc/ini: [Midnight-Commander] auto_menu=1 This option didn't work in versions prior to 4.6.0. -- Regards, Pavel Roskin From pthomas at suse.de Mon Mar 17 17:50:51 2003 From: pthomas at suse.de (Philipp Thomas) Date: Mon, 17 Mar 2003 18:50:51 +0100 Subject: Some patches for mc In-Reply-To: References: <20030303093215.GB5760@paradies.suse.de> <20030307173250.GI10337@paradies.suse.de> Message-ID: <20030317175051.GA18981@paradies.suse.de> * Pavel Roskin (proski at gnu.org) [20030310 08:34]: > mc-4.6.0-tempfile.patch: > > I don't understand what's the point in creating any temporary files under > /tmp for sending mail. I think the home directory is suited better for > that purpose. The point is, that the use of the mktemp utility is far better than relying on the shell to produce suitable unique names Philipp -- Philipp Thomas SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nuremberg, Germany From lzsiga at mail.ahiv.hu Tue Mar 18 10:04:54 2003 From: lzsiga at mail.ahiv.hu (Lorinczy Zsigmond) Date: Tue, 18 Mar 2003 11:04:54 +0100 Subject: Another FTP problem Message-ID: <3E76EF46.22F51198@mail.ahiv.hu> Hello! I have a problem with sending a file with mc via FTP: I wanna send my text.txt file from my home-directory, with the same name to the remote machine's working directory, but mc sends "STOR /test.txt", which causes remote partner reject transition (tested with remote linux and BS2000). patching ftpfs.c solved this problem, but caused "cannot parse" errors when LIST-ing the remote machine as "LIST -la /." became "LIST -a ." --- ftpfs.bk2 Fri Mar 14 16:58:08 2003 +++ ftpfs.c Tue Mar 18 10:30:11 2003 @@ -972,7 +972,7 @@ } if (remote) { char * remote_path = translate_path (me, super, remote); - j = command (me, super, WAIT_REPLY, "%s /%s", cmd, + j = command (me, super, WAIT_REPLY, "%s %s", cmd, /* WarFtpD can't STORE //filename */ (*remote_path == '/') ? remote_path + 1 : remote_path); g_free (remote_path); From sav at bcs.zp.ua Wed Mar 19 15:48:51 2003 From: sav at bcs.zp.ua (Andrew V. Samoilov) Date: Wed, 19 Mar 2003 17:48:51 +0200 Subject: [PATCH]: Locale's abbreviated month & vfs References: <3E3A4EFF.2080109@bcs.zp.ua> <3E534319.6060704@bcs.zp.ua> Message-ID: <3E789163.5050302@bcs.zp.ua> Pavel Roskin wrote: > Hello! > > >>> * vfs.c (is_localized_month): New function for locale's >>> abbreviated month name as any 3 bytes long string without digits >>> and control characters. >>> (vfs_parse_filedate): Fallback to is_localized_month() if >>> is_month() and is_dos_date() fail and set date to Jan 1 1970. >>> (vfs_parse_ls_lga): Use is_localized_month(). >>> >> >>Commited to CVS. > > > Thank you. > > >> What about backward search feature in the internal viewer? > > > If you have code that you like, then commit it. I trust you to make this > decision. Just write to the list about your commit - it's a serious > change that affects end users. Patch commited. I will have moved in 2 weeks, so I want to see this patch commited. I am not sure I will be able to continue development there first time after moving. Comment are greatly appreshiated! -- Regards, Andrew V. Samoilov From alpha at student.uci.agh.edu.pl Wed Mar 19 16:00:09 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Wed, 19 Mar 2003 17:00:09 +0100 Subject: [PATCH]: Locale's abbreviated month & vfs In-Reply-To: <3E789163.5050302@bcs.zp.ua> References: <3E3A4EFF.2080109@bcs.zp.ua> <3E534319.6060704@bcs.zp.ua> <3E789163.5050302@bcs.zp.ua> Message-ID: <20030319160009.GA4565@mentat.localdomain> On Wed, Mar 19, 2003 at 05:48:51PM +0200, Andrew V. Samoilov wrote: > Patch commited. I will have moved in 2 weeks, so I want to > see this patch commited. I am not sure I will be able to continue Please, could you examine https://savannah.gnu.org/patch/?func=detailpatch&patch_id=1254&group_id=3521 The problem is connected with the viewer, and my patch fixes the critical bug (core dump or infinite loop). Regards alpha -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 From proski at gnu.org Wed Mar 19 16:08:12 2003 From: proski at gnu.org (Pavel Roskin) Date: Wed, 19 Mar 2003 11:08:12 -0500 (EST) Subject: [PATCH]: Locale's abbreviated month & vfs In-Reply-To: <3E789163.5050302@bcs.zp.ua> References: <3E3A4EFF.2080109@bcs.zp.ua> <3E534319.6060704@bcs.zp.ua> <3E789163.5050302@bcs.zp.ua> Message-ID: Hello! > > If you have code that you like, then commit it. I trust you to make this > > decision. Just write to the list about your commit - it's a serious > > change that affects end users. > > Patch commited. I will have moved in 2 weeks, so I want to see this > patch commited. I am not sure I will be able to continue development > there first time after moving. Backward search is working fine for me. Thank you and good luck! I hope to hear from you soon. -- Regards, Pavel Roskin From proski at gnu.org Wed Mar 19 16:25:46 2003 From: proski at gnu.org (Pavel Roskin) Date: Wed, 19 Mar 2003 11:25:46 -0500 (EST) Subject: [PATCH]: Locale's abbreviated month & vfs In-Reply-To: <20030319160009.GA4565@mentat.localdomain> References: <3E3A4EFF.2080109@bcs.zp.ua> <3E534319.6060704@bcs.zp.ua> <3E789163.5050302@bcs.zp.ua> <20030319160009.GA4565@mentat.localdomain> Message-ID: Hi, Adam! > Please, could you examine > https://savannah.gnu.org/patch/?func=detailpatch&patch_id=1254&group_id=3521 > > The problem is connected with the viewer, and my patch fixes the > critical bug (core dump or infinite loop). If I apply your patch to the CVS version (this requires some manual intervention), following bug appears. If the viewer is positioned at the beginning of file, regex search cannot find anything, even strings without characters with special meaning. In particular, try opening ChangeLog and look for "200" using F6. -- Regards, Pavel Roskin From alpha at student.uci.agh.edu.pl Wed Mar 19 19:19:13 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Wed, 19 Mar 2003 20:19:13 +0100 Subject: [PATCH]: Locale's abbreviated month & vfs In-Reply-To: References: <3E3A4EFF.2080109@bcs.zp.ua> <3E534319.6060704@bcs.zp.ua> <3E789163.5050302@bcs.zp.ua> <20030319160009.GA4565@mentat.localdomain> Message-ID: <20030319191912.GA17400@mentat.localdomain> On Wed, Mar 19, 2003 at 11:25:46AM -0500, Pavel Roskin wrote: > If I apply your patch to the CVS version (this requires some manual > intervention), That's because of Andrew's patch which was later. > following bug appears. If the viewer is positioned at the > beginning of file, regex search cannot find anything, even strings > without characters with special meaning. In particular, try opening > ChangeLog and look for "200" using F6. 0) I really love those disappearing revisions in anon cvs... 1) Silly little typo: - for (i = 0; (ch != -1) && (pos > 0); ch = get_byte (view, pos)) { + for (i = 0; (ch != -1) && (pos >= 0); ch = get_byte (view, pos)) { But looks like Andrew has taken this issue into account in his patch (the 'break' inside the 'for'), so it no longer applies. But the proper '^' and '$' and 'prev' handling in reverse regexp search still applies, see my patch. 2) Andrew's patch has broken regexp reverse search... see the usage of strreverse() - Andrew, please could you fix this and examine/apply (parts) of my patch? If something is unclear - tell me. 3) Try to create file: --cut-- 000 aaa --cut-- WITHOUT final newline. Now try to search 'aaa' - not found. Fixed in my patch (attached). Regards Adam -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 -------------- next part -------------- Index: view.c =================================================================== RCS file: /cvs/gnome/mc/src/view.c,v retrieving revision 1.117 diff -u -r1.117 view.c --- view.c 19 Mar 2003 13:39:48 -0000 1.117 +++ view.c 19 Mar 2003 19:13:16 -0000 @@ -1521,46 +1521,40 @@ get_line_at (WView *view, unsigned long *p, unsigned long *skipped) { char *buffer = 0; - int buffer_size = 0; - int usable_size = 0; - int ch; - int direction = view->direction; + int buffer_size = 0, usable_size = 0; + int ch, i = 0, prev = 0; unsigned long pos = *p; - long i = 0; - int prev = 0; - - if (!pos && direction == -1) - return 0; /* skip over all the possible zeros in the file */ while ((ch = get_byte (view, pos)) == 0) { - if (!pos && direction == -1) + if (pos == 0 && view->direction == -1) return 0; - pos += direction; + pos += view->direction; i++; } *skipped = i; - if (pos) { - prev = get_byte (view, pos - 1); + if (pos > 0 || view->direction == -1) { + prev = get_byte (view, pos - view->direction); if ((prev == -1) || (prev == '\n')) prev = 0; + } else { + prev=0; } - for (i = 0; ch != -1; ch = get_byte (view, pos)) { + for (i = 1; ch != -1; ch = get_byte (view, pos)) { - if (i == usable_size) { + if (i >= usable_size) { buffer = grow_string_buffer (buffer, &buffer_size); usable_size = buffer_size - 2; } - i++; - buffer[i] = ch; + buffer[i++] = ch; - if (!pos && direction == -1) + if (pos == 0 && view->direction == -1) break; - pos += direction; + pos += view->direction; if (ch == '\n' || !ch) break; @@ -1666,15 +1660,13 @@ /* We found the string */ - if (*s && !view->search_start && (search == regexp_view_search) - && (*text == '^')) { - - /* We do not want to match a - * ^ regexp when not at the real - * beginning of some line - */ - continue; - } + /* Handle ^ and $ in reexp searches when starting at + * the middle of the line */ + if (s[0] && (search == regexp_view_search)) + if (((text[0] == '^') && (view->direction > 0)) || + ((text[strlen(text)-1] == '$') && (view->direction < 0))) + continue; + /* Record the position used to continue the search */ if (view->direction == 1) t += forward_line_start; From proski at gnu.org Wed Mar 19 19:47:30 2003 From: proski at gnu.org (Pavel Roskin) Date: Wed, 19 Mar 2003 14:47:30 -0500 (EST) Subject: [PATCH]: Locale's abbreviated month & vfs In-Reply-To: <20030319191912.GA17400@mentat.localdomain> References: <3E3A4EFF.2080109@bcs.zp.ua> <3E534319.6060704@bcs.zp.ua> <3E789163.5050302@bcs.zp.ua> <20030319160009.GA4565@mentat.localdomain> <20030319191912.GA17400@mentat.localdomain> Message-ID: On Wed, 19 Mar 2003, Adam Byrtek / alpha wrote: > 0) I really love those disappearing revisions in anon cvs... I'm really sorry. I contacted the person responsible for anonymous CVS on GNOME, and the answer was basically "it should be at most 1 day delay, not a big deal". Unless there are objections in the next two days, I'm going to ask the admins of gnome.org and gnu.org to transfer the mc repository to subversion.gnu.org. This is a pity because GNOME translators would lose write access, but I'll enable their access to subversion.gnu.org on request. > 2) Andrew's patch has broken regexp reverse search... see the usage of > strreverse() - Andrew, please could you fix this and examine/apply > (parts) of my patch? If something is unclear - tell me. There is no support for "regexp reverse search", so it's quite hard to break it :-) > WITHOUT final newline. Now try to search 'aaa' - not found. > Fixed in my patch (attached). Still not good. Try searching backwards for a non-existent word. mc hangs with 100% CPU utilization. -- Regards, Pavel Roskin From alpha at student.uci.agh.edu.pl Wed Mar 19 19:59:48 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Wed, 19 Mar 2003 20:59:48 +0100 Subject: [PATCH]: Locale's abbreviated month & vfs In-Reply-To: References: <3E3A4EFF.2080109@bcs.zp.ua> <3E534319.6060704@bcs.zp.ua> <3E789163.5050302@bcs.zp.ua> <20030319160009.GA4565@mentat.localdomain> <20030319191912.GA17400@mentat.localdomain> Message-ID: <20030319195948.GA28694@mentat.localdomain> On Wed, Mar 19, 2003 at 02:47:30PM -0500, Pavel Roskin wrote: > There is no support for "regexp reverse search", so it's quite hard to > break it :-) Sure, and I've spend whole night to fix something which non-existing. $grep -C5 "Reverse" doc/mc.1 .PP .B F6, /. Regular expression search. .PP .B ?, Reverse regular expression search. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .PP .B F7 Normal search / hex mode search. .PP .B C-s, F17, n. No wonder it is broken... > Still not good. Try searching backwards for a non-existent word. mc > hangs with 100% CPU utilization. I know it is broken. This is not the final patch - it is a patch for Andrew to merge with his modifications which I didn't know about. Regards -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 From count0 at c64.org Wed Mar 19 21:24:07 2003 From: count0 at c64.org (Count Zero) Date: Wed, 19 Mar 2003 22:24:07 +0100 Subject: Shift&F6 rename files on 4.6.x versions Message-ID: <200303192224.07204.count0@c64.org> Hello, I really LOVE the Shift&F6 Rename function on the new 4.6.x series, but wonder if it would be possible to avoid selected files and only rename the current one. Whenever you have e.g. 3 files, select the first 2 and choose to rename the 3rd one with shift&F6, after submitting the new name an error comes up. l8r -- Count Zero - CyberpunX / SCS * TRC Retro Replay Home - http://rr.c64.org From proski at gnu.org Wed Mar 19 22:22:57 2003 From: proski at gnu.org (Pavel Roskin) Date: Wed, 19 Mar 2003 17:22:57 -0500 (EST) Subject: Shift&F6 rename files on 4.6.x versions In-Reply-To: <200303192224.07204.count0@c64.org> References: <200303192224.07204.count0@c64.org> Message-ID: Hello! > I really LOVE the Shift&F6 Rename function on the new 4.6.x series, but > wonder if it would be possible to avoid selected files and only rename > the current one. > > Whenever you have e.g. 3 files, select the first 2 and choose to rename > the 3rd one with shift&F6, after submitting the new name an error comes > up. I think it's a good idea, but it comes a bit late, after a release that has a different behavior. Indeed, Shift-F5 and Shift-F6 are primarily meant to copy or move files to something with a similar name, so it would be logical for them to act on the current file even in presence of selected files. Also, it's good to have a possibility to act on the current file without having to unselect everything. Any objections if we change the behavior of Shift-F5 and Shift-F6? -- Regards, Pavel Roskin From alpha at student.uci.agh.edu.pl Wed Mar 19 22:35:12 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Wed, 19 Mar 2003 23:35:12 +0100 Subject: Shift&F6 rename files on 4.6.x versions In-Reply-To: References: <200303192224.07204.count0@c64.org> Message-ID: <20030319223512.GA24383@mentat.localdomain> On Wed, Mar 19, 2003 at 05:22:57PM -0500, Pavel Roskin wrote: > Any objections if we change the behavior of Shift-F5 and Shift-F6? I think it is no problem, not many people know about Shift-F[56] and not many use this feature unknowingly. Moreover now it causes error on multiple tagged files, so nobody uses it this way... Regards Adam -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 From lzsiga at mail.ahiv.hu Thu Mar 20 08:16:53 2003 From: lzsiga at mail.ahiv.hu (Lorinczy Zsigmond) Date: Thu, 20 Mar 2003 09:16:53 +0100 Subject: Another FTP problem References: <3E76EF46.22F51198@mail.ahiv.hu> Message-ID: <3E7978F5.209D873C@mail.ahiv.hu> Sorry for the re-posting, but I'm afraid my first letter lost The problem stands for 4.55.5 to, the message is "Cannot close target file: Operation not permitted (1)" while for 4.6.0 "Cannot create target file: Operation not permitted (1)" Lorinczy Zsigmond wrote: > > Hello! > > I have a problem with sending a file with mc via FTP: > I wanna send my text.txt file from my home-directory, > with the same name to the remote machine's working > directory, but mc sends "STOR /test.txt", > which causes remote partner reject transition > (tested with remote linux and BS2000). > > patching ftpfs.c solved this problem, but caused > "cannot parse" errors when LIST-ing the remote machine > as "LIST -la /." became "LIST -a ." > > --- ftpfs.bk2 Fri Mar 14 16:58:08 2003 > +++ ftpfs.c Tue Mar 18 10:30:11 2003 > @@ -972,7 +972,7 @@ > } > if (remote) { > char * remote_path = translate_path (me, super, remote); > - j = command (me, super, WAIT_REPLY, "%s /%s", cmd, > + j = command (me, super, WAIT_REPLY, "%s %s", cmd, > /* WarFtpD can't STORE //filename */ > (*remote_path == '/') ? remote_path + 1 : remote_path); > g_free (remote_path); From lzsiga at mail.ahiv.hu Thu Mar 20 10:05:56 2003 From: lzsiga at mail.ahiv.hu (Lorinczy Zsigmond) Date: Thu, 20 Mar 2003 11:05:56 +0100 Subject: Another FTP problem References: <3E76EF46.22F51198@mail.ahiv.hu> <3E7978F5.209D873C@mail.ahiv.hu> Message-ID: <3E799284.7455F377@mail.ahiv.hu> Lorinczy Zsigmond wrote: > > Sorry for the re-posting, but I'm afraid my first letter lost > > The problem stands for 4.55.5 to, the message is > "Cannot close target file: Operation not permitted (1)" > while for 4.6.0 > "Cannot create target file: Operation not permitted (1)" With more tests I realized, that this happens only if /home is a symbolic link... I'll analyze this more precisely later From alpha at student.uci.agh.edu.pl Thu Mar 20 10:37:12 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Thu, 20 Mar 2003 11:37:12 +0100 Subject: TODO list Message-ID: <20030320103712.GA931@mentat.localdomain> . From the TODO list: --cut-- Allow navigating VFS directories by Enter with non-empty command line. Right now, pressing Enter on a directory on VFS with something on the command line cayses and error message "Cannot execute commands on non-local filesystems". --cut-- IMO we should remove this from the TODO, because such option will make mc usage differ on normal filesystem and on VFS. People sometimes forgot about the boundaries, and it could lead to accidental command execution (when one wanted to use Enter to move to parent directory, didn't noticed he already left VFS). Moreover one can always use Ctrl-PgUp, Ctrl-PgDn, so it is not a problem (btw it doesn't work on rxvt and aterm). Regards Adam -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 From proski at gnu.org Thu Mar 20 20:17:45 2003 From: proski at gnu.org (Pavel Roskin) Date: Thu, 20 Mar 2003 15:17:45 -0500 (EST) Subject: TODO list In-Reply-To: <20030320103712.GA931@mentat.localdomain> References: <20030320103712.GA931@mentat.localdomain> Message-ID: Hello! > IMO we should remove this from the TODO, because such option will make > mc usage differ on normal filesystem and on VFS. People sometimes > forgot about the boundaries, and it could lead to accidental command > execution (when one wanted to use Enter to move to parent directory, > didn't noticed he already left VFS). Agreed. Item removed. > Moreover one can always use Ctrl-PgUp, Ctrl-PgDn, so it is not a > problem (btw it doesn't work on rxvt and aterm). They work if you set TERM=xterm. You can also use Learn Keys is you have X11 support enabled. The sequences for xterm are currently hardcoded because there is no way to define modifiers in mc.lib. It should be fixed. init_key() is called before init_xterm_support(), so it's impossible to use xterm_flag. I'm not going to reorder the initialization order just to enable a workaround when the right fix is planned. -- Regards, Pavel Roskin From alpha at student.uci.agh.edu.pl Thu Mar 20 22:55:58 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Thu, 20 Mar 2003 23:55:58 +0100 Subject: Config file handling Message-ID: <20030320225558.GA3350@mentat.localdomain> Patch to write config to temporary file and then 'atomicaly' move it to proper place. Moreover it is a fix for following nasty bug which happend when no ~/.mc/ini is found: open("/usr/local/share/mc/mc.ini", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = -1 EACCES (Permission denied) We should not try to write to public files, so profile_name should be used only for reading... But dump_profile still wants to save file (even unmodified), so we check and save only in home_dir. Regards Patch attached and in BTS Adam -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/gnome/mc/src/ChangeLog,v retrieving revision 1.1145 diff -u -r1.1145 ChangeLog --- ChangeLog 19 Mar 2003 13:39:48 -0000 1.1145 +++ ChangeLog 20 Mar 2003 22:54:26 -0000 @@ -1,0 +1,12 @@ +2003-03-20 Adam Byrtek + + * profile.c (dump_profile): When saving config files, write to + a copy, then replace the file. Retain file mode. + * hotlist.c (save hotlist): Likewise. + + * setup.c (dump_profile), setup.c (profile_name), hotlist.c + (profile_name), learn.c (profile_name), panelize.c + (profile_name): Avoid writing config files outside home + directory (happend when no .mc/ini existed). Use profile_name + only for reading. + Index: hotlist.c =================================================================== RCS file: /cvs/gnome/mc/src/hotlist.c,v retrieving revision 1.44 diff -u -r1.44 hotlist.c --- hotlist.c 21 Dec 2002 08:43:15 -0000 1.44 +++ hotlist.c 20 Mar 2003 22:54:26 -0000 @@ -1328,23 +1328,26 @@ static void clean_up_hotlist_groups (char *section) { - char *grp_section; + char *profile, *grp_section; void *profile_keys; char *key, *value; + profile = concat_dir_and_file (home_dir, PROFILE_NAME); + grp_section = g_strconcat (section, ".Group", NULL); - if (profile_has_section (section, profile_name)) - profile_clean_section (section, profile_name); - if (profile_has_section (grp_section, profile_name)) { - profile_keys = profile_init_iterator (grp_section, profile_name); + if (profile_has_section (section, profile)) + profile_clean_section (section, profile); + if (profile_has_section (grp_section, profile)) { + profile_keys = profile_init_iterator (grp_section, profile); while (profile_keys) { profile_keys = profile_iterator_next (profile_keys, &key, &value); clean_up_hotlist_groups (key); } - profile_clean_section (grp_section, profile_name); + profile_clean_section (grp_section, profile); } g_free (grp_section); + g_free (profile); } @@ -1416,16 +1419,17 @@ save_group (struct hotlist *grp) { struct hotlist *current = grp->head; - char *group_section; + char *group_section, *profile; + profile = concat_dir_and_file (home_dir, PROFILE_NAME); group_section = find_group_section (grp); - profile_clean_section (group_section, profile_name); + profile_clean_section (group_section, profile); for (;current && current->type == HL_TYPE_GROUP; current = current->next){ WritePrivateProfileString (group_section, current->directory, current->label, - profile_name); + profile); } g_free (group_section); @@ -1434,13 +1438,14 @@ current = current->next) save_group (current); - profile_clean_section (grp->directory, profile_name); + profile_clean_section (grp->directory, profile); for (;current; current = current->next){ WritePrivateProfileString (grp->directory, current->directory, current->label, - profile_name); + profile); } + g_free (profile); } static int list_level = 0; @@ -1510,23 +1515,23 @@ struct stat stat_buf; if (!hotlist_state.readonly && hotlist_state.modified && hotlist_file_name) { - char *fbak = g_strconcat (hotlist_file_name, ".bak", NULL); + char *ftmp = g_strconcat (hotlist_file_name, ".tmp", NULL); - rename (hotlist_file_name, fbak); - if ((hotlist_file = fopen (hotlist_file_name, "w")) != 0) { - if (stat (fbak, &stat_buf) == 0) - chmod (hotlist_file_name, stat_buf.st_mode); + if ((hotlist_file = fopen (ftmp, "w")) != 0) { + if (stat (hotlist_file_name, &stat_buf) == 0) + chmod (ftmp, stat_buf.st_mode); else - chmod (hotlist_file_name, S_IRUSR | S_IWUSR); + chmod (ftmp, S_IRUSR | S_IWUSR); hot_save_group (hotlist); fclose (hotlist_file); - stat (hotlist_file_name, &stat_buf); - hotlist_file_mtime = stat_buf.st_mtime; - saved = 1; - hotlist_state.modified = 0; - } else - rename (fbak, hotlist_file_name); - g_free (fbak); + if (rename (ftmp, hotlist_file_name) == 0) { + stat (hotlist_file_name, &stat_buf); + hotlist_file_mtime = stat_buf.st_mtime; + saved = 1; + hotlist_state.modified = 0; + } + } + g_free (ftmp); } return saved; Index: learn.c =================================================================== RCS file: /cvs/gnome/mc/src/learn.c,v retrieving revision 1.19 diff -u -r1.19 learn.c --- learn.c 21 Oct 2002 22:54:21 -0000 1.19 +++ learn.c 20 Mar 2003 22:54:26 -0000 @@ -310,12 +310,15 @@ int i; int profile_changed = 0; char *section = g_strconcat ("terminal:", getenv ("TERM"), NULL); + char *profile; + profile = concat_dir_and_file (home_dir, PROFILE_NAME); + for (i = 0; i < learn_total; i++) { if (learnkeys [i].sequence != NULL) { profile_changed = 1; WritePrivateProfileString (section, key_name_conv_tab [i].name, - learnkeys [i].sequence, profile_name); + learnkeys [i].sequence, profile); } } @@ -329,6 +332,7 @@ sync_profiles (); g_free (section); + g_free (profile); } void learn_keys (void) Index: panelize.c =================================================================== RCS file: /cvs/gnome/mc/src/panelize.c,v retrieving revision 1.33 diff -u -r1.33 panelize.c --- panelize.c 8 Dec 2002 04:16:30 -0000 1.33 +++ panelize.c 20 Mar 2003 22:54:26 -0000 @@ -327,16 +327,20 @@ void save_panelize (void) { struct panelize *current = panelize; + char *profile; - profile_clean_section (panelize_section, profile_name); + profile = concat_dir_and_file (home_dir, PROFILE_NAME); + + profile_clean_section (panelize_section, profile); for (;current; current = current->next){ if (strcmp (current->label, _("Other command"))) WritePrivateProfileString (panelize_section, current->label, current->command, - profile_name); + profile); } sync_profiles (); + g_free(profile); } void done_panelize (void) Index: profile.c =================================================================== RCS file: /cvs/gnome/mc/src/profile.c,v retrieving revision 1.10 diff -u -r1.10 profile.c --- profile.c 3 Mar 2003 07:59:11 -0000 1.10 +++ profile.c 20 Mar 2003 22:54:26 -0000 @@ -395,16 +395,32 @@ static void dump_profile (TProfile *p) { FILE *profile; + struct stat stat_buf; + char *tmpFileName; if (!p) return; dump_profile (p->link); /* .ado: p->FileName can be empty, it's better to jump over */ - if (p->FileName[0] != (char) 0) - if ((profile = fopen (p->FileName, "w")) != NULL){ + if (p->FileName[0] == (char) 0) + return; + + /* write files in home dir only */ + if (strncmp (p->FileName, home_dir, sizeof(home_dir)) != 0) + return; + + /* save to temporary file, 'atomic' rename after completion */ + tmpFileName = g_strconcat (p->FileName, ".tmp", NULL); + + if ((profile = fopen (tmpFileName, "w")) != NULL){ + if (stat (p->FileName, &stat_buf) == 0) + chmod (tmpFileName, stat_buf.st_mode); + else + chmod (tmpFileName, S_IRUSR | S_IWUSR); dump_sections (profile, p->Section); fclose (profile); - } + rename (tmpFileName, p->FileName); + } } /* @@ -510,7 +526,6 @@ /* We assume the user has called one of the other initialization funcs */ if (!find_loaded (file, §ion)){ - fprintf (stderr,"Warning: profile_clean_section called before init\n"); return; } /* We only disable the section, so it will still be freed, but it */ Index: setup.c =================================================================== RCS file: /cvs/gnome/mc/src/setup.c,v retrieving revision 1.73 diff -u -r1.73 setup.c --- setup.c 23 Jan 2003 14:26:22 -0000 1.73 +++ setup.c 20 Mar 2003 22:54:26 -0000 @@ -219,38 +219,42 @@ void panel_save_setup (struct WPanel *panel, char *section) { - char buffer [BUF_TINY]; + char buffer [BUF_TINY], *profile; int i; + profile = concat_dir_and_file (home_dir, PROFILE_NAME); + g_snprintf (buffer, sizeof (buffer), "%d", panel->reverse); - save_string (section, "reverse", buffer, profile_name); + save_string (section, "reverse", buffer, profile); g_snprintf (buffer, sizeof (buffer), "%d", panel->case_sensitive); - save_string (section, "case_sensitive", buffer, profile_name); + save_string (section, "case_sensitive", buffer, profile); for (i = 0; sort_names [i].key; i++) if (sort_names [i].sort_type == (sortfn *) panel->sort_type){ save_string (section, "sort_order", - sort_names [i].key, profile_name); + sort_names [i].key, profile); break; } for (i = 0; list_types [i].key; i++) if (list_types [i].list_type == panel->list_type){ - save_string (section, "list_mode", list_types [i].key, profile_name); + save_string (section, "list_mode", list_types [i].key, profile); break; } save_string (section, "user_format", - panel->user_format, profile_name); + panel->user_format, profile); for (i = 0; i < LIST_TYPES; i++){ g_snprintf (buffer, sizeof (buffer), "user_status%d", i); save_string (section, buffer, - panel->user_status_format [i], profile_name); + panel->user_status_format [i], profile); } g_snprintf (buffer, sizeof (buffer), "%d", panel->user_mini_status); save_string (section, "user_mini_status", buffer, - profile_name); + profile); + + g_free (profile); } void @@ -290,13 +294,17 @@ panel_save_type (char *section, int type) { int i; + char *profile; + + profile = concat_dir_and_file (home_dir, PROFILE_NAME); for (i = 0; panel_types [i].opt_name; i++) if (panel_types [i].opt_type == type){ save_string (section, "display", panel_types [i].opt_name, - profile_name); + profile); break; } + g_free(profile); } void @@ -347,7 +355,7 @@ #ifdef HAVE_CHARSET save_string( "Misc", "display_codepage", - get_codepage_id( display_codepage ), profile_name ); + get_codepage_id( display_codepage ), profile ); #endif /* HAVE_CHARSET */ g_free (profile); @@ -476,7 +484,7 @@ void load_setup (void) { - char *profile; + char *profile, *profile_writable; int i; profile = setup_init (); @@ -536,8 +544,10 @@ /* Load the directory history */ /* directory_history_load (); */ /* Remove the temporal entries */ - profile_clean_section ("Temporal:New Left Panel", profile_name); - profile_clean_section ("Temporal:New Right Panel", profile_name); + profile_writable = concat_dir_and_file (home_dir, PROFILE_NAME); + profile_clean_section ("Temporal:New Left Panel", profile_writable); + profile_clean_section ("Temporal:New Right Panel", profile_writable); + g_free (profile_writable); #if defined(USE_VFS) && defined (USE_NETCODE) ftpfs_init_passwd (); #endif /* USE_VFS && USE_NETCODE */ From proski at gnu.org Fri Mar 21 07:15:52 2003 From: proski at gnu.org (Pavel Roskin) Date: Fri, 21 Mar 2003 02:15:52 -0500 (EST) Subject: Config file handling In-Reply-To: <20030320225558.GA3350@mentat.localdomain> References: <20030320225558.GA3350@mentat.localdomain> Message-ID: Hello! > Patch to write config to temporary file and then 'atomically' move it > to proper place. Thank you! > Moreover it is a fix for following nasty bug which happens when no > ~/.mc/ini is found: > > open("/usr/local/share/mc/mc.ini", > O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = -1 EACCES (Permission > denied) > > We should not try to write to public files, so profile_name should be > used only for reading... But dump_profile still wants to save file > (even unmodified), so we check and save only in home_dir. Not sure if it's the right fix. Sometimes there is more that one way to write home directory. For example. /home is a link to /usr/home by default on some versions of FreeBSD. More importantly, mc shouldn't even attempt to save anything to mc.ini. dump_profile() shouldn't be called for global files. I think the fix should be in some other place. I like the idea of using stat() on the config file. When "Auto Save Setup" is used, the changes made manually are lost. Maybe the modification time should be checked. -- Regards, Pavel Roskin From sav at bcs.zp.ua Fri Mar 21 16:06:37 2003 From: sav at bcs.zp.ua (Andrew V. Samoilov) Date: Fri, 21 Mar 2003 18:06:37 +0200 Subject: [PATCH]: Locale's abbreviated month & vfs In-Reply-To: <20030319191912.GA17400@mentat.localdomain> References: <3E3A4EFF.2080109@bcs.zp.ua> <3E534319.6060704@bcs.zp.ua> <3E789163.5050302@bcs.zp.ua> <20030319160009.GA4565@mentat.localdomain> <20030319191912.GA17400@mentat.localdomain> Message-ID: <3E7B388D.1090600@bcs.zp.ua> Adam Byrtek / alpha wrote: > On Wed, Mar 19, 2003 at 11:25:46AM -0500, Pavel Roskin wrote: > > 2) Andrew's patch has broken regexp reverse search... see the usage of > strreverse() Well, I restore regexp reverse search now. Thanks for report. > - Andrew, please could you fix this and examine/apply > (parts) of my patch? If something is unclear - tell me. There are too many unreleated changes. I will look it later. Sorry, I am too buzy at work before moving. -- Regards, Andrew V. Samoilov From ptsekov at gmx.net Fri Mar 21 19:31:40 2003 From: ptsekov at gmx.net (Pavel Tsekov) Date: Fri, 21 Mar 2003 20:31:40 +0100 (CET) Subject: MC + zsh: prompt problem Message-ID: Hello, I want to know your opinion on the following matter: http://www.cygwin.com/ml/cygwin/2003-03/msg00618.html Take a look at problem 2 - this is reproducable in both Cygwin and Linux console. To summerize how to reproduce: MC + subshell running subshell must be zsh PS1 must be set to: PS1='%n at %m%{'$'\e[1;36m%}%#%{'$'\e[m%} ' RPROMPT must be set to: RPROMPT='%{'$'\e[1;34m%}%~%{'$'\e[m%} %h:%i' Here is my (short) analysis of the problem: http://www.cygwin.com/ml/cygwin/2003-03/msg01501.html Are you aware of this problem ? Do you consider it worth fixing ? Thanks! :) From proski at gnu.org Fri Mar 21 20:02:38 2003 From: proski at gnu.org (Pavel Roskin) Date: Fri, 21 Mar 2003 15:02:38 -0500 (EST) Subject: MC + zsh: prompt problem In-Reply-To: References: Message-ID: Hello! > Here is my (short) analysis of the problem: > http://www.cygwin.com/ml/cygwin/2003-03/msg01501.html > > Are you aware of this problem ? Do you consider it worth fixing ? Yes, I'm aware of the problem. From TODO: Don't read prompt from the subshell, because it's unreliable. Interpret environment variable MC_PS1 (or PS1) in the same way as bash. -- Regards, Pavel Roskin From rgr at sdf.lonestar.org Fri Mar 21 21:31:52 2003 From: rgr at sdf.lonestar.org (Rob Ristroph) Date: 21 Mar 2003 15:31:52 -0600 Subject: MC is awesome Message-ID: <87bs04z9rr.fsf@rgristroph-austin.ath.cx> Hi ! First, I would like to say that my previous question about how to make the user menu come up on start-up is answered; it was indeed auto_menu=1. I had thought that it was, but just adding that line to an ini file left over from a previous version of MC didn't work for some reason, but changing the value in the ini file made when you install MC 4.6.0 did work. Also, I asked here a longer while ago about mcserv, and I said it wasn't working for me -- well, I'm using it now, and it is working; I am using the latest stuff from CVS. It is indeed working without the portmapper, if you use the -p option (all though it still prints a warning about RPC). As I am running it from a very limited floppy linux, it somehow couldn't authenticate passwords correctly, so I made do_auth() just always return 1. Many thanks for the help I received with these problems. I am using MC more and more for my own work. --Rob From ptsekov at gmx.net Fri Mar 21 21:24:31 2003 From: ptsekov at gmx.net (Pavel Tsekov) Date: Fri, 21 Mar 2003 22:24:31 +0100 (CET) Subject: MC + zsh: prompt problem In-Reply-To: Message-ID: On Fri, 21 Mar 2003, Pavel Roskin wrote: > > Here is my (short) analysis of the problem: > > http://www.cygwin.com/ml/cygwin/2003-03/msg01501.html > > > > Are you aware of this problem ? Do you consider it worth fixing ? > > Yes, I'm aware of the problem. From TODO: > > Don't read prompt from the subshell, because it's unreliable. Interpret > environment variable MC_PS1 (or PS1) in the same way as bash. Thanks, for the prompt response. Obviously, I took the hard way to find what is causing the problem :) Next time I'll be more careful in expecting the available resources. Is there any discussion on this list on how to implement this feature ? I might be interested in coding it. Btw looking through the TODO list I find the following line in the section "In the 4.7 branch": Dynamic loading for libX11, libgpm. I think libX11 should be removed. From proski at gnu.org Fri Mar 21 21:32:27 2003 From: proski at gnu.org (Pavel Roskin) Date: Fri, 21 Mar 2003 16:32:27 -0500 (EST) Subject: MC + zsh: prompt problem In-Reply-To: References: Message-ID: > Thanks, for the prompt response. Obviously, I took the hard way to find > what is causing the problem :) Next time I'll be more careful in expecting > the available resources. In fact, your work may still be useful. Even if the prompt is ignored, we should be careful to determine its end correctly. > Is there any discussion on this list on how to implement this feature ? I > might be interested in coding it. Remove load_prompt() and subshell_prompt variable. Rename read_subshell_prompt() to flush_subshell_prompt() and fix all dependencies. > Btw looking through the TODO list I find the following line in the section > "In the 4.7 branch": > > Dynamic loading for libX11, libgpm. > > I think libX11 should be removed. Done. Thank you! -- Regards, Pavel Roskin From alpha at student.uci.agh.edu.pl Fri Mar 21 22:06:03 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Fri, 21 Mar 2003 23:06:03 +0100 Subject: Config file handling In-Reply-To: References: <20030320225558.GA3350@mentat.localdomain> Message-ID: <20030321220603.GA1635@mentat.localdomain> On Fri, Mar 21, 2003 at 02:15:52AM -0500, Pavel Roskin wrote: > Not sure if it's the right fix. Sometimes there is more that one way to > write home directory. For example. /home is a link to /usr/home by > default on some versions of FreeBSD. I don't see the problem. There are only 2 possibilities. The profile in mc code is always descibed as concat_dir_and_file (home_dir, PROFILE_NAME) or concat_dir_and_file (mc_home, "mc.ini") it the first one doesn't exist. We have to block saving the latter, so we can filter it out, or accept only the first one, which is more safe (my patch implements it this way). I can't see in which place (sym)links are a problem... > More importantly, mc shouldn't even attempt to save anything to mc.ini. > dump_profile() shouldn't be called for global files. I think the fix > should be in some other place. Maybe. But AFAIK mc code doesn't know how to distinct global files from personal ones besides path checking. Regards Adam -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 From dmi_a at qnx.org.ru Sat Mar 22 17:04:40 2003 From: dmi_a at qnx.org.ru (Dmitry Alexeyev) Date: Sat, 22 Mar 2003 20:04:40 +0300 Subject: small bug in cons.handler.c Message-ID: <169119952.20030322200440@qnx.org.ru> Hello! There's a small bug in cons.handler.c in FreeBSD part. Here's fix: diff -dru mc.orig/src/cons.handler.c mc/src/cons.handler.c --- mc.orig/src/cons.handler.c Mon Mar 10 22:41:55 2003 +++ mc/src/cons.handler.c Sat Mar 22 19:53:11 2003 @@ -423,7 +423,7 @@ bc = (attr >> 4) & 0xF; printf ("\x1B[%d;%d;3%d;4%dm", (bc & 8) ? 5 : 25, (tc & 8) ? 1 : 22, - color_map[tc & 7], color_map[bc & 7] + color_map[tc & 7], color_map[bc & 7]); } #define cursor_to(x, y) do { \ WBR, Dmitry From sav at bcs.zp.ua Sat Mar 22 17:28:56 2003 From: sav at bcs.zp.ua (Andrew V. Samoilov) Date: Sat, 22 Mar 2003 19:28:56 +0200 Subject: small bug in cons.handler.c In-Reply-To: <169119952.20030322200440@qnx.org.ru> References: <169119952.20030322200440@qnx.org.ru> Message-ID: <3E7C9D58.9010405@bcs.zp.ua> Dmitry Alexeyev wrote: > Hello! > > There's a small bug in cons.handler.c in FreeBSD part. > > Here's fix: > diff -dru mc.orig/src/cons.handler.c mc/src/cons.handler.c > --- mc.orig/src/cons.handler.c Mon Mar 10 22:41:55 2003 > +++ mc/src/cons.handler.c Sat Mar 22 19:53:11 2003 > @@ -423,7 +423,7 @@ > bc = (attr >> 4) & 0xF; > > printf ("\x1B[%d;%d;3%d;4%dm", (bc & 8) ? 5 : 25, (tc & 8) ? 1 : 22, > - color_map[tc & 7], color_map[bc & 7] > + color_map[tc & 7], color_map[bc & 7]); > } Applied, thanks! -- Regards, Andrew V. Samoilov From dmi_a at qnx.org.ru Sun Mar 23 15:50:45 2003 From: dmi_a at qnx.org.ru (Dmitry Alexeyev) Date: Sun, 23 Mar 2003 18:50:45 +0300 Subject: SQL syntax update for PostgreSQL Message-ID: <42508811.20030323185045@qnx.org.ru> Hello! Attached is updated sql.syntax file with some PostgreSQL keywords, which pg_dump produces. Syntax file also changed slightly to support QNX makefile includes with ".mk" extension. I get very annoyed with lots of red messages with errors, especially ones complaining about permissions and chown/chmod errors for non-native partitions like FAT/etc. Here's a hack which I use to add "Skip aLl" button to file_error dialog when copying files. Maybe someone more expierenced then me could apply similar feature to MC? WBR, Dmitry diff -ur mc.orig/src/cmd.c mc/src/cmd.c --- mc.orig/src/cmd.c Fri Feb 21 00:40:46 2003 +++ mc/src/cmd.c Sun Mar 23 18:34:46 2003 @@ -355,7 +355,10 @@ void copy_cmd (void) { + extern int skipall; + save_cwds_stat (); + skipall = 0; if (panel_operate (cpanel, OP_COPY, NULL, TRUE)) { update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); diff -ur mc.orig/src/file.c mc/src/file.c --- mc.orig/src/file.c Thu Dec 26 22:04:10 2002 +++ mc/src/file.c Sun Mar 23 18:33:47 2003 @@ -97,6 +97,8 @@ int verbose = 1; +int skipall = 0; + /* * Whether the Midnight Commander tries to provide more * information about copy/move sizes and bytes transfered @@ -2172,22 +2174,34 @@ { int result; char *msg; + static char *last_error= NULL; + if (skipall && (error == last_error)) { + return FILE_SKIP; + } + else { + skipall = 0; + error == NULL; + } msg = mode == Foreground ? MSG_ERROR : _(" Background process error "); result = - query_dialog (msg, error, D_ERROR, 3, _("&Skip"), _("&Retry"), + query_dialog (msg, error, D_ERROR, 4, _("&Skip"), _("Skip a&Ll"),_("&Retry"), _("&Abort")); switch (result) { case 0: do_refresh (); return FILE_SKIP; - case 1: + skipall = 1; + last_error = error; + do_refresh (); + return FILE_SKIP; + case 2: do_refresh (); return FILE_RETRY; - case 2: + case 3: default: return FILE_ABORT; } -------------- next part -------------- A non-text attachment was scrubbed... Name: syntax.diff Type: application/octet-stream Size: 3692 bytes Desc: not available URL: From alpha at student.uci.agh.edu.pl Sun Mar 23 15:55:17 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Sun, 23 Mar 2003 16:55:17 +0100 Subject: SQL syntax update for PostgreSQL In-Reply-To: <42508811.20030323185045@qnx.org.ru> References: <42508811.20030323185045@qnx.org.ru> Message-ID: <20030323155517.GA9222@mentat.localdomain> On Sun, Mar 23, 2003 at 06:50:45PM +0300, Dmitry Alexeyev wrote: > I get very annoyed with lots of red messages with errors, especially > ones complaining about permissions and chown/chmod errors for > non-native partitions like FAT/etc. So uncheck the 'preserve Attributes' chech-box when copying, it will do the job. Regards Adam -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 From dmi_a at qnx.org.ru Mon Mar 24 14:42:43 2003 From: dmi_a at qnx.org.ru (Dmitry Alexeyev) Date: Mon, 24 Mar 2003 17:42:43 +0300 Subject: QNX 6.x filesystem information (information panel) Message-ID: <137235338.20030324174243@qnx.org.ru> Hello Attached is patch allowing obtaining file system information for MC info panel under QNX 6.x. WBR, Dmitry -------------- next part -------------- A non-text attachment was scrubbed... Name: qnx_info.diff Type: application/octet-stream Size: 6038 bytes Desc: not available URL: From sav at bcs.zp.ua Mon Mar 24 18:57:29 2003 From: sav at bcs.zp.ua (Andrew V. Samoilov) Date: Mon, 24 Mar 2003 20:57:29 +0200 Subject: [PATCH]: Locale's abbreviated month & vfs In-Reply-To: <20030319191912.GA17400@mentat.localdomain> References: <3E3A4EFF.2080109@bcs.zp.ua> <3E534319.6060704@bcs.zp.ua> <3E789163.5050302@bcs.zp.ua> <20030319160009.GA4565@mentat.localdomain> <20030319191912.GA17400@mentat.localdomain> Message-ID: <3E7F5519.6040206@bcs.zp.ua> Adam Byrtek / alpha wrote: > On Wed, Mar 19, 2003 at 11:25:46AM -0500, Pavel Roskin wrote: > >>If I apply your patch to the CVS version (this requires some manual >>intervention), > > But the proper '^' and '$' and 'prev' handling in reverse regexp search > still applies, see my patch. > . . . > 3) Try to create file: > --cut-- > 000 > aaa > --cut-- > WITHOUT final newline. Now try to search 'aaa' - not found. > Fixed in my patch (attached). Commited. Thanks! -- Regards, Andrew V. Samoilov From alpha at student.uci.agh.edu.pl Mon Mar 24 23:12:46 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Tue, 25 Mar 2003 00:12:46 +0100 Subject: mcedit file locking In-Reply-To: References: <20030324221257.GA1657@mentat.localdomain> Message-ID: <20030324231246.GA2167@mentat.localdomain> On Mon, Mar 24, 2003 at 06:02:16PM -0500, Pavel Roskin wrote: >> What do you think is the best way to implement file locking in mc >> editor? I want to work on this issue, but first I want to consult you, >> because you know many of the portability secrets :) > Why do you think we need file locking in the editor? It's not an often > requested feature. What kind of scenarios do you want to prevent? Do we > need write locks or read locks? I just wanted to start work on the following TODO item: "Lock files in the editor to prevent opening them more than once. Warn user when opening locked file." Did I misunderstand something? Regards Adam -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 From proski at gnu.org Tue Mar 25 06:59:12 2003 From: proski at gnu.org (Pavel Roskin) Date: Tue, 25 Mar 2003 01:59:12 -0500 (EST) Subject: mcedit file locking In-Reply-To: <20030324231246.GA2167@mentat.localdomain> References: <20030324221257.GA1657@mentat.localdomain> <20030324231246.GA2167@mentat.localdomain> Message-ID: Hello, Adam! > > Why do you think we need file locking in the editor? It's not an often > > requested feature. What kind of scenarios do you want to prevent? Do we > > need write locks or read locks? This question still needs to be answered. > I just wanted to start work on the following TODO item: > > "Lock files in the editor to prevent opening them more than once. > Warn user when opening locked file." > > Did I misunderstand something? No, it was me :-) OK, we have several possibilities: 1) mc-specific, user-specific file locks using O_EXCL. Lock files should probably go to /tmp/mc-$USER. Pro: Other software is not affected. Fully portable (even RCS uses it). Works in non-writable directories. Con: Stale locks may be left under /tmp/mc-$USER is mc is killed. Locking between users may be desired in some cases. 2) mc-specific, non-user-specific file locks. Created in the same directory as the file being edited. Pro: other software is not affected. Fully portable. Con: Stale locks may be left everywhere, copied together with directories. Doesn't work in non-writable directories. 3) System-wide locks using fcntl() or (if not supported) flock(). Pro: No stale locks. Works in non-writable directories. Locking between users. Con: not 100% portable, but should work on most modern systems. Locks affect other software. We can also use combinations of the above, e.g. fcntl() on file locks. If the fcntl() lock can be obtained on an existing file lock, it's assumed to be a stale lock. To make a choice, we need to answer a few questions. Should the lock be held for the whole time when the file is being edited or just for the time when it's being saved? If we take the later approach, the user will have a chance to save the file under another name in the editor that is closed last. Do we want the locks to affect other software? I just checked, support for fcntl() in vim 6.1 is planned, but it's not there yet. cooledit 3.17.6 doesn't seem to use fcntl() for locking. Most importantly, I'm not sure if we want other software (like procmail) to wait for the mc lock, even if I'm reading the mail in the editor. Do we want locks to be shared between users? Of course the locks should not be mandatory, but I'm not sure if we want e.g. root to be affected by users' locks at all. With all that complexity I feel that we probably should postpone the issue or find a popular editor that used locking already and implement locking in a compatible way. -- Regards, Pavel Roskin From ossi at kde.org Tue Mar 25 15:10:03 2003 From: ossi at kde.org (Oswald Buddenhagen) Date: Tue, 25 Mar 2003 16:10:03 +0100 Subject: mcedit file locking In-Reply-To: References: <20030324221257.GA1657@mentat.localdomain> <20030324231246.GA2167@mentat.localdomain> Message-ID: <20030325151003.GC12063@ugly.local> On Tue, Mar 25, 2003 at 01:59:12AM -0500, Pavel Roskin wrote: > 3) System-wide locks using fcntl() or (if not supported) flock(). > i'd go with that one. > Pro: No stale locks. Works in non-writable directories. Locking between > users. > and it's simple (except the #ifdef for fcntl vs. flock). the other variants get hairy once you try to get around the stale lock problem. > Con: not 100% portable, but should work on most modern systems. > and it's halfways broken over nfs - at least one of the variants. check out the man page. > Locks affect other software. > that's a) not exactly a downside, if you ask me and b) usually not true, as the locks are only advisory, not mandatory, so "the other" application has to use locking itself to notice what we do. one thing to note is, that cooledit would need to keep the file open all the time. dunno if it does currently. > Should the lock be held for the whole time when the file is being edited > yes. that was my point in the initial request. i want a warning like "this file is already being edited. still want to open it? (No/yes)". > or just for the time when it's being saved? > that helps against corrupting the file if two instances try to write out at once, but is otherwise useless. > Do we want the locks to affect other software? > Do we want locks to be shared between users? > it would not hurt. i don't care much, personally. > With all that complexity I feel that we probably should postpone the issue > or find a popular editor that used locking already and implement locking > in a compatible way. > hmm, and what if multiple popular editors use different approaches? :} greetings -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Chaos, panic, and disorder - my work here is done. From sav at bcs.zp.ua Wed Mar 26 10:30:29 2003 From: sav at bcs.zp.ua (Andrew V. Samoilov) Date: Wed, 26 Mar 2003 12:30:29 +0200 Subject: Data corruption on file copying/moving fixed Message-ID: <3E818145.90906@bcs.zp.ua> Hello! There was a data corruption possibility in the file.c:copy_file_file() for a years. If mc_write() fails to write n_read bytes at once for some reason then n_read is fixed, but buf is not, so there are some pieces from beginning of buf instead of trailing part. Possible scenario: copy/move file to some partition without enough space, remove some files to provide enough space and press "Retry". Path commited. -- Regards, Andrew V. Samoilov -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: file.c.patch URL: From ptsekov at gmx.net Wed Mar 26 10:31:05 2003 From: ptsekov at gmx.net (Pavel Tsekov) Date: Wed, 26 Mar 2003 11:31:05 +0100 (CET) Subject: mcedit file locking In-Reply-To: <20030325151003.GC12063@ugly.local> Message-ID: On Tue, 25 Mar 2003, Oswald Buddenhagen wrote: > On Tue, Mar 25, 2003 at 01:59:12AM -0500, Pavel Roskin wrote: > > 3) System-wide locks using fcntl() or (if not supported) flock(). > > > i'd go with that one. > > > Pro: No stale locks. Works in non-writable directories. Locking between > > users. > > > and it's simple (except the #ifdef for fcntl vs. flock). the other > variants get hairy once you try to get around the stale lock problem. > > > Con: not 100% portable, but should work on most modern systems. > > > and it's halfways broken over nfs - at least one of the variants. check > out the man page. > > > Locks affect other software. > > > that's a) not exactly a downside, if you ask me and b) usually not true, > as the locks are only advisory, not mandatory, so "the other" > application has to use locking itself to notice what we do. Just for the record - Cygwin currently supports only mandatory file locks. From proski at gnu.org Wed Mar 26 22:01:31 2003 From: proski at gnu.org (Pavel Roskin) Date: Wed, 26 Mar 2003 17:01:31 -0500 (EST) Subject: mcedit file locking In-Reply-To: References: Message-ID: > > that's a) not exactly a downside, if you ask me and b) usually not true, > > as the locks are only advisory, not mandatory, so "the other" > > application has to use locking itself to notice what we do. OK, it seems that write lock using fcntl for the period when the file is being edited would be the best solution. > Just for the record - Cygwin currently supports only mandatory file locks. That's unfortunate. What kind of lock is that - flock, lockf or fcntl? If fcntl is supported, would it work always, or only if mandatory locking is requested in some special way? But even in the worst case, when fcntl is supported and creates mandatory locks automatically, it's trivial for the user to work around. To open the file, write access is not required. To save the file, another filename can be selected. -- Regards, Pavel Roskin From alpha at student.uci.agh.edu.pl Sun Mar 30 19:23:16 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Sun, 30 Mar 2003 21:23:16 +0200 Subject: mcedit file locking In-Reply-To: References: Message-ID: <20030330192316.GA5745@mentat.localdomain> On Wed, Mar 26, 2003 at 05:01:31PM -0500, Pavel Roskin wrote: > OK, it seems that write lock using fcntl for the period when the file is > being edited would be the best solution. Tried to do this today, but looks like it would be quite hard to achieve. It's because mc opens and closes the file multiple times during edit (twice in fast-load mode, more often in buffer mode), and lockf (fcntl lock) is destroyed on every close (even if more desciptors on this file are open). I've found quite nice approach in JED editor sources (it is called 'Emacs locking' there, so maybe it is more universal): /* The basic idea here is quite simple. Whenever a buffer is attached to * a file, and that buffer is modified, then attempt to lock the * file. Moreover, before writing to a file for any reason, lock the * file. The lock is really a protocol respected and not a real lock. * The protocol is this: If in the directory of the file is a * symbolic link with name ".#FILE", the FILE is considered to be locked * by the process specified by the link. * * Here are the scenerios requiring a lock: * * 1. When a buffer attached to a file becomes modified. * 2. When appending or writing to a file. * * Suppose that a buffer has not been modified but one appends a * region of the buffer to some file. Then while that file is being * written, it should be locked and then released when finished. * However, suppose another buffer has that file locked. Then in * order to write to it, either the lock must be stolen or ignored. * In either of these cases, the user is responsible to what happens * to the text in the other buffer. In fact, if the user elects to * steal the lock from the other buffer, then that lock will be * deleted after the file has been modfied. Of course these same comments * apply if another process owns the lock. * * Now consider the case when a buffer is modified and has the file locked. * When the buffer is saved, the file will already be locked and there is no * need to lock it again. */ Regards Adam -- _.|._ |_ _. : Adam Byrtek /alpha/ (_|||_)| |(_| : email alpha@(irc.pl|debian.org) | : jabber alpha.pl(at)jabber.org, pgp 0xB25952C0 From proski at gnu.org Mon Mar 31 16:13:05 2003 From: proski at gnu.org (Pavel Roskin) Date: Mon, 31 Mar 2003 11:13:05 -0500 (EST) Subject: mcedit file locking In-Reply-To: <20030330192316.GA5745@mentat.localdomain> References: <20030330192316.GA5745@mentat.localdomain> Message-ID: Hello! > I've found quite nice approach in JED editor sources (it is called > 'Emacs locking' there, so maybe it is more universal): I really appreciate that you looked what other editors do. I think it's a good idea to respect an established protocol. There are some issues with creating files in the same directory as the file (i.e. there will be stale locks is mc is killed, write access to the directory is required), but I believe that following a standard adopted by other editors is more important. > /* The basic idea here is quite simple. Whenever a buffer is attached > to * a file, and that buffer is modified, then attempt to lock the * > file. Moreover, before writing to a file for any reason, lock the * > file. The lock is really a protocol respected and not a real lock. Sounds very good. Some users open files in the editor just to view the file and take advantage of syntax highlighting. If the file has not been modified, the lock shouldn't be held. On the other hand, if the user uses "Save as", the file should be locked only for the time when it's being written. I think that's what mc should do. -- Regards, Pavel Roskin From alpha at student.uci.agh.edu.pl Mon Mar 31 16:25:42 2003 From: alpha at student.uci.agh.edu.pl (Adam Byrtek / alpha) Date: Mon, 31 Mar 2003 18:25:42 +0200 Subject: mcedit file locking In-Reply-To: References: <20030330192316.GA5745@mentat.localdomain> Message-ID: <20030331162542.GB2277@mentat.localdomain> On Mon, Mar 31, 2003 at 11:13:05AM -0500, Pavel Roskin wrote: > (i.e. there will be stale locks is mc is killed, No, the lock is connected with PID: .#testfile -> alpha at mentat.localdomain.2339 We can safely assume that the PID is unique. Moreover jed does not break when trying to edit locked file, it just politely asks user whether steal the lock or not. > write access to the directory is required), I guess we can safely assume that when one tries to modify file in some directory - he has write access to it. Of course it is not always true, but in most cases... > I think that's what mc should do. I'll try to implement this. Regards Adam -- _.|._ |_ _. : Adam Byrtek /alpha alpha at debian.org (_|||_)| |(_| : http://krakow.linux.org.pl/ pgp 0xB25952C0 | From proski at gnu.org Mon Mar 31 16:29:37 2003 From: proski at gnu.org (Pavel Roskin) Date: Mon, 31 Mar 2003 11:29:37 -0500 (EST) Subject: SQL syntax update for PostgreSQL In-Reply-To: <42508811.20030323185045@qnx.org.ru> References: <42508811.20030323185045@qnx.org.ru> Message-ID: On Sun, 23 Mar 2003, Dmitry Alexeyev wrote: > Attached is updated sql.syntax file with some PostgreSQL keywords, > which pg_dump produces. Syntax file also changed slightly to support > QNX makefile includes with ".mk" extension. Applied both. Thank you! As for "Skip all", I need more time to work on it. I'd prefer to make skip_all part of FileOpContext. -- Regards, Pavel Roskin