rename com.sun.vlsi.chips.marina.test -> edu.berkeley.fleet.marina
[fleet.git] / src / com / sun / vlsi / chips / marina / test / Indenter.java
diff --git a/src/com/sun/vlsi/chips/marina/test/Indenter.java b/src/com/sun/vlsi/chips/marina/test/Indenter.java
deleted file mode 100644 (file)
index eea831e..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.sun.vlsi.chips.marina.test;
-
-public class Indenter {
-    private static char NL = '\n';
-    private int indent = 0;
-    private boolean beginLine = true;
-        
-    private void spaces(int n) {
-        StringBuffer sb = new StringBuffer();
-        for (int i=0; i<n; i++)  sb.append(" ");
-        System.out.print(sb.toString());
-    }
-    private void indentIfNeeded() {
-        if (beginLine) spaces(indent);
-        beginLine = false;
-    }
-    private void printLines(String msg) {
-        while (true) {
-            int nl = msg.indexOf(NL);
-            if (nl==-1) {
-                indentIfNeeded();
-                System.out.print(msg);
-                return;
-            } else {
-                // found a new line.
-                String line = msg.substring(0, nl);
-                indentIfNeeded();
-                System.out.println(line);
-                beginLine = true;
-                if (nl==msg.length()-1) {
-                    // nothing left after the newline
-                    return;
-                }
-                msg = msg.substring(nl+1);
-            }
-        }
-    }
-    public void prln(String msg) {printLines(msg+NL);}
-    public void pr(String msg) {printLines(msg);}
-    public void adjustIndent(int n) {
-        indent += n;
-    }
-
-
-}