[sac-dev] [patch] Use a pager to show the help files

Kuang He icrazy at gmail.com
Sun Sep 14 09:32:50 PDT 2008


Dear Brian,

On Sun, Sep 14, 2008 at 12:04 PM, Brian Savage <savage at uri.edu> wrote:
> Kuang He
>
> Looking over the patches I have a couple of suggestions/comments.
>
> Could we use ANSI C syntax rather than K&R for function declarations.  This
> would allow for the easy creation of header files by copying and it is a
> current/standard notation.

Sure, I actually prefer ANSI C syntax myself. I used K&R style
function declarations just to conform to the existing code base. I'll
use ANSI C style from now on.

> Pager use: We need to check the system for the less command on compilation.
>  In fact we could check for less, then more, then fallback to the original
> code in sac.

This is a good idea, but I'm not sure how to do it, so could you help
me with this?

> A change like this might allow for syntax highlighting in the help files.

Exactly, and we get to search within help files.

> This would mean the current paging code needs to be made into a
> seperate function.  The pager value could always be checked for to override
> the default.

I can try isolating the current paging code to a separate function.
Where do you think I should put it, in src/ucf/wrhelp.c?


Best regards,

-- 
Kuang He
Department of Physics
University of Connecticut
Storrs, CT 06269-3046

Tel: +1.860.486.4919
Web: http://www.phys.uconn.edu/~he/


More information about the sac-dev mailing list