DragonFly BSD
DragonFly submit List (threaded) for 2005-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: PATCH for broken stty


From: Jonas Trollvik <jontro@xxxxxxxxx>
Date: Thu, 31 Mar 2005 16:59:02 +0200

joerg commited a fix for getopt which changed the behaviour of  optind
this week.
This is most probably what caused this problem


On Thu, 31 Mar 2005 06:02:17 -0800, walt <wa1ter@xxxxxxxxxxxxx> wrote:
> I don't understand how stty has been working until now, and apparently
> only two of us see the broken behavior :-/  Anyway, something changed
> yesterday that made stty act differently, and this patch fixes it for
> me.
> 
> --- src/bin/stty/stty.c.orig    2005-03-31 05:48:27.000000000 -0800
> +++ src/bin/stty/stty.c 2005-03-31 05:52:25.000000000 -0800
> @@ -63,6 +63,7 @@
>        i.fd = STDIN_FILENO;
> 
>        opterr = 0;
> +       optind = 1;
>        while (optind < argc &&
>            strspn(argv[optind], "-aefg") == strlen(argv[optind]) &&
>            (ch = getopt(argc, argv, "aef:g")) != -1)
>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]