ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/vendor/ircservices-5.1.24/lang/make-langstrs-h.pl
Revision: 3389
Committed: Fri Apr 25 14:12:15 2014 UTC (9 years, 10 months ago) by michael
Content type: text/x-perl
File size: 441 byte(s)
Log Message:
- Imported ircservices-5.1.24

File Contents

# Content
1 #!/usr/bin/perl
2
3 print STDERR "Generating langstrs.h... ";
4
5 $i = 0;
6 @list = ();
7 open F, "<index" or die "index: $!\n";
8 while (<F>) {
9 chop;
10 push @list, $_;
11 printf "#define %-32s %d\n", $_, $i++;
12 }
13 close F;
14
15 print "\n#define NUM_BASE_STRINGS $i\n";
16 print "\n#ifdef LANGSTR_ARRAY\n";
17 print "static const char * const base_langstrs[] = {\n";
18 foreach $s (@list) {
19 print " \"$s\",\n";
20 }
21 print "};\n#endif\n";
22 print STDERR "$i strings\n";