Re: Problems with mintty jump list

2018-05-13 Thread Michael Schaap

On 13 May 18 22:04, Thomas Wolff wrote:

Thanks, maybe jumplist-started instances should implicitly inherit AppID.
Probably, yes.  In fact, not just jumplist-started instances, but any 
instance (also the default one) opened from the task bar icon.


Are you sure --store-taskbar-properties is needed to get the jumplist 
stable? This would have additional implications, to be checked.
No, I'm not sure at all.  I just added this because the man page told me 
for AppLaunchCmd: "This is only effective if combined with an AppName 
option and the command-line option --store-taskbar-properties to make it 
persistent.".  And I *did* have to add an AppLaunchCmd to the .minttyrc, 
otherwise the default task bar icon action would open a window without 
the AppID, but also without a login shell.


- Michael

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Problems with mintty jump list

2018-05-13 Thread Michael Schaap

On 13 May 18 11:45, Thomas Wolff wrote:

Am 12.05.2018 um 19:15 schrieb Brian Inglis:

On 2018-05-12 06:28, Michael Schaap wrote:
I'm experimenting with the new mintty jump list feature, but I'm 
having trouble

getting things working.
I've added the following to my .minttyrc:
 TaskCommands=default:-p 100,100;myserver:-p bottom -p right -o
BackgroundColour=255,250,230 -e /usr/bin/ssh -C -Y -o 
ServerAliveInterval=60

myserver.example.org
I then started mintty with:
 mintty -o AppID=minttytest
The MinTTY window appeared, with a new icon on the task bar. I 
pinned that

icon, and closed this new window.
A right click on the taskbar icon now indeed shows two jump list 
entries:

default and myserver.
But when I click on "default", a MinTTY window does open and runs my 
shell
(which is zsh), but the environment is different than normal: for 
instance,
/usr/bin is not in the $PATH and most commands are therefore not 
found.  (It's

not running as a login shell?)
Yes, as you most likely want to run a login shell, you should add a 
bare '-' to the arguments list, like


TaskCommands=default:-p 100,100 -;...


Indeed, that helped.
I was a bit confused about why I needed this here, and not when running 
MinTTY "normally", but then I saw that the default shortcut also had 
this argument.




When I close all MinTTY windows, the icon remains on the taskbar (as 
it should),

but the jump list entries are gone.
What am I doing wrong?
Nothing. I have no idea why this fails, in my testing it worked. On 
the other hand, the whole jump list showed up on only 2 of 3 test 
systems and failed on one. Mozilla applications (Thunderbird, Firefox) 
manage to establish a task list on all of these systems, but their 
jumplist code looks much more complex. If someone finds out by what 
cursed Microsoft magic this is further affected, I'd consider an 
enhancement...


I got things working.  :-)
I noted that the entries disappeared from the list as soon as I clicked 
on one of them.  I eventually tried adding "-o AppID=..." to the 
arguments in TaskCommands, and that helped: the entries remained.
The only remaining problem was that the entries still disappeared when 
clicking on "Terminal" (or simply clicking on the pinned taskbar item 
with no terminal windows open), so I added AppName and AppLaunchCmd 
options to .minttyrc, and that did the trick.


So, in the end, I added these lines to ~/.minttyrc:

    TaskCommands=default:-o AppID=mymintty -p 1170,605 -;myserver:-o 
AppID=mymintty -p bottom -p right -o BackgroundColour=255,250,230 -e 
/usr/bin/ssh -C -Y -o ServerAliveInterval=60 myserver.example.org

    AppName=Terminal
    AppLaunchCmd=C:\cygwin64\bin\mintty.exe -o AppID=mymintty -

then started MinTTY with this shortcut:

    C:\cygwin64\bin\mintty.exe -o AppID=mymintty 
--store-taskbar-properties -


and pinned it to the taskbar.

Thanks for your help (and for providing the awesome MinTTY in general!),

 – Michael

PS: PuTTY also supports the jump list, both "Recent Sessions" and a 
couple of fixed "Tasks", this appears to work fine.  I'm sure you're 
more familiar with the PuTTY source code than that of Mozilla apps, so 
perhaps it helps to take a look at how PuTTY's doing this?


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Problems with mintty jump list

2018-05-12 Thread Michael Schaap
I'm experimenting with the new mintty jump list feature, but I'm having 
trouble getting things working.


I've added the following to my .minttyrc:

    TaskCommands=default:-p 100,100;myserver:-p bottom -p right -o 
BackgroundColour=255,250,230 -e /usr/bin/ssh -C -Y -o 
ServerAliveInterval=60 myserver.example.org


I then started mintty with:

    mintty -o AppID=minttytest

The MinTTY window appeared, with a new icon on the task bar.  I pinned 
that icon, and closed this new window.
A right click on the taskbar icon now indeed shows two jump list 
entries: default and myserver.


But when I click on "default", a MinTTY window does open and runs my 
shell (which is zsh), but the environment is different than normal: for 
instance, /usr/bin is not in the $PATH and most commands are therefore 
not found.  (It's not running as a login shell?)


When I close all MinTTY windows, the icon remains on the taskbar (as it 
should), but the jump list entries are gone.


What am I doing wrong?

Thanks,

 - Michael

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Request for update: zsh

2018-04-25 Thread Michael Schaap

On 25-Apr-18 20:20, Peter A. Castro wrote:

The current version of zsh is 5.5.1, while Cywin is stuck on 5.3.
If the maintainer of zsh is still around, could (s)he perhaps update 
it to the latest version?
Yes, I was waiting for the inevitable update to the base 5.5 release 
(5.5.1 as you noted).  I'll build it in a few days.

Thanks, Peter; much appreciated.

 - Michael

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Request for update: zsh

2018-04-25 Thread Michael Schaap

The current version of zsh is 5.5.1, while Cywin is stuck on 5.3.
If the maintainer of zsh is still around, could (s)he perhaps update it 
to the latest version?


Thanks in advance,

 - Michael

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: WinCompose vs. Cygwin/X

2017-06-24 Thread Michael Schaap (lists)
On 16 January 2017 at 15:49, Jon Turney  wrote:
> On 11/01/2017 22:16, Michael Schaap wrote:
>>
>> On 11-Jan-17 9:51, Csaba Raduly wrote:
>>>
>>> Hi Michael,
>>>
>>> On Tue, Jan 10, 2017 at 2:28 PM, Michael Schaap  wrote:
>>>>
>>>> I recently discovered WinCompose
>>>> <https://github.com/samhocevar/wincompose>,
>>>> a Windows port of XCompose, and fell in love with it.
>>>>
>>>> Unfortunately, it doesn't play nice with Cygwin/X, it seems.
>>>
(snip)
> In the short term, some sort of feature in WinCompose where it turns itself
> off for specified windows might be easier.

Just a quick note that the latest release of WinCompose (0,7,7) does
exactly that: it turns itself off for windows owned by XWin.exe.
So now WinCompose and XCompose do play nice together.

 - Michael

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: WinCompose vs. Cygwin/X

2017-01-11 Thread Michael Schaap

On 11-Jan-17 9:51, Csaba Raduly wrote:

Hi Michael,

On Tue, Jan 10, 2017 at 2:28 PM, Michael Schaap  wrote:

I recently discovered WinCompose <https://github.com/samhocevar/wincompose>,
a Windows port of XCompose, and fell in love with it.

Unfortunately, it doesn't play nice with Cygwin/X, it seems.

(snip various scenarios and potential solutions)

Have you tried opening an issue in the WinCompose issue tracker? They
might be able to code a workaround.

Somebody beat me to it.  Unfortunately with not much result.
https://github.com/samhocevar/wincompose/issues/132

 - Michael

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



WinCompose vs. Cygwin/X

2017-01-10 Thread Michael Schaap
I recently discovered WinCompose 
, a Windows port of XCompose, 
and fell in love with it.


Unfortunately, it doesn't play nice with Cygwin/X, it seems. WinCompose 
eats the key sequences, and neither the original keys nor the intended 
character(s) ever reach X.
Of course, Cygwin/X has XCompose.  But because of the above, you can't 
use the same compose key in WinCompose and XCompose.  So I keep using 
the wrong compose key.  (gvim is the worst, since I use both the Windows 
and X versions.)


Does any of you have experience with this and know a better way to deal 
with this?
Potential solutions might be to tell Cygwin/X to use Windows keyboard 
handling instead of its own keyboard drivers (but I don't think that's 
possible), or to tell WinCompose to disable itself in windows owned by 
the X server (and that doesn't seem possible either).
(I know mintty has its own compose functionality now, but that doesn't 
help.  I spend a lot of my time in terminal windows, but not all. :)


Thanks in advance,

– Michael

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Updated: vim-7.3.353-1

2011-12-04 Thread Michael Schaap
Hi,

With this new version, every time I run gvim, I get the following
(unhelpful) error message:

    $ gvim -u NONE

    (gvim:3736): Pango-WARNING **: No such file or directory

This never happened with the previous version of gvim.
I do have libpango1.0 installed, and also installed libpango-1.0, but
that doesn't make a difference.
(gvim appears to run just fine, but the error message is rather annoying.)

If I read the output of strace correctly, it tries to open
/usr/lib/pango/1.6.0/modules/pango-basic-fc.dll, which doesn't exist.
According to the Cygwin package search, no such file is contained in
any Cygwin package.

Any ideas?

Output of "strace gvim -u NONE > strace.out 2>&1":
http://mscha.org/tmp/strace.out

Output of "cygcheck -s -v -r > cygcheck.out":
http://mscha.org/tmp/cygcheck.out

Thanks,

 - Michael

On Thu, Nov 24, 2011 at 02:42, Yaakov (Cygwin/X)
 wrote:
>
> The following packages have been updated for the Cygwin distribution:
>
> *** vim-7.3.353-1
> *** vim-common-7.3.353-1
> *** gvim-7.3.353-1
> *** xxd-7.3.353-1
>
> Vim is an advanced text editor that seeks to provide the power of the
> de-facto Unix editor 'Vi', with a more complete feature set and a choice
> of terminal and GTK+ interfaces.
>
> This release includes the latest upstream patchset as of today.  The
> packaging was changed slightly now that both interfaces are being built
> from a single source package; the upgrade should be handled
> automatically for existing users.
>
>
> Yaakov
> Cygwin/X
>
>

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: New: rakudo-star-201007-1, Updated: rakudo-201007_47-1 (aka perl6)

2010-09-06 Thread Michael Schaap

 On 6-Sep-2010 13:04, Reini Urban wrote:

2010/9/1 Michael Schaap:

However, with rakudo-star 201007-1, rakudo_47-1 and parrot 2.6.0-1
installed:

$ perl6 -e 'say "hello";'
hello

$ perl6 -e 'sub hello() { say "hello"; }'
===SORRY!===
No such file or directory

Works for me, but it looks like a missing packaging dependency in the hint

$ perl6 -e 'sub hello() { say "hello"; }'

$ perl6 -e 'sub hello() { say "hello"; }; hello'
hello

Can you try
$ ldd /usr/bin/perl6.exe
 ntdll.dll =>  /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x76e8)
 kernel32.dll =>  /cygdrive/c/Windows/system32/kernel32.dll (0x754f)
 KERNELBASE.dll =>  /cygdrive/c/Windows/system32/KERNELBASE.dll
(0x751f)
 cygwin1.dll =>  /usr/bin/cygwin1.dll (0x6100)
 ADVAPI32.DLL =>  /cygdrive/c/Windows/system32/ADVAPI32.DLL (0x7595)
 msvcrt.dll =>  /cygdrive/c/Windows/system32/msvcrt.dll (0x75d5)
 sechost.dll =>  /cygdrive/c/Windows/SYSTEM32/sechost.dll (0x75e9)
 RPCRT4.dll =>  /cygdrive/c/Windows/system32/RPCRT4.dll (0x756a)
 cygparrot2_6_0.dll =>  /usr/bin/cygparrot2_6_0.dll (0x6334)
 cyggcc_s-1.dll =>  /usr/bin/cyggcc_s-1.dll (0x6bf4)
 cygssp-0.dll =>  /usr/bin/cygssp-0.dll (0x6728)
 cyggmp-3.dll =>  /usr/bin/cyggmp-3.dll (0x6d3a)
 cygintl-8.dll =>  /usr/bin/cygintl-8.dll (0x6a35)
 cygiconv-2.dll =>  /usr/bin/cygiconv-2.dll (0x6c33)
 cygreadline7.dll =>  /usr/bin/cygreadline7.dll (0x6887)
 cygncurses-9.dll =>  /usr/bin/cygncurses-9.dll (0x68b6)
 USER32.dll =>  /cygdrive/c/Windows/system32/USER32.dll (0x7534)
 GDI32.dll =>  /cygdrive/c/Windows/system32/GDI32.dll (0x75e1)
 LPK.dll =>  /cygdrive/c/Windows/system32/LPK.dll (0x75e0)
 USP10.dll =>  /cygdrive/c/Windows/system32/USP10.dll (0x75eb)
 cygicuuc38.dll =>  /usr/bin/cygicuuc38.dll (0x6b53)
 cygstdc++-6.dll =>  /usr/bin/cygstdc++-6.dll (0x6c48)
 cygicudata38.dll =>  /usr/bin/cygicudata38.dll (0x19a)
 SspiCli.dll =>  /cygdrive/c/Windows/system32/SspiCli.dll (0x74ee)

Looks the same here. (That was to be expected, since perl6 -e 'say 
"hello";' works fine.)

and report the missing dll.
Or if it's dynamic maybe install parrot-devel.
Installing parrot-devel (and the following (direct and indirect) 
dependencies) worked indeed!


gmp (4.3.1-3)
GMP is a free library for arbitrary precision arithmetic
Required by: libgmp-devel

icu (3.8-7)
IBM Internationalization Components for Unicode (apps and docs)
Required by: libicu-devel

libgdbm-devel (1.8.3-20)
GNU dbm database routines (development)
Required by: parrot-devel

libgmp-devel (4.3.1-3)
Development library for GMP arbitrary precision arithmetic library
Required by: parrot-devel

libicu-devel (3.8-7)
IBM Internationalization Components for Unicode (development)
Required by: parrot-devel

libncurses-devel (5.7-18)
(devel) libraries for terminal handling
Required by: parrot-devel, readline

libpcre-devel (8.02-1)
Perl-Compatible Regular Expressions library (C development)
Required by: pcre-devel

pcre-devel (7.9-1)
Obsolete package
Required by: parrot-devel

readline (6.0.3-2)
GNU readline and history libraries
Required by: parrot-devel



However I didn't saw any dynext missing.

$ strace perl6 -e 'sub hello() { say "hello"; }; hello' 2>&1 |grep .dll \
>  /usr/src/perl/parrot/perl6.deps.strace

# dynexts
$ grep "src /usr/lib/parrot/2.6.0/dynext/"
/usr/src/perl/parrot/perl6.deps.strace
# vs
$ zgrep dynext /etc/setup/rakudo.lst.gz
# and
$ zgrep dynext /etc/setup/parrot.lst.gz

# and the rest
$ grep .dll /usr/src/perl/parrot/perl6.deps.strace|grep -v dynext

Dynamically loaded:
/usr/bin/cygiconv-2.dll
/usr/bin/cygintl-8.dll
It doesn't appear to be a .dll, I didn't see anything suspicious. (The 
dynext stuff was certainly complete.)


I did compare the before-and-after strace output, and the first 
significant difference is when it tries to load 
/usr/lib/parrot/2.6.0/include/except_types.pasm, which is indeed present 
in parrot-devel.


– Michael

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: New: rakudo-star-201007-1, Updated: rakudo-201007_47-1 (aka perl6)

2010-09-01 Thread Michael Schaap

 Reini,

Thanks for packaging this!

However, with rakudo-star 201007-1, rakudo_47-1 and parrot 2.6.0-1 
installed:


$ perl6 -e 'say "hello";'
hello

$ perl6 -e 'sub hello() { say "hello"; }'
===SORRY!===
No such file or directory

– Michael



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: PATCH: cygutils/cygstart - wait till task terminates (i.e. run in foreground)

2008-08-11 Thread Michael Schaap

On 11-Aug-2008 18:26, Barry Kelly wrote:

I find cygstart useful generally, but ShellExecute/Ex has more options
than cygstart exposes.

In particular, I'd like to be able to write a script that starts an
action and waits for it to complete, and then perform another action.
This means that I don't want cygstart to return until the process it has
started exits (modulo MDI etc).

ShellExecuteEx can return the process handle, which can then be waited
on.

I've written a patch against cygutils-1.3.2-1 that implements this
functionality via a new "-w | --wait" argument.

I've attached the patch for review. Is there any other place I should be
posting to submit this patch?

  

This is the right place, as far as I'm concerned.

This seems useful and the patch looks good at first glance, but I'll 
have a better look at it, probably this weekend.


Thanks,

– Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: [ANNOUNCEMENT] Updated: parrot-0.6.4-2 with parrot-perl6 and parrot-languages

2008-07-27 Thread Michael Schaap

On 27-Jul-2008 17:28, Reini Urban wrote:

The parrot packages with libparrot0 and libparrot-devel,
plus parrot-perl6 and parrot-languages are updated to 0.6.4-2 for
the Cygwin distribution.

This release fixes the serious issue with running /usr/bin/perl6 and
the other languages /usr/bin/parrot-* without building from source.
See http://cygwin.com/ml/cygwin/2008-07/msg00440.html


Thanks, that's better!

$ perl6 -e 'say "Hello, World!"'
Hello, World!

– Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: [ANNOUNCEMENT] Updated: parrot-0.6.4-1 with parrot-perl6 and parrot-languages

2008-07-20 Thread Michael Schaap

On 20-Jul-2008 17:36, Michael Schaap wrote:

On 19-Jul-2008 21:42, Reini Urban wrote:

Michael Schaap schrieb:

Is perl6 supposed to (somewhat) work, yet?
I get:
% perl6 -e 'say "Hello, World!"'
"load_bytecode" couldn't find file 'P6object.pbc'
current instr.: 'onload' pc 0 (src/gen_builtins.pir:28)
called from Sub 'parrot;Perl6::Compiler;main' pc -1 ((unknown file):-1)

P6object does exist, in /usr/lib/parrot/library.
If I cd to this directory first, I get:
% cd /usr/lib/parrot/library; perl6 -e 'say "Hello, World!"'
Null PMC access in get_string()
current instr.: 'parrot;P6metaclass;add_parent' pc 119 
(runtime/parrot/library/P6object.pir:137)
called from Sub 'parrot;P6metaclass;add_parent' pc 241 
(runtime/parrot/library/P6object.pir:215)
called from Sub 'parrot;P6metaclass;register' pc 411 
(runtime/parrot/library/P6object.pir:295)

called from Sub 'parrot;Str;onload' pc 965 (src/gen_builtins.pir:619)
called from Sub 'parrot;Perl6::Compiler;main' pc -1 ((unknown file):-1)


Interesting.
Cannot reproduce this on both of my machines, with fresh installations.

I'd like to blame Windows Longhorn/Vista (not yet supported!) Ver 6.0 
Build 6001 Service Pack 1

The cpu 'x86 Family 6 Model 23 Stepping 6, GenuineIntel'
looks fine to me.

It's not Vista.
I just installed Cygwin (base packages plus the three Parrot packages) 
on a Virtual PC image¹, and it behaves identically.


Do you perhaps have any environment variables set that I don't?  I 
don't have any Perl or Parrot variables.



Hmm...  I see in /usr/share/doc/parrot-0.6.4/languages/perl6/README:

--8<--
If you want to create a binary executable of the compiler
that can be invoked as "perl6" from the command line, then
try "make perl6".  This will create a "perl6" (or "perl6.exe")
binary that can be directly used from the command line:

   $ ./perl6 hello.pl

This binary executable feature is still somewhat experimental,
and may not work on all platforms.  Also, the binary has hardcoded
paths to the Parrot build tree (especially the dynamic libraries
and modules), so removing the build tree will cause the binary
to stop working.
-->8--

... which sounds like a likely explanation.

– Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: [ANNOUNCEMENT] Updated: parrot-0.6.4-1 with parrot-perl6 and parrot-languages

2008-07-20 Thread Michael Schaap

On 19-Jul-2008 21:42, Reini Urban wrote:

Michael Schaap schrieb:

Is perl6 supposed to (somewhat) work, yet?
I get:
% perl6 -e 'say "Hello, World!"'
"load_bytecode" couldn't find file 'P6object.pbc'
current instr.: 'onload' pc 0 (src/gen_builtins.pir:28)
called from Sub 'parrot;Perl6::Compiler;main' pc -1 ((unknown file):-1)

P6object does exist, in /usr/lib/parrot/library.
If I cd to this directory first, I get:
% cd /usr/lib/parrot/library; perl6 -e 'say "Hello, World!"'
Null PMC access in get_string()
current instr.: 'parrot;P6metaclass;add_parent' pc 119 
(runtime/parrot/library/P6object.pir:137)
called from Sub 'parrot;P6metaclass;add_parent' pc 241 
(runtime/parrot/library/P6object.pir:215)
called from Sub 'parrot;P6metaclass;register' pc 411 
(runtime/parrot/library/P6object.pir:295)

called from Sub 'parrot;Str;onload' pc 965 (src/gen_builtins.pir:619)
called from Sub 'parrot;Perl6::Compiler;main' pc -1 ((unknown file):-1)


Interesting.
Cannot reproduce this on both of my machines, with fresh installations.

I'd like to blame Windows Longhorn/Vista (not yet supported!) Ver 6.0 
Build 6001 Service Pack 1

The cpu 'x86 Family 6 Model 23 Stepping 6, GenuineIntel'
looks fine to me.

It's not Vista.
I just installed Cygwin (base packages plus the three Parrot packages) 
on a Virtual PC image¹, and it behaves identically.


Do you perhaps have any environment variables set that I don't?  I don't 
have any Perl or Parrot variables.


Thanks,

– Michael

¹: <http://go.microsoft.com/fwlink/?LinkId=70868>, the first one.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Ping Yaakov (Was: Re: Attn: Yaakov - gvim (Was: [ANNOUNCEMENT] Updated: vim-7.1-1))

2007-06-19 Thread Michael Schaap

On 16-Jun-2007 21:42, Corinna Vinschen wrote:

On Jun 16 18:01, Michael Schaap wrote:
  

Would you be perhaps interested in giving up gvim?
If so, I'd be happy to take over. (Unless Corinna jumps in and thinks 
it's easier for her to take it, since she already takes care of vim.)



I won't jump in.  I'm not interested in maintaining any kind of GUI.
  

That's fine.

Yaakov, if possible, could you please release either a) gvim 7.1, or b) 
your gvim maintainership? :-)

In case of b), I'll be happy to take over and prepare a 7.1 release.

– Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Attn: Yaakov - gvim (Was: [ANNOUNCEMENT] Updated: vim-7.1-1)

2007-06-16 Thread Michael Schaap

On 16-May-2007 03:12, Yaakov (Cygwin Ports) wrote:

Michael Schaap wrote:
  

Yaakov, if possible, could you perhaps release a corresponding gvim as
well?
(Upgrading to vim-7.1 breaks gvim-7.0, so there is some amount of
urgency...)



Please understand that, unfortunately, I had no more warning that
vim-7.1 was coming to the distro than anyone else.  I will nevertheless
work on the upgrade ASAP; in the meantime, if you wish to use gvim, you
must downgrade to the last 7.0 release.
  

Would you be perhaps interested in giving up gvim?
If so, I'd be happy to take over. (Unless Corinna jumps in and thinks 
it's easier for her to take it, since she already takes care of vim.)


(Redirected to cygwin-apps)

– Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Attn: Yaakov - gvim (Was: [ANNOUNCEMENT] Updated: vim-7.1-1)

2007-05-16 Thread Michael Schaap

On 16-May-2007 03:12, Yaakov (Cygwin Ports) wrote:

Michael Schaap wrote:
  

Yaakov, if possible, could you perhaps release a corresponding gvim as
well?
(Upgrading to vim-7.1 breaks gvim-7.0, so there is some amount of
urgency...)



Please understand that, unfortunately, I had no more warning that
vim-7.1 was coming to the distro than anyone else.  I will nevertheless
work on the upgrade ASAP; in the meantime, if you wish to use gvim, you
must downgrade to the last 7.0 release.
  
... or a symbolic link /usr/share/vim/vim70 -> vim71 does the job, as a 
temporary workaround.


Anyway, I'd like to stress that in no way this was meant as a complaint, 
just a heads-up. It's a volunteer effort, after all, and it's much 
appreciated!


Thanks,

– Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Attn: Yaakov - gvim (Was: [ANNOUNCEMENT] Updated: vim-7.1-1)

2007-05-15 Thread Michael Schaap

On 14-May-2007 17:05, Corinna Vinschen wrote:

I have updated the version of vim on cygwin.com to 7.1-1.

  

Yaakov, if possible, could you perhaps release a corresponding gvim as well?
(Upgrading to vim-7.1 breaks gvim-7.0, so there is some amount of 
urgency...)


Thanks in advance,

- Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: [ANNOUNCEMENT] Updated: cron 4.1-1

2007-04-11 Thread Michael Schaap

On 11-Apr-2007 17:08, Michael Schaap wrote:

On 11-Apr-2007 16:51, Pierre A. Humblet wrote:

- Original Message - From: "Michael Schaap"
To: 
Sent: Wednesday, April 11, 2007 10:42 AM
Subject: ***[Possible UCE]*** Re: [ANNOUNCEMENT] Updated: cron 4.1-1


| On 11-Apr-2007 16:30, Pierre A. Humblet wrote:
| > | "[ -e /usr/sbin/sendmail ]" is true when a symlink
| > | "/usr/sbin/sendmail.exe" exists.
| >
| > Precisely if "[ -e /usr/sbin/sendmail ]"  is true then
| >  || ln -sf /usr/bin/cronlog /usr/sbin/sendmail
| > shouldn't run.
| >
| Indeed it doesn't.  But then:
|
| [ -e /usr/sbin/sendmail ] && rm -f /usr/sbin/sendmail.exe
|
| does run.
|
| – Michael
|
| (I can't stand that syntax, by the way.  It's so much easier to see
| what's going on when you use a proper "if"...)

Except if that if /usr/sbin/sendmail.exe did exist in the first place
(not a dangling link) then cronlog would not have been linked,
for the same reason:
 [ -e /usr/sbin/sendmail -o -e /usr/sbin/sendmail.exe  ]

and thus the rm -f would not do anything except possibly remove
a dangling symlink. I still don't understand what happened.

  

Okay, I have a symlink

   sendmail.exe -> /usr/sbin/ssmtp.exe

The following code:

   [ -e /usr/sbin/sendmail -o -e /usr/sbin/sendmail.exe  ] ||
 ln -sf /usr/bin/cronlog /usr/sbin/sendmail

does nothing, since "-e /usr/sbin/sendmail.exe" is true.

Then this code runs:

   [ -e /usr/sbin/sendmail ] && rm -f /usr/sbin/sendmail.exe

and *does* "rm -f /usr/sbin/sendmail.exe", since "-e 
/usr/sbin/sendmail.exe" is (still) true.

Make that: ..., since "-e /usr/sbin/sendmail" is true.



I'd just rewrite this as a proper "if".  Much easier to read and 
maintain.
(I don't really see what you're trying to do with that last statement 
anyway.  In which situation is it supposed to do something useful?)


– Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: [ANNOUNCEMENT] Updated: cron 4.1-1

2007-04-11 Thread Michael Schaap

On 11-Apr-2007 16:51, Pierre A. Humblet wrote:
- Original Message - 
From: "Michael Schaap"

To: 
Sent: Wednesday, April 11, 2007 10:42 AM
Subject: ***[Possible UCE]*** Re: [ANNOUNCEMENT] Updated: cron 4.1-1


| On 11-Apr-2007 16:30, Pierre A. Humblet wrote:
| > | "[ -e /usr/sbin/sendmail ]" is true when a symlink
| > | "/usr/sbin/sendmail.exe" exists.
| >
| > Precisely if "[ -e /usr/sbin/sendmail ]"  is true then
| >  || ln -sf /usr/bin/cronlog /usr/sbin/sendmail
| > shouldn't run.
| >
| Indeed it doesn't.  But then:
|
| [ -e /usr/sbin/sendmail ] && rm -f /usr/sbin/sendmail.exe
|
| does run.
|
| – Michael
|
| (I can't stand that syntax, by the way.  It's so much easier to see
| what's going on when you use a proper "if"...)

Except if that if /usr/sbin/sendmail.exe did exist in the first place
(not a dangling link) then cronlog would not have been linked,
for the same reason:
 [ -e /usr/sbin/sendmail -o -e /usr/sbin/sendmail.exe  ]

and thus the rm -f would not do anything except possibly remove
a dangling symlink. I still don't understand what happened.

  

Okay, I have a symlink

   sendmail.exe -> /usr/sbin/ssmtp.exe

The following code:

   [ -e /usr/sbin/sendmail -o -e /usr/sbin/sendmail.exe  ] ||
 ln -sf /usr/bin/cronlog /usr/sbin/sendmail

does nothing, since "-e /usr/sbin/sendmail.exe" is true.

Then this code runs:

   [ -e /usr/sbin/sendmail ] && rm -f /usr/sbin/sendmail.exe

and *does* "rm -f /usr/sbin/sendmail.exe", since "-e 
/usr/sbin/sendmail.exe" is (still) true.



I'd just rewrite this as a proper "if".  Much easier to read and maintain.
(I don't really see what you're trying to do with that last statement 
anyway.  In which situation is it supposed to do something useful?)


– Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: [ANNOUNCEMENT] Updated: cron 4.1-1

2007-04-11 Thread Michael Schaap

On 11-Apr-2007 16:30, Pierre A. Humblet wrote:

| If you have to do this by symlinking sendmail (which I still don't like,
| but that's just me), can't you move the creation to cron-config, so you
| can ask the user for permission before you do it?

Yes, but there are always those that do it by hand and then complain.
  
Yeah, but it they ignore the excellent installation and diagnostics 
scripts included in your package, they've deserved all the abuse they're 
going to get on this list, no?  :-)



I absolutely want to avoid disturbing existing installations, so understanding
exactly what happened would help.
  
But even when this bug is fixed, simply installing cron will silently 
create a somewhat dysfunctional sendmail, on machines where ssmtp or 
exim isn't installed or configured.
This means that if another program tries to use sendmail, it will seem 
to work and there won't be any error message.


It would be best, IMHO, if you didn't create symlink at all, to a 
sendmail that can't send mail, but if you have to, it should at least be 
done after warning the user very loudly.


– Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: [ANNOUNCEMENT] Updated: cron 4.1-1

2007-04-11 Thread Michael Schaap

On 11-Apr-2007 16:30, Pierre A. Humblet wrote:

| "[ -e /usr/sbin/sendmail ]" is true when a symlink
| "/usr/sbin/sendmail.exe" exists.

Precisely if "[ -e /usr/sbin/sendmail ]"  is true then
 || ln -sf /usr/bin/cronlog /usr/sbin/sendmail
shouldn't run.
  

Indeed it doesn't.  But then:

[ -e /usr/sbin/sendmail ] && rm -f /usr/sbin/sendmail.exe

does run.

– Michael

(I can't stand that syntax, by the way.  It's so much easier to see 
what's going on when you use a proper "if"...)


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: [ANNOUNCEMENT] Updated: cron 4.1-1

2007-04-11 Thread Michael Schaap

On 11-Apr-2007 16:15, Pierre A. Humblet wrote:
- Original Message - 
From: "Michael Schaap"

To: 
Sent: Wednesday, April 11, 2007 10:03 AM
Subject: Re: [ANNOUNCEMENT] Updated: cron 4.1-1


| On 11-Apr-2007 12:49, Pierre A. Humblet wrote:
| > If /usr/sbin/sendmail does not point to a mailer, the cron postinstall 
script
| > links it to the (new) script /usr/bin/cronlog.
| >
|
| Isn't this a bit aggressive? Cron isn't the only one who might be using
| sendmail, you know...
| Might it not be better if crond would be made smart enough to run
| /usr/bin/cronlog in case /usr/sbin/sendmail doesn't exist?
|
| Aside from that, the cron postinstall just removed my existing sendmail
| symlink (to ssmtp), leaving me without one.
| Your code does:
|
| # Link sendmail to a poor man's mailer if sendmail
| # does not exist (e.g. dangling symlink)
| # Handle the .exe mess
| [ -e /usr/sbin/sendmail -o -e /usr/sbin/sendmail.exe ] ||
| ln -sf /usr/bin/cronlog /usr/sbin/sendmail
| [ -e /usr/sbin/sendmail ] && rm -f /usr/sbin/sendmail.exe
|
| which is broken in the case of an existing symlink
| /usr/sbin/sendmail.exe -> /usr/sbin/ssmtp.exe (as created by current
| versions of ssmtp-config and ln).
|
| – Michael

Sorry, I thought I had tested that and I don't see why it happened.
Exactly what did you observe?
If you had either /usr/sbin/sendmail  or /usr/sbin/sendmail.exe pointing
to an existing file, then "ln -sf /usr/bin/cronlog " should not have run.
If you had both /usr/sbin/sendmail  already pointing to a file and 
/usr/sbin/senmail.exe
existed (not necessarily pointing to anything) , which guarantees confusion,
then the second one was removed. That's a little aggressive, I should make
it conditional on cronlog being newly linked.
  
"[ -e /usr/sbin/sendmail ]" is true when a symlink 
"/usr/sbin/sendmail.exe" exists.


If you have to do this by symlinking sendmail (which I still don't like, 
but that's just me), can't you move the creation to cron-config, so you 
can ask the user for permission before you do it?


- Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: [ANNOUNCEMENT] Updated: cron 4.1-1

2007-04-11 Thread Michael Schaap

On 11-Apr-2007 12:49, Pierre A. Humblet wrote:

If /usr/sbin/sendmail does not point to a mailer, the cron postinstall script
links it to the (new) script /usr/bin/cronlog.
  


Isn't this a bit aggressive? Cron isn't the only one who might be using 
sendmail, you know...
Might it not be better if crond would be made smart enough to run 
/usr/bin/cronlog in case /usr/sbin/sendmail doesn't exist?


Aside from that, the cron postinstall just removed my existing sendmail 
symlink (to ssmtp), leaving me without one.

Your code does:

# Link sendmail to a poor man's mailer if sendmail
# does not exist (e.g. dangling symlink)
# Handle the .exe mess
[ -e /usr/sbin/sendmail -o -e /usr/sbin/sendmail.exe ] ||
ln -sf /usr/bin/cronlog /usr/sbin/sendmail
[ -e /usr/sbin/sendmail ] && rm -f /usr/sbin/sendmail.exe

which is broken in the case of an existing symlink 
/usr/sbin/sendmail.exe -> /usr/sbin/ssmtp.exe (as created by current 
versions of ssmtp-config and ln).


– Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygutils patch: fix cygstart under recent snapshots

2006-12-13 Thread Michael Schaap

Charles Wilson wrote:

Michael Schaap wrote:

Can you apply the patch and release a new Cygutils version, at your 
convenience?


Done.  I'll announce 1.3.1-1 after the mirrors have had a chance to 
get it. (FYI: your next 'cvs update' you'll need to explicitly get the 
newly added m4/ and build-aux/ subdirectories -- or use 'cvs update -d')



Thanks!
(And congratulations on the gold stars.  You deserve 'em!  :-) )

- Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygstart getting The specified file was not found

2006-12-12 Thread Michael Schaap

Corinna Vinschen wrote:

When using cygwin_internal(CW_SYNC_WINENV), Cygwin doesn't only copy the
environment, it also changes into the actual cwd and keeps Cygwin cwd
and native cwd in sync.  This is also propagated to child processes. 
Naturally, this process and its children are blocking the cwd from now

on, until all these processes exited.
  
Luckily, this won't be an issue for cygstart.  It doesn't hang around, 
but exits as soon as it asked the shell to open a file, URL or program.
(Whatever program the shell starts, might be blocking the cwd, of 
course, but that is no different than when you start the program in any 
other way.)


In any case, with the fixed cygstart,
   $ cygstart .
   $ rmdir $PWD
works fine.  (The Explorer window actually closes itself when you do the 
rmdir.)


- Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygstart getting The specified file was not found

2006-12-12 Thread Michael Schaap

Igor Peshansky wrote:

I just looked at the ChangeLog between those two snapshots.  The following
looks like the culprit change:

2006-11-29  Corinna Vinschen  <(snip)>

* path.cc [snip]
(cwdstuff::init): Initialize cygheap->cwd with current working
directory.  Change to windows_system_directory afterwards.

With that change, any use of non-Cygwin calls, e.g., GetCurrentDirectory,
or ShellExecute (which calls GetCurrentDirectory under the covers, it
seems) will produce the problem you're seeing (Windows system directory as
the current directory).

So it looks like you ought to call cygwin_internal(CW_SYNC_WINENV) after
all, as it syncs more than the environment variables...
  

Indeed, this turns out to be the culprit.

Thanks - also to Corinna - for helping to find this,

- Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygstart getting The specified file was not found

2006-12-12 Thread Michael Schaap

Hi Eric,

ERIC HO wrote:

The command and out are as follows:
/cygdrive/c/user $cmd /c cd
c:\user
The latest snapshot (2006-12-11) has the same problem.
I went back to 1.5.22-1 release and the problem is fixed.

Not sure which change causes this.
Thanks.
  


The bug was found and fixed, and a new Cygutils version which includes 
this fix will hopefully be released soon.
(If you can't wait, feel free to either build a new version yourself 
with the patch, or download an executable from 
.)


Note that this version will work fine in the latest snapshot 
(2006-12-11), but not in the version you were using when you originally 
reported the problem (2006-11-30), though.


Thanks for reporting this,

- Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Cygutils patch: fix cygstart under recent snapshots

2006-12-12 Thread Michael Schaap

Hi Chuck,

Attached is a Cygutils patch that fixes cygstart under recent Cygwin 
snapshots.  (It didn't set the current directory correctly under them.)  
In addition, I've added a --verbose flag, which shows the Win32 
ShellExecute call that is made.


Can you apply the patch and release a new Cygutils version, at your 
convenience?


The appropriate Changelog entries are:
   * src/cygstart/cygstart.c (winstart): use 
cygwin_internal(CW_SYNC_WINENV) instead of own code to sync environment
   * src/cygstart/cygstart.c (main): add --verbose option to show 
actual ShellExecute call made


Thanks in advance,

- Michael
Index: src/cygstart/cygstart.c
===
RCS file: /cvs/cygwin-apps/cygutils/src/cygstart/cygstart.c,v
retrieving revision 1.5
diff -u -r1.5 cygstart.c
--- src/cygstart/cygstart.c 10 Feb 2006 05:50:39 -  1.5
+++ src/cygstart/cygstart.c 12 Dec 2006 16:24:51 -
@@ -25,6 +25,8 @@
 #endif
 #include "common.h"
 
+#include 
+
 /* The official name of this program (e.g., no `g' prefix).  */
 #define PROGRAM_NAME "cygstart"
 #define AUTHORS "Michael Schaap"
@@ -40,7 +42,7 @@
 #define MSDN_URL "http://msdn.microsoft.com/library/en-us/shellcc/platform/"; \
  "Shell/reference/functions/shellexecute.asp"
 
-static const char versionID[] = "1.3";
+static const char versionID[] = "1.4";
 /* for future CVS */
 static const char revID[] =
"$Id: cygstart.c,v 1.5 2006/02/10 05:50:39 cwilson Exp $";
@@ -53,9 +55,9 @@
 static char *program_name;
 
 static int cygStart(const char *aPath, const char *action, const char *args,
-const char *workDir, int show);
+const char *workDir, int show, int verbose);
 static int winStart(const char *aPath, const char *action, const char *args,
-const char *workDir, int show);
+const char *workDir, int show, int verbose);
 static char *startError(int err);
 static const char *getVersion(void);
 static void printTopDescription(FILE *f, char *name);
@@ -64,7 +66,6 @@
 static void help(poptContext optCon, FILE *f, char *name);
 static void version(poptContext optCon, FILE *f, char *name);
 static void license(poptContext optCon, FILE *f, char *name);
-static void setup_win_environ(void);
 
 int main(int argc, const char **argv)
 {
@@ -80,6 +81,7 @@
 char *args = NULL;
 char *workDir = NULL;
 int show = SW_SHOWNORMAL;
+int verbose = 0;
 
 /* Action options */
 struct poptOption actionOptionsTable[] = {
@@ -143,6 +145,13 @@
 { NULL, '\0', 0, NULL, 0, NULL, NULL }
 };
 
+/* Troubleshooting options */
+struct poptOption troubleOptionsTable[] = {
+{ "verbose",  'v',  POPT_ARG_NONE, NULL, 'E', \
+  "Show the actual ShellExecute call made", NULL},
+{ NULL, '\0', 0, NULL, 0, NULL, NULL }
+};
+
 /* Help options */
 struct poptOption helpOptionsTable[] = {
 { "help",  '?',  POPT_ARG_NONE, NULL, '?', \
@@ -165,6 +174,8 @@
   "Directory options", NULL },
 { NULL, '\0', POPT_ARG_INCLUDE_TABLE, showOptionsTable, 0, \
   "Show options", NULL },
+{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, troubleOptionsTable, 0, \
+  "Troubleshooting options", NULL },
 { NULL, '\0', POPT_ARG_INCLUDE_TABLE, helpOptionsTable, 0, \
   "Help options", NULL },
 { NULL, '\0', 0, NULL, 0, NULL, NULL }
@@ -218,7 +229,7 @@
 free(workDir);
 return(0);
 case 'r':
-cygStart(MSDN_URL, NULL, NULL, NULL, SW_NORMAL);
+cygStart(MSDN_URL, NULL, NULL, NULL, SW_NORMAL, verbose);
 poptFreeContext(optCon);
 free(program_name);
 if (action)
@@ -313,6 +324,11 @@
 case 'O':
 show = SW_SHOWNORMAL;
 break;
+
+/* Troubleshooting options */
+case 'E':
+verbose = 1;
+break;
 }
 }
 if (rc < -1 ) {
@@ -360,7 +376,7 @@
 }
 
 /* Start it! */
-ret = cygStart(file, action, args, workDir, show);
+ret = cygStart(file, action, args, workDir, show, verbose);
 
 poptFreeContext(optCon);
 free(program_name);
@@ -378,7 +394,7 @@
 
 /* Start a program, or open a file or URL, using Cygwin POSIX paths */
 static int cygStart(const char *aPath, const char *action, const char *args,
-const char *workDir, int show)
+const char *workDir, int show, int verbose)
 {
 char winPath[MAX_PATH+1];
 char winDir[MAX_PATH+1];
@@ -393,20 

Re: cygstart getting The specified file was not found

2006-12-12 Thread Michael Schaap

Michael Schaap wrote:


normalize_posix_path: /cygdrive/c/WINDOWS/system32/hello.txt = 
normalize_posix_path (hello.txt)

(FWIW, the above strace output is now actually incorrect, prepending 
/cygdrive/c/WINDOWS/system32/, instead of the POSIX current directory, 
to the filename.)



Never mind that.  This is already fixed in the 2006-12-11 snapshot.

- Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygstart getting The specified file was not found

2006-12-12 Thread Michael Schaap

Corinna Vinschen wrote:

On Dec 12 14:23, Michael Schaap wrote:
  

Corinna Vinschen wrote:


Does cygstart use CreateProcess and/or GetCurrentDirectory instead of
fork/exec/getcwd?

If so, cygstart will have to call cygwin_internal(CW_SYNC_WINENV) before
using the native Windows functions.
  
No, it uses ShellExecute (see "cygstart --reference").  It does indeed 
need to sync the environment, but it does this using its own code. 
(Predates cygwin_internal(CW_SYNC_WINENV); I still need to change 
cygstart some day to use it.)



ShellExecute is the same problem.  With 1.7.0 you must use
cygwin_internal(CW_SYNC_WINENV), when calling native Windows functions
which have even vaguely to do with the current directory.

  

Indeed.
I had code to do that which precedes (and even inspired, I think) 
cygwin_internal(CW_SYNC_WINENV), but that did not set the current 
directory, the need for which, I guess, is a new thing.


However, this is unrelated to this problem, things go wrong long before 
that.  It appears that cygwin_conv_to_win32_path incorrectly determines 
the current working directory.


It is called as follows:

cygwin_conv_to_win32_path(aPath, winPath);

where aPath == "hello.txt".

The current directory is "/cygdrive/c/user" =~ "c:\user", but 
cygwin_conv_to_win32_path thinks that:


normalize_posix_path: /cygdrive/c/WINDOWS/system32/hello.txt = 
normalize_posix_path (hello.txt)



Hang on.  cygwin_conv_to_win32_path does not translate the path into
an absolute path, cygwin_conv_to_full_win32_path does that.

  
You're right.  I was fooled by the strace output which seemed to suggest 
that it did.
Indeed, the problem is not filename conversion, but the Windows current 
directory.


(FWIW, the above strace output is now actually incorrect, prepending 
/cygdrive/c/WINDOWS/system32/, instead of the POSIX current directory, 
to the filename.)



I'm running the following simple testcase(tm):

  #include 
  #include 

  int
  main (int argc, char **argv)
  {
char buf[260];

cygwin_conv_to_win32_path (argv[1], buf);
puts (buf);
cygwin_conv_to_full_win32_path (argv[1], buf);
puts (buf);
GetCurrentDirectory (260, buf);
puts (buf);
cygwin_internal (CW_SYNC_WINENV);
GetCurrentDirectory (260, buf);
puts (buf);
return 0;
  }

$ pwd
/home/corinna/tests
$ ./cyg_conv_to_w32 hello.txt
hello.txt
C:\home\corinna\tests\hello.txt
C:\WINDOWS\system32
C:\home\corinna\tests

This shows you what happens.  This is not a bug, but deliberately
chosen.  Use cygwin_internal(CW_SYNC_WINENV), please.

  

Yes, ma'am.  :-)

I've been holding off for a while, since the old code did the job as 
well, and still worked for older Cygwin versions that didn't have 
cygwin_internal (CW_SYNC_WINENV), but I guess the time has come... 
especially since the old code doesn't work anymore.  ;-)


- Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygstart getting The specified file was not found

2006-12-12 Thread Michael Schaap

Michael Schaap wrote:

Corinna Vinschen wrote:


Does cygstart use CreateProcess and/or GetCurrentDirectory instead of
fork/exec/getcwd?

If so, cygstart will have to call cygwin_internal(CW_SYNC_WINENV) before
using the native Windows functions.



No, it uses ShellExecute (see "cygstart --reference").  It does indeed 
need to sync the environment, but it does this using its own code. 
(Predates cygwin_internal(CW_SYNC_WINENV); I still need to change 
cygstart some day to use it.)


However, this is unrelated to this problem, things go wrong long before 
that.  It appears that cygwin_conv_to_win32_path incorrectly determines 
the current working directory.


It is called as follows:

cygwin_conv_to_win32_path(aPath, winPath);

where aPath == "hello.txt".

The current directory is "/cygdrive/c/user" =~ "c:\user", but 
cygwin_conv_to_win32_path thinks that:


normalize_posix_path: /cygdrive/c/WINDOWS/system32/hello.txt = 
normalize_posix_path (hello.txt)


(See Eric's messages for more debugging info.)



I just installed the 2006-12-11 snapshot, and I can reproduce this. 
Like Eric, I'm on XP SP2.


I went down the list of snapshots, and it looks like this was introduced 
some time in between 2006-11-27 and 2006-11-30.


 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygstart getting The specified file was not found

2006-12-12 Thread Michael Schaap

Corinna Vinschen wrote:


Does cygstart use CreateProcess and/or GetCurrentDirectory instead of
fork/exec/getcwd?

If so, cygstart will have to call cygwin_internal(CW_SYNC_WINENV) before
using the native Windows functions.



No, it uses ShellExecute (see "cygstart --reference").  It does indeed 
need to sync the environment, but it does this using its own code. 
(Predates cygwin_internal(CW_SYNC_WINENV); I still need to change 
cygstart some day to use it.)


However, this is unrelated to this problem, things go wrong long before 
that.  It appears that cygwin_conv_to_win32_path incorrectly determines 
the current working directory.


It is called as follows:

cygwin_conv_to_win32_path(aPath, winPath);

where aPath == "hello.txt".

The current directory is "/cygdrive/c/user" =~ "c:\user", but 
cygwin_conv_to_win32_path thinks that:


normalize_posix_path: /cygdrive/c/WINDOWS/system32/hello.txt = 
normalize_posix_path (hello.txt)


(See Eric's messages for more debugging info.)

 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygstart getting The specified file was not found

2006-12-11 Thread Michael Schaap

ERIC HO wrote:

/cygdrive/c/user $cmd /c pwd
/cygdrive/c/user


Hmm, I should have asked for
$ cmd /c cd
:-[



My cygcheck ouput are attached. Thanks



Looks like you're running a pretty old Cygwin snapshot:
Cygwin DLL version info:
Build date: Thu Nov 30 10:51:28 EST 2006
Snapshot date: 20061130-10:49:23

Can you either go back to the latest release (1.5.22), or install the 
newest snapshot?


 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygstart getting The specified file was not found

2006-12-11 Thread Michael Schaap

ERIC HO wrote:

I was able to use Windows Explorer to open the file by double clicking the 
file. I was able to use cygstart open the file with full path. The problem is 
with all file type. I can do a cygstart http://www.cygwin.com/ with no problem. 
The result from:
 strace cygstart hello.txt |grep hello.txt
is as below:
20   11399 [main] cygstart 732 build_argv: argv[1] = 'hello.txt'
  202   12600 [main] cygstart 732 normalize_posix_path: src hello.txt
   46   12686 [main] cygstart 732 normalize_posix_path: 
/cygdrive/c/WINDOWS/system32/hello.txt = normalize_posix_path (hello.txt)
   22   12708 [main] cygstart 732 mount_info::conv_to_win32_path: 
conv_to_win32_path (/cygdrive/c/WINDOWS/system32/hello.txt)
  135   12843 [main] cygstart 732 mount_info::cygdrive_win32_path: src 
'/cygdrive/c/WINDOWS/system32/hello.txt', dst 'c:\WINDOWS\system32\hello.txt'
   21   12960 [main] cygstart 732 mount_info::conv_to_win32_path: src_path 
/cygdrive/c/WINDOWS/system32/hello.txt, dst c:\WINDOWS\system32\hello.txt, 
flags 0x2A, rc 0
   73   13033 [main] cygstart 732 symlink_info::check: GetFileAttributes 
(c:\WINDOWS\system32\hello.txt) failed
   47   13103 [main] cygstart 732 symlink_info::check: GetFileAttributes 
(c:\WINDOWS\system32\hello.txt.lnk) failed
  169   13294 [main] cygstart 732 symlink_info::check: 0 = symlink.check 
(c:\WINDOWS\system32\hello.txt, 0x22C040) (0x80002A)
   26   13619 [main] cygstart 732 path_conv::check: 
this->path(c:\WINDOWS\system32\hello.txt), has_acls(1)
Unable to start 'hello.txt': The specified file was not found.

It seems it is looking at the wrong directory.



Indeed it does...
What is the current directory?
$ pwd
$ cmd /c pwd

Can you please attach "cygcheck -s -v -r" (see 
http://cygwin.com/problems.html)?


 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygstart getting The specified file was not found

2006-12-11 Thread Michael Schaap

ERIC HO wrote:

Hi there, I've been using cygstart to start chm and pdf files with no problems 
until a few days ago. Now I'm getting The specified file was not found when 
using cygstart on a file. I updated  a few the cygwin packages  last week. Not 
sure whether this has something to do with it. I can provide a output of strace 
too if required. Thanks.



Hmm, that is weird indeed...
Can you still open the files in question by double-clicking them in
Windows Explorer?  If not, then it appears to be something wrong with
your Windows installation.
Does the problem occur with full paths? e.g., does this work?
$ cygstart /full/path/to/myfile.pdf
Does this only affect certain extensions, or all file types?  For
instance, does this work?
$ echo hello > hello.txt; cygstart hello.txt
How about URLs?  Does
$ cygstart http://www.cygwin.com/
still work?

The only thing in a 'strace' that might be helpful here, is the path
conversion.  Can you do something like:
$ strace cygstart myfile.pdf | grep myfile.pdf
and check if the converted Windows filename (C:\blah\blah) is correct?

If the above doesn't help, we'll need more information.  Can you follow
the "Problem reports" link below, and attach cygcheck output?

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Please test the latest developer's snapshot

2006-11-07 Thread Michael Schaap

Corinna Vinschen wrote:

Hi,

The latest developer snapshot from http://cygwin.com/snapshots/ contains
a couple of patches which are supposed to get Cygwin running better on
the upcoming Windows Vista.

The important change here is a slightly different memory allocation
scheme.  I'd like to hear if this version still runs fine on all OSes,
not only on Vista so I'd appreciate some feedback in terms of memory
allocation problems.  Please look for messages as "fixup_mmap_after_fork
failed", "couldn't allocate heap", stuff like that.

The new memory allocation scheme could result in the necessity to rebase
again.  The usual base address of 0x7000 for rebase *might* result
in problems with applications using mmap and runtime loaded DLLs.  So,
if you get such a problem, please call rebase(all) with a base addresses
of, say, 0x6500 and try again.



I've been running with this snapshot on my brand new Vista RC2 dual-boot 
for a few days, and FWIW, I haven't had any problems with it.  (With 
1.5.21, I got the above errors all the time.)
I'm not doing anything special with it, though - I'm just running a zsh 
shell in rxvt-unicode, and doing the usual shell stuff.  Oh, and I'm 
editing with gvim.
(I'm not using the Cygwin/X server, though, but running Cygwin X clients 
on an Xming server.)


After reinstalling I rebase-all'ed using the default parameters, no 
problems.


Thanks for making my Vista install bearable!  :-)

 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: mp3 player from cygwin

2006-09-03 Thread Michael Schaap

On 1-Sep-2006 17:45, Larry Hall (Cygwin) wrote:

umen wrote:

Hello all , is there any thing like that ?
mp3 player from cygwin? not graphic or graphic command line that 
working ?

thanks


No, not as a package in the distribution.  I remember some talk about, I
believe, mplayer a while back on the list but I may be mistaken.



Or alternatively, try:

$ cygstart myfile.mp3

:-)

 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: GPL Alert: Super

2006-06-19 Thread Michael Schaap

On 18-Jun-2006 22:35, »Q« wrote:

Michael Schaap wrote:


http://www.erightsoft.com/SUPER.html
It's a GUI around a bunch of command-line video file editing
tools.

Installs both cygwin1.dll and cygz.dll in the System32 folder.
Can't find any mention of source code on the web site.


I asked about this in alt.comp.freeware when somebody posted about
Super.  A couple of people have reported that it doesn't install
cygwin files, but one of them says he already had them from
installing other apps.  In case it's of any interest, the thread is
at
<http://groups.google.com/group/alt.comp.freeware/browse_thread/thread/4096e6234e8d9209/708069dc5b3f5be5>

or <http://tinyurl.com/g8sgt>



Well, after I installed it, I got lots of errors after my next reboot 
which were caused by the copy of cygwin1.dll in the System32 folder...


Ans perhaps even more telling, in the support forum 
<http://tinyurl.com/r2dda>, someone who is apparently one of the authors 
states that it's perfectly fine to install cygwin1.dll and cygz.dll in 
the System32 folder, 'cause everyone does it, and it you don't like it, 
tough, just uninstall it...


 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



GPL Alert: Super

2006-06-15 Thread Michael Schaap

http://www.erightsoft.com/SUPER.html
It's a GUI around a bunch of command-line video file editing tools.

Installs both cygwin1.dll and cygz.dll in the System32 folder.  Can't 
find any mention of source code on the web site.


(I won't even mention that it distributes these open source command-line 
tools without any source code as well.  Oops... looks like I just did.)


 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: [ANNOUNCEMENT] New packages: geoip-1.3.14 -- IP lookup command line tools that use the GeoIP library

2006-02-21 Thread Michael Schaap
Hi Jari,

Thanks for packaging this.

On 21-Feb-2006 8:20, Jari Aalto wrote:
> PACKAGE DESCRIPTION
> ===
>
> Homepage: http://freshmeat.net/projects/geoip/
> License : GPL
>
> GeoIP is a C library that enables the user to find the country that any IP
> address or hostname originates from. It uses a file based database that is
> accurate as of March 2002. (...)
Actually, the database included appears to be from September 2005:
$ geoiplookup -v
GEO-106FREE 20050901 Build 1 Copyright (c) 2005 MaxMind LLC All Rights
Reserved

Any particular reason why you didn't include the latest database, from
?
$ cd /usr/share/GeoIP
$ wget http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz
$ mv GeoIP.dat GeoIP.dat.OLD
$ gunzip GeoIP.dat.gz
$ geoiplookup -v
GEO-106FREE 20060201 Build 1 Copyright (c) 2006 MaxMind LLC All Rights
Reserved

Wouldn't it be a good idea to package the data file separately from the
tools, perhaps? This would allow for (monthly, ideally) updates of the
data file without having to reinstall the tools.

Also, the man page lists a non-existing "-l" flag.

Finally, any particular reason why GeoIP.dat has executable permissions?

Cheers,

– Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Patch for cygutils: let cygstart properly convert environment variables

2006-02-09 Thread Michael Schaap
Hi,

Attached is a patch that fixes a bug in cygstart, triggered by changes
in Cygwin 1.5.19, where certain path-based environment variables (like
TMP) were not converted from POSIX to Win32. (See
.)
It also contains the outstanding patch from Eric Blake to not let
cygstart parse any options listed after the to-be-started command. (See
.)

Chuck, can you please apply the patch, and release a new version, at
your convenience?
A suggested list of changes:
* cygstart - properly convert environment variables to Win32
* cygstart - don't parse options listed after the command

Thanks in advance,

– Michael

? .cygstart.c.swp
Index: cygstart.c
===
RCS file: /cvs/cygwin-apps/cygutils/src/cygstart/cygstart.c,v
retrieving revision 1.4
diff -u -r1.4 cygstart.c
--- cygstart.c  16 May 2005 20:18:52 -  1.4
+++ cygstart.c  9 Feb 2006 16:30:56 -
@@ -40,7 +40,7 @@
 #define MSDN_URL "http://msdn.microsoft.com/library/en-us/shellcc/platform/"; \
  "Shell/reference/functions/shellexecute.asp"
 
-static const char versionID[] = "1.2";
+static const char versionID[] = "1.3";
 /* for future CVS */
 static const char revID[] =
"$Id: cygstart.c,v 1.4 2005/05/16 20:18:52 cwilson Exp $";
@@ -176,7 +176,7 @@
 }
 
 /* Parse options */
-optCon = poptGetContext(NULL, argc, argv, opt, 0);
+optCon = poptGetContext(NULL, argc, argv, opt, POPT_CONTEXT_POSIXMEHARDER);
 poptSetOtherOptionHelp(optCon, "[OPTION]... FILE [ARGUMENTS]");
 while ((rc = poptGetNextOpt(optCon)) > 0) {
 switch (rc) {
@@ -523,6 +523,8 @@
 char **envp = environ;
 char *var, *val;
 char curval[2];
+char *winpathlist;
+char winpath[MAX_PATH+1];
 
 while (envp && *envp) {
 var = strdup(*envp++);
@@ -531,7 +533,25 @@
 
 if (GetEnvironmentVariable(var, curval, 2) == 0
 && GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
-SetEnvironmentVariable(var, val);
+/* Convert POSIX to Win32 where necessary */
+if (!strcmp(var, "PATH") ||
+!strcmp(var, "LD_LIBRARY_PATH")) {
+winpathlist = (char *)
+  malloc(cygwin_posix_to_win32_path_list_buf_size(val)+1);
+if (winpathlist) {
+cygwin_posix_to_win32_path_list(val, winpathlist);
+SetEnvironmentVariable(var, winpathlist);
+free(winpathlist);
+}
+} else if (!strcmp(var, "HOME") ||
+!strcmp(var, "TMPDIR") ||
+!strcmp(var, "TMP") ||
+!strcmp(var, "TEMP")) {
+cygwin_conv_to_win32_path(val, winpath);
+SetEnvironmentVariable(var, winpath);
+} else {
+SetEnvironmentVariable(var, val);
+}
 }
 
 free(var);

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

Re: strange cygstart bug with current Cygwin versions

2006-02-08 Thread Michael Schaap
On 8-Feb-2006 18:54, Michael Schaap wrote:
> winpathlist = (char *)
> malloc(cygwin_posix_to_win32_path_list_buf_size(val));
To correct myself before anyone else does so: This needs a " + 1", of
course.  :-[

 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: strange cygstart bug with current Cygwin versions

2006-02-08 Thread Michael Schaap
On 8-Feb-2006 18:49, Michael Schaap wrote:
> On 8-Feb-2006 16:41, Christopher Faylor wrote:
>   
>> On Tue, Feb 07, 2006 at 01:25:12PM -0600, Brian Ford wrote:
>>   
>> 
>>> On Tue, 7 Feb 2006, Christopher Faylor wrote:
>>>
>>> 
>>>   
>>>> I believe that Brian Ford is looking into modifying the new CW_SETUP_WINENV
>>>> code to perform the proper conversion of POSIX style to Windows style.
>>>>   
>>>> 
>>> We're still debating aproaches for solving our problem, so it is possible
>>> I won't get to it.  If someone else wants to try, feel free.
>>> 
>>>   
>> Well, that's disappointing.  I'm not aware of any debates.  I thought
>> just this once we could rely on someone else fixing a problem.
>>
>> I guess I'll look into this when I get a chance.
>>
>>   
>> 
> Well, the below code works for cygstart, and does the right thing for
> the variables Cygwin converts from POSIX <-> Win32.
> Feel free to adapt this to CW_SETUP_WINENV. (Although it might be more
> elegant to use conv_envvars[] from environ.cc there.)
>
> If I hear no objections, I'm going to submit this as a path for
> cygutils, and ask Chuck to release it. If and when this gets fixed in
> CW_SETUP_WINENV, and released, I'll change it to use that instead.
>   
No idea why Thunderbird decided to strip the indentation...  Anyway,
I'll just attach cygstart.c instead.

 - Michael
/*
 * cygstart - Let Windows start a program, or open a file or URL
 *
 * (c) 2002 Michael Schaap 
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * See the COPYING file for license information.
 */

#if HAVE_CONFIG_H
#include "config.h"
#endif
#include "common.h"

/* The official name of this program (e.g., no `g' prefix).  */
#define PROGRAM_NAME "cygstart"
#define AUTHORS "Michael Schaap"

/* Predefined actions */
#define ACTION_OPEN "open"
#define ACTION_EXPLORE "explore"
#define ACTION_EDIT "edit"
#define ACTION_FIND "find"
#define ACTION_PRINT "print"

/* MSDN reference URL */
#define MSDN_URL "http://msdn.microsoft.com/library/en-us/shellcc/platform/"; \
 "Shell/reference/functions/shellexecute.asp"

static const char versionID[] = "1.2";
/* for future CVS */
static const char revID[] =
"$Id: cygstart.c,v 1.4 2005/05/16 20:18:52 cwilson Exp $";
static const char copyrightID[] =
"Copyright (c) 2002,...\n"
"Michael Schaap. All rights reserved.\n"
"Licensed under GPL v2.0\n";

/* The name this program was run with. */
static char *program_name;

static int cygStart(const char *aPath, const char *action, const char *args,
const char *workDir, int show);
static int winStart(const char *aPath, const char *action, const char *args,
const char *workDir, int show);
static char *startError(int err);
static const char *getVersion(void);
static void printTopDescription(FILE *f, char *name);
static void printBottomDescription(FILE *f, char *name);
static void usage(poptContext optCon, FILE *f, char *name);
static void help(poptContext optCon, FILE *f, char *name);
static void version(poptContext optCon, FILE *f, char *name);
static void license(poptContext optCon, FILE *f, char *name);
static void setup_win_environ(void);

int main(int argc, const char **argv)
{
poptContext optCon;
const char *arg;
const char **rest;
int rc;
int ret;
char *action = NULL;
char *file = NULL;
size_t argLength;
const char **tmp;
char *args = NULL;
char *workDir = NULL;
int show = SW_SHOWNORMAL;

/* Action options */
struct poptOption actionOptionsTable[] = {
{ "action",  'a',  POPT_ARG_STRING, NULL, 'a', \
  "Use specified action instead of default", NULL},
{ "open",  'o',  POPT_ARG_NONE, NULL, 'o', \
  "Short for: --action open", NULL},

Re: strange cygstart bug with current Cygwin versions

2006-02-08 Thread Michael Schaap
On 8-Feb-2006 16:41, Christopher Faylor wrote:
> On Tue, Feb 07, 2006 at 01:25:12PM -0600, Brian Ford wrote:
>   
>> On Tue, 7 Feb 2006, Christopher Faylor wrote:
>>
>> 
>>> I believe that Brian Ford is looking into modifying the new CW_SETUP_WINENV
>>> code to perform the proper conversion of POSIX style to Windows style.
>>>   
>> We're still debating aproaches for solving our problem, so it is possible
>> I won't get to it.  If someone else wants to try, feel free.
>> 
>
> Well, that's disappointing.  I'm not aware of any debates.  I thought
> just this once we could rely on someone else fixing a problem.
>
> I guess I'll look into this when I get a chance.
>
>   
Well, the below code works for cygstart, and does the right thing for
the variables Cygwin converts from POSIX <-> Win32.
Feel free to adapt this to CW_SETUP_WINENV. (Although it might be more
elegant to use conv_envvars[] from environ.cc there.)

If I hear no objections, I'm going to submit this as a path for
cygutils, and ask Chuck to release it. If and when this gets fixed in
CW_SETUP_WINENV, and released, I'll change it to use that instead.

– Michael


/* Copy cygwin environment variables to the Windows environment if
they're not
* already there. */
static void setup_win_environ(void)
{
char **envp = environ;
char *var, *val;
char curval[2];
char *winpathlist;
char winpath[MAX_PATH+1];

while (envp && *envp) {
var = strdup(*envp++);
val = strchr(var, '=');
*val++ = '\0';

if (GetEnvironmentVariable(var, curval, 2) == 0
&& GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
/* Convert POSIX to Win32 where necessary */
if (!strcmp(var, "PATH") ||
!strcmp(var, "LD_LIBRARY_PATH")) {
winpathlist = (char *)
malloc(cygwin_posix_to_win32_path_list_buf_size(val));
if (winpathlist) {
cygwin_posix_to_win32_path_list(val, winpathlist);
SetEnvironmentVariable(var, winpathlist);
free(winpathlist);
}
} else if (!strcmp(var, "HOME") ||
!strcmp(var, "TMPDIR") ||
!strcmp(var, "TMP") ||
!strcmp(var, "TEMP")) {
cygwin_conv_to_win32_path(val, winpath);
SetEnvironmentVariable(var, winpath);
} else {
SetEnvironmentVariable(var, val);
}
}

free(var);
}
}

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: strange cygstart bug with current Cygwin versions

2006-02-07 Thread Michael Schaap
On 7-Feb-2006 3:31, Yitzchak Scott-Thoennes wrote:
> On Mon, Feb 06, 2006 at 11:40:22PM +0100, Michael Schaap wrote:
>   
>> What we basically need to do, is copy the Cygwin environment to the
>> Windows environment, taking care of path conversion for all the
>> appropriate variables.
>> 
>
> Maybe start with:
>
> http://www.cygwin.com/ml/cygwin-patches/2005-q4/msg9.html
>   

Not really, I think, especially since that code didn't make it into
Cygwin.  ;-)
(Also, Corinna suggested in that thread that an application should
simply convert the necessary variables itself.)

I did notice, though, that a new version, setup_winenv(), externally
callable as cygwin_internal(CW_SETUP_WINENV), was made available ...
last Thursday.  (Looks like the code was adapted from the cygstart code,
actually. :-) )
So, ideally, that function would be fixed to do POSIX to Windows
conversion on the necessary variables, and cygstart can then be changed
to call it, instead of its own setup_win_environ() function.

That would mean that the bug won't be fixed until 1.5.20 is released,
though ...
So, I guess I'll just add some path conversion handling to the cygstart
code itself, for now.  Then if at some point the Cygwin setup_winenv()
function is fixed in a similar way, and released, I might take it out
and call cygwin_internal(CW_SETUP_WINENV) instead.

If I don't see any other suggestions or objections, watch this space for
a patch.

 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: strange cygstart bug with current Cygwin versions

2006-02-06 Thread Michael Schaap
On 6-Feb-2006 22:29, David Picton wrote:
> On 2/3/06, Igor Peshansky <[EMAIL PROTECTED]> wrote:
>   
>> Sounds like an instance of
>> ...  Does it work if
>> you "cygstart cmd" and then start word from that cmd shell?  If you get
>> the same symptoms, please run "set" in that cmd window and compare the
>> output with the same in a cmd started via "Start->Run"...
>> 
>
> I get the same symptoms, and now I can see what the problem is.  The 
> CMD window shows that TEMP and TMP have retained Cygwin-style
> pathnames:
>
> TEMP=/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp
> TMP=/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp
>
> Word works OK if I set TMP to a proper Windows pathname e.g. D:\cygwin\tmp
>
>   
Hmm, indeed it does ...

Under Cygwin 1.5.18, a process started using the Win32 ShellExecute
function (which cygstart uses) inherits the entire Cygwin environment,
with the appropriate variables, including TEMP and TMP, converted from
POSIX to Windows standard.

Under Cygwin 1.5.19, however, it only appears to inherit the following
variables: COMSPEC, PATH, PATHEXT, PROMPT, SYSTEMDRIVE and SYSTEMROOT
and WINDIR.

Some code was added to cygstart last May that copies all enviroment
variables from the Cygwin enviroment to the Windows enviroment, if they
don't exist there yet.  This was apparently needed in some obscure
circumstances at the time (regarding "mount -X", I think), but it looks
like it is now always necessary.
(See  and
, among others.)

This code has no special handling for path conversion.  We knew that
PATH was already in the Windows environment, so we didn't have to care
about that one.  But we didn't think of other variables...

I had a look at the Cygwin source code, and, in environment.cc, it seems
to do path conversion for the following variables: PATH, HOME,
LD_LIBRARY_PATH, TMPDIR, TMP and TEMP.  So, we should probably do so in
cygstart as well...
However, I'd rather not have to hardcode all of this in the cygstart
source code, since it is bound to get out of sync at some point.  So,
I'm hoping there is some way to use some Cygwin functionality directly.

Is there anyone with a better grasp of Cygwin's environment handling
code that could help with this, perhaps?
What we basically need to do, is copy the Cygwin environment to the
Windows environment, taking care of path conversion for all the
appropriate variables.

The current code we use is as follows:

/* Copy cygwin environment variables to the Windows environment if
they're not
 * already there. */
static void setup_win_environ(void)
{
char **envp = environ;
char *var, *val;
char curval[2];

while (envp && *envp) {
var = strdup(*envp++);
val = strchr(var, '=');
*val++ = '\0';
   
if (GetEnvironmentVariable(var, curval, 2) == 0
&& GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
SetEnvironmentVariable(var, val);
}

free(var);
}
}

Thanks in advance,

 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: 1.5.19-4 cygpath -f - broken?

2006-01-20 Thread Michael Schaap
On 21-Jan-2006 0:15, Brian Dessent wrote:
> Martin wrote:
>   
>> I have the following bash alias:
>> alias explr='explorer.exe `pwd | cygpath -w -f -`'
>> 
>
> I'm not sure why that wouldn't work, but how about this instead:
>
> alias explr='cygstart "$(cygpath -w "$(pwd)")"'
>
>   
Or why not:
alias explr='cygstart .'
?

– Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: VIM - Vi IMproved 6.4 (2005 Oct 15, compiled Oct 17 2005 11:54:34

2005-11-03 Thread Michael Schaap
On 4-Nov-2005 1:49, Igor Pechtchanski wrote:
> On Fri, 4 Nov 2005, Michael Schaap wrote:
>
>   
>> On 20-Oct-2005 16:42, Christopher Faylor wrote:
>> 
>>> On Thu, Oct 20, 2005 at 04:15:34PM +0200, Christoph Jeksa wrote:
>>>
>>>   
>>>> there is a bug in this version:
>>>>
>>>> Supposed, you have a file X.sh ( exactly in this spelling ).  If you
>>>> enter:
>>>>
>>>> vim x.sh ( also exactly in this spelling )
>>>>
>>>> and write it back after any modification, the file will be renamed even
>>>> to x.sh.  This behavior is very nasty if such file is used by programs
>>>> which are case-sensitive for file names, example: SCM program perforce.
>>>> 
>>> This isn't a vim problem.  Windows filename handling is case-insensitive.
>>>
>>> I suppose that there could be a vim option to deal with this case but
>>> that would require modifying vim, i.e., PTC* by the upstream vim
>>> developers.
>>>   
>> Actually, there already is such an option...
>>
>> $ touch X
>> $ ls -l
>> total 0
>> -rw-r--r--  1 mscha None 0 Nov  4 01:29 X
>> $ vim x
>> :wq!
>> $ ls -l
>> total 0
>> -rw-r--r--  1 mscha None 0 Nov  4 01:30 x
>> $ rm x
>> $ touch X
>> $ vim -c 'set backupcopy=yes' x
>> :wq!
>> $ ls -l
>> total 0
>> -rw-r--r--  1 mscha None 0 Nov  4 01:30 X
>>
>> See ":help backupcopy" for details.  It defaults to "auto", which is
>> kinda unpredictable.  Set it to "yes", and it might be a bit slower, but
>> won't mess with your case.  :-)
>> 
>
> More interestingly, ":help backupcopy" says:
>
> (Vi default for Unix: "yes", otherwise: "auto")
>
> This means that VIm treats Cygwin as non-Unix.  Shouldn't the Cygwin
> default be the same as for Unix?
>   
Good point, I missed that...

Actually, it turns out that Cygwin *does* use the UNIX default. 
However, when 'compatible' is not set (e.g. when a .vimrc exists) it
sets backupcopy=auto.  (See ":help compatible")
That explains the varying experiences in this mailing list...

 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: VIM - Vi IMproved 6.4 (2005 Oct 15, compiled Oct 17 2005 11:54:34

2005-11-03 Thread Michael Schaap
On 20-Oct-2005 16:42, Christopher Faylor wrote:
> On Thu, Oct 20, 2005 at 04:15:34PM +0200, Christoph Jeksa wrote:
>   
>> there is a bug in this version:
>>
>> Supposed, you have a file X.sh ( exactly in this spelling ).  If you
>> enter:
>>
>> vim x.sh ( also exactly in this spelling )
>>
>> and write it back after any modification, the file will be renamed even
>> to x.sh.  This behavior is very nasty if such file is used by programs
>> which are case-sensitive for file names, example: SCM program perforce.
>> 
>
> This isn't a vim problem.  Windows filename handling is case-insensitive.
>
> I suppose that there could be a vim option to deal with this case but
> that would require modifying vim, i.e., PTC* by the upstream vim
> developers.
>
>   
Actually, there already is such an option...

$ touch X
$ ls -l
total 0
-rw-r--r--  1 mscha None 0 Nov  4 01:29 X
$ vim x
:wq!
$ ls -l
total 0
-rw-r--r--  1 mscha None 0 Nov  4 01:30 x
$ rm x
$ touch X
$ vim -c 'set backupcopy=yes' x
:wq!
$ ls -l
total 0
-rw-r--r--  1 mscha None 0 Nov  4 01:30 X

See ":help backupcopy" for details.  It defaults to "auto", which is
kinda unpredictable.  Set it to "yes", and it might be a bit slower, but
won't mess with your case.  :-)

 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygstart regression [Was: Re: on the road to 1.5.19 - snapshot testing needed]

2005-10-03 Thread Michael Schaap
On 3-Oct-2005 18:56, Aaron Humphrey wrote:
> On 10/2/05, Michael Schaap wrote:
>   
>> To be able to check whether something has changed in the path handling,
>> I've uploaded a version of cygstart that prints out the exact
>> ShellExecute call it is making, at
>> <http://www.mscha.org/cygstart_dbg.zip>.  Could you perhaps download
>> that, try it out both with a snapshot and 1.5.18, and let us know
>> whether it prints out something different?
>> 
>
> With 20050930 snapshot, running 'cygstart_dbg empty.mdb':
>
> ShellExecute(
> "(null)",
> "(null)",
> "empty.mdb",
> "(null)",
> "(null)",
> 1
> );
>
> With 1.5.18, the same command:
>
> ShellExecute(
> "(null)",
> "(null)",
> "empty.mdb",
> "(null)",
> "(null)",
> 1
> );
>
> They look pretty similar to me.
>
>   
Indeed.
That pretty much rules out that something is broken in path conversion.

>> If that's not it, then I don't know what it could be.  Must have
>> something to do with timing, or the exact memory location, or something
>> like that, especially since the problem disappears under strace...
>> To track it down, perhaps you could try:
>>  - "cmd /c start whatever.mdb" from a Cygwin prompt
>> 
>
> Works.  So at least this gives me a better workaround than running strace,
> if I can remember it.
>
>   
That seems to rule out that something in the environment (variables) is
causing the problem.

>>  - "cygstart whatever.mdb" from a cmd.exe command prompt
>> 
>
> Works.
>
>   
This more or less rules out a cygstart bug, or for that matter, a Cygwin
bug.

>>  - save the simplest possible Access database, and see if cygstart can
>> open that
>> 
>
> Doesn't work.
>
>   
That makes it unlikely that it's really running out of memory.  Must be
that "system error", then...

>>  - make sure whatever.mdb is on a local disk, in the current directory,
>> and has a simple file name
>> 
>
> 'empty.mdb' is in 'C:\'.  Running 'cygstart empty.mdb' from /cygdrive/c 
> doesn't
> work.
>
>   
Yeah, that's pretty much as simple as it gets.

> For all cases, "works" means that the mdb file comes up properly in Access 97,
> whereas "doesn't work" means the error message mentioned in my original
> email on the subject(http://cygwin.com/ml/cygwin/2005-09/msg00923.html).
>
> For another data point, cygstart works fine on my Windows 98 SE computer,
> running a recent snapshot(forget which one, sorry), but it has Access 2000.
>
>   
I'm afraid I'm fresh out of ideas.  It looks like this might be a bug in
Access 97, or perhaps something wrong on your computer, triggered by
some random change in cygwin1.dll.

Sorry I couldn't be of more help,

 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygstart regression [Was: Re: on the road to 1.5.19 - snapshot testing needed]

2005-10-02 Thread Michael Schaap

On 1-Oct-2005 5:28, Eric Blake wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Charles Wilson on 9/30/2005 10:07 AM:
  

cygstart was contributed by Michael Schapp, who is still around but
doesn't post often.  cygstart, aside from its option handling, is a very
simple app.  The core routine just uses the Windows 'ShellExecute'
function on the specified file.  Windows is then responsible for looking
up the associated application in the registry, starting it, and causing
it to load the specified file.  I don't see how anything in cygwin
itself can affect that.



By the way, there is an outstanding cygstart patch that has yet to be
applied, at:
http://cygwin.com/ml/cygwin/2005-07/msg01082.html

  

Indeed.
Chuck, could you be so kind to apply this patch and release a new 
version at your convenience?


(There's another outstanding patch in 
, but I bet that 
one won't make it in.  :-) )


Thanks in advance,

- Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygstart regression [Was: Re: on the road to 1.5.19 - snapshot testing needed]

2005-10-02 Thread Michael Schaap

On 30-Sep-2005 18:07, Charles Wilson wrote:

Christopher Faylor wrote:

On Fri, Sep 30, 2005 at 09:17:06AM -0600, Aaron Humphrey wrote:

I just did some version testing on the cygstart .mdb problem I 
reported a few

days ago(http://cygwin.com/ml/cygwin/2005-09/msg00923.html), and it is
indeed a regression from 1.5.18.  Cygstart works fine with 1.5.18, 
but as
early as the 20050909 snapshot(as far back as I have)it fails on MDB 
files.



Sorry but I don't have Microsoft Access so I can't check this.  I 
don't consider

this a show-stopper either, unfortunately.

cygstart comes from cygutils.  I don't remember the genesis of this
utility (just because it is in cygutils doesn't mean that Chuck is
responsible for it) but it would be nice if the person who supports this
utility would comment here.


cygstart was contributed by Michael Schapp, who is still around but 
doesn't post often.  cygstart, aside from its option handling, is a 
very simple app.  The core routine just uses the Windows 
'ShellExecute' function on the specified file.  Windows is then 
responsible for looking up the associated application in the registry, 
starting it, and causing it to load the specified file.  I don't see 
how anything in cygwin itself can affect that.


The ONLY thing I can think of is changes in path handing (conversion 
between 'unix' and 'windows') as cygstart tries to prepare the target 
file's pathname for passing into the ShellExecute function -- variable 
name 'aPath' in the code below.


But I'll defer to Michael for futher analysis.

As Chuck states, cygstart is a very simple program, and it is indeed 
unlikely that anything in it is causing this problem.


To be able to check whether something has changed in the path handling, 
I've uploaded a version of cygstart that prints out the exact 
ShellExecute call it is making, at 
.  Could you perhaps download 
that, try it out both with a snapshot and 1.5.18, and let us know 
whether it prints out something different?


If that's not it, then I don't know what it could be.  Must have 
something to do with timing, or the exact memory location, or something 
like that, especially since the problem disappears under strace...

To track it down, perhaps you could try:
- "cmd /c start whatever.mdb" from a Cygwin prompt
- "cygstart whatever.mdb" from a cmd.exe command prompt
- save the simplest possible Access database, and see if cygstart can 
open that
- make sure whatever.mdb is on a local disk, in the current directory, 
and has a simple file name


Hope that helps,

 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: missing sh.exe in coreutils

2005-08-15 Thread Michael Schaap

On 15-Aug-2005 10:45, Brian Dessent wrote:

Sigurd Nes wrote:

  

Is sh.exe missing from coreutils?

I am not able to use sh after a upgrade - and sh-utils is listed as _obsolete



First, sh is not a part of coreutils nor its predecessor sh-utils. 
Until recently, /bin/sh has been ash, in the package 'ash'.  Now it is a

copy of /bin/bash, from the package 'bash'.  The new bash postinstall
script is supposed to make this change for you when upgrading, but
because the shell itself is used to run the script it does not always
work.  You can just manually run /etc/postinstall/00bash.sh.done and it
should fix things.  Or re-run setup and set 'bash' to reinstall.

  
Apologies if I'm stating something obvious and well-known, but if the 
problem is that a currently running sh.exe cannot be 
deleted/overwritten, note that you *can* rename a running executable.

So something like
   rm -f /bin/sh0.exe
   [[ -f /bin/sh.exe ]] && mv /bin/sh.exe /bin/sh0.exe
   cp -fpuv /bin/bash.exe /bin/sh.exe
might do the job.

- Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Error using cygstart command with option arguments: "cygstart: bad argument"

2005-07-24 Thread Michael Schaap

On 24-Jul-2005 2:01, Eric Blake wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Brian Dessent on 7/23/2005 2:24 PM:
  

$ cygstart bash -c echo Hi There
cygstart: bad argument -c: unknown option
  

The problem that you are running into is that you need to tell cygstart
that the -c and following arguments are meant for the child process, and
are not arguments to cygstart itself.  '--' is a standard way of doing
this, which indicates to the program that all of the following arguments
should not be interpreted as switches but just regular data.  So
"cygstart -- bash -c ..." ought to work.



Or you could patch cygstart to not permute arguments (by the way, cygutils
was hard to bootstrap from CVS.  I had to run `gettextize -f', and now
have several CVS conflicts where generated files conflict with the results
of the gettextize and ./bootstrap):

2005-07-23  Eric Blake  <[EMAIL PROTECTED]>

* src/cygstart/cygstart.c (main): Don't permute options.

Index: src/cygstart/cygstart.c
===
RCS file: /cvs/cygwin-apps/cygutils/src/cygstart/cygstart.c,v
retrieving revision 1.4
diff -u -p -r1.4 cygstart.c
- --- src/cygstart/cygstart.c 16 May 2005 20:18:52 -  1.4
+++ src/cygstart/cygstart.c 23 Jul 2005 23:56:48 -
@@ -176,7 +176,8 @@ int main(int argc, const char **argv)
 }

 /* Parse options */
- -optCon = poptGetContext(NULL, argc, argv, opt, 0);
+optCon = poptGetContext(NULL, argc, argv, opt,
+   POPT_CONTEXT_POSIXMEHARDER);
 poptSetOtherOptionHelp(optCon, "[OPTION]... FILE [ARGUMENTS]");
 while ((rc = poptGetNextOpt(optCon)) > 0) {
 switch (rc) {
  

This patch makes sense to me, so gets my blessing (FWIW :-)

Chuck, can you apply this patch?

Thanks,

– Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Patch for cygutils: make cygstart behave better under mount -X

2005-05-16 Thread Michael Schaap
On 16-May-2005 22:59, Charles Wilson wrote:

> Michael Schaap wrote:
>
>>
>> Chuck, can you, at your convenience, apply this patch and release a new
>> version of cygutils?
>
>
> Look for 1.2.8 on a mirror near you. Thanks for the patch.
>
Thanks!

– Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Patch for cygutils: make cygstart behave better under mount -X

2005-05-12 Thread Michael Schaap
Hi,

Attached is a patch to fix cygstart behaviour when running under "mount
-X".  Cygstart now ensures that the Windows environment is synchronized
with the Cygwin one.
(For more details, see the recent thread: "Fixing strace and cygcheck so
that they work with mount -X")

Chuck, can you, at your convenience, apply this patch and release a new
version of cygutils?

Thanks in advance,

 - Michael

--- ORIG/cygstart.c 2005-03-08 06:22:51.0 +0100
+++ cygstart.c  2005-05-12 00:37:06.04725 +0200
@@ -40,7 +40,7 @@
 #define MSDN_URL "http://msdn.microsoft.com/library/en-us/shellcc/platform/"; \
  "Shell/reference/functions/shellexecute.asp"
 
-static const char versionID[] = "1.0";
+static const char versionID[] = "1.2";
 /* for future CVS */
 static const char revID[] =
"$Id: cygstart.c,v 1.3 2005/03/08 05:22:51 cwilson Exp $";
@@ -64,6 +64,7 @@
 static void help(poptContext optCon, FILE *f, char *name);
 static void version(poptContext optCon, FILE *f, char *name);
 static void license(poptContext optCon, FILE *f, char *name);
+static void setup_win_environ(void);
 
 int main(int argc, const char **argv)
 {
@@ -404,6 +405,9 @@
 {
 int ret;
 
+/* Need to sync the Windows environment when running under "mount -X" */
+setup_win_environ();
+
 ret = (int) ShellExecute(NULL, action, aPath, args, workDir, show);
 if (ret >= 32) {
 return TRUE;
@@ -511,3 +515,25 @@
   printTopDescription(f, name);
   printLicense(f, name);
 }  
+
+/* Copy cygwin environment variables to the Windows environment if they're not
+ * already there. */
+static void setup_win_environ(void)
+{
+char **envp = environ;
+char *var, *val;
+char curval[2];
+
+while (envp && *envp) {
+var = strdup(*envp++);
+val = strchr(var, '=');
+*val++ = '\0';
+
+if (GetEnvironmentVariable(var, curval, 2) == 0
+&& GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
+SetEnvironmentVariable(var, val);
+}
+
+free(var);
+}
+}


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

Re: Fixing strace and cygcheck so that they work with mount -X

2005-05-12 Thread Michael Schaap
On 12-May-2005 1:49, David Rothenberger wrote:

>
>> Revised patch attached.  Can you try this out and see if it still works
>> for you?  If you confirm this, I'll resend the patch in a new, more
>> obviously titled thread, to attract Chuck's attention.  ;-)
>
>
> Works fine for me. Start attracting!
>
Thanks!

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Fixing strace and cygcheck so that they work with mount -X

2005-05-11 Thread Michael Schaap
On 11-May-2005 20:58, David Rothenberger wrote:

> On 5/11/2005 9:53 AM, Christopher Faylor wrote:
>
>> On Wed, May 11, 2005 at 11:40:36AM -0400, Christopher Faylor wrote:
>>
>>> It sounds like you need to read MSDN on CreateProcess and see what
>>> it says
>>> about "lpEnvironment":
>>>
>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp
>>>
>>
>
> cygstart uses ShellExecute, not CreateProcess.
>
>> Btw, from the description, it sounds like cygstart is broken right now
>> and could be fixed right now.  You don't need any of the functionality
>> from the snapshot.  You just need to construct a windows lpEnvironment
>> block from the UNIX-like global variable, provided by cygwin: "extern
>> char **environ".
>
>
> The attached patch fixes cygstart for me. It copies all missing Cygwin
> environment variables to the Windows environment before invoking
> ShellExecute.
>
Indeed, that's the help I needed!  :-)

The patch as-is doesn't compile for me, though, I presume because
char **envp = (char **) cygwin_internal (CW_ENVP);
uses a not-yet-released Cygwin enhancement.  But when I change it to the
simpler and more standard
char **envp = environ;
it compiles and works fine, both under mount -X and normally.

(At first I was a bit suspicious of the logic - it only sets those
Windows variables that are not currently set, so what about variables
that were changed or deleted within Cygwin? - but it looks like the
Windows environment isn't the standard pre-Cygwin user environment, but
a minimal one with only PATH and SYSTEMROOT set, so it actually does
behave optimally this way - it sets all other variables when running
under mount -X, and sets nothing otherwise.)

Revised patch attached.  Can you try this out and see if it still works
for you?  If you confirm this, I'll resend the patch in a new, more
obviously titled thread, to attract Chuck's attention.  ;-)

Thanks for your and Chris' assistance,

 - Michael
--- ORIG/cygstart.c 2005-03-08 06:22:51.0 +0100
+++ cygstart.c  2005-05-12 00:37:06.04725 +0200
@@ -40,7 +40,7 @@
 #define MSDN_URL "http://msdn.microsoft.com/library/en-us/shellcc/platform/"; \
  "Shell/reference/functions/shellexecute.asp"
 
-static const char versionID[] = "1.0";
+static const char versionID[] = "1.2";
 /* for future CVS */
 static const char revID[] =
"$Id: cygstart.c,v 1.3 2005/03/08 05:22:51 cwilson Exp $";
@@ -64,6 +64,7 @@
 static void help(poptContext optCon, FILE *f, char *name);
 static void version(poptContext optCon, FILE *f, char *name);
 static void license(poptContext optCon, FILE *f, char *name);
+static void setup_win_environ(void);
 
 int main(int argc, const char **argv)
 {
@@ -404,6 +405,9 @@
 {
 int ret;
 
+/* Need to sync the Windows environment when running under "mount -X" */
+setup_win_environ();
+
 ret = (int) ShellExecute(NULL, action, aPath, args, workDir, show);
 if (ret >= 32) {
 return TRUE;
@@ -511,3 +515,25 @@
   printTopDescription(f, name);
   printLicense(f, name);
 }  
+
+/* Copy cygwin environment variables to the Windows environment if they're not
+ * already there. */
+static void setup_win_environ(void)
+{
+char **envp = environ;
+char *var, *val;
+char curval[2];
+
+while (envp && *envp) {
+var = strdup(*envp++);
+val = strchr(var, '=');
+*val++ = '\0';
+
+if (GetEnvironmentVariable(var, curval, 2) == 0
+&& GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
+SetEnvironmentVariable(var, val);
+}
+
+free(var);
+}
+}

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

Re: Fixing strace and cygcheck so that they work with mount -X

2005-05-11 Thread Michael Schaap
On 10-May-2005 17:17, Christopher Faylor wrote:

>On Mon, May 09, 2005 at 09:19:14PM +0200, Michael Schaap wrote:
>  
>
>>On 9-May-2005 19:22, David Rothenberger wrote:
>>
>>
>>
>>>Does cygstart also need to be fixed? I've found that it doesn't
>>>propagate the full Cygwin environment when /bin is mounted in cygexec
>>>mode.
>>>
>>>% cygstart -- /bin/rxvt -e bash -c "'env; read x'"
>>>
>>>prints out a small set of environment variables when /bin is mounted
>>>in cygexec. When /bin is mounted normally, it gets the full environment.
>>>  
>>>
>>Well, cygstart is a proper Cygwin executable. However, it does use a
>>Windows API call (ShellExecute, see "cygstart --reference") to execute
>>whatever needs to be started, so I can see how it might depend on a
>>properly synchronized Windows environment.
>>
>>If anyone can tell me how to do this, I'll be happy to make the change
>>to cygstart.
>>
>>
>
>This shows what I did to cygcheck:
>
>http://sources.redhat.com/cgi-bin/cvsweb.cgi/winsup/utils/cygcheck.cc.diff?cvsroot=uberbaum&r1=1.65&r2=1.66
>
>It's possible that the environment code may just work.  Otherwise,
>you'll have to grab the environment from cygwin and build a new
>environment block, I assume.
>
>  
>
Well, I gave it a try, but no success.
Since cygstart is a proper Cygwin executable, and cygcheck a normal
Windows one, the code needs to be quite different.  And my knowledge of
either Cygwin or Windows internals is not enough to write this myself.
So, any additional help would be appreciated.

Thanks anyway,

 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygwin and gmail problems? Remote host said: 530 5.7.0 Must issue a STARTTLS command first

2005-05-11 Thread Michael Schaap
On 10-May-2005 19:04, Matt Wilkie wrote:

>Hi All,
>
>gmail doesn't seem to like messages from the cygwin mailing list
>today. Did anybody else get a notice like this?
>
>  
>
(...)

>
>--- Enclosed is a copy of the bounce message I received.
>
>Return-Path: <>
>Received: (qmail 22555 invoked for bounce); 28 Apr 2005 23:28:08 -
>Date: 28 Apr 2005 23:28:08 -
>  
>
Note that the actual bounce included was from a couple of weeks ago. 
And Gmail was indeed briefly bouncing random messages - not just from
this or any mailing list - at that time.

 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Fixing strace and cygcheck so that they work with mount -X

2005-05-09 Thread Michael Schaap
On 9-May-2005 19:22, David Rothenberger wrote:

> On 5/8/2005 7:26 PM, Christopher Faylor wrote:
>
>> On Sun, May 08, 2005 at 08:21:26PM -0400, Christopher Faylor wrote:
>>
>>> Ultimately, I just have to make strace and cygcheck understand the
>>> cygwin arguments and environment variables. Then we won't need this.
>>
>>
>> I would appreciate it if people would check out the latest snapshot to
>> verify if I actually got this working in all scenarios (directories
>> mounted with -X, -x, not mounted at all, or mounted without -X and -x).
>
>
> Does cygstart also need to be fixed? I've found that it doesn't
> propagate the full Cygwin environment when /bin is mounted in cygexec
> mode.
>
> % cygstart -- /bin/rxvt -e bash -c "'env; read x'"
>
> prints out a small set of environment variables when /bin is mounted
> in cygexec. When /bin is mounted normally, it gets the full environment.
>
Well, cygstart is a proper Cygwin executable. However, it does use a
Windows API call (ShellExecute, see "cygstart --reference") to execute
whatever needs to be started, so I can see how it might depend on a
properly synchronized Windows environment.

If anyone can tell me how to do this, I'll be happy to make the change
to cygstart.

– Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Problem with symbolic links and cygpath in 1.5.14

2005-04-08 Thread Michael Schaap
On 8-Apr-2005 16:24, Jörg Schaible wrote:
Michael Schaap wrote on Friday, April 08, 2005 4:03 PM:
 

$ uname -a
CYGWIN_NT-5.1 PHB 1.5.14(0.126/4/2) 2005-04-01 13:40 i686 unknown
unknown Cygwin 

$ ln -s /bin /tmp
$ cygpath -w /tmp/bin
C:\cygwin\bin
$ cygpath -w /tmp/bin/ls.exe
C:\cygwin\tmp\bin\ls.exe
   

Already reported. Use a snapshot, it's fixed.
 

Oops.  :-[  That'll teach me to just scan the mailing list instead of 
doing a proper search...

Anyway, confirmed, works fine with snapshot.
Thanks,
- Michael
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Problem with symbolic links and cygpath in 1.5.14

2005-04-08 Thread Michael Schaap
$ uname -a
CYGWIN_NT-5.1 PHB 1.5.14(0.126/4/2) 2005-04-01 13:40 i686 unknown 
unknown Cygwin

$ ln -s /bin /tmp
$ cygpath -w /tmp/bin
C:\cygwin\bin
$ cygpath -w /tmp/bin/ls.exe
C:\cygwin\tmp\bin\ls.exe
-
Worked fine in 1.5.13.
– Michael
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: cygstart patch

2005-03-08 Thread Michael Schaap
On 8-Mar-2005 6:21, Charles Wilson wrote:
Michael Schaap wrote:
This time with patch.  :-[

Applied.
Thanks, Chuck!
– Michael
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: cygstart patch

2005-03-07 Thread Michael Schaap
This time with patch.  :-[
– Michael
On 8-Mar-2005 2:13, Michael Schaap wrote:
Hi Anthony, Chuck, all,
On 4-Mar-2005 4:21, Charles Wilson wrote:
Anthony --
I've applied this patch. Thanks!

Sorry for jumping in so late...
While I agree that the revised patch looks good and does the job, I'm 
not too happy with the constant reallocation that's going on. (I know, 
there won't be a measurable performance impact, but it, well, just 
looks wring to me. ;-) )

In any case, here's a proposed alternative patch (against the version 
containing Anthony's patch already) which calculates the actual total 
argument size in advance, before allocating.
(In addition, I've taken the opportunity to change the listed email 
address (cygwin_start at mscha dot org), which I had to block long ago 
due to the ongoing stream of spam and viruses, to a new one, obscured 
this time. Plus, I changed the feedback address to the mailing list 
address (also obscured), since the list is obviously much more 
responsive than I am. :-/ )

Chuck, if this looks OK to you, can you apply this patch?
Thanks, also to Anthony and all for everything you've done.
– Michael
PS: That free() bug was very embarrassing... :-[ (Hmm... why do I even 
draw attention to that again? ;-) )

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

diff -u ORIG/cygstart.1 ./cygstart.1
--- ORIG/cygstart.1 2002-03-15 04:51:30.0 +0100
+++ ./cygstart.12005-03-08 01:42:09.214625000 +0100
@@ -194,7 +194,7 @@
 
 .\"{{{  Author
 .SH AUTHOR
-Michael Schaap <[EMAIL PROTECTED]>
+Michael Schaap 
 .\"}}}
 .\"{{{  See also
 .SH "SEE ALSO"
diff -u ORIG/cygstart.c ./cygstart.c
--- ORIG/cygstart.c 2005-03-08 01:22:15.42225 +0100
+++ ./cygstart.c2005-03-08 01:41:21.16775 +0100
@@ -1,7 +1,7 @@
 /*
  * cygstart - Let Windows start a program, or open a file or URL
  *
- * (c) 2002 Michael Schaap <[EMAIL PROTECTED]>
+ * (c) 2002 Michael Schaap 
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -74,6 +74,8 @@
 int ret;
 char *action = NULL;
 char *file = NULL;
+size_t argLength;
+const char **tmp;
 char *args = NULL;
 char *workDir = NULL;
 int show = SW_SHOWNORMAL;
@@ -102,7 +104,7 @@
 { NULL, '\0', 0, NULL, 0, NULL, NULL }
 };
 
-/* SHow options */
+/* Show options */
 struct poptOption showOptionsTable[] = {
 { "hide",  '\0',  POPT_ARG_NONE, NULL, 'H', \
   "Hides the window and activates another window", NULL},
@@ -340,16 +342,17 @@
 
 /* Retrieve any arguments */
 if (rest && *rest) {
-if ((args = (char *) malloc(strlen(*rest)+1)) == NULL) {
+tmp = rest;
+argLength = strlen(*tmp);
+while (tmp++ && *tmp) {
+argLength += 1 + strlen(*tmp);
+}
+if ((args = (char *) malloc(argLength+1)) == NULL) {
 fprintf(stderr, "%s: memory allocation error\n", argv[0]);
 exit(1);
-}   
+}
 strcpy(args, *rest);
 while (rest++ && *rest) {
-if ((args = (char *) realloc(args, strlen(args)+strlen(*rest)+2)) 
== NULL) {
-fprintf(stderr, "%s: memory allocation error\n", argv[0]);
-exit(1);
-}  
 strcat(args, " ");
 strcat(args, *rest);
 }
@@ -464,7 +467,7 @@
 {
 fprintf(f, "\n");
 fprintf(f, "With thanks to MSDN: <%s>\n\n", MSDN_URL);
-fprintf(f, "Please report any bugs to <[EMAIL PROTECTED]>.\n");
+fprintf(f, "Please report any bugs to .\n");
 }
 
 static printLicense(FILE *f, char *name)

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

Re: cygstart patch

2005-03-07 Thread Michael Schaap
Hi Anthony, Chuck, all,
On 4-Mar-2005 4:21, Charles Wilson wrote:
Anthony --
I've applied this patch. Thanks!

Sorry for jumping in so late...
While I agree that the revised patch looks good and does the job, I'm 
not too happy with the constant reallocation that's going on. (I know, 
there won't be a measurable performance impact, but it, well, just looks 
wring to me. ;-) )

In any case, here's a proposed alternative patch (against the version 
containing Anthony's patch already) which calculates the actual total 
argument size in advance, before allocating.
(In addition, I've taken the opportunity to change the listed email 
address (cygwin_start at mscha dot org), which I had to block long ago 
due to the ongoing stream of spam and viruses, to a new one, obscured 
this time. Plus, I changed the feedback address to the mailing list 
address (also obscured), since the list is obviously much more 
responsive than I am. :-/ )

Chuck, if this looks OK to you, can you apply this patch?
Thanks, also to Anthony and all for everything you've done.
– Michael
PS: That free() bug was very embarrassing... :-[ (Hmm... why do I even 
draw attention to that again? ;-) )

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: Updated: fortune-1.99.1-1

2005-01-21 Thread Michael Schaap
On 21-Jan-2005 23:59, Yitzchak Scott-Thoennes wrote:
On Fri, Jan 21, 2005 at 04:49:21PM +0100, Michael Schaap wrote:
 

Hi Yitzckak,
On 13-Jan-2005 21:27, Yitzchak Scott-Thoennes wrote:
   

Achilles:  Don't tell me you believe in fortune-telling!
Tortoise:  No...but they say it works even if you don't believe in it.
   -- GEB, Hofstadter
I've made a new version of fortune available for installation.
 

Thanks for bracing the storm and doing this!
One thing, though: this version is much, much slower than the previous 
one. It takes around a second to produce a fortune, while the old one 
ran pretty much instantaneously. (This is on a high end XP box.)
   

Is that the first time you run it, or every time?  For me it goes
much faster on subsequent runs, presumably due to disk cache.
 

Indeed, it is quite a bit faster on subsequent runs ("time fortune -a" 
initially reports 1.3 seconds, subsequently 0.3 seconds), although it 
'forgets' this quite quicky, after a minute or so it's back to 1.3 already.

When I run "strace fortune", the new version produces 16,771 lines of 
output. The old version produces 467 lines...
I won't attach it to this message, for size reasons.
   

I will actually try it in the next day or so, but I believe this is
due to a bug in the old fortune version where the -a switch was
disregarded and only a single fortune file checked.
Hmm, I never noticed. So that's why I didn't get offended. ;-)
 Additionally,
the old fortune had fewer fortunes in far fewer files.
 

I think that's certainly part of the reason. However, that probably 
doesn't explain the whole slowdown: there are now about 35 times as many 
system calls...

By the way, I'm also running fortune-mod version 9708, with almost as 
many fortunes, on a Linux box (with lower specs than my Windows box), 
and there it's running much faster: 0.015s on the first run.
There are no *.u8 symlinks there, by the way. And I tried removing those 
from the Cygwin /usr/share/games/fortunes directory: that actually makes 
it about twice as fast... Are those *.u8 symlinks doing anything useful?

Nevertheless, I will see if there's any way to speed up the selection
from any files.
As a workaround, you can cat together the base fortune files (those
without a .dat or .u8 extension), run /usr/bin/strfile on it to create
the .dat file, and create a .u8 symlink to it.  Then run fortune without
the -a switch but with your large file name.
 

Yeah, that helps quite a bit.
With only two fortune files (one regular, one offensive), and without 
the .u8 symlinks, it runs pretty smoothly: 0.064 seconds.
(For the record: for the offensive fortunes, use "strfile -x".)

Thanks,
– Michael
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: Updated: fortune-1.99.1-1

2005-01-21 Thread Michael Schaap
Hi Yitzckak,
On 13-Jan-2005 21:27, Yitzchak Scott-Thoennes wrote:
  Achilles:  Don't tell me you believe in fortune-telling!
  Tortoise:  No...but they say it works even if you don't believe in it.
 -- GEB, Hofstadter
I've made a new version of fortune available for installation.
 

Thanks for bracing the storm and doing this!
One thing, though: this version is much, much slower than the previous 
one. It takes around a second to produce a fortune, while the old one 
ran pretty much instantaneously. (This is on a high end XP box.)

When I run "strace fortune", the new version produces 16,771 lines of 
output. The old version produces 467 lines...
I won't attach it to this message, for size reasons.

You might think: what's the big deal, a second to run fortune, but I'm 
running fortune from my prompt(*), so I now have to wait up to a second 
for my prompt to appear.

– Michael
(*): This is using zsh. I basically have the following lines in my .zshrc:
# Load color arrays
autoload colors
colors
# Fortune before every prompt
precmd()
{
echo -n "\n$fg[blue]"
fortune -a -s # but think about the children...
echo -n "$reset_color"
}
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: Please update cvs

2004-01-26 Thread Michael Schaap
On 26-Jan-2004 19:30, Reini Urban wrote:

Maintainer: Charles Wilson
We have 1.13.6
1.11.6

See http://ccvs.cvshome.org/ => News

Current stable is 1.11.11
Current feature (exp) version is 1.12.5
There exist multiple security problems with version 1.13.6 and
1.13.6 has zlib problems with the latest cygwin1-20040124.dll.bz2 
release. Maybe it's related, but at least I would like to give it a try.
This actually doesn't seem to be a Cygwin problem.  Since I upgraded my 
(Linux) server to 1.11.11, I've had such problems with older clients on 
multiple platforms (Cygwin, Linux, HP-UX.)
It looks like the CVS folks made some non-backwards-compatible changes... 

Anyway, updating any clients does seem to fix the problem, so a Cygwin 
package update to 1.11.11 would indeed be welcome.

- Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: Updated: vim-6.2-1

2003-06-05 Thread Michael Schaap
Corinna Vinschen wrote:

I have no idea what gvim is actually good for.
The non-GUI version runs very nicely inside of xterm or rxvt,
so what?
For me, mostly force of habit, these days.  Mouse support under rxvt is 
now pretty decent (hmm...  looks like dragging the status bar between 
two split windows doesn't work in rxvt), color support is OK (although 
you're limited to the standard colors, and there's no bold, 
italic and underline, for instance).  I guess the main 
convenience of using gvim, for me, is that it frees up my terminal to do 
other stuff (like, follow the instructions in the README.txt I just opened).

  <-- just a rethorical question

Oh.  Sorry...  ;-)

- Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: Updated: vim-6.2-1

2003-06-05 Thread Michael Schaap
Corinna Vinschen wrote:

On Wed, Jun 04, 2003 at 08:36:07PM -0400, Brett  Serkez (cygwin) wrote:
 

Corinna,

Looks like this version of vim doesn't have GUI support compiled in.  

Are there any plans to build GUI support so that vim -g works on Cygwin?
   

Nope.  If anybody wants to contribute and maintain an additional "gvim"
package, feel free.
The problem is: what GUI?

An X-based GUI would be an option, but that would require you to run an 
X server, such as Cygwin-XFree, whenever you want to run gvim.  (Also, 
to have a decent looking GUI, you'd need some GUI toolkit like GTK 
available.)

The Win32 GUI is not ported to Cygwin.  If you use Make_cyg.mak, you get 
a Win32 gvim.exe, not a Cygwin gvim.exe.  (If you use USEDLL=yes, you 
seem to get a weird hybrid Win32/Cygwin app, which is probably not safe 
to use.)

Somewhere deep down on my rainy day list is a plan to port the Win32 GUI 
to the UNIX (./configure; make) based vim build.  (With some cygwin path 
conversion functions inserted here and there, so that the dialog boxes 
use Win32 paths, as they have to, but within gvim, Posix paths are 
used.)  Don't hold your breath though, and if someone beats me to it, 
great!  :-)

- Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: NTsec permissions issue over inet

2003-05-29 Thread Michael Schaap
Igor Pechtchanski wrote:

For the future, please *attach* the cygcheck output to avoid generating
false positives on message archive search.
 

Random idea: would it be possible to instruct ezmlm-idx to bounce 
messages containing cygcheck output in the body?  (Or enough text to 
identify cygcheck output, with a small risk of false positives, e.g.
   Cygwin Win95/NT Configuration Diagnostics
   Current System Time:
?

- Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: rxvt and mouse wheel

2003-03-17 Thread Michael Schaap
On 17-Mar-2003 10:39, Virginia Mann wrote:
It appears that the version of rxvt installed by the Cygwin installer 
wasn't compiled with wheel mouse support. Of course I may be mistaken 
and am just doing something wrong.
WFM.  :-)

You should have a look around your Control Panel - Mouse settings. 
Depending on which driver you use, it's probably possible to put rxvt on 
an "exception list" - tell the mouse driver not to use its own wheel 
handling, but let rxvt figure it out itself.

HTH,

 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: cygstart, mutt or mailcap?

2003-02-23 Thread Michael Schaap
On 23-Feb-2003 21:45, Andrew Markebo wrote:
|> Wild guess:
|>   1. Mutt saves the file to /tmp/something.doc
|>   2. Mutt runs "cygstart /tmp/something.doc"
|>   3. Cygstart starts Word (if necessary) and tells it to load the doc,
|>  and exits immediately.
|>   4. Since Cygstart has exited, Mutt deletes /tmp/something.doc
|>   5. Word is still loading the file and gets in trouble
Wild guess 2 (sorry if I have missed this thought before)

/tmp/something.doc gets sent to cygstart... points to
c:\cygwin\tmp\something.doc, who opens word with "/tmp/something.doc",
who looks for c:\tmp\something.doc?
Nope: cygstart is Posix-path-aware, so will translate /tmp/something.doc 
to (usually) c:\tmp\something.doc internally.

 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: cygstart, mutt or mailcap?

2003-02-23 Thread Michael Schaap
On 23-Feb-2003 19:07, Igor Pechtchanski wrote:
I tried everything now it may have something to do with starting it
directly from a view command within mutt.  If I save it and then start
it either through windows or cygstart command it does not have any
corruption.

Wild guess:
 1. Mutt saves the file to /tmp/something.doc
 2. Mutt runs "cygstart /tmp/something.doc"
 3. Cygstart starts Word (if necessary) and tells it to load the doc,
and exits immediately.
 4. Since Cygstart has exited, Mutt deletes /tmp/something.doc
 5. Word is still loading the file and gets in trouble
Just had a wild idea: try setting your .doc rule in your .mailcap as follows:

Application/MSWORD;  cp %s /tmp/blah.doc && cygstart /tmp/blah.doc; copiousoutput;

It should set the permissions and ownership of /tmp/blah.doc to your
current user...  Don't know if it'll help...
If my theory, correction, wild guess is correct, then this might indeed 
help.

 – Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: Win 2000 : Open Files With Word & Excel From The Command Line

2003-02-15 Thread Michael Schaap
On 15-Feb-2003 06:14, Randall R Schulz wrote:

Steve,

Double damn!

Or maybe... Third time's the charm. Yeah, that's it!

-==-
#!/bin/bash

wwArgs=()

for arg; do
wwArgs[${#wwArgs[@]}]="$(cygpath -m "$arg")"
done

exec "/cygdrive/c/Program Files/Microsoft Office/Office/winword.exe" 
"${wwArgs[@]}"
-==-

Or maybe...

-==-
#/bin/sh

for arg; do
cygstart $arg
done
-==-

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Updated Package: Whois 4.6.1

2003-02-06 Thread Michael Schaap
On 6-Feb-2003 16:19, Mark Bradshaw wrote:

This version no longer works with .org domains.  Looks like 4.6.2 is out 
on http://www.linux.it/~md/software/ .
Would it be possible to release this version, at your convenience?


Will do.


Thanks!

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Updated Package: Whois 4.6.1

2003-02-06 Thread Michael Schaap
Hi,

On 27-Dec-2002 20:07, Mark Bradshaw wrote:

The most recent version of GNU Whois (4.6.1) has been uploaded to
sourceware.


This version no longer works with .org domains.  Looks like 4.6.2 is out 
on http://www.linux.it/~md/software/ .
Would it be possible to release this version, at your convenience?

TIA,

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Explorer Shell shortcuts with a DOS shell

2003-01-15 Thread Michael Schaap
On 16-Jan-2003 01:13, Dave Hooper wrote:

You know what I would do?  I'd write a tiny .exe (for Win32) wrapper around
cmd.exe and use that to execute your .bat which in turn spawns bash, etc.
Why?  Because as far as I know there's no way to instruct a shortcut to 'run
hidden' (you can run Minimized, though).

So, if the command shell window is 'only slightly' annoying, you can set
your shortcut to

cmd.exe /c your-batch-script.bat

and set that shortcut's properties to run minimized.

But, if the command shell window is 'really very' annoying, write a cheesy
.exe that does a CreateProcess() on cmd.exe and specifies the SW_HIDE flag
on launch.

This is from memory, so apologies in advance for any mistakes or omissions.
NB - this isn't really on-topic for Cygwin as it's a Win32-explorer
integration problem not a Cygwin problem.  Of course, you could use Cygwin
(or Mingw32) to create your wrapper .exe ! :-)

Naturally you'll want to use command.exe instead of cmd.exe if you're using
Win9x instead of NT/2K/XP.  You could even make use of the COMSPEC
environment variable (e.g. on my 2K box Windows has this set to
J:\WINNT\system32\cmd.exe)


Or just make sure you have the cygutils package installed, and run:

cygstart --hide your-batch-script.bat

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: How did I get it?

2002-12-14 Thread Michael Schaap
On 14-Dec-2002 10:11, Max Bowsher wrote:

Jack Rose <[EMAIL PROTECTED]> wrote:



Could some tell me how the CYGWIN1.DLL ended up on my computer. It
seems to have just appeared at 3:09am yesterday and I know I wasn't
working at that time.

Could this have been uploaded to my machine for malicious purposes?
If so, what else should I be looking for, besides a better firewall
and virus detector?

Any information would be appreciated...



Well, someone (apparently not you) installed Cygwin, or a program which uses
a cut down Cygwin install to function.



And this could indeed be a virus or worm.  There is at least one that 
includes cygwin1.dll:

http://vil.mcafee.com/dispVirus.asp?virus_k=99529

I'd certainly check your PC carefully for viruses, if I were you.

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Bash puzzle: Spaces, environment variables and tab completion

2002-12-04 Thread Michael Schaap
On 4-12-2002 17:17, Igor Pechtchanski wrote:

On Wed, 4 Dec 2002, Michael Schaap wrote:



On 4-12-2002 7:09, James Shaw wrote:
(...)


What I want to do is define an environment
variable so I can easily cd or ls.  E.g.
% PF="/cygdrive/c/Program Files"
% cd $PF
% ls $PF/Games
% ls $PF/G


(...)


So, I ask the list:
   Can you define $PF so that cd $PF;
   ls $PF/Games; and ls $PF/G all work???


I'd do something like:

% ln -s '/cygdrive/c/Program Files' /programs
% PF=/programs

 - Michael



$ mount 'c:\Program Files' /programs

	Igor


Yep, that's even better.  But, I believe, in order to get TAB completion 
to work, you need to do:

$ mkdir /programs
$ mount 'c:\Program Files' /programs
$ PF=/programs

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Bash puzzle: Spaces, environment variables and tab completion

2002-12-04 Thread Michael Schaap
On 4-12-2002 7:09, James Shaw wrote:
(...)

What I want to do is define an environment
variable so I can easily cd or ls.  E.g.
% PF="/cygdrive/c/Program Files"
% cd $PF
% ls $PF/Games
% ls $PF/G


(...)


So, I ask the list:
Can you define $PF so that cd $PF;
ls $PF/Games; and ls $PF/G all work???


I'd do something like:

% ln -s '/cygdrive/c/Program Files' /programs
% PF=/programs

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: [ANNOUNCEMENT] Updated cygwin package: rxvt-2.7.9-2

2002-12-03 Thread Michael Schaap
On 3-12-2002 21:53, Soren A wrote:


Is there _anything_ that can be done about the cursor shape in rxvt? That 
_od-awful block cursor that obscures the character lying under it drives me 
nuts. Past messages on this List seemed to indicate in my reading, that 
this wasn't reconfigurable -- that we are stuck with it. That alone would 
make me not be infavor of rxvt becoming the default Cygwin terminal --even 
tho I am using Win98 (part of the time).


I have the following lines in my ~/.Xdefaults:

Rxvt*cursorColor: orange
Rxvt*cursorColor2: blue

This makes the cursor easy to spot, and also keeps the character under 
the cursor fairly readable.
You can tune these colors to your own preference, of course.

HTH,

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cygstart foo.pdf results in 'AcroRd32.exe has generated errors'

2002-12-02 Thread Michael Schaap
On 3-12-2002 0:28, Andre Srinivasan wrote:

BB> What happens using plain start (C:\WINDOWS\COMMAND\start.exe)? 

I can't seem to find start.exe on my W2K box.

No such thing on W2K.  "start" is a cmd.exe builtin.

You could try:

	$ cmd /c start 

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: cygstart foo.pdf results in 'AcroRd32.exe has generated errors'

2002-12-02 Thread Michael Schaap
On 2-12-2002 23:57, Charles Wilson wrote:

Andre Srinivasan wrote:


I noticed sometime in August or September that I could no longer
invoke acroreader (v5.0.5) via cygstart or directly from AcroRd32 if I
wanted to view a document.  If I do invoke either, I get a Dr. Watson
(which I've appended).  On the otherhand, if I invoke IE and pass it
the file to open, acroread starts fine within IE.

I've appended the drwtsn32 file. 
Thanks.


The following works for me
(cygwin kernel version 1.3.17-1, W2k, Acroread 5.0.1 3/27/2001)
$ uname -a
CYGWIN_NT-5.0 KHELDAR 1.3.17(0.67/3/2) 2002-11-27 18:54 i686 unknown

 in ~/.bashrc (ignore stupid mailer-induced linewrap) 
function pdfv ()
{
cygstart /d/Program\ Files/Adobe/Acrobat\ 5.0/Reader/AcroRd32.exe 
\"`cygpath -w -a $1`\" &
}

What's wrong with just

	$ cygstart whatever.pdf

?  ;-)



BTW, I don't see anything in your drwatson dump that implicates 
cygstart.  Everything on the stack seems to be inside windows DLLs.
Any comments, Michael?
  ( Michael Schaap   cygwin_start AT mscha DOT org )

Oh, wait, that's me!  ;-)

I'm pretty sure that it's not cygstart related.  Cygstart doesn't really 
do anything except tell Windows to start a program or open a file.

One difference between starting a program from Cygwin and from Explorer, 
is the environment, most notably the $PATH.  This might cause different 
DLLs to be found.

Anyway, Andre also has problems when starting the reader directly, I 
assume from the start menu (i.e. Explorer).  So, it seems that this is 
not a Cygwin problem at all.

That makes this problem off-topic for this mailing list :-) , but I 
would try the following standard Microsoft troubleshooting steps:
 1. Reboot, and see if the problem goes away
 2. Uninstall and re-install Acrobat Reader, and see if it goes away

HTH,

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How can I avoid using a DOS box??

2002-11-27 Thread Michael Schaap
On 27-11-2002 13:04, Robert Collins wrote:

On Wed, 2002-11-27 at 19:10, Gary R. Van Sickle wrote:

 

Are things to the point where we could make rxvt the default installed terminal
emulator instead of the DOS box?  I can't imagine any Win9x user could possibly
complain, and any NT+ user that would is simply misguided ;-).



Well, it's been discussed before IIRC. Certainly I'm in favour of it.


How about making two shortcuts, one for a console window, and one for rxvt?
(Actually, the rxvt shortcut should probably be part of the postinstall 
of the rxvt package, not?)

Just my € 0.02,

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: .rhosts on W2K w/o ntsec

2002-11-20 Thread Michael Schaap
On 20-11-2002 19:51, Randall R Schulz wrote:



I don't know how cygstart works internally, but I imagine it looks up
the association and launches the appropriate application without regard
for the execute bits on the document file being opened.


Luckily, cygstart doesn't need to do such things.  ;-)  It just passes 
the filename to the ShellExecute API function, which doesn't seem to 
care about the execute bits.

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: emacs lockup w/ TERM = linux

2002-11-15 Thread Michael Schaap
On 16-11-2002 0:25, Bill Priest wrote:


--- David Starks-Browning  wrote:


>But the default for rxvt is "xterm".  Why are you
>using "linux"?  Have
>you tried using the default "xterm"?

Yes, xterm works fine.  But linux used to work.  I
used
linux because a lot of the time I rlogin into my linux
machine.



This may be a silly suggestion, but have you tried
	TERM=rxvt
?  Works fine for me, but then, I don't run emacs.  ;-)

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: grep -i -R path32 * vs grep -i -R path32 *.vb*

2002-10-09 Thread Michael Schaap

On 10-10-2002 1:24, Igor Pechtchanski wrote:
> On Wed, 9 Oct 2002, Sheryl McKeown wrote:
> 
> 
>>Better titled, "That dot thing again on Windows XP
>>Pro..."
>>
>>Ok, again I'm trying to search recursively through a
>>directory structure looking for specific values.
>>
>>According to grep --help grep -R should walk the
>>directory structure.  Cool.
>>
>>So, "grep -i -R path32 *" returns, as expected,
>>.grep -i -R path32 *
>>IntelliLab/IntelliLab.vbp:Path32="..Build"
>>IntelliLab/IntelliLabR.vbp:Path32="..BUILD"
>>IntelliLab/intellilabr.vbpold:Path32="Build"
>>LabTestMnt/LabTestMnt.vbp:Path32="..BUILD"
>>Ordent/ordent.vbp:Path32="..BUILD"
>>QC/qc.vbp:Path32="..BUILD"
>>Reports/Reports.vbp:Path32="..BUILD"
>>RsltsEnt/RsltsEnt.vbp:Path32="..BUILD"
>>RsltsInqry/ptresinq.vbp:Path32="..BUILD"
>>
>>But I want to search only files with a specific
>>extension.  Enter the dot thing.  So I try
>>grep -i -R path32 *.vb*
>>which returns nothing.
>>
>>I understand that the directories, technically, do not
>>have a . in the name, therefore they won't be
>>searched.  The same reason grep -i -R path32 *.*
>>returns nothing.
>>
>>So the question becomes, how do I grep a directory
>>structure and search only files with a specific name.
>>(I prefere a grep only solution vs "find . -name
>>"somefilename" -exec ...).
>>
>>Thanks,
>>Sheryl
> 
> 
> Sheryl,
> 
> This isn't a "dot problem".  This is a grep usage problem.

Specifically, you're telling grep to only look in directories which have 
  '.vb' in their name.

> 
> Frankly, I don't see why you are so opposed to 'find'...  'find . -name
> \*.vb\* -exec grep -ni path32 {} \; -print' can be a very powerful tool.
> If you want the filenames printed before the matches (ala 'grep -R'),
> consider using 'find . -name \*.vb\* -print | xargs grep -i path32'.  If
> you have files with spaces and weird characters, try 'find . -name \*.vb\*
> -print0 | xargs -0 grep -i path32'.

You should always use the -print0/-0 syntax, just in case.  And I'd find 
it a bit more readable as:
find . -name '*.vb' -print0 | xargs -0 grep -i path32

> 
> Of course, if you really want to stick with "pure grep", you could always
> do 'grep -i -R path32 --include=\*.vb\*' (now that I've pitched in an
> argument in favor of "find" :-D)...  'info grep' should also be quite
> helpful.

Alternatively, you could use zsh as your shell, and just use:
grep -i path32 **/*.vb*
:-)

  - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: grep = * vs grep = * > foo

2002-10-09 Thread Michael Schaap

On 9-10-2002 2:58, Christopher Faylor wrote:
> 
> You'll see that delme is not listed.  Cygnus wildcard expansion follows
(snip)

Cygnus?  Who's that?  ;-)

  - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Can't figure out how to pass command arguments via cygstart

2002-09-20 Thread Michael Schaap

On 20-9-2002 18:05, Igor Pechtchanski wrote:
> On Fri, 20 Sep 2002, Andre Srinivasan wrote:
> 
> 
>>...
>>AS> Works for me.  Add it to the man page and we'll call it a feature.
>>
>>IP> It already IS a feature.  The getopt function will stop processing
>>IP> switches when it encounters the '--' option.
>>
>>You know that and I know that (now).  I was just suggesting that
>>adding this to the man page will eliminate these kinds of questions.
>>-andre.
> 
> 
> Agreed.  Below is a minimal patch against cygutils-1.1.2, feel free to
> expand on it.

(snip)

Thanks.
When Chuck comes back from the dead, I'll make sure this gets included. 
  (I'll probably also add an example or two.)

  - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Can't figure out how to pass command arguments via cygstart

2002-09-20 Thread Michael Schaap

On 11-9-2002 2:14, Andre Srinivasan wrote:

>I'd like to invoke command foo and pass the -s switch to the command.
>When I try
>
>cygstart --hide foo -s
>
>cygstart complains that it does not understand the -s switch.  Is
>there a way to do this?
>
Yes, that's a bit unfortunate.

I don't think there is a real solution for this - how would popt know 
that it shouldn't parse the "-s"?
There is a workaround, though.  You can use
cygstart --hide -- foo -s

Best regards,

 - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: run -nw in cygwin

2002-09-20 Thread Michael Schaap

On 20-9-2002 12:55, Francois de Campagnolle wrote:
> Hi,
> 
> I know there's a link on cygwin site to some 'run.exe' that doesn't launch a
> new win (a la runemacs.exe), but I doesn't seem to work on my win98.
> Wouldn't it make sense to include sth similar in cygwin distro ?  [or does
> it already exist??]

Make sure you have cygutils installed, then use "cygstart --hide"

HTH,

  - Michael


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Cut and paste standard input and output

2002-05-12 Thread Michael Schaap

Quoting Charles Wilson <[EMAIL PROTECTED]>:
> Raoul Gough wrote:
> 
> > I recently wrote a simple command-line tool that cuts or pastes plain
> text
> > to/from standard input/output. I find it quite useful sometimes, when
> I've
> > got a script that generates some output and I want to process the
> output in
> > a windows application (or vice-versa).
> > 
> > e.g.
> > 
> > ls -lR | clipboard -x
> > 
> Have you seen the 'putclip' and 'getclip' applications that are part of
> 
> the official 'cygutils' package?

Or just use

ls -lR > /dev/clipboard

 - Michael

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Getting Cygwin into a corporation..

2002-04-24 Thread Michael Schaap

At 20:01 24-4-2002, Michael F. March wrote:
>In the company I work for they have outlawed all Unix
>variants (Linux, Solaris, OSX) from certain networks. I
>asked why Cygwin could not be installed and here is
>some of the response I got back:
>
> > Cygwin, in itself, is typically a harmless application.
> > However, once installed, it does allow a user to invalidate
> > the NT Security architecture; a user can then install cygwin
> > ports without the NT administrators consent (including, of
> > course, the cygwin DHCP port).

You mean, they outlaw UNIX style operating systems and only allow Windows 
for *security* reasons?!?

I'm not sure if that's hilarious or sad.  Probably both...

  - Michael

-- 
 I always wondered about the meaning of life.   So I looked it
 up in the dictionary under "L" and there it was - the meaning
 of life.  It was not what I expected.  - Dogbert 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: mcrypt commnad

2002-04-04 Thread Michael Schaap

At 20:32 4-4-2002, Gupta, Sanjay wrote:
>I have openssl installed, but I would really appreciate, if you can tell me
>how to use for my requirement.
>My requirement is, I have a  simple text file which has some sensitive
>information, and I want encrypt this file this file using some password and
>similarly decrypt the file using the same password. The vi -x filename,
>command will not work because these steps should be done in shell scripts.
>Is it possible to do the same in openssl ?.

"man openssl" should tell you all you need to know.

A few basic examples:

Encrypt a file:
 $ openssl des3 -a -salt -in plainfile -out encryptedfile -k mypassword

Decrypt a file:
 $ openssl des3 -d -a -salt -in encryptedfile -out plainfile -k 
mypassword

HTH,

  - Michael

-- 
 I always wondered about the meaning of life.   So I looked it
 up in the dictionary under "L" and there it was - the meaning
 of life.  It was not what I expected.  - Dogbert 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: mcrypt commnad

2002-04-04 Thread Michael Schaap

At 08:57 4-4-2002, Andrew Markebo wrote:
>/ "Gupta, Sanjay" <[EMAIL PROTECTED]> wrote:
>| I have read http://lists.hellug.gr/pipermail/mcrypt-dev/2001/87.html
>| note and I have tried every thing which was mentioned here but did not help.
>
>Any special reason for wanting crypt/mcrypt, maybe choose pgp or
>gpg(?) (the gnu-version of pgp) that is available on many platforms..

If compatibility with Solaris crypt is not an issue, then I recommend to 
use OpenSSL - this comes with a command-line tool, appropriately called 
"openssl".  No porting required - just install the latest openssl package 
using setup.exe.

  - Michael

-- 
 I always wondered about the meaning of life.   So I looked it
 up in the dictionary under "L" and there it was - the meaning
 of life.  It was not what I expected.  - Dogbert 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




RE: mcrypt commnad

2002-04-03 Thread Michael Schaap

At 00:21 4-4-2002, Gupta, Sanjay wrote:
>My answer :- As I recall the crypt command in all Unix works the same way

You actually worked with "all Unix"?  Wow!  That's impressive!

>e.g. if I want to encrypt a file, I would use
>crypt crypt_password < file_you_want_to_encrypt > encrypted_file
>
>and to decrypt file, you would issue command
>crypt crypt_password encrypted_file
>
>but the same thing does not work in cygwin. The purpose of crypt command in
>cygwin is different than the purpose of crypt command in unix. I have no
>idea why it is different but it is.

On my copy of RedHat 7.1, crypt behaves as follows:

 $ crypt
 bash: crypt: command not found

Please update Cygwin ASAP so that it behaves the same!!!

  - Michael  ;-)

-- 
 I always wondered about the meaning of life.   So I looked it
 up in the dictionary under "L" and there it was - the meaning
 of life.  It was not what I expected.  - Dogbert 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




  1   2   >