On 2004-07-14 23:51, Jos? de Paula <[EMAIL PROTECTED]> wrote:
> I hacked together this little patch to contrib/nvi to make it support
> simple modelines. [snip]

> +
> +     if (O_ISSET(sp, O_MODELINE)) { 
> +             cmd = get_modeline(sp); 
> +             if (cmd != NULL)
> +                     if (ex_run_str(sp, "modeline", cmd, strlen(cmd), 0, 0)) 
> +                             return;
> +     }
> +

Just a minor comment.

Nested if's like the second & third above look like a natural place to
use && as in:

        if (O_ISSET(sp, O_MODELINE)) {
                cmd = get_modeline(sp);
                if (cmd != NULL &&
                    ex_run_str(sp, "modeline", cmd, strlen(cmd), 0, 0))
                        return;
        }

Giorgos

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to