import java.util.*;
import org.xbill.DNS.*;

public class lookup {

public static void
printAnswer(String name, Lookup lookup) {
	System.out.print(name + ":");
	int result = lookup.getResult();
	if (result != Lookup.SUCCESSFUL)
		System.out.print(" " + lookup.getErrorString());
	System.out.println();
	if (lookup.getResult() == Lookup.SUCCESSFUL) {
		Record [] answers = lookup.getAnswers();
		for (int i = 0; i < answers.length; i++)
			System.out.println(answers[i]);
	}
}

public static void
main(String [] args) throws Exception {
	short type = Type.A;
	int start = 0;
	if (args.length > 2 && args[0].equals("-t")) {
		type = Type.value(args[1]);
		if (type < 0)
			throw new IllegalArgumentException("invalid type");
		start = 2;
	}
	for (int i = start; i < args.length; i++) {
		Lookup l = new Lookup(args[i], type);
		l.run();
		printAnswer(args[i], l);
	}
}

}

@@ -291,24 +291,293 @@
 .println();%0A
+%09Name %5B%5D aliases = lookup.getAliases();%0A%09if (aliases.length %3E 0) %7B%0A%09%09System.out.print(%22# aliases: %22);%0A%09%09for (int i = 0; i %3C aliases.length; i++) %7B%0A%09%09%09System.out.print(aliases%5Bi%5D);%0A%09%09%09if (i %3C aliases.length - 1)%0A%09%09%09%09System.out.print(%22 %22);%0A%09%09%7D%0A%09%09System.out.println();%0A%09%7D%0A
 %09if (lookup.

Print a list of aliases, if any exist.