-
Notifications
You must be signed in to change notification settings - Fork 0
/
PP-patch
71 lines (71 loc) · 2.15 KB
/
PP-patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
10,11c10,11
< private static final String _L_PAREN = new String("(");
< private static final String _R_PAREN = new String(")");
---
> private static final String _L_PAREN = new String("");
> private static final String _R_PAREN = new String("");
15,61c15
< if (s.equals("{"))
< {
< buf_.append("\n");
< indent();
< buf_.append(s);
< _n_ = _n_ + INDENT_WIDTH;
< buf_.append("\n");
< indent();
< }
< else if (s.equals("(") || s.equals("["))
< buf_.append(s);
< else if (s.equals(")") || s.equals("]"))
< {
< backup();
< buf_.append(s);
< buf_.append(" ");
< }
< else if (s.equals("}"))
< {
< int t;
< _n_ = _n_ - INDENT_WIDTH;
< for(t=0; t<INDENT_WIDTH; t++) {
< backup();
< }
< buf_.append(s);
< buf_.append("\n");
< indent();
< }
< else if (s.equals(","))
< {
< backup();
< buf_.append(s);
< buf_.append(" ");
< }
< else if (s.equals(";"))
< {
< backup();
< buf_.append(s);
< buf_.append("\n");
< indent();
< }
< else if (s.equals("")) return;
< else
< {
< buf_.append(s);
< buf_.append(" ");
< }
---
> buf_.append(s);
3466,3469c3420,3423
< private static void pp(Integer n, int _i_) { buf_.append(n); buf_.append(" "); }
< private static void pp(Double d, int _i_) { buf_.append(d); buf_.append(" "); }
< private static void pp(String s, int _i_) { buf_.append(s); buf_.append(" "); }
< private static void pp(Character c, int _i_) { buf_.append("'" + c.toString() + "'"); buf_.append(" "); }
---
> private static void pp(Integer n, int _i_) { buf_.append(n); }
> private static void pp(Double d, int _i_) { buf_.append(d); }
> private static void pp(String s, int _i_) { buf_.append(s); }
> private static void pp(Character c, int _i_) { buf_.append("'" + c.toString() + "'"); }
3892,3895d3845
< while (buf_.length() > 0 && buf_.charAt(0) == ' ')
< buf_.deleteCharAt(0);
< while (buf_.length() > 0 && buf_.charAt(buf_.length()-1) == ' ')
< buf_.deleteCharAt(buf_.length()-1);