test/testfile.c

Fri, 03 Jun 2022 20:05:15 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 03 Jun 2022 20:05:15 +0200
changeset 66
be2084398c37
parent 57
68018eac46c3
permissions
-rw-r--r--

new feature: count non-whitespace characters

universe@57 1 /*
universe@57 2 * Many Files have license headers.
universe@57 3 */
universe@57 4 // And add other stuff below.
universe@57 5
universe@57 6
universe@66 7 int main(int argc, char** argv) { // comments behind code don't matter
universe@57 8
universe@57 9 int zero /* in block comments we are genius enough to
universe@57 10 * detect, if there is still some code in the line
universe@57 11 */ = 0;
universe@57 12
universe@57 13 /* otherwise the whole comment is
universe@57 14 * not counted*/
universe@57 15
universe@57 16 // this holds also for this empty line
universe@57 17
universe@57 18 return zero;
universe@57 19 }
universe@57 20
universe@57 21 /* rare case, but must also work: last line is a comment */

mercurial