Removed/commented out/tagged some unused local variables.

Added a JUnit test for the new Trie that fails at present since the Trie is
case-insensitive.  Running JUnit tests is not something our build system
knows about at present, but Eclipse 2.0 makes it very easy.

Fixed a few compiler errors due to imports I'd forgotten.
This commit is contained in:
dchandler 2002-11-02 16:01:40 +00:00
parent b8391e923d
commit a6cc4a7ff3
31 changed files with 292 additions and 179 deletions

View file

@ -1605,7 +1605,6 @@ public void paste(int offset) {
StringBuffer sb;
AttributeSet attr;
String fontName;
int fontNum;
Position endPos;
int i;
@ -1618,7 +1617,7 @@ public void paste(int offset) {
attr = doc.getCharacterElement(i).getAttributes();
fontName = StyleConstants.getFontFamily(attr);
if ((0 != (fontNum = TibetanMachineWeb.getTMWFontNumber(fontName))) || i==endPos.getOffset()) {
if ((0 != TibetanMachineWeb.getTMWFontNumber(fontName)) || i==endPos.getOffset()) {
if (i != start) {
try {
DuffData[] duffdata = TibTextUtils.getTibetanMachineWeb(sb.toString());
@ -1653,7 +1652,7 @@ public void paste(int offset) {
* document consists of both Tibetan and non-Tibetan fonts, however,
* the conversion stops at the first non-Tibetan font.
* @return the string of Wylie corresponding to the associated document
* @see org.thdl.tib.text.TibetanDocument.getWylie() */
* @see org.thdl.tib.text.TibetanDocument#getWylie() */
public String getWylie() {
return doc.getWylie();
}

View file

@ -26,6 +26,7 @@ import netscape.javascript.JSObject;
import org.thdl.tib.text.*;
import org.thdl.util.ThdlActionListener;
import org.thdl.util.ThdlDebug;
/**
* A version of Jskad which can be embedded into

View file

@ -68,7 +68,6 @@ public class Jskad4JavaScript extends JApplet {
public void setWylie(String wylie) {
try {
DuffData[] dd = TibTextUtils.getTibetanMachineWeb(wylie);
TibetanDocument t_doc = (TibetanDocument)jskad.dp.getDocument();
if (t_doc.getLength() > 0)
jskad.dp.newDocument(); // DLC FIXME: is it intended that t_doc is the new document? Because it is the old document at present.

View file

@ -172,7 +172,6 @@ public class AppletScannerFilter extends JApplet implements ActionListener, Focu
Object clicked = e.getSource();
StringSelection ss;
String s = null;
int start, end;
if (clicked==aboutItem)
{

View file

@ -101,7 +101,9 @@ public class BinaryFileGenerator extends LinkedList
{
final short newDefiniendum=1, halfDefiniendum=2, definition=3;
short status=newDefiniendum;
int marker, len, marker2, n=0, total=0, currentPage=0, currentLine=1;
int marker, len, marker2;
// int n=0;
int currentPage=0, currentLine=1;
char ch;
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(archivo)));
String entrada="", s1="", s2="", currentLetter="", temp="", lastWeirdDefiniendum="";
@ -383,7 +385,7 @@ public class BinaryFileGenerator extends LinkedList
Link link, newLink;
BinaryFileGenerator ultimo;
String firstSillable;
int pos, marker = word.indexOf(" "), comp;
int marker = word.indexOf(" "), comp;
if (marker<0)
firstSillable = word;

View file

@ -102,7 +102,7 @@ class ConsoleScannerFilter
public void run() throws Exception
{
String inStr, outStr;
String inStr;
while ((inStr=in.readLine())!=null)
{

View file

@ -22,10 +22,12 @@ import javax.swing.*;
import javax.swing.table.TableCellRenderer;
import javax.swing.border.*;
import javax.swing.text.*;
import java.io.Serializable;
import org.thdl.tib.input.DuffPane;
import org.thdl.util.ThdlDebug;
import org.thdl.tib.text.*;
import org.thdl.tib.text.DuffData;
import java.io.Serializable;
/** Used by DictionaryTable to display a Tibetan word or phrase
(in either Roman or Tibetan script) in a single cell.

View file

@ -201,7 +201,6 @@ class LocalTibetanScanner implements TibetanScanner
{
boolean isDeclined =false;
int len = sil.length();
String dev;
if (len<3) return null;
@ -223,7 +222,6 @@ class LocalTibetanScanner implements TibetanScanner
public void scanBody(String in)
{
Word word;
boolean hayMasLineas=true;
if (in.equals("")) finishUp();
@ -263,7 +261,7 @@ class LocalTibetanScanner implements TibetanScanner
public void scanLine(String linea)
{
int init = 0, fin, i;
int init = 0, fin;
char ch;
String sil;
boolean doNotFinishUp;
@ -349,7 +347,6 @@ outAHere:
{
int i=wordList.size();
Token token[] = new Token[i];
Object obj;
ListIterator li = wordList.listIterator();
while(li.hasNext())
token[--i] = (Token)li.next();
@ -366,7 +363,6 @@ outAHere:
{
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(archivo + ".dic")));
LinkedList ll1 = new LinkedList(), ll2 = new LinkedList();
int i;
String s;
while ((s=br.readLine())!=null)
{

View file

@ -272,7 +272,7 @@ public class Manipulate
{
sil = sil.toLowerCase();
int i=0, len=sil.length();
int i=0;
char ch, ch2;
while (!isVowel(sil.charAt(i))) i++;

View file

@ -85,7 +85,7 @@ public class MemorySyllableListTree extends LinkedList implements SyllableListTr
{
MemorySyllableListTree prefijo;
String firstSillable;
int pos, marker = word.indexOf(" ");
int marker = word.indexOf(" ");
if (marker<0)
firstSillable = word;

View file

@ -46,7 +46,7 @@ public class OnLineScannerFilter extends HttpServlet {
String parrafo = request.getParameter("parrafo"), checkboxName, script;
DictionarySource ds=null;
boolean checkedDicts[], allUnchecked, wantsTibetan;
int percent=100;
// int percent=100;
out.println("<html>");
out.println("<head>");
@ -176,7 +176,7 @@ public class OnLineScannerFilter extends HttpServlet {
synchronized public void desglosar(String in, PrintWriter pw, boolean tibetan)
{
boolean hayMasLineas=true;
//boolean hayMasLineas=true;
//int init = 0, fin;
//String linea;
Object words[];

View file

@ -125,7 +125,6 @@ public class RemoteTibetanScanner implements TibetanScanner
BufferedReader br = new BufferedReader(new InputStreamReader(uC.getInputStream()));
LinkedList ll1 = new LinkedList(), ll2 = new LinkedList();
int i;
String s;
while ((s=br.readLine())!=null)
{

View file

@ -258,7 +258,6 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio
Object clicked = e.getSource();
StringSelection ss;
String s = null;
int start, end;
if (clicked == mnuAbout)
{

View file

@ -99,7 +99,8 @@ public class Word extends Token
public String getLink(boolean tibetan)
{
String localWord, result;
String localWord;
// String result;
if (wordSinDec==null) localWord = super.token;
else localWord = wordSinDec;
if (tibetan) localWord = TibetanHTML.getHTML(localWord + " ");

View file

@ -929,9 +929,6 @@ public class TibTextUtils {
if (dcs.length == 0)
return null;
AttributeSet attr;
String fontName;
int fontNum;
char ch;
String wylie;
@ -944,7 +941,7 @@ public class TibTextUtils {
for (int i=start; i<dcs.length; i++) {
ch = dcs[i].character;
int k = dcs[i].charNum;
fontNum = dcs[i].fontNum;
// int fontNum = dcs[i].fontNum;
if (k < 32) {
if (wylieBuffer.length() > 0 || !glyphList.isEmpty()) {

View file

@ -295,7 +295,7 @@ public class TibetanMachineWeb {
System.out.println("reading "+fileName);
String line;
boolean hashOn = false;
boolean isSanskrit = false;
boolean isSanskrit = false; //FIXME: this is never read.
boolean ignore = false;
while ((line = in.readLine()) != null) {