File: make_help.pl

package info (click to toggle)
peruser 4b33-6
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,952 kB
  • ctags: 1,064
  • sloc: cpp: 22,367; perl: 2,733; makefile: 345; sh: 335
file content (19 lines) | stat: -rwxr-xr-x 250 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl

die unless( open TXT, "help.txt" );
die unless( open C, ">help.C" );

print C "static char *help_text = ";

while( <TXT> )
{
   chop;
   print C "\"$_\\n\"";
   print C ';' if ( eof TXT );
   print C "\n";
}

close TXT;
close C;

0;