summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authordane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-03-28 23:00:59 +0000
committerdane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-03-28 23:00:59 +0000
commit811ce266630864719df94f757cde407c2b0cdd7d (patch)
tree5e27d2709cb7dfd5c4368c6f778ab15f879104d6 /lang
parent55bf4dbcabf378e9472b7d31d6edf87f6ac853e9 (diff)
BUILD : 1.6.0 (4) BUGS : none NOTES : File cleanup and new AnopeManager script (bin/am) to work with Anope source control. Version schema change with no impact on cpp directives.
git-svn-id: svn://svn.anope.org/anope/trunk@4 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'lang')
-rwxr-xr-xlang/fixlang.pl118
-rwxr-xr-xlang/obs.pl129
2 files changed, 0 insertions, 247 deletions
diff --git a/lang/fixlang.pl b/lang/fixlang.pl
deleted file mode 100755
index bd0f175bf..000000000
--- a/lang/fixlang.pl
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/usr/bin/perl
-#
-# Tries to fix a language file using the reference
-# language (en_us), and injecting all new strings
-# (in english) into the newly generated fixed.pl
-#
-# check the result with obs.pl then copy on top
-# of the source language file.
-#
-my $srcfile = $ARGV[0];
-my $dstfile = "fixed.l";
-my $engfile = "en_us.l";
-my %is_there= ();
-my $pos=0;
-my $wc=0;
-
-my @defs;
-my @efile;
-
-sub error {
-
- my $msg = shift ;
- print "*** Error: $msg \n";
- exit ;
-}
-
-sub not_del {
- $line = shift;
- if ($is_there{$line}) {
- return 1;
- } else {
- return 0;
- }
-
-}
-
-# Could not think of a worse of doing this...
-sub new_def {
- my $ndef;
- my $start=0;
-
- $def = shift;
- for (@efile) {
- my $line = $_;
- chomp $line;
-
- if (/^[A-Z]/) {
- $start=0;
- }
-
- if ($start) {
- $ndef.=$_;
- }
-
- if ($line eq $def) {
- $ndef=$_;
- $start=1;
- }
-
- }
- return $ndef;
-}
-
-error("Usage $0 [lang.l]") unless ($srcfile);
-error("Can't find language file: $srcfile") if (! -f $srcfile);
-error("Can't find language file: $engfile") if (! -f $engfile);
-
-open (EFILE, "< $engfile");
-while (<EFILE>) {
- my $line = $_;
- push(@efile, $line);
- chomp $line;
- if (/^[A-Z]/) {
- $wc = push (@defs, $line);
- }
-}
-close(EFILE);
-
-# Need to load entiry text into hash...
-for (@defs) {
- $is_there{$_} = 1;
-}
-
-open (SFILE, "< $srcfile");
-open (DFILE, "> $dstfile");
-while (<SFILE>) {
- my $line = $_;
- chomp $line;
- if (/^[A-Z]/) {
-
- $del = 0;
- if (not_del($line)) {
- while ($line ne $defs[$pos]) {
- print "ADD: $defs[$pos]\n";
- # Need to reference the hash...
- my $ndef = new_def($defs[$pos]);
- print DFILE $ndef;
- $pos++;
- }
- $pos++;
- } else {
- $del = 1;
- print "DEL: $line\n";
- }
- }
-
- if (! $del) {
- print DFILE "$line\n";
- }
-}
-
-for($pos ; $pos < $wc; $pos++) {
- print "ADD: $defs[$pos]\n";
- my $ndef = new_def($defs[$pos]);
- print DFILE $ndef;
-}
-close(SFILE);
-close(DFILE);
diff --git a/lang/obs.pl b/lang/obs.pl
deleted file mode 100755
index 305351648..000000000
--- a/lang/obs.pl
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/perl
-#
-# Checks a language file against the reference language (en_us), and
-# finds #define string diferences
-#
-my $srcfile = $ARGV[0];
-my $engfile = "en_us.l";
-my %is_there= ();
-my $pos=0;
-my $wc=0;
-my $edef="";
-my $sdef="";
-
-my @efile;
-my @sfile;
-my @defs;
-
-sub error {
-
- my $msg = shift ;
- print "*** Error: $msg \n";
- exit ;
-}
-
-sub not_del {
- $line = shift;
- if ($is_there{$line}) {
- return 1;
- } else {
- return 0;
- }
-
-}
-
-sub get_format {
- my $fmt="";
-
- my $str=shift;
-
- while ($str =~ m/%\w/g) {
- $fmt .= $&;
- }
-
- return $fmt;
-}
-
-# Could not think of a worse of doing this...
-sub get_def {
- my $ndef;
- my $start=0;
- my $found=0;
-
- $buf = shift;
- $def = shift;
- for (@$buf) {
- my $line = $_;
- chomp $line;
-
- if (/^[A-Z]/) {
- $start=0;
- last if $found;
- }
-
- if ($start) {
- $found=1;
- $ndef.=$_;
- }
-
- if ($line eq $def) {
- $start=1;
- }
-
- }
- return $ndef;
-}
-
-error("Usage $0 [lang.l]") unless ($srcfile);
-error("Can't find language file: $srcfile") if (! -f $srcfile);
-error("Can't find language file: $engfile") if (! -f $engfile);
-
-open (EFILE, "< $engfile");
-while (<EFILE>) {
- my $line = $_;
- push(@efile, $line);
- chomp $line;
- if (/^[A-Z]/) {
- $wc = push (@defs, $line);
- $is_there{$line} = 1;
- }
-}
-close(EFILE);
-
-open (SFILE, "< $srcfile");
-while (<SFILE>) {
- push(@sfile, $_);
-}
-close(SFILE);
-
-#for (@defs) {
-# $is_there{$_} = 1;
-#}
-
-for (@sfile) {
- my $line = $_;
- chomp $line;
- if (/^[A-Z]/) {
- if (not_del($line)) {
- while ($line ne $defs[$pos]) {
- print "ADD: $defs[$pos]\n";
- $pos++;
- }
- if (! /^STRFTIME/ ) {
- $edef = get_format(get_def(\@efile, $line)) ;
- $sdef = get_format(get_def(\@sfile, $line)) ;
- if ( $edef ne $sdef ) {
- print "FORMAT: $line (expecting '$edef' and got '$sdef')\n";
- }
- }
- $pos++;
- } else {
- print "DEL: $line\n";
- }
- }
-}
-
-for($pos ; $pos < $wc; $pos++) {
- print "ADD: $defs[$pos]\n";
-}
-