On Friday 17 August 2012 16:55:18 Joe Hershberger wrote:
> --- a/common/cmd_echo.c
> +++ b/common/cmd_echo.c
>
> -             while ((c = *p++) != '\0') {
> -                     if (c == '\\' && *p == 'c') {
> -                             putnl = 0;
> -                             p++;
> -                     } else {
> -                             putc(c);
> -                     }
> +
> +             nls = strstr(p, "\\c");
> +             if (nls) {
> +                     putnl = 0;
> +                     *nls = '\0';
> +                     puts(p);
> +                     puts(nls + 2);
> +                     *nls = '\\';
> +             } else {
> +                     puts(p);
>               }
>       }

what if someone uses \c multiple times ?
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to