Revision: | 1.1.1.1 (vendor branch) |
Committed: | Fri Feb 3 07:12:02 2006 UTC (18 years, 5 months ago) by root |
Content type: | text/plain |
Branch: | UPSTREAM |
CVS Tags: | UPSTREAM_2006_03_15, LAST_C_VERSION, STABLE, UPSTREAM_2006_02_22, difficulty_fix_merge_060810_2300, UPSTREAM_2006_02_03 |
Branch point for: | difficulty_fix |
Changes since 1.1: | +0 -0 lines |
Log Message: | initial import |
# | Content |
---|---|
1 | #!/usr/bin/perl |
2 | |
3 | # basic |
4 | |
5 | $in = $ARGV[0]; |
6 | $out = $ARGV[1]; |
7 | sub die { |
8 | $prog = $0; |
9 | print STDERR $prog.": ".$_[0]."\n"; |
10 | exit(1); |
11 | } |
12 | |
13 | open(FOUT,">".$out) || &die("cannot open ".$out); |
14 | |
15 | |
16 | sub include_file { |
17 | $in = shift; |
18 | local(*FIN); |
19 | open(FIN,"<".$in) || &die("cannot open ".$in); |
20 | while (<FIN>) { |
21 | if (/^<!--#include file="(.*)"-->$/) { |
22 | &include_file($1); |
23 | } |
24 | else { |
25 | print FOUT $_; |
26 | } |
27 | } |
28 | close(FIN); |
29 | } |
30 | |
31 | &include_file($in); |
32 | close(FOUT); |
33 |