On Sun, Jun 02, 2013 at 02:06:03PM +0200, John Spencer wrote: > On 06/02/2013 12:51 PM, John Spencer wrote: > >man.config can define lines such as > >DEFINE pager less -s > > > >this patch parses them, additionally it always sets pager to less > >instead of more. > > > >Signed-off-by: John Spencer <[email protected]> > > > > ++ const char* env_pager = getenv("MANPAGER"); > ++ if (!env_pager) env_pager = getenv("PAGER"); > > maybe one could optimize this to > > const char* env_pager = getenv("MANPAGER"); > if (!env_pager) env_pager = getenv("MANPAGER"+3); > > so that 5 bytes are saved because the string is reused.
The compiler is free to, and should, make this optimization automatically. Rich _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
