File: fallback.pl

package info (click to toggle)
xawtv 3.107-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,204 kB
  • sloc: ansic: 46,254; perl: 749; sh: 422; cpp: 184; makefile: 126; xml: 74
file content (26 lines) | stat: -rw-r--r-- 361 bytes parent folder | download | duplicates (18)
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
#!/usr/bin/perl -w
#
# build header file from
#
use strict;

while (my $line = <>) {
	chomp $line;

	# ignore comments
	next if $line =~ /^!/;
#	next if $line =~ /^\s*$/;

	# quote stuff
	$line =~ s/\\/\\\\/g;
	$line =~ s/\"/\\\"/g;

	# continued line?
	if ($line =~ s/\\\\$//) {
		printf "\"%s\"\n",$line;
		next;
	}

	# write out
	printf "\"%s\",\n",$line;
}