* Patch: bug 5731
@ 2008-03-01 17:56 Tom Tromey
2008-03-01 19:57 ` Mark Wielaard
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2008-03-01 17:56 UTC (permalink / raw)
To: Frysk List
This fixes bug 5731, which is that the output of plain "set" is ugly.
Previously I "washed" the ChangeLog entry when sending a patch.
I don't know if that is what you want or not. This time I didn't.
Tom
diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog
index 7aba61e..7832a4d 100644
--- a/frysk-core/frysk/hpd/ChangeLog
+++ b/frysk-core/frysk/hpd/ChangeLog
@@ -1,3 +1,10 @@
+2008-03-01 Tom Tromey <tromey@redhat.com>
+
+ Bugzilla 5731
+ * DbgVariableCommands.java (Set.interpret): Use
+ DbgVariables.print.
+ * DbgVariables.java (print): New method.
+
2008-02-29 Tom Tromey <tromey@redhat.com>
* ParameterizedCommand.java (help): Use getWordWrapWriter. Set
diff --git a/frysk-core/frysk/hpd/DbgVariableCommands.java b/frysk-core/frysk/hpd/DbgVariableCommands.java
index f893422..443c21e 100644
--- a/frysk-core/frysk/hpd/DbgVariableCommands.java
+++ b/frysk-core/frysk/hpd/DbgVariableCommands.java
@@ -1,6 +1,6 @@
// This file is part of the program FRYSK.
//
-// Copyright 2005, 2006, 2007 Red Hat Inc.
+// Copyright 2005, 2006, 2007, 2008 Red Hat Inc.
//
// FRYSK is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
@@ -75,7 +75,7 @@ abstract class DbgVariableCommands extends ParameterizedCommand {
throw new InvalidCommandException
("wrong number of parameters");
case 0:
- cli.outWriter.println(cli.dbgvars.toString());
+ cli.dbgvars.print(cli.outWriter);
break;
case 1:
String var = input.parameter(0);
diff --git a/frysk-core/frysk/hpd/DbgVariables.java b/frysk-core/frysk/hpd/DbgVariables.java
index 9516abc..950d356 100644
--- a/frysk-core/frysk/hpd/DbgVariables.java
+++ b/frysk-core/frysk/hpd/DbgVariables.java
@@ -1,6 +1,6 @@
// This file is part of the program FRYSK.
//
-// Copyright 2006, 2007, Red Hat Inc.
+// Copyright 2006, 2007, 2008, Red Hat Inc.
//
// FRYSK is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
@@ -40,12 +40,14 @@
package frysk.hpd;
import java.util.SortedMap;
+import java.util.Map;
import java.util.TreeMap;
import java.util.LinkedList;
import java.util.Arrays;
import java.lang.Integer;
import java.util.Iterator;
import java.util.List;
+import java.io.PrintWriter;
/**
* Debugger variable accessible through the "set" command.
@@ -184,4 +186,13 @@ public class DbgVariables {
CompletionFactory.padSingleCandidate(candidates);
return 0;
}
+
+ public void print(PrintWriter out) {
+ for (Iterator i = vars.entrySet().iterator(); i.hasNext(); ) {
+ Map.Entry e = (Map.Entry) i.next();
+ out.print(e.getKey());
+ out.print("=");
+ out.println(((Value) e.getValue()).getValue());
+ }
+ }
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Patch: bug 5731
2008-03-01 17:56 Patch: bug 5731 Tom Tromey
@ 2008-03-01 19:57 ` Mark Wielaard
2008-03-01 20:35 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Mark Wielaard @ 2008-03-01 19:57 UTC (permalink / raw)
To: tromey; +Cc: Frysk List
Hi Tom,
On Sat, 2008-03-01 at 10:06 -0700, Tom Tromey wrote:
> This fixes bug 5731, which is that the output of plain "set" is ugly.
Thanks. This looks good. I have pushed it.
For this reading along at home. Before this patch:
(fhpd) set
{ERROR_CHECKS=NORMAL, EVENT_INTERRUPT=ON,
EXECUTABLE_PATH=./:/home/mark/bin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin, MAX_HISTORY=20, MAX_LEVELS=20, MAX_LIST=20, MAX_PROMPT=40, MODE=MULTILEVEL, PROMPT=(frysk) , SOURCE_PATH=, START_MODEL=ANY, STOP_MODEL=ANY, VERBOSE=WARN}
after:
(fhpd) set
ERROR_CHECKS=NORMAL
EVENT_INTERRUPT=ON
EXECUTABLE_PATH=./:/home/mark/bin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
MAX_HISTORY=20
MAX_LEVELS=20
MAX_LIST=20
MAX_PROMPT=40
MODE=MULTILEVEL
PROMPT=(frysk)
SOURCE_PATH=
START_MODEL=ANY
STOP_MODEL=ANY
VERBOSE=WARN
> Previously I "washed" the ChangeLog entry when sending a patch.
> I don't know if that is what you want or not. This time I didn't.
I liked "washed", if only because often the patch for a ChangeLog won't
apply anyway since the top of the file has already changed.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Patch: bug 5731
2008-03-01 19:57 ` Mark Wielaard
@ 2008-03-01 20:35 ` Tom Tromey
0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2008-03-01 20:35 UTC (permalink / raw)
To: Mark Wielaard; +Cc: Frysk List
Mark> I liked "washed", if only because often the patch for a ChangeLog won't
Mark> apply anyway since the top of the file has already changed.
No problem.
BTW for those using Emacs, jimb-patch.el (in ELPA) has some handy
patch-washing code.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-01 20:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-01 17:56 Patch: bug 5731 Tom Tromey
2008-03-01 19:57 ` Mark Wielaard
2008-03-01 20:35 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).