File: Doxyfile.filter

package info (click to toggle)
w-scan-cpp 0~20230121-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,008 kB
  • sloc: ansic: 69,193; cpp: 9,599; makefile: 1,149; perl: 862; python: 74; sh: 70
file content (34 lines) | stat: -rw-r--r-- 803 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/perl

# Filter source files for use with Doxygen.
#
# Escapes special characters in comments marked with "///<".
#
# Usage: Doxyfile.filter filename
#
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Doxyfile.filter 2.1 2013/02/17 10:54:05 kls Exp $

$TAG = "///<";

while (<>) {
      $t = $_;
      $p = index($t, $TAG);
      if ($p >= 0) {
         $p += length($TAG);
         print substr($t, 0, $p);
         $quote = 0;
         while (1) {
               $s = substr($t, $p++, 1);
               last        if ($s eq "");
               $quote ^= 1 if ($s eq '"');
               print "\\"  if (!$quote && $s =~ /[\\\@<>]/);
               print $s;
               }
         }
      else {
         print $t;
         }
      }