[GnuWin32-Users] R: which command
Provides native Win32 open source ports and utilities
Brought to you by:
gnuwin32
From: Alessandro C. <zca...@gm...> - 2011-10-25 15:08:27
|
The problem of the current version (2.20) of “which” command is this: in Windows the directory separator character is ‘\’, but many users fond of Linux accidentally use character ‘/’ 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 = *argv; char intruder = (DIR_SEPARATOR == '/' ? '\\' : '/'); for (; *p; p++) { if (*p == intruder) { *p = DIR_SEPARATOR; } } } I hope it could work. Regards -----Messaggio originale----- Da: GnuWin32 [mailto:gnu...@gm...] Inviato: lunedì 24 ottobre 2011 18.28 A: gnu...@li... Oggetto: Re: [GnuWin32-Users] which command Yes, here, or in the Bugs Tracker (http://sourceforge.net/tracker/?group_id=23617&atid=379173). -----Oorspronkelijk bericht----- From: aca...@em... Sent: Monday, October 24, 2011 11:16 AM To: gnu...@li... Subject: [GnuWin32-Users] which command Hi, I have a (possible) bug fix for the which command (version 2.20), but I don’t 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=11451&d=20111024 -- 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=11848&d=24-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 Gnu...@li... https://lists.sourceforge.net/lists/listinfo/gnuwin32-users ------------------------------------------------------------------------------ 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 Gnu...@li... https://lists.sourceforge.net/lists/listinfo/gnuwin32-users |