Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Such C. Much ANSI.

    STATIC_OVL void
    mkcavepos(x, y, dist, waslit, rockit)
    xchar x, y;
    int dist;
    boolean waslit, rockit;
    {
        register struct rm *lev;
        ...
    }


... as in, "this is actually a quite nice and readable old-style ANSI C codebase". Seriously, the downvotes...


Yeah. I made a mod many years ago (it made you the "drunken master" if you were master level in unarmed combat and drank potions of booze). It was really, really easy. I have rarely worked on a code base of that size that was so easy to understand and modify.


If you don't want downvotes, put some text in your comment that is not nonsense-for-the-sake-of-nonsense.


Maybe you were downvoted because that is K&R style, not ANSI style. ANSI requires the type declaration next to the name in the parameter list.


ANSI still allows K&R style, refer to the grammar in section 6.7.6 and the semantics in 6.7.6.3 (of C11).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: