Re: Starting a Win32 app from inside Cygwin

2004-03-24 Thread Robert Mecklenburg
RM> If I can restate your request as: "I want to use MS Word to edit a
RM> file that lives on my AIX machine."  The obvious answer is to install
RM> Samba on your AIX machine to allow file access from your PC.  This
RM> has nothing to do with X, rsh, or NFS.

CP> Yes, but I want Word to open on the XP machine editing the file on
CP> the AIX box all when called from a script on the AIX box.  The
CP> user will be viewing an X seesion from the AIX box in cygwin,
CP> execute a script and Word would then open locally.

How about running sshd on your Cygwin box and have your AIX script
run "ssh pc-host 'cygstart foo.doc'"?

Cheers,
-- 
Robert


--
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/



GNU Make performance question

2004-03-23 Thread Robert Mecklenburg
I am writing a document on the performance of gnu make and various
makefiles and came across something I can't explain.

To measure the speed of gnu make $(subst...) versus sed I wrote this
simple makefile:

  p1000 := ...<1000 character string with periodic semicolons>...
  # This simple assignment 1 times.
  x := $(subst ;, ,$(p1000))
  ...

I then run this makefile 10 times and average the times.  I ran the
makefile on Windows XP with Cygwin and a Linux system with RedHat 9:

  Windows XP 1.8 GHz/P4/512MB82644 assignments / second
  Linux  450 MHz/P2/256MB   11 assignments / second

As you can see the puny 450 MHz P2 managed to kick Windows ass.  I'm
at a total loss to explain why, though.  For instance,

* Both systems were idle, with no memory hogging apps running (the
  Windows machine was freshly booted)

* The test runs the makefile only 10 times, for only 10 process
  create/loads and 10 assignments

* The test seems to be entirely cpu bound, with both executables
  compiled by gcc (albeit different versions)

Could this be entirely explained by the difference in process creation
times?  I would have thought that the 4 times clock rate and beefier
ram would have adequately compensated.

Note, this is not - in any way - a complaint about performance.  I'd
just like to understand the reasons.

Thanks,
Robert


--
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: Starting a Win32 app from inside Cygwin

2004-03-23 Thread Robert Mecklenburg
CP> I'm hoping someone can point me in the right direction here,
CP> though I'm not even sure this is possible.
CP> 
CP> I currently use cygwin in WinXP to display X session from an AIX
CP> machine.  This works very well.  The software on the AIX box can
CP> call a word processor (Uniplex) on the AIX box to edit text files.
CP> What I'd like to do is instead of launching the AIX word processor
CP> inside of the X session is launch Word on the WinXP machine to
CP> edit the file out on an NFS.
CP> 
CP> Another site is currently doing this, but they are all linux and
CP> OpenOffice.  The script on the AIX box does a rsh back to the
CP> linux box and opens OO word processing with the text file on an
CP> NFS.
CP> 
CP> It there anyway to do this back to a WinXP box?

If I can restate your request as: "I want to use MS Word to edit a
file that lives on my AIX machine."  The obvious answer is to install
Samba on your AIX machine to allow file access from your PC.  This
has nothing to do with X, rsh, or NFS.

Hope this helps,
-- 
Robert


--
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/



A bit of history

2004-03-05 Thread Robert Mecklenburg
When was the Cygwin project started?  I know that I started using
Cygwin somehwere around 1992.

I thought it was good then, I think it is incredible now.

Thanks!
-- 
Robert


--
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: bug in cygwin build of Make

2004-01-15 Thread Robert Mecklenburg
JP> dir1/Makefile:
JP> --
JP> VARIABLE = $(shell echo $$PWD)
JP> 
JP> sources :
JP> @echo VARIABLE set to ${VARIABLE}

The GNU make variable CURDIR is set by make to the current working
directory of the executing make.  This is probably the variable you
want.

Hope this helps,
-- 
Robert


--
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/



ssh-agent on cygwin

2003-11-07 Thread Robert Mecklenburg
I'm having trouble getting ssh-agent to work.  I've tried both dsa
and rsa keys with and without a passphrase and every time I'm still
prompted for a password on the remote system.  I've looked at the ssh
faq and googled the cygwin list.  I can login remotely without a
password using authorized_keys files, but I'd rather not have to
manage them.

Others are using this successfully, correct?

Here is a sample session I just tried.  Any suggestions?

Thanks,
Robert



10 osaka:mecklen$ rm -rf .ssh

11 osaka:mecklen$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/c/home/mecklen/.ssh/id_dsa): 
Created directory '/c/home/mecklen/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /c/home/mecklen/.ssh/id_dsa.
Your public key has been saved in /c/home/mecklen/.ssh/id_dsa.pub.
The key fingerprint is:
45:a4:77:0f:af:98:ae:7b:03:72:b2:7a:b2:c6:80:0f [EMAIL PROTECTED]

12 osaka:mecklen$ ssh-agent /bin/bash

1 osaka:mecklen$ ssh-add
Enter passphrase for /c/home/mecklen/.ssh/id_dsa: 
Identity added: /c/home/mecklen/.ssh/id_dsa (/c/home/mecklen/.ssh/id_dsa)

2 osaka:mecklen$ ssh -vvv wolf
OpenSSH_3.7.1p2, SSH protocols 1.5/2.0, OpenSSL 0.9.7c 30 Sep 2003
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to wolf [10.1.1.120] port 22.
debug1: Connection established.
debug1: identity file /c/home/mecklen/.ssh/identity type -1
debug1: identity file /c/home/mecklen/.ssh/id_rsa type -1
debug3: Not a RSA1 key file /c/home/mecklen/.ssh/id_dsa.
debug2: key_type_from_name: unknown key type '-BEGIN'
debug3: key_read: missing keytype
debug2: key_type_from_name: unknown key type 'Proc-Type:'
debug3: key_read: missing keytype
debug2: key_type_from_name: unknown key type 'DEK-Info:'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-END'
debug3: key_read: missing keytype
debug1: identity file /c/home/mecklen/.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version OpenSSH_3.5p1
debug1: match: OpenSSH_3.5p1 pat OpenSSH_3.2*,OpenSSH_3.3*,OpenSSH_3.4*,OpenSSH_3.5*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.7.1p2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: 
diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: 
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cb
c,[EMAIL PROTECTED],aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: 
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cb
c,[EMAIL PROTECTED],aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[EMAIL 
PROTECTED],hmac-sha1-96
,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[EMAIL 
PROTECTED],hmac-sha1-96
,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: kex_parse_kexinit: 
diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: 
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cb
c,[EMAIL PROTECTED]
debug2: kex_parse_kexinit: 
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cb
c,[EMAIL PROTECTED]
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[EMAIL 
PROTECTED],hmac-sha1-96
,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[EMAIL 
PROTECTED],hmac-sha1-96
,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 109/256
debug2: bits set: 1619/3191
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug3: check_host_in_hostfile: filename /c/home/mecklen/.ssh/known_hosts
debug3: check_host_in_hostfile: filename /etc/ssh_known_hosts
debug3: check_host_in_hostfile: fi

Print postscript from cygwin

2003-10-14 Thread Robert Mecklenburg
Please forgive this post if I'm blind here, but I can't figure out how
to print a postscript (or pdf) file using cygwin.  Normally (I
believe), I would use gs with:

  gs -sDEVICE=mswinpr2 -sOutputFile=spool\\MyPrinter foo.ps

However neither the "native" /bin/gs or /usr/X11R6/bin/gs supports
the mswinpr2 device.  A quick google shows a very similar question
about a year ago with several days discussion:

  http://www.cygwin.com/ml/cygwin/2002-09/msg00180.html

With suggestions from Igor and Shankar that the MS devices (drivers?)
be included in the native version.  The maintainer at the time (I
believe), Dario Alcocer placed it on his todo list, but apparently it
got lost or re-prioritized.

I know I can use non-cygwin tools, but my question is: "How can I
print a postscript or pdf file using only cygwin tools?"

Thank you and thanks for Cygwin!
--
Robert


--
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: problems with make under cygwin

2003-09-02 Thread Robert Mecklenburg

RW> ... but when I try these under cygwin I get
RW> the following error:
RW> 
RW> Target pattern contains no '%'

I've seen this message many times when a target or prerequisite (both
or one of, I can't remember) contains a windows path.  In that case,
make sees a line with two colons and believes it is seeing a malformed
static pattern rule.

Hope this helps,
-- 
Robert


--
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/



Bug in make?

2003-08-14 Thread Robert Mecklenburg
Has anyone seen this problem before?  The following makefile:



SHELL := /bin/bash

# Remove the blank line to make it work...
define f

  @echo hi
endef

a:
$(f)



Generates the error:

make

  @echo hi
/bin/bash: line 1: @echo: command not found
make: *** [a] Error 127

Either deleting the blank line in the define or changing the shell
from bash fixes the problem.  I searched the archives but I had
trouble coming up with a useful search pattern.

I'm about to build make and dive in, but I thought I'd ask first...
Cygcheck output attached.

Thanks,
-- 
Robert
Cygwin Package Information
Last downloaded files to: //wolf/software/cygwin
Last downloaded files from: ftp://mirrors.rcn.net/mirrors/sources.redhat.com/cygwin

Package Version
_update-info-dir00193-1
a2ps4.12-1
agetty  2.1-1
apache  1.3.24-5
ash 20020731-1
astyle  1.15.3-3
autoconf2.54-1
autoconf-devel  2.57-1
autoconf-stable 2.13-4
automake1.7.1-1
automake-devel  1.7.6-1
automake-stable 1.4p5-5
base-files  1.3-1
base-passwd 1.1-1
bash2.05b-9
bc  1.06-1
binutils20030307-1
bison   20030307-1
byacc   1.9-1
bzip2   1.0.2-2
c-client2002d-2
ccache  1.9-1
ccdoc   0.8.39-1
cgoban  1.9.12-1
chkconfig   1.2.24h-1
clear   1.0-1
cmake   1.6.7-1
compface1.4-5
cpio2.5-1
cron3.0.1-10
crypt   1.0-1
ctags   5.5-4
curl7.10.4-1
curl-devel  7.10.4-1
cvs 1.11.5-1
cygipc  2.01-1
cygrunsrv   0.96-1
cygutils1.1.4-2
cygwin  1.3.22-1
cygwin-doc  1.3-4
db2 2.7.7-4
db3.1   3.1.17-2
dejagnu 20021217-2
diff1.0-1
diffutils   2.8.1-1
docbook-xml42   4.2-1
docbook-xsl 1.61.3-2
doxygen 1.2.18-1
dpkg1.10.4-2
ed  0.2-1
ELFIO   1.0.0-1
emacs   21.2-12
emacs-el21.2-12
emacs-X11   21.2-12
enscript1.6.3-3
exim4.20-1
expat   1.95.6-1
expect  20030128-1
fetchmail   6.2.2-1
figlet  2.2-1
file4.02-1
fileutils   4.1-1
findutils   4.1.7-4
flex2.5.4-2
fortune 1.8-2
fvwm2.4.7-2
gawk3.1.3-1
gcc 3.2-3
gcc-mingw   20020817-5
gcc22.95.3-10
gdb 20030303-1
gdbm1.8.3-3
gettext 0.11.5-1
gettext-devel   0.11.5-1
ghostscript 7.05-2
ghostscript-base7.05-2
ghostscript-x11 7.05-2
gnugo   3.2-1
gnupg   1.2.2-1
gperf   2.7.2-1
grace   5.1.12-1
grep2.5-1
groff   1.18.1-2
gsl 1.3-1
guile   1.6.4-2
guile-devel 1.6.4-2
guile-doc   1.6.4-2
gzip1.3.3-4
indent  2.2.8-1
inetutils   1.3.2-23
initscripts 0.9-1
ioperm  0.4-1
irc 20010101-1
jbigkit 1.4-1
jgraph  8.3-1
jpeg6b-8
keychain1.9-1
less378-1
lesstif 0.93.41-1
libbz2_01.0.2-1
libbz2_11.0.2-2
libcharset1 1.8-3
libdb2  2.7.7-4
libdb2-devel2.7.7-4
libdb3.13.1.17-2
libdb3.1-devel  3.1.17-2
libgdbm 1.8.0-5
libgdbm-devel   1.8.3-3
libgdbm31.8.3-3
libgdbm41.8.3-4
libgettextpo0   0.12.1-1
libguile12  1.6.0-1
libguile12abi13 1.6.4-2
libguile14  1.5.6-5
libiconv1.8-3
libiconv2   1.8-3
libintl 0.10.38-3
libintl10.10.40-1
libintl20.11.5-1
libjpeg62   6b-9
libjpeg6b   6b-8
libkpathsea32.0.2-1
libkpathsea3abi13   2.0.2-2
libltdl31.5-1
libncurses-devel5.3-1
libncurses5 5.2-1
libncurses6 5.2-8
libncurses7 5.3-1
libpcre 4.1-1
libpcre0 

Re: Bug in make?

2003-08-14 Thread Robert Mecklenburg
IP> On Wed, Aug 06, 2003 at 02:27:02PM -0400, Igor Pechtchanski wrote:
IP> This could well be a bug in make.  I'll take a look at the make source
IP> later to see whether there's something obvious.

CF> You might want to hop over to the gnu web site and check out the make
CF> mailing list to see if this is a known problem.

I looked at the bug tracking list on savannah and didn't see any open
bugs relating to this issue.  I just tried searching [EMAIL PROTECTED]
but didn't find anything relevant.  There were a lot of (old) posts
about an unrelated echo suppression bug in define/endef sequences in
3.79 which made it difficult to be sure.

I didn't send the message to bug-make because a) the identical
makefile behaves as expected on our local GNU/Linux box (with make
3.80) and b) I had the vague impression that cygwin make was modified
enough that Paul Smith (make maintainer) would just bounce it back
here.

I'll post the original bug report to make-w32 and see what they say.

Thanks,
-- 
Robert


--
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: Bug in make?

2003-08-06 Thread Robert Mecklenburg
RM> Has anyone seen this problem before? ...
RM> 
RM> make
RM> 
RM> @echo hi
RM> /bin/bash: line 1: @echo: command not found
RM> make: *** [a] Error 127

IP> FYI, any shell (I tried /bin/sh, /bin/tcsh, etc) tries to execute '@echo',
IP> with the obvious result.  

Of course, I thought that was self-evident so I didn't remark on it.
The issue is that make _should_ process the @ and does if the case is
simplified any further.


IP> However, changing the shell to ' /bin/bash -x' might prove
IP> instructive.

Good point, I didn't do that.  The output is:

make SHELL=~/bin/echo-bash -f make-define-bug.mk

  @echo hi
+ bash -c '@echo hi'
bash: line 1: @echo: command not found
make: *** [a] Error 127

I'm not sure what I was supposed to see.  I know the @ is being passed
to the shell.  Or did I miss something?


IP> It seems the blank line (anywhere in the sequence) confuses the define
IP> processor in make and makes it forgo the processing of the prefix
IP> characters after the blank line.  This could well be a bug in
IP> make.

Yes, that's what I think.  But I suspect it is specific to cygwin, the
same makefile works fine on our local GNU/Linux box.

Thanks for looking into it.  As always cygwin rules!

Cheers,
-- 
Robert


--
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/



Need cygwin usage statistics

2003-06-30 Thread Robert Mecklenburg
I'm sorry to bother the list with this, but I don't know where to
turn.  Would any of the cygwin maintainers like to give a rough
estimate of the number of cygwin users?  I realize from:

http://www.cygwin.com/ml/cygwin-apps/2002-10/msg00177.html

that actual download stats aren't available, but that doesn't mean you
don't have some general idea of the number of users.

A long shot, I know, but I need the data so I thought I'd ask.

Thanks,

P.S. Cygwin rocks!
-- 
Robert


--
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: newbie shell-users howto, guide, cheatsheet, or reference?

2003-06-30 Thread Robert Mecklenburg

GRVS> Let's get this straight.  Your intent was clear.  You were yet
GRVS> again trying to be a jerk when it was completely and utterly
GRVS> unwarranted, and completely contrary to convincing anybody of
GRVS> doing anything for the Cygwin project.

I've been using cygwin since the '80s and reading this list daily for
many years.  I must say that I don't believe Chris is wrong.  Many
people mistakenly believe that any effort put in toward an open source
project is good.  At some statistical level that may be true, but at a
practical engineering level it is false.  By placing documentation and
tools outside the cygwin distribution (and distribution mechanism) you
create confusion, fragment management, increase likelihood of
incorrect or out of date data, and generally waste energy.  By failing
to acknowledge this situation you further degrade your position.

Chris is often direct in his communication.  Some people read into
this that he is being insulting, demanding, or domineering.  I believe
this is created by the reader from their own imagination.  I
appreciate Chris' style.

Peace,
-- 
Robert


--
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/



make is holding a directory open

2003-06-25 Thread Robert Mecklenburg
I seem to be having a subtle issue with make under cygwin.  The
problem appears to be that make is "improperly" holding an open file
handle on a directory.  This prevents rm from deleting the directory
as part of a makefile action.  The actual problem occurs in a 4,700
line makefile which I've pared down (after many hours) to these 19
lines:

- cut here -
# make; make clean; make clean
# mkdir -p /tmp/a/b
# rm -rf /tmp/a
# rm: cannot remove directory `/tmp/a': Permission denied
# make: *** [clean] Error 1
# rm -rf /tmp/a

compile:
mkdir -p /tmp/a/b

clean:
rm -rf /tmp/a

define rule
c:
$(wildcard /tmp/a/b)
endef

$(rule)
- cut here -

As the comment says, see the problem by executing it like this:

$ make
mkdir -p /tmp/a/b

$ make clean
rm -rf /tmp/a
rm: cannot remove directory `/tmp/a': Permission denied
make: *** [clean] Error 1

$ make clean
rm -rf /tmp/a

The "compile" rule simulates the essence of a java compile, the
following clean action deletes /tmp/a/b then fails because make is
holding a lock on /tmp/a.  A subsequent make clean succeeds because
/tmp/a/b no longer exists.

My theory is that when /tmp/a/b exists the $(wildcard /tmp/a/b) opens
/tmp/a and fails to close it.  When /tmp/a/b doesnot exist the file
/tmp/a is not held open.  I've used a utility called handle.exe from
sysinternals.com to verify that make has the /tmp/a handle open.

If I simplify the example in any of these ways the problem disappears:

1) Move the target c out of define rule to before $(rule)

2) Run "make compile clean" as a single invocation

3) Avoid define/endef by expanding the rule by hand

I've run strace on the "make clean" that fails.  Here is the actual rm
failure:

   30   19982 [main] rm 3596 normalize_posix_path: /c/work/bug = normalize_posix_path 
(/c/work/bug)
   29   20011 [main] rm 3596 chdir: 0 = chdir() cygheap->cwd.posix '/c/work/bug' 
native 'c:\work\bug'
   53   20064 [main] rm 3596 normalize_posix_path: src /tmp/a
   26   20090 [main] rm 3596 normalize_posix_path: /tmp/a = normalize_posix_path 
(/tmp/a)
   28   20118 [main] rm 3596 mount_info::conv_to_win32_path: conv_to_win32_path 
(/tmp/a)
   29   20147 [main] rm 3596 mount_info::cygdrive_win32_path: src '/tmp/a', dst ''
   31   20178 [main] rm 3596 set_flags: flags: binary (0x2)
   27   20205 [main] rm 3596 mount_info::conv_to_win32_path: src_path /tmp/a, dst 
C:\usr\cygwin\tmp\a, flags 0xA, rc 0
  106   20311 [main] rm 3596 symlink_info::check: not a symlink
   32   20343 [main] rm 3596 symlink_info::check: 0 = symlink.check 
(C:\usr\cygwin\tmp\a, 0x241F538) (0xA)
   30   20373 [main] rm 3596 path_conv::check: root_dir(C:\), 
this->path(C:\usr\cygwin\tmp\a), set_has_acls(8)
  103   20476 [main] rm 3596 seterrno_from_win_error: 
/netrel/src/cygwin-1.3.22-1/winsup/cygwin/dir.cc:332 windows error 32
   33   20509 [main] rm 3596 geterrno_from_win_error: windows error 32 == errno 13
   27   20536 [main] rm 3596 rmdir: -1 = rmdir (/tmp/a)

But I believe the actual problem is much farther "upstream" in make
and I couldn't determine where.  I've included the cygcheck output as
an attachment along with.  (I tried including the earlier strace
output but exceeded the 100k character limit.)

It turns out the message 

http://mail.gnu.org/archive/html/make-w32/2001-12/msg0.html

indicates the bug occurred in 3.78.1 and 3.79.1 in the windows version
of make.  But the message is actually vague about whether this is a
win32 make or a cygwin make.  I have not yet found any follow-ups or
patches.

Comments or suggestions welcome.  
-- 
Robert
Cygwin Package Information
Last downloaded files to: //wolf/software/cygwin
Last downloaded files from: ftp://ftp.plig.net/pub/cygwin

Package Version
_update-info-dir00170-1
a2ps4.12-1
agetty  2.1-1
apache  1.3.24-5
ash 20020731-1
astyle  1.15.3-3
autoconf2.54-1
autoconf-devel  2.57-1
autoconf-stable 2.13-4
automake1.7.1-1
automake-devel  1.7.5-1
automake-stable 1.4p5-5
base-files  1.3-1
base-passwd 1.1-1
bash2.05b-9
bc  1.06-1
binutils20030307-1
bison   20030307-1
byacc   1.9-1
bzip2   1.0.2-2
ccache  1.9-1
cgoban  1.9.12-1
chkconfig   1.2.24h-1
clear   1.0-1
cmake   1.6.7-1
compface1.4-5
cpio2.5-1
cron3.0.1-10
crypt   1.0-1
ctags   5.5-4
curl7.10.4-1
curl-devel  7.10.4-1
cvs 1.11.5-1
cygrunsrv   0.96-1
cygutils1.1.4-2
cygwin  1.3.22-1
cygwin-doc  1.3-4
db2 2.7.7-4
db3.1   3.1.17

Re: trying to compile emacs under cygwin

2003-03-27 Thread Robert Mecklenburg

RM> fatal ("SHEAP_ADJUSTMENT needs to be modified to reduce memory waste!");

JB> The proper thing to do is adjust SHEAP_ADJUSTMENT like the message says.
JB> I think the SLOP parameter is a comparison fuzz setting.

Okay, I'm forced to admit how lame I am, but I can't figure out how to
reset this value.  The error messages says:

Static heap usage: 2129280 of 10648960, slop is 65536 -- 8320k wasted -- reset to 
2194816k
emacs: SHEAP_ADJUSTMENT needs to be modified to reduce memory waste!

So I edit emacs-21.2/src/sheap.c to:

#ifdef HAVE_X_WINDOWS
#define SHEAP_ADJUSTMENT 2194816 /* XEmacs does this dynamically */
#else
#define SHEAP_ADJUSTMENT 2194816 /* XEmacs does this dynamically */
#endif

But it has no effect on the error/build.  I then notice
emacs-21.2-build/src/sheap-adjust.h which is generated by sheap.c:

/*  Do not edit this file!
Automatically generated by XEmacs */
# define SHEAP_ADJUSTMENT (-8454144)

Well, changing this doesn't do any good, it just gets regenerated (as
the comment says!).  Furthermore, a tags search fails to find any file
which includes this header.  Then I notice that emacs-21.2.install
actually writes sheap.c, so I edit the script to change the -62
to:

+#ifdef HAVE_X_WINDOWS
+#define SHEAP_ADJUSTMENT 2194816 /* XEmacs does this dynamically */
+#else
+#define SHEAP_ADJUSTMENT 2194816 /* XEmacs does this dynamically */
+#endif

Still no joy.

I'll perform the penance of your choice if you tell me how to set
SHEAP_ADJUSTMENT and the appropriate value!

Thanks,
-- 
Robert


--
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/



trying to compile emacs under cygwin

2003-03-26 Thread Robert Mecklenburg
I'm trying to compile emacs under cygwin to debug the hanging problems
I'm experiencing and I've run into a minor wall.  Running
emacs-21.2.install yields the error:

Dumping under names emacs and emacs-21.2.1
Static heap usage: 2102240 of 2254144, slop is 65536
Static heap usage: 2102240 of 2254144, slop is 65536 -- 148k wasted -- reset to 
2167776k
emacs: SHEAP_ADJUSTMENT needs to be modified to reduce memory waste!
make[1]: *** [emacs] Error 1
make[1]: Leaving directory `/usr/src/emacs-21.2-12/emacs-21.2-build/src'

This comes from sheap.c:


  if (lost > STATIC_HEAP_SLOP) {
sprintf (buf + strlen (buf), " -- %ldk wasted", (long)(lost/1024));
if (die_if_pure_storage_exceeded) {
  sheap_adjust_h(STATIC_HEAP_SLOP - lost);
  sprintf (buf + strlen (buf), " -- reset to %ldk", 
   (long) (STATIC_HEAP_SIZE + STATIC_HEAP_SLOP - lost));
  rc = -1;
}
message ("%s", buf);
  }

  if (rc < 0) {
unlink("SATISFIED");
fatal ("SHEAP_ADJUSTMENT needs to be modified to reduce memory waste!");
  }

I suppose I could increase the size of STATIC_HEAP_SLOP, but that is
clearly a bad hack and may have other consequences.  Suggestions?

Thanks,
-- 
Robert


--
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/



cygwin-mount.el 1.4.4 and UNC mounts

2003-03-26 Thread Robert Mecklenburg
The version of cygwin-mount.el I'm using (1.4.4) seems to skip UNC
mounts.  For instance, here is my mount table:

  1 osaka:mecklen$ mount
  C:\usr\cygwin\usr\X11R6\lib\X11\fonts on /usr/X11R6/lib/X11/fonts type system 
(binmode)
  C:\usr\cygwin\bin on /usr/bin type system (binmode)
  C:\usr\cygwin\lib on /usr/lib type system (binmode)
  c:\usr\site-lisp on /usr/share/emacs/site-lisp/local type system (binmode)
  \\wolf\software on /software type system (binmode,noexec)
  \\fido\reftree on /reftree type system (binmode,noexec)
  C:\usr\cygwin on / type system (binmode)
  \\fido\code on /repository type system (binmode,noexec)
  c: on /c type user (binmode,noumount)
  d: on /d type user (binmode,noumount)
  p: on /p type user (binmode,noumount)
  r: on /r type user (binmode,noumount)

and after executing cygwin-mount-activate, here is my
cygwin-mount-table--internal:

  (pp cygwin-mount-table--internal)
  (("c:/usr/site-lisp/" . "/usr/share/emacs/site-lisp/local/")
   ("c:/usr/cygwin/usr/X11R6/lib/X11/fonts/" . "/usr/X11R6/lib/X11/fonts/")
   ("c:/usr/cygwin/lib/" . "/usr/lib/")
   ("c:/usr/cygwin/bin/" . "/usr/bin/")
   ("r:/" . "/r/")
   ("p:/" . "/p/")
   ("d:/" . "/d/")
   ("c:/" . "/c/")
   ("c:/usr/cygwin/" . "/"))

The variable cygwin-mount-parsing-regexp is 't' so it automatically
chooses the regexp to parse mount output.  Since my cygwin is entirely
up-to-date (updated daily) I'm using this regexp:

  (defconst cygwin-mount>=1.3.1-mount-regexp
"^\\([a-z]:.*\\)[ \t]+on[ \t]+\\(.+\\) type \\(system\\|user\\)")

As you can see the regexp only searches for drive letter type mounts
(due to the "[a-z]:" part).  After customizing this to:

  "^\\(.*\\)[ \t]+on[ \t]+\\(.+\\) type \\(system\\|user\\)"

cygwin-mount.el now understands my unc mounts.  Should this change
be made in the original package? (With possibly a better regexp:
"^\\(\\([a-z]:.*\\)\\|\\(.*\\)\\)[ \t]+on[ \t]+\\(.+\\) type \\(system\\|user\\)").

Cheers and thanks for cygwin and cygwin-mount!
-- 
Robert


--
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/



Emacs occassionally hangs

2003-03-10 Thread Robert Mecklenburg
I'm running emacs under X with the -rootless option and emacs
occassionally hangs.  In this instance the emacs process is using no
cpu and does not respond to keyboard events such as control-g.
Interestingly, this time attaching with gdb and detaching restored
responsiveness.  This didn't happen in a previous hang.  Here
is the gdb output when I attach to the process:

1 osaka:mecklen$ /bin/emacs &
[1] 1548
2 osaka:mecklen$ ps  
  PIDPPIDPGID WINPID  TTY  UIDSTIME COMMAND
 4908   14908   4908? 11285 08:25:15 /usr/X11R6/bin/XWin
 6080   16080   60801 11285 08:25:16 /usr/X11R6/bin/wmaker
 291660806080   49241 11285 08:25:19 /usr/X11R6/bin/xterm
 450429164504   26842 11285 08:25:20 /usr/bin/bash
 154845041548   55082 11285 08:25:31 /usr/bin/emacs
 411215484112   3440? 11285 08:25:38 
/usr/sbin/emacs/21.2/i686-pc-cygwin/emacsserver
I328815483288   53720 11285 08:56:30 /usr/bin/bash
 398045043980   60482 11285 09:09:09 /usr/bin/ps
3 osaka:mecklen$ gdb
GNU gdb 2003-03-03-cvs (cygwin-special)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
(gdb) attach 1548
Attaching to process 5508
[Switching to thread 5508.0x1254]
(gdb) where
#0  0x77f767ce in ntdll!DbgUiConnectToDbg () from /c/WINDOWS/System32/ntdll.dll
#1  0x77f7285c in ntdll!KiUserCallbackDispatcher () from /c/WINDOWS/System32/ntd
ll.dll
(gdb) info threads
* 7 thread 5508.0x1254  0x77f767ce in ntdll!DbgUiConnectToDbg () from /c/WINDOWS
/System32/ntdll.dll
0x7ffe0304 in ??  6 thread 5508.0x8ec   ()
0x7ffe0304 in ??  5 thread 5508.0x1188   ()

 4 thread 5508.0x210  0x7ffe0304 in ?? ()
0x7ffe0304 in ??  3 thread 5508.0x17e8   ()
0x7ffe0304 in ??  2 thread 5508.0x104c   ()

 1 thread 5508.0xb7c  0x7ffe0304 in ?? ()
(gdb) thread 4
[Switching to thread 4 (thread 5508.0x210)]#0  0x7ffe0304 in ?? ()
(gdb) where
#0  0x7ffe0304 in ?? ()
#1  0x77e75faa in WaitForMultipleObjects () from /c/WINDOWS/system32/kernel32.dll
#2  0x610756db in siginterrupt () from /usr/bin/cygwin1.dll
#3  0x610053c8 in cygwin1!__assert () from /usr/bin/cygwin1.dll
#4  0x77e7d33b in RegisterWaitForInputIdle () from /c/WINDOWS/system32/kernel32.dll
(gdb) thread 1
[Switching to thread 1 (thread 5508.0xb7c)]#0  0x7ffe0304 in ?? ()
(gdb) where
#0  0x7ffe0304 in ?? ()
#1  0x77e75faa in WaitForMultipleObjects () from /c/WINDOWS/system32/kernel32.dll
#2  0x6106a0e8 in select () from /usr/bin/cygwin1.dll
#3  0x61069873 in select () from /usr/bin/cygwin1.dll
#4  0x2011f648 in ?? ()
#5  0x2011f15f in ?? ()
#6  0x200ef9e1 in ?? ()
#7  0x2011adbc in ?? ()
#8  0x200f002b in ?? ()
#9  0x200efb1c in ?? ()
#10 0x2011adbc in ?? ()
#11 0x200eebcb in ?? ()
#12 0x200ed349 in ?? ()
#13 0x2011b1f5 in ?? ()
#14 0x200f002b in ?? ()
#15 0x200efb1c in ?? ()
#16 0x2011adbc in ?? ()
#17 0x200eebcb in ?? ()
#18 0x200ed349 in ?? ()
#19 0x2011b1f5 in ?? ()
#20 0x200f002b in ?? ()
#21 0x200efb1c in ?? ()
#22 0x2011adbc in ?? ()
#23 0x200eebcb in ?? ()
#24 0x200ed713 in ?? ()
#25 0x2011b258 in ?? ()
#26 0x200f002b in ?? ()
#27 0x200efb1c in ?? ()
#28 0x2011adbc in ?? ()
#29 0x200f002b in ?? ()
#30 0x200efb1c in ?? ()
#31 0x200eef07 in ?? ()
#32 0x200ef8e0 in ?? ()
#33 0x2011adbc in ?? ()
#34 0x200eebcb in ?? ()
#35 0x200ed713 in ?? ()
#36 0x2011b258 in ?? ()
#37 0x200f002b in ?? ()
#38 0x200efb1c in ?? ()
#39 0x200ef5e9 in ?? ()
#40 0x200948f2 in ?? ()
#41 0x200937f2 in ?? ()
#42 0x20097197 in ?? ()
#43 0x20094413 in ?? ()
#44 0x200089a3 in ?? ()
#45 0x20008af5 in ?? ()
#46 0x200ef9e1 in ?? ()
#47 0x2011adbc in ?? ()
#48 0x200f002b in ?? ()
#49 0x200efb1c in ?? ()
#50 0x200eeedb in ?? ()
#51 0x200ef8e0 in ?? ()
#52 0x2011adbc in ?? ()
#53 0x200eebcb in ?? ()
#54 0x200ed713 in ?? ()
#55 0x2011b258 in ?? ()
#56 0x200f002b in ?? ()
#57 0x200efb1c in ?? ()
#58 0x200ef5e9 in ?? ()
#59 0x200948f2 in ?? ()
#60 0x200937f2 in ?? ()
#61 0x20097197 in ?? ()
#62 0x2009bf09 in ?? ()
#63 0x2011f6e4 in ?? ()
#64 0x200089fd in ?? ()
#65 0x200926e3 in ?? ()
#66 0x20099c71 in ?? ()
#67 0x20090c00 in ?? ()
#68 0x200ed7fd in ?? ()
#69 0x200906c0 in ?? ()
#70 0x200ed349 in ?? ()
#71 0x20090672 in ?? ()
#72 0x20090155 in ?? ()
#73 0x20090298 in ?? ()
#74 0x2008eb80 in ?? ()
#75 0x610073e8 in cygwin1!__assert () from /usr/bin/cygwin1.dll
#76 0x610076cd in [EMAIL PROTECTED] () from /usr/bin/cygwin1.dll
#77 0x201a8d92 in ?? ()
#78 0x20001043 in ?? ()
#79 0x77e814c7 in KERNEL32!GetCurrentDirectoryW () from 
/c/WINDOWS/system32/kernel32.dll
(gdb) 


Cygwin Package Information
Last downloaded files to: //wolf/software/cygwin
Last downloaded files from: ft

Trouble getting shift keypad events

2003-02-28 Thread Robert Mecklenburg
I'm not sure if this is a cygwin emacs problem or a cygwin XFree
problem, but here goes.


Using emacs under xfree started with:

start XWin -screen 0 830 1124 -rootless -clipboard

I am not getting shift-keypad events as expected.  When I type C-h c
 I get the message " runs the command ..." in the
minibuffer display area.  When I type C-h c  I get the
message " runs the command ..." in the minibuffer display area.
Under nt emacs 


I run xev in an xterm and when I press keypad 3 I get:

KeyPress event, serial 22, synthetic NO, window 0xe1,
root 0x36, subw 0xe2, time 342208796, (44,51), root:(153,118),
state 0x0, keycode 89 (keysym 0xff9b, KP_Next), same_screen YES,
XLookupString gives 0 characters:  ""

KeyRelease event, serial 22, synthetic NO, window 0xe1,
root 0x36, subw 0xe2, time 342208968, (44,51), root:(153,118),
state 0x0, keycode 89 (keysym 0xff9b, KP_Next), same_screen YES,
XLookupString gives 0 characters:  ""


when I press shift keypad three I get:

KeyPress event, serial 22, synthetic NO, window 0xe1,
root 0x36, subw 0xe2, time 342277421, (31,30), root:(140,97),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 characters:  ""

KeyPress event, serial 22, synthetic NO, window 0xe1,
root 0x36, subw 0xe2, time 342277609, (31,30), root:(140,97),
state 0x1, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
XLookupString gives 1 characters:  "3"

KeyRelease event, serial 22, synthetic NO, window 0xe1,
root 0x36, subw 0xe2, time 342277734, (31,30), root:(140,97),
state 0x1, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
XLookupString gives 1 characters:  "3"

KeyRelease event, serial 22, synthetic NO, window 0xe1,
root 0x36, subw 0xe2, time 342277937, (31,30), root:(140,97),
state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 characters:  ""


I have no idea if the xev output is correct.

Debugging this issue is made slightly more complex by an interesting
feature of emacs.  If a function is not bound to a keypad key, C-h c
reports a different keypress than if a function is bound.  If no
function is bound to keypad Enter C-h c reports RET as the keypress.
If a function is bound C-h c reports kp-enter.  So to reproduce the
problem I'm seeing you must bind some function to the keypad key:

(global-set-key [kp-next] 'forward-word)
(global-set-key [S-kp-next] 'forward-word)


Any suggestions on how to get cygwin emacs to recognize shift-keypad-3
as  as nt emacs does?

Thanks,
-- 
Robert


--
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 error ad-Orig-documentation called with 5 arguments

2003-01-17 Thread Robert Mecklenburg
DH> Robert Mecklenburg wrote:
RM> I'm getting the following error in the x-enabled version of cygwin
RM> emacs:  
RM> 
RM> ** ad-Orig-documentation called with 5 arguments, but accepts only 1-2

DH> I think the problem is with the original documentation function itself, 
DH> not with advice.

Moments after sending my previous message I discovered that the error
message is actually generated by loading advice.el.  No other action
is required.  A little judicious editing revealed that commenting out
the "defadvice documentation" code in advice.el allows the advice.el
file to load correctly.  Obviously, this is not a functional fix of
any kind, just more clues.  My comment lines are marked ";;x" (from
advice.el):

;;x(defadvice documentation (after ad-advised-docstring first disable preact)
;;x  "Builds an advised docstring if FUNCTION is advised."
;;x  ;; Because we get the function name from the advised docstring
;;x  ;; this will work for function names as well as for definitions:
;;x  (if (and (stringp ad-return-value)
;;x(string-match
;;x ad-advised-definition-docstring-regexp ad-return-value))
;;x  (let ((function
;;x  (car (read-from-string
;;xad-return-value (match-beginning 1) (match-end 1)
;;x (cond ((ad-is-advised function)
;;x(setq ad-return-value (ad-make-advised-docstring function))
;;x;; Handle optional `raw' argument:
;;x(if (not (ad-get-arg 1))
;;x(setq ad-return-value
;;x  (substitute-command-keys ad-return-value


;; @@ Starting, stopping and recovering from the advice package magic:
;; ===

(defun ad-start-advice ()
  "Start the automatic advice handling magic."
  (interactive)
  ;; Advising `ad-activate-internal' means death!!
  (ad-set-advice-info 'ad-activate-internal nil)
  (ad-safe-fset 'ad-activate-internal 'ad-activate)
;;x  (ad-enable-advice 'documentation 'after 'ad-advised-docstring)
;;x  (ad-activate 'documentation 'compile)
)

(defun ad-stop-advice ()
  "Stop the automatic advice handling magic.
You should only need this in case of Advice-related emergencies."
  (interactive)
  ;; Advising `ad-activate-internal' means death!!
  (ad-set-advice-info 'ad-activate-internal nil)
;;x  (ad-disable-advice 'documentation 'after 'ad-advised-docstring)
;;x  (ad-update 'documentation)
  (ad-safe-fset 'ad-activate-internal 'ad-activate-internal-off))



-- 
Robert


--
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/




emacs error ad-Orig-documentation called with 5 arguments

2003-01-17 Thread Robert Mecklenburg
I'm getting the following error in the x-enabled version of cygwin
emacs:  

  ** ad-Orig-documentation called with 5 arguments, but accepts only 1-2

The bug is very reproduceable by defining the following two lisp
functions:

(defun foo ()
  (interactive)
  (message "hi"))

(defadvice foo (before example-advice act comp))

Here is what little I know of the problem:

1.  The error is advice on the documentation function rather than on
the function I advised, foo.  The advice.el documentation says:
"Once Advice has been started ... it generates an advised
definition of the `documentation' function".  So most likely, here
lies the error.  No reason to suspect ntsec.

2.  The error does not occur with the same source code with either nt
emacs (non-cygwin version) or "/bin/emacs-nox -q".

3.  It does occur with "/bin/emacs -q -nw".

4.  The advice suggested recently here of completely deleting and
reinstalling a clean cygwin (because of possible ntsec issues)
does not solve the problem for me.

5.  A google search for "ad-Orig-documentation" yields 6 results, none
of which are helpful.

I'm not sure how to continue debugging this issue.  I'm studying
advice.el now.

Cheers,
-- 
Robert


--
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: fix for "wrong number of arguments" emacs problem

2003-01-09 Thread Robert Mecklenburg
JB> There have been a couple people with an emacs problem whose symptom
JB> is LISP error messages complaining about a bad number of arguments
JB> to a function call.
JB> 
JB> Dr. Andrew Mayer cured this problem through a reinstall.  Here are
JB> the details:
JB> 
JB> ...
JB> http://cygwin.com/ml/cygwin/2003-01/msg00421.html

I just followed the instructions his last message and I am still
experiencing the problem.  On a wild guess I deleted all the elc files
(checking for corrupt compiled code) and I still have the problem.  In
particular the defadvice that follows generates the error (for me):

;;;#
;;; If you quit minibuffer editing, add the text already entered in the
;;; minibuffer to the history.
;;;
;;; From: Roland McGrath ([EMAIL PROTECTED])
;;; Newsgroups: gnu.emacs.sources
;;; Date: 1998/05/02
(when (< emacs-major-version 21)
  (defalias 'minibuffer-contents 'buffer-string))

(defadvice abort-recursive-edit (before minibuffer-history act comp)
  "If you quit minibuffer editing, add the text already entered in the minibuffer to 
the history."
  (and (buffer-modified-p)  ;buffer modified
   minibuffer-history-variable  ;using a minibuffer history
   (boundp minibuffer-history-variable) ;and it's not a bogus symbol
   (eq (selected-window) (active-minibuffer-window)) ;indeed in minibuffer
   ;; Do the history save, unless it replicates an existing value.
   (let ((v (symbol-value minibuffer-history-variable))
 (s (progn (widen) (minibuffer-contents
 (cond ((not (listp v)) ;variable was not a list, nuke it
(set minibuffer-history-variable (list s)))
   ((member s v);this string is already in the list
;; Move it to the head of the list, and remove all
;; duplicate occurrences.
(set minibuffer-history-variable (cons s (delete s v)))
)
   (t
(set minibuffer-history-variable (cons s v)))

-- 
Robert


--
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/




sed -i problem?

2003-01-03 Thread Robert Mecklenburg
I seem to be having problem with the -i flag in sed 4.0.1 in the
latest cygwin release.  The docs state -i places output in a tmp file
and renames the tmp to the original when finished.  It appears the
rename is not happening for me:

22 OSAKA:$ mkdir /c/temp/sed
23 OSAKA:$ cd cd /c/temp/sed
25 OSAKA:sed$ echo "hi" > hi
26 OSAKA:sed$ sed -i 's/hi/there/' hi
27 OSAKA:sed$ ls
hi  sed000188
28 OSAKA:sed$ cat hi
hi
30 OSAKA:sed$ cat sed000188
there
31 OSAKA:sed$ sed 's/hi/there/' -i hi
32 OSAKA:sed$ ls
hi  sed000188  sed003016
33 OSAKA:sed$ cat sed003016
there
34 OSAKA:sed$ sed --version
GNU sed version 4.0.1
Copyright (C) 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.


Or am I misunderstanding the proper use of the option?  A quick google
search for "gnu sed 4.0.1 -i" revealed no obvious references.  The
news file from 4.0.5 (the most recent on ftp.gnu.org) doesn't mention
the problem or a fix either.

Thanks,
-- 
Robert Mecklenburg


--
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/




C-c not getting to subshells in emacs?

2002-11-26 Thread Robert Mecklenburg
A bash shell running under emacs seems to ignore C-c from the parent
emacs in the current cygwin release.  To reproduce:

1. start a bash (in dos window, rxvt, or xterm all the same)
2. run
   SHELL=/usr/bin/bash /usr/bin/emacs -nw -q
3. M-x shell
4. at the shell prompt type "cat"
5. C-c C-c  -- the cat process continues

If you replace step 2 above with:

   SHELL=/usr/bin/sh /usr/bin/emacs -nw -q

Then the cat terminates as expected in step 5.  Thought you'd like to
know.

Cheers,
-- 
Robert


--
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/




Changing resolution of $^ in make

2002-10-08 Thread Robert Mecklenburg

I apologize in advance if this cross-posting is inappropriate, but it
seemed reasonable at the time...


The following makefile yields two different values for $^ when run
twice in succession:

# Example makefile
vpath %.in /c/work/tmp/src
vpath %.out /c/work/tmp/out

default: stuff/foo.out
# $^

%.out: %.in
touch /c/work/tmp/out/$@

# end of makefile


When run twice I get:

63 OSAKA:tmp$ make
touch /c/work/tmp/out/stuff/foo.out
# c/foo.out
64 OSAKA:tmp$ make
# /c/work/tmp/out/stuff/foo.out

As you can see, the first time (when the prerequisite "stuff/foo.out"
doesn't exist) , $^ is resolved to "stuff/foo.out".  But the second
time, when stuff/foo.out already exists, it is resolved to
"/c/work/tmp/out/stuff/foo.out".  Is this behavior correct?

Environment Specifics:

This is being run on Windows XP with the latest cygwin installation.
I've cc'd that list because there are a lot of sharp people there
familiar with gnu internals.

65 OSAKA:tmp$ make --version
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i686-pc-cygwin
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Report bugs to <[EMAIL PROTECTED]>.

Thanks,
-- 
Robert


--
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: Setup problem: Download Incomplete

2002-05-17 Thread Robert Mecklenburg

RM> ... but I haven't seen it mentioned in the list so far and it is
RM> possible you don't know...

Please forgive this bit of noise, I'd failed to read 4 digests worth
of messages...  Doh!
-- 
Robert


--
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/




Setup problem: Download Incomplete

2002-05-17 Thread Robert Mecklenburg

First, thanks for cygwin, xfree, and a great development environment
on Windows!

I don't think this is a big deal, but I haven't seen it mentioned in
the list so far and it is possible you don't know...  I'm experiencing
the above error message from setup:

Setup version 2.218.2.9
Windows 2000, SP2

Here's how to reproduce it.

1. Run setup, selecting "Run the program as the following user:"

2. Login as Administrator  (BTW, not a bug but an irritation, when you
   type return the mouse is warpped away from its current location so
   that the main "Cygwin Setup" screen does not have the focus {with
   focus follows mouse, "Active Tracking" set}.)

3. Click "Next" through the following screens using the defaults:

   "Main Screen"
   "Choose A Download Source"
   "Select Root Install Directory" (d:/usr/cygwin) 
   "Select Local Package Directory" (d:/usr/Archive/cygwin)
   "Select Your Internet Connection"
   "Choose A Download Site" (ftp://mirrors.rcn.net)

4. At the "Select packages to install" screen, click the "All Default"
   arrow-ring to select "All Install", then next.  There is nothing to
   install.

5. I then get the dialog "Download Incomplete. Try again?".  If I
   select Yes, I just go into an infinite loop getting "Download
   Incomplete" dialogs over and over.  If I select No, I get the
   dialog "Can't open (null) for reading: No such file".

In an attempt to clear the problem I deleted all files and directories
under my local package directory (except setup.exe) and I still get
the problem.  My installation appears to be complete and correct, but
I don't use most packages in cygwin (e.g., tcl, inetd, tex, apache).

Thanks again for the great software!

Cheers,
-- 
Robert


--
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/




regtool doesn't support REG_BINARY?

2002-02-20 Thread Robert Mecklenburg

I'm trying to use the regtool to swap caps-lock and control using this
incantation:

  regtool -m set \
  "machine\SYSTEM\CurrentControlSet\Control\Keyboard Layout\Scancode Map" \
  00 00 00 00 00 00 00 00 03 00 00 00 1d 00 3a 00 3a 00 1d 00 00 00 00 00

Unfortunately this produces a value of type REG_MULTI_SZ rather than
REG_BINARY (not very surprising).  Omitting the "-m" or supplying "-i"
yields a single REG_DWORD value.  From the docs and this experiment it
appears regtool doesn't support REG_BINARY.  Am I missing something?

Thanks,
-- 
Robert Mecklenburg


--
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/




Is window manipulation available in perl?

2002-02-12 Thread Robert Mecklenburg

First, please excuse the newbie question.  I don't think this is
off-topic, but my judgement isn't the one that counts. ;-) I've done a
good bit of searching with google, faqs, and posting to
comp.lang.perl.misc, but can't figure this out...

I'm using the most recent cygwin port of perl (revision 5.0 version 6
subversion 1) on windows 2000.  I want to send "alt+f x" to an Outlook
Express window from a perl script.  It seems that ActiveState Perl can
do this with the Win32::Setupsup package, but that the vanilla perl
(or cygwin's perl) cannot do this?

I tried to install the Win32-CtrlGUI-0.22 package from cpan.org but it
requires Win32::Setupsup which is not on cpan.org.  I found this
package on perlring.org but it seems to require ppm.  I found
references to ppm at activestate.com but it appears to be a feature of
ActivePerl rather than of "just perl".

So the question is: "how to I send keystrokes to a Windows window with
cygwin Perl"?

I'm using cygwin tools heavily in this perl script and I'd hate to
have to use ActiveState perl.  Partly because I love cygwin and partly
because the path translation between a non-cygwin perl and cygwin
tools would introduce messiness I'd like to avoid.

Suggestions welcome. 
Thanks,
Robert Mecklenburg


--
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/