head	1.2;
access;
symbols
	RELEASE_7_4_0:1.1
	RELEASE_8_2_0:1.1
	RELEASE_6_EOL:1.1
	RELEASE_8_1_0:1.1
	RELEASE_7_3_0:1.1
	RELEASE_8_0_0:1.1
	RELEASE_7_2_0:1.1
	RELEASE_7_1_0:1.1
	RELEASE_6_4_0:1.1
	RELEASE_5_EOL:1.1
	RELEASE_7_0_0:1.1
	RELEASE_6_3_0:1.1
	PRE_XORG_7:1.1
	RELEASE_4_EOL:1.1
	RELEASE_6_2_0:1.1
	RELEASE_6_1_0:1.1
	RELEASE_5_5_0:1.1
	RELEASE_6_0_0:1.1
	RELEASE_5_4_0:1.1
	RELEASE_4_11_0:1.1
	RELEASE_5_3_0:1.1
	RELEASE_4_10_0:1.1
	RELEASE_5_2_1:1.1
	RELEASE_5_2_0:1.1
	RELEASE_4_9_0:1.1
	RELEASE_5_1_0:1.1;
locks; strict;
comment	@# @;


1.2
date	2011.09.01.06.47.45;	author bapt;	state dead;
branches;
next	1.1;

1.1
date	2003.04.27.01.12.01;	author vanilla;	state Exp;
branches;
next	;


desc
@@


1.2
log
@2011-09-01 astro/gkrellmoon: Abandonware
2011-09-01 astro/spacechart: Abandonware
2011-09-01 audio/adpcm: No more public distfiles
2011-09-01 audio/aube: Abandonware
2011-09-01 audio/festvox-aec: BROKEN for more than 6 month
2011-09-01 audio/gtkgep: Abandonware
2011-09-01 audio/gtkhirad: No more public distfiles
2011-09-01 audio/opmixer: No more upstream
2011-09-01 audio/swami: Abandonware
2011-09-01 audio/x11amp: Abandonware
2011-09-01 audio/xmms-sndstretch: No Master Site
2011-09-01 cad/linux-gid: No more public distfiles
2011-09-01 chinese/gbscript: No more public distfiles
2011-09-01 chinese/mplayer-fonts: No more public distfiles
2011-09-01 chinese/oxford: No more public distfiles
2011-09-01 chinese/vflib: No more public distfiles
2011-09-01 databases/mysql++: No more public distfiles
2011-09-01 databases/mysql_last_value: No Master Site
2011-09-01 databases/p5-DBIx-Table: No more public distfiles
@
text
@#!/usr/bin/perl

$prefix="/usr/local";

# modify file path below if needed
$dicpath="$prefix/share/oxford/";
$flag=0;

# accept 4 parameters
$input="$ARGV[0]";
if ( $ARGV[1] ) { $input = $input." $ARGV[1]"; }
if ( $ARGV[2] ) { $input = $input." $ARGV[2]"; }
if ( $ARGV[3] ) { $input = $input." $ARGV[3]"; }

# no argument
if ( ! $input )
{
  print "Input your word/phrase please: ";
  $input=<STDIN>;
  chop($input);
} 

if( $input )
{
  $index=`echo $input | cut -c1 | tr "[A-Z]" "[a-z]"`;
  chop($index);
  $dicfilename=$dicpath."$index.dic";

  open ( FHHH, $dicfilename )
    or die("Dictionary perl script");

  print "Searching Word: [ $input ]\n";

  while ( <FHHH> )
  {
    if ( /^$input/i )
    {
       print $_;
       print "\n";
       $flag=1;
       $matchline=1;
    }
    else
    {
       if ( $matchline eq 1 )
       {      
          # print explanations
           print $_; 
           print "\n";
           $matchline = 0;
       }
    }
  }
  if ( $flag eq 0 )
  {
     print "not found.\n";
  }
}  # end of else of if ( ! $input )
@


1.1
log
@Add oxford 0.1, a English to Chinese(GB) dictionary.

PR:		50817
Submitted by:	Shen Chuan-Hsing <statue@@freebsd.sinica.edu.tw>
@
text
@@

