I: which command
"Alessandro Carioni" <[email protected]> Tue, 25 Oct 2011 17:35:42 +0200
| Newsgroups | gmane.comp.windows.gnu.user |
|---|---|
| Message-ID | <003d01cc932b$c4d1eab0$4e75c010$@com> |
This is a multi-part message in MIME format.
------=_NextPart_000_003E_01CC933C.885ABAB0
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Ops the mailing system doesn't accept files. That's diff output for the =
patch:
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: .deps
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: Makefile
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: Tb02.patch
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: config.h
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: config.log
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: =
config.status
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: =
maintMakefile
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src: stamp-h1
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src/tilde: .deps
Only in which-2.20-src_fixed/src/which/2.20/which-2.20-src/tilde: =
Makefile
diff -crB which-2.20-src/src/which/2.20/which-2.20-src/which.c =
which-2.20-src_fixed/src/which/2.20/which-2.20-src/which.c
*** which-2.20-src/src/which/2.20/which-2.20-src/which.c Sun Aug 10 =
14:07:18 2008
--- which-2.20-src_fixed/src/which/2.20/which-2.20-src/which.c Sun Oct =
16 15:49:31 2011
***************
*** 713,718 ****
--- 713,727 ----
{
int found_something =3D 0;
=20
+ {
+ char *p =3D *argv;
+ char intruder =3D (DIR_SEPARATOR =3D=3D '/' ? '\\' : '/');
+ for (; *p; p++) {
+ if (*p =3D=3D intruder) {
+ *p =3D DIR_SEPARATOR;
+ }
+ }
+ }
if (!*argv)
continue;
=20
-----Messaggio originale-----
Da: Alessandro Carioni [mailto:[email protected]]=20
Inviato: marted=C3=AC 25 ottobre 2011 17.08
A: '[email protected]'
Oggetto: R: [GnuWin32-Users] which command
The problem of the current version (2.20) of =E2=80=9Cwhich=E2=80=9D =
command is this: in Windows the directory separator character is =
=E2=80=98\=E2=80=99, but many users fond of Linux accidentally use =
character =E2=80=98/=E2=80=99 instead. When that happens, the command =
abruptly stops, and the OS signals a segmentation fault error. Therefore =
in the main loop of the program, where the command line is handled, I =
take every argument and I substitute the wrong dir separator with the =
correct one as pointed out by macro DIR_SEPARATOR. The code is this:
{
char *p =3D *argv;
char intruder =3D (DIR_SEPARATOR =3D=3D '/' ? '\\' : '/');
for (; *p; p++) {
if (*p =3D=3D intruder) {
*p =3D DIR_SEPARATOR;
}
}
}
I hope it could work.
Regards
-----Messaggio originale-----
Da: GnuWin32 [mailto:[email protected]]
Inviato: luned=C3=AC 24 ottobre 2011 18.28
A: [email protected]
Oggetto: Re: [GnuWin32-Users] which command
Yes, here, or in the Bugs Tracker
(http://sourceforge.net/tracker/?group_id=3D23617&atid=3D379173).
-----Oorspronkelijk bericht-----
From: [email protected]
Sent: Monday, October 24, 2011 11:16 AM
To: [email protected]
Subject: [GnuWin32-Users] which command
Hi, I have a (possible) bug fix for the which command (version 2.20), =
but I don=E2=80=99t know how to submit the patch. May I post it here?
Regards
--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e =
SMTP autenticato? GRATIS solo con Email.it: http://www.email.it/f
Sponsor:
Vuoi arredare casa con stile? MisterCupido.com realizza perfette =
Riproduzioni d'Opere d'Arte! Scopri subito le nostre migliori proposte =
in offerta!
Clicca qui: =
http://adv.email.it/cgi-bin/foclick.cgi?mid=3D11451&d=3D20111024
--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e =
SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
Sponsor:
Sviluppa il tuo business e trova nuovi clienti con il Direct Email =
Marketing di Email.it, la strategia vincente per rafforzare la =
notorieta'della tua impresa!
Clicca qui: =
http://adv.email.it/cgi-bin/foclick.cgi?mid=3D11848&d=3D24-10
-------------------------------------------------------------------------=
-----
The demand for IT networking professionals continues to grow, and the =
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn about =
Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
GnuWin32-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users=20
-------------------------------------------------------------------------=
-----
The demand for IT networking professionals continues to grow, and the =
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn about =
Cisco certifications, training, and career opportunities.=20
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
GnuWin32-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users
------=_NextPart_000_003E_01CC933C.885ABAB0
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
------=_NextPart_000_003E_01CC933C.885ABAB0
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
GnuWin32-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users
------=_NextPart_000_003E_01CC933C.885ABAB0--