[U-Boot] [PATCH 11/16] New command clr: Clear the ANSI terminal

Pali Rohár
2011-12-18T19:20:35Z

On Sunday 18 December 2011 13:56:12 Mike Frysinger wrote:
> On Saturday 17 December 2011 12:03:13 Pali Roh?r wrote:
> > --- /dev/null
> > +++ b/common/cmd_clr.c
> >
> > +int do_clr(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>
> static
>
> > + printf(ANSI_CLEAR_CONSOLE);
>
> puts()

puts(s) will output s + '\n'. And we do not want newline after clear screen.

>
> > +U_BOOT_CMD(
> > + clr, CONFIG_SYS_MAXARGS, 1, do_clr,
> > + "clr",
> > + "\n"
> > + " - clear screen and move cursor to top of screen"
> > +);
>
> "clr" is unusual. name it "clear" instead. that's what all the standard
> *nix systems use after all.
> -mike

ok, I will rename clr to clear.

--
Pali Roh?r
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/c5de2a7d/attachment.pgp>