Quickies

[categories] [index] [all (527)] [latest]

Unix
  1. cloc can't count the lines properly in multi-line Objective-C strings.

    It counts two lines instead of three here:

    NSString *s = "/* \
    x \
    */";
    

    The best way I can find is to use the cpp preprocessor:

    $ /usr/bin/cpp -fpreprocessed -P MyClass.m | grep -cve '^\s*$'