diff options
author | Stephane Carrez <stcarrez@nerim.fr> | 2001-07-21 19:46:59 +0000 |
---|---|---|
committer | Stephane Carrez <stcarrez@nerim.fr> | 2001-07-21 19:46:59 +0000 |
commit | fea1470223dd1910e80bf0a5a4c60139d4846446 (patch) | |
tree | d05839f5ebbce22ef590bc0a07095654f9d05ed6 /gdb/tui | |
parent | af101512330aa06212f39e1af3691f8da8158692 (diff) | |
download | gdb-fea1470223dd1910e80bf0a5a4c60139d4846446.zip gdb-fea1470223dd1910e80bf0a5a4c60139d4846446.tar.gz gdb-fea1470223dd1910e80bf0a5a4c60139d4846446.tar.bz2 |
* tuiRegs.c (tuiDisplayRegistersFrom): Call touchwin.
(_tuiRegisterFormat): Reduce size of format result.
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/tui/tuiRegs.c | 21 |
2 files changed, 25 insertions, 1 deletions
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog index 1f2ddd6..153b09c 100644 --- a/gdb/tui/ChangeLog +++ b/gdb/tui/ChangeLog @@ -1,5 +1,10 @@ 2001-07-21 Stephane Carrez <Stephane.Carrez@worldnet.fr> + * tuiRegs.c (tuiDisplayRegistersFrom): Call touchwin. + (_tuiRegisterFormat): Reduce size of format result. + +2001-07-21 Stephane Carrez <Stephane.Carrez@worldnet.fr> + * tuiGeneralWin.c (boxWin): Use the tui configuration variables. * tuiWin.h: Declare the new variables. * tuiWin.c (_initialize_tuiWin): Create TUI configuration variables. diff --git a/gdb/tui/tuiRegs.c b/gdb/tui/tuiRegs.c index 177451f..f93d2b9 100644 --- a/gdb/tui/tuiRegs.c +++ b/gdb/tui/tuiRegs.c @@ -347,6 +347,8 @@ tuiDisplayRegistersFrom (int startElementNo) makeWindow (dataItemWin, DONT_BOX_WINDOW); scrollok (dataItemWin->handle, FALSE); } + touchwin (dataItemWin->handle); + /* ** Get the printable representation of the register ** and display it @@ -603,6 +605,7 @@ _tuiRegisterFormat (char *buf, int bufLen, int regNum, char *name; struct cleanup *cleanups; char *p; + int pos; name = REGISTER_NAME (regNum); if (name == 0) @@ -619,7 +622,23 @@ _tuiRegisterFormat (char *buf, int bufLen, int regNum, do_registers_info (regNum, 0); /* Save formatted output in the buffer. */ - strncpy (buf, tui_file_get_strbuf (stream), bufLen); + p = tui_file_get_strbuf (stream); + pos = 0; + while (*p && *p == *name++ && bufLen) + { + *buf++ = *p++; + bufLen--; + pos++; + } + while (*p == ' ') + p++; + while (pos < 8 && bufLen) + { + *buf++ = ' '; + bufLen--; + pos++; + } + strncpy (buf, p, bufLen); /* Remove the possible \n. */ p = strchr (buf, '\n'); |