diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-07-07 20:19:36 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-07-07 20:19:36 +0000 |
commit | c5aa993b1f4add48fbdc6cc3117059f616e49875 (patch) | |
tree | c809d06515a34428cc8df5f758fbc1b6117d4c30 /gdb/tui | |
parent | 3a4b77d8bee950afce6f9702aa65dc0e60817a82 (diff) | |
download | gdb-c5aa993b1f4add48fbdc6cc3117059f616e49875.zip gdb-c5aa993b1f4add48fbdc6cc3117059f616e49875.tar.gz gdb-c5aa993b1f4add48fbdc6cc3117059f616e49875.tar.bz2 |
import gdb-1999-07-07 post reformat
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/tui.c | 246 | ||||
-rw-r--r-- | gdb/tui/tui.h | 149 | ||||
-rw-r--r-- | gdb/tui/tuiCommand.c | 54 | ||||
-rw-r--r-- | gdb/tui/tuiCommand.h | 17 | ||||
-rw-r--r-- | gdb/tui/tuiData.c | 378 | ||||
-rw-r--r-- | gdb/tui/tuiData.h | 328 | ||||
-rw-r--r-- | gdb/tui/tuiDataWin.c | 112 | ||||
-rw-r--r-- | gdb/tui/tuiDataWin.h | 29 | ||||
-rw-r--r-- | gdb/tui/tuiDisassem.c | 90 | ||||
-rw-r--r-- | gdb/tui/tuiDisassem.h | 17 | ||||
-rw-r--r-- | gdb/tui/tuiGeneralWin.c | 84 | ||||
-rw-r--r-- | gdb/tui/tuiGeneralWin.h | 38 | ||||
-rw-r--r-- | gdb/tui/tuiIO.c | 188 | ||||
-rw-r--r-- | gdb/tui/tuiIO.h | 25 | ||||
-rw-r--r-- | gdb/tui/tuiLayout.c | 218 | ||||
-rw-r--r-- | gdb/tui/tuiLayout.h | 22 | ||||
-rw-r--r-- | gdb/tui/tuiRegs.c | 228 | ||||
-rw-r--r-- | gdb/tui/tuiRegs.h | 27 | ||||
-rw-r--r-- | gdb/tui/tuiSource.c | 102 | ||||
-rw-r--r-- | gdb/tui/tuiSource.h | 17 | ||||
-rw-r--r-- | gdb/tui/tuiSourceWin.c | 228 | ||||
-rw-r--r-- | gdb/tui/tuiSourceWin.h | 85 | ||||
-rw-r--r-- | gdb/tui/tuiStack.c | 94 | ||||
-rw-r--r-- | gdb/tui/tuiStack.h | 33 | ||||
-rw-r--r-- | gdb/tui/tuiWin.c | 304 | ||||
-rw-r--r-- | gdb/tui/tuiWin.h | 29 |
26 files changed, 1595 insertions, 1547 deletions
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index f64db44..53b8452df 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -1,7 +1,7 @@ /* -** tui.c -** General functions for the WDB TUI -*/ + ** tui.c + ** General functions for the WDB TUI + */ #include <stdio.h> #include <stdlib.h> @@ -57,8 +57,8 @@ static Opaque _tui_vDo PARAMS ((TuiOpaqueFuncPtr, va_list)); ************************/ /* -** tuiInit(). -*/ + ** tuiInit(). + */ void #ifdef __STDC__ tuiInit (char *argv0) @@ -83,12 +83,12 @@ tuiInit (argv0) * the XDB way. However, one thing we do want to do in * XDB style is set up the scrolling region to be * the bottom of the screen (tuiTermUnsetup()). - */ + */ fputs_unfiltered_hook = NULL; flush_hook = NULL; rl_initialize (); /* need readline initialization to - * create termcap sequences - */ + * create termcap sequences + */ tuiTermUnsetup (1, cmdWin->detail.commandInfo.curch); return; @@ -96,8 +96,8 @@ tuiInit (argv0) /* -** tuiInitWindows(). -*/ + ** tuiInitWindows(). + */ void #ifdef __STDC__ tuiInitWindows (void) @@ -120,9 +120,9 @@ tuiInitWindows () /* -** tuiCleanUp(). -** Kill signal handler and cleanup termination method -*/ + ** tuiCleanUp(). + ** Kill signal handler and cleanup termination method + */ void #ifdef __STDC__ tuiResetScreen (void) @@ -152,9 +152,9 @@ tuiResetScreen () /* -** tuiCleanUp(). -** Kill signal handler and cleanup termination method -*/ + ** tuiCleanUp(). + ** Kill signal handler and cleanup termination method + */ void #ifdef __STDC__ tuiCleanUp (void) @@ -179,8 +179,8 @@ tuiCleanUp () /* -** tuiError(). -*/ + ** tuiError(). + */ void #ifdef __STDC__ tuiError ( @@ -204,9 +204,9 @@ tuiError (string, exitGdb) /* -** tui_vError() -** tuiError with args in a va_list. -*/ + ** tui_vError() + ** tuiError with args in a va_list. + */ void #ifdef __STDC__ tui_vError ( @@ -229,9 +229,9 @@ tui_vError (args) /* -** tuiFree() -** Wrapper on top of free() to ensure that input address is greater than 0x0 -*/ + ** tuiFree() + ** Wrapper on top of free() to ensure that input address is greater than 0x0 + */ void #ifdef __STDC__ tuiFree ( @@ -251,10 +251,10 @@ tuiFree (ptr) /* tuiGetLowDisassemblyAddress(). -** Determine what the low address will be to display in the TUI's -** disassembly window. This may or may not be the same as the -** low address input. -*/ + ** Determine what the low address will be to display in the TUI's + ** disassembly window. This may or may not be the same as the + ** low address input. + */ Opaque #ifdef __STDC__ tuiGetLowDisassemblyAddress ( @@ -270,9 +270,9 @@ tuiGetLowDisassemblyAddress (low, pc) Opaque newLow; /* - ** Determine where to start the disassembly so that the pc is about in the - ** middle of the viewport. - */ + ** Determine where to start the disassembly so that the pc is about in the + ** middle of the viewport. + */ for (line = 0, newLow = pc; (newLow > low && line < (tuiDefaultWinViewportHeight (DISASSEM_WIN, @@ -289,9 +289,9 @@ tuiGetLowDisassemblyAddress (low, pc) /* tui_vGetLowDisassemblyAddress(). -** Determine what the low address will be to display in the TUI's -** disassembly window with args in a va_list. -*/ + ** Determine what the low address will be to display in the TUI's + ** disassembly window with args in a va_list. + */ Opaque #ifdef __STDC__ tui_vGetLowDisassemblyAddress ( @@ -315,20 +315,20 @@ tui_vGetLowDisassemblyAddress (args) /* -** tuiDo(). -** General purpose function to execute a tui function. Transitions -** between curses and the are handled here. This function is called -** by non-tui gdb functions. -** -** Errors are caught here. -** If there is no error, the value returned by 'func' is returned. -** If there is an error, then zero is returned. -** -** Must not be called with immediate_quit in effect (bad things might -** happen, say we got a signal in the middle of a memcpy to quit_return). -** This is an OK restriction; with very few exceptions immediate_quit can -** be replaced by judicious use of QUIT. -*/ + ** tuiDo(). + ** General purpose function to execute a tui function. Transitions + ** between curses and the are handled here. This function is called + ** by non-tui gdb functions. + ** + ** Errors are caught here. + ** If there is no error, the value returned by 'func' is returned. + ** If there is an error, then zero is returned. + ** + ** Must not be called with immediate_quit in effect (bad things might + ** happen, say we got a signal in the middle of a memcpy to quit_return). + ** This is an OK restriction; with very few exceptions immediate_quit can + ** be replaced by judicious use of QUIT. + */ Opaque #ifdef __STDC__ tuiDo ( @@ -345,7 +345,7 @@ tuiDo (func, va_alist) /* It is an error to be tuiDo'ing if we * don't own the terminal. - */ + */ if (!terminal_is_ours) return ret; @@ -367,22 +367,22 @@ tuiDo (func, va_alist) /* -** tuiDoAndReturnToTop(). -** General purpose function to execute a tui function. Transitions -** between curses and the are handled here. This function is called -** by non-tui gdb functions who wish to reset gdb to the top level. -** After the tuiDo is performed, a return to the top level occurs. -** -** Errors are caught here. -** If there is no error, the value returned by 'func' is returned. -** If there is an error, then zero is returned. -** -** Must not be called with immediate_quit in effect (bad things might -** happen, say we got a signal in the middle of a memcpy to quit_return). -** This is an OK restriction; with very few exceptions immediate_quit can -** be replaced by judicious use of QUIT. -** -*/ + ** tuiDoAndReturnToTop(). + ** General purpose function to execute a tui function. Transitions + ** between curses and the are handled here. This function is called + ** by non-tui gdb functions who wish to reset gdb to the top level. + ** After the tuiDo is performed, a return to the top level occurs. + ** + ** Errors are caught here. + ** If there is no error, the value returned by 'func' is returned. + ** If there is an error, then zero is returned. + ** + ** Must not be called with immediate_quit in effect (bad things might + ** happen, say we got a signal in the middle of a memcpy to quit_return). + ** This is an OK restriction; with very few exceptions immediate_quit can + ** be replaced by judicious use of QUIT. + ** + */ Opaque #ifdef __STDC__ tuiDoAndReturnToTop ( @@ -399,7 +399,7 @@ tuiDoAndReturnToTop (func, va_alist) /* It is an error to be tuiDo'ing if we * don't own the terminal. - */ + */ if (!terminal_is_ours) return ret; @@ -439,9 +439,9 @@ tui_vSelectSourceSymtab (args) /* -** _initialize_tui(). -** Function to initialize gdb commands, for tui window manipulation. -*/ + ** _initialize_tui(). + ** Function to initialize gdb commands, for tui window manipulation. + */ void _initialize_tui () { @@ -469,21 +469,21 @@ Usage:\ttoggle $fregs\n\ttoggle breakpoints"; "toggle ", 1, &cmdlist); -} /* _initialize_tui*/ +} /* _initialize_tui */ /* -** va_catch_errors(). -** General purpose function to execute a function, catching errors. -** If there is no error, the value returned by 'func' is returned. -** If there is error, then zero is returned. -** Note that 'func' must take a variable argument list as well. -** -** Must not be called with immediate_quit in effect (bad things might -** happen, say we got a signal in the middle of a memcpy to quit_return). -** This is an OK restriction; with very few exceptions immediate_quit can -** be replaced by judicious use of QUIT. -*/ + ** va_catch_errors(). + ** General purpose function to execute a function, catching errors. + ** If there is no error, the value returned by 'func' is returned. + ** If there is error, then zero is returned. + ** Note that 'func' must take a variable argument list as well. + ** + ** Must not be called with immediate_quit in effect (bad things might + ** happen, say we got a signal in the middle of a memcpy to quit_return). + ** This is an OK restriction; with very few exceptions immediate_quit can + ** be replaced by judicious use of QUIT. + */ Opaque #ifdef __STDC__ va_catch_errors ( @@ -498,10 +498,10 @@ va_catch_errors (func, args) Opaque ret = (Opaque) NULL; /* - ** We could have used catch_errors(), but it doesn't handle variable args. - ** Also, for the tui, we always want to catch all errors, so we don't - ** need to pass a mask, or an error string. - */ + ** We could have used catch_errors(), but it doesn't handle variable args. + ** Also, for the tui, we always want to catch all errors, so we don't + ** need to pass a mask, or an error string. + */ jmp_buf saved_error; jmp_buf saved_quit; jmp_buf tmp_jmp; @@ -537,11 +537,11 @@ va_catch_errors (func, args) } /* -** vcatch_errors(). -** Catch errors occurring in tui or non tui function, handling -** variable param lists. Note that 'func' must take a variable -** argument list as well. -*/ + ** vcatch_errors(). + ** Catch errors occurring in tui or non tui function, handling + ** variable param lists. Note that 'func' must take a variable + ** argument list as well. + */ Opaque #ifdef __STDC__ vcatch_errors ( @@ -550,10 +550,10 @@ vcatch_errors ( vcatch_errors (va_alist) va_dcl /* -vcatch_errors(func, va_alist) - OpaqueFuncPtr func; - va_dcl -*/ + vcatch_errors(func, va_alist) + OpaqueFuncPtr func; + va_dcl + */ #endif { Opaque ret = (Opaque) NULL; @@ -561,8 +561,8 @@ vcatch_errors(func, va_alist) #ifdef __STDC__ va_start (args, func); /* - va_arg(args, OpaqueFuncPtr); -*/ + va_arg(args, OpaqueFuncPtr); + */ #else OpaqueFuncPtr func; @@ -644,20 +644,20 @@ strcat_to_buf_with_fmt (va_alist) /* -** _tui_vDo(). -** General purpose function to execute a tui function. Transitions -** between curses and the are handled here. This function is called -** by non-tui gdb functions. -** -** Errors are caught here. -** If there is no error, the value returned by 'func' is returned. -** If there is an error, then zero is returned. -** -** Must not be called with immediate_quit in effect (bad things might -** happen, say we got a signal in the middle of a memcpy to quit_return). -** This is an OK restriction; with very few exceptions immediate_quit can -** be replaced by judicious use of QUIT. -*/ + ** _tui_vDo(). + ** General purpose function to execute a tui function. Transitions + ** between curses and the are handled here. This function is called + ** by non-tui gdb functions. + ** + ** Errors are caught here. + ** If there is no error, the value returned by 'func' is returned. + ** If there is an error, then zero is returned. + ** + ** Must not be called with immediate_quit in effect (bad things might + ** happen, say we got a signal in the middle of a memcpy to quit_return). + ** This is an OK restriction; with very few exceptions immediate_quit can + ** be replaced by judicious use of QUIT. + */ static Opaque #ifdef __STDC__ _tui_vDo ( @@ -675,7 +675,7 @@ _tui_vDo (func, args) /* It is an error to be tuiDo'ing if we * don't own the terminal. - */ + */ if (!terminal_is_ours) return ret; @@ -683,7 +683,7 @@ _tui_vDo (func, args) { /* If doing command window the "XDB way" (command window * is unmanaged by curses... - */ + */ /* Set up terminal for TUI */ tuiTermSetup (1); @@ -711,13 +711,13 @@ _toggle_command (arg, fromTTY) printf_filtered ("Specify feature to toggle.\n%s\n", (tui_version) ? TUI_TOGGLE_USAGE : TOGGLE_USAGE); /* - tuiDo((TuiOpaqueFuncPtr)_Toggle_command, arg, fromTTY); -*/ + tuiDo((TuiOpaqueFuncPtr)_Toggle_command, arg, fromTTY); + */ } /* -** _tui_vToggle_command(). -*/ + ** _tui_vToggle_command(). + */ static void #ifdef __STDC__ _tui_vToggle_command ( @@ -745,8 +745,8 @@ _tui_vToggle_command (args) if (subsetCompare (ptr, TUI_FLOAT_REGS_NAME)) tuiToggleFloatRegs (); /* else if (subsetCompare(ptr, "ANOTHER TOGGLE OPTION")) - ... -*/ + ... + */ else printf_filtered (TOGGLE_USAGE); tuiFree (ptr); @@ -766,9 +766,9 @@ _tuiReset () struct termio mode; /* - ** reset the teletype mode bits to a sensible state. - ** Copied tset.c - */ + ** reset the teletype mode bits to a sensible state. + ** Copied tset.c + */ #if ! defined (USG) && defined (TIOCGETC) struct tchars tbuf; #endif /* !USG && TIOCGETC */ @@ -804,7 +804,7 @@ _tuiReset () #endif /* CBREAK */ | VTDELAY | ALLDELAY); mode.sg_flags |= XTABS | ECHO | CRMOD | ANYP; -#else /*USG*/ +#else /*USG */ ioctl (FILEDES, TCGETA, &mode); mode.c_cc[VINTR] = CHK (mode.c_cc[VINTR], CTRL ('?')); mode.c_cc[VQUIT] = CHK (mode.c_cc[VQUIT], CTRL ('\\')); @@ -818,7 +818,7 @@ _tuiReset () mode.c_cflag &= ~(CSIZE | PARODD | CLOCAL); #ifndef hp9000s800 mode.c_cflag |= (CS8 | CREAD); -#else /*hp9000s800*/ +#else /*hp9000s800 */ mode.c_cflag |= (CS8 | CSTOPB | CREAD); #endif /* hp9000s800 */ mode.c_lflag &= ~(XCASE | ECHONL | NOFLSH); diff --git a/gdb/tui/tui.h b/gdb/tui/tui.h index bc9fb31..b80b0e9 100644 --- a/gdb/tui/tui.h +++ b/gdb/tui/tui.h @@ -21,100 +21,109 @@ /* Opaque data type */ typedef char *Opaque; -typedef Opaque (*OpaqueFuncPtr) PARAMS ((va_list)); -typedef char **OpaqueList; -typedef OpaqueList OpaquePtr; +typedef +Opaque (*OpaqueFuncPtr) PARAMS ((va_list)); + typedef char **OpaqueList; + typedef OpaqueList OpaquePtr; /* Generic function pointer */ -typedef void (*TuiVoidFuncPtr) PARAMS ((va_list)); -typedef int (*TuiIntFuncPtr) PARAMS ((va_list)); + typedef void (*TuiVoidFuncPtr) PARAMS ((va_list)); + typedef int (*TuiIntFuncPtr) PARAMS ((va_list)); /* -typedef Opaque (*TuiOpaqueFuncPtr) PARAMS ((va_list)); -*/ -typedef OpaqueFuncPtr TuiOpaqueFuncPtr; + typedef Opaque (*TuiOpaqueFuncPtr) PARAMS ((va_list)); + */ + typedef OpaqueFuncPtr TuiOpaqueFuncPtr; -extern Opaque vcatch_errors PARAMS ((OpaqueFuncPtr, ...)); -extern Opaque va_catch_errors PARAMS ((OpaqueFuncPtr, va_list)); + extern Opaque vcatch_errors PARAMS ((OpaqueFuncPtr,...)); + extern Opaque va_catch_errors PARAMS ((OpaqueFuncPtr, va_list)); -extern void strcat_to_buf PARAMS ((char *, int, char *)); -extern void strcat_to_buf_with_fmt PARAMS ((char *, int, char *, ...)); + extern void strcat_to_buf PARAMS ((char *, int, char *)); + extern void strcat_to_buf_with_fmt PARAMS ((char *, int, char *,...)); /* Types of error returns */ -typedef enum { - TUI_SUCCESS, - TUI_FAILURE -} TuiStatus, *TuiStatusPtr; + typedef enum + { + TUI_SUCCESS, + TUI_FAILURE + } +TuiStatus, *TuiStatusPtr; /* Types of windows */ -typedef enum { - SRC_WIN = 0, - DISASSEM_WIN, - DATA_WIN, - CMD_WIN, - /* This must ALWAYS be AFTER the major windows last */ - MAX_MAJOR_WINDOWS, - /* auxillary windows */ - LOCATOR_WIN, - EXEC_INFO_WIN, - DATA_ITEM_WIN, - /* This must ALWAYS be next to last */ - MAX_WINDOWS, - UNDEFINED_WIN /* LAST */ -} TuiWinType, *TuiWinTypePtr; + typedef enum + { + SRC_WIN = 0, + DISASSEM_WIN, + DATA_WIN, + CMD_WIN, + /* This must ALWAYS be AFTER the major windows last */ + MAX_MAJOR_WINDOWS, + /* auxillary windows */ + LOCATOR_WIN, + EXEC_INFO_WIN, + DATA_ITEM_WIN, + /* This must ALWAYS be next to last */ + MAX_WINDOWS, + UNDEFINED_WIN /* LAST */ + } +TuiWinType, *TuiWinTypePtr; /* This is a point definition */ -typedef struct _TuiPoint { - int x, y; -} TuiPoint, *TuiPointPtr; + typedef struct _TuiPoint + { + int x, y; + } +TuiPoint, *TuiPointPtr; /* Generic window information */ -typedef struct _TuiGenWinInfo { - WINDOW *handle; /* window handle */ - TuiWinType type; /* type of window */ - int width; /* window width */ - int height; /* window height */ - TuiPoint origin; /* origin of window */ - OpaquePtr content; /* content of window */ - int contentSize; /* Size of content (# of elements) */ - int contentInUse; /* Can it be used, or is it already used? */ - int viewportHeight; /* viewport height */ - int lastVisibleLine; /* index of last visible line */ - int isVisible; /* whether the window is visible or not */ -} TuiGenWinInfo, *TuiGenWinInfoPtr; + typedef struct _TuiGenWinInfo + { + WINDOW *handle; /* window handle */ + TuiWinType type; /* type of window */ + int width; /* window width */ + int height; /* window height */ + TuiPoint origin; /* origin of window */ + OpaquePtr content; /* content of window */ + int contentSize; /* Size of content (# of elements) */ + int contentInUse; /* Can it be used, or is it already used? */ + int viewportHeight; /* viewport height */ + int lastVisibleLine; /* index of last visible line */ + int isVisible; /* whether the window is visible or not */ + } +TuiGenWinInfo, *TuiGenWinInfoPtr; /* GENERAL TUI FUNCTIONS */ /* tui.c */ -extern void tuiInit PARAMS ((char *argv0)); -extern void tuiInitWindows PARAMS ((void)); -extern void tuiResetScreen PARAMS ((void)); -extern void tuiCleanUp PARAMS ((void)); -extern void tuiError PARAMS ((char *, int)); -extern void tui_vError PARAMS ((va_list)); -extern void tuiFree PARAMS ((char *)); -extern Opaque tuiDo PARAMS ((TuiOpaqueFuncPtr, ...)); -extern Opaque tuiDoAndReturnToTop PARAMS ((TuiOpaqueFuncPtr, ...)); -extern Opaque tuiGetLowDisassemblyAddress PARAMS ((Opaque, Opaque)); -extern Opaque tui_vGetLowDisassemblyAddress PARAMS ((va_list)); -extern void tui_vSelectSourceSymtab PARAMS ((va_list)); + extern void tuiInit PARAMS ((char *argv0)); + extern void tuiInitWindows PARAMS ((void)); + extern void tuiResetScreen PARAMS ((void)); + extern void tuiCleanUp PARAMS ((void)); + extern void tuiError PARAMS ((char *, int)); + extern void tui_vError PARAMS ((va_list)); + extern void tuiFree PARAMS ((char *)); + extern Opaque tuiDo PARAMS ((TuiOpaqueFuncPtr,...)); + extern Opaque tuiDoAndReturnToTop PARAMS ((TuiOpaqueFuncPtr,...)); + extern Opaque tuiGetLowDisassemblyAddress PARAMS ((Opaque, Opaque)); + extern Opaque tui_vGetLowDisassemblyAddress PARAMS ((va_list)); + extern void tui_vSelectSourceSymtab PARAMS ((va_list)); /* tuiDataWin.c */ -extern void tui_vCheckDataValues PARAMS ((va_list)); + extern void tui_vCheckDataValues PARAMS ((va_list)); /* tuiIO.c */ -extern void tui_vStartNewLines PARAMS ((va_list)); + extern void tui_vStartNewLines PARAMS ((va_list)); /* tuiLayout.c */ -extern void tui_vAddWinToLayout PARAMS ((va_list)); -extern TuiStatus tui_vSetLayoutTo PARAMS ((va_list)); + extern void tui_vAddWinToLayout PARAMS ((va_list)); + extern TuiStatus tui_vSetLayoutTo PARAMS ((va_list)); /* tuiSourceWin.c */ -extern void tuiDisplayMainFunction PARAMS ((void)); -extern void tuiUpdateAllExecInfos PARAMS ((void)); -extern void tuiUpdateOnEnd PARAMS ((void)); -extern void tui_vAllSetHasBreakAt PARAMS ((va_list)); -extern void tui_vUpdateSourceWindowsWithAddr PARAMS ((va_list)); + extern void tuiDisplayMainFunction PARAMS ((void)); + extern void tuiUpdateAllExecInfos PARAMS ((void)); + extern void tuiUpdateOnEnd PARAMS ((void)); + extern void tui_vAllSetHasBreakAt PARAMS ((va_list)); + extern void tui_vUpdateSourceWindowsWithAddr PARAMS ((va_list)); /* tuiStack.c */ -extern void tui_vShowFrameInfo PARAMS ((va_list)); -extern void tui_vUpdateLocatorFilename PARAMS ((va_list)); + extern void tui_vShowFrameInfo PARAMS ((va_list)); + extern void tui_vUpdateLocatorFilename PARAMS ((va_list)); #endif /* TUI_H */ diff --git a/gdb/tui/tuiCommand.c b/gdb/tui/tuiCommand.c index 454dc62..699a420 100644 --- a/gdb/tui/tuiCommand.c +++ b/gdb/tui/tuiCommand.c @@ -1,7 +1,7 @@ /* -** tuiCommand.c -** This module contains functions specific to command window processing. -*/ + ** tuiCommand.c + ** This module contains functions specific to command window processing. + */ #include "defs.h" @@ -22,9 +22,9 @@ ******************************************/ /* -** tuiDispatchCtrlChar(). -** Dispatch the correct tui function based upon the control character. -*/ + ** tuiDispatchCtrlChar(). + ** Dispatch the correct tui function based upon the control character. + */ unsigned int #ifdef __STDC__ tuiDispatchCtrlChar ( @@ -37,10 +37,10 @@ tuiDispatchCtrlChar (ch) TuiWinInfoPtr winInfo = tuiWinWithFocus (); /* - ** If the command window has the logical focus, or no-one does - ** assume it is the command window; in this case, pass the - ** character on through and do nothing here. - */ + ** If the command window has the logical focus, or no-one does + ** assume it is the command window; in this case, pass the + ** character on through and do nothing here. + */ if (winInfo == (TuiWinInfoPtr) NULL || winInfo == cmdWin) return ch; else @@ -50,9 +50,9 @@ tuiDispatchCtrlChar (ch) char *term; /* If this is an xterm, page next/prev keys aren't returned - ** by keypad as a single char, so we must handle them here. - ** Seems like a bug in the curses library? - */ + ** by keypad as a single char, so we must handle them here. + ** Seems like a bug in the curses library? + */ term = (char *) getenv ("TERM"); for (i = 0; (term && term[i]); i++) term[i] = toupper (term[i]); @@ -109,10 +109,10 @@ tuiDispatchCtrlChar (ch) /* -** tuiIncrCommandCharCountBy() -** Increment the current character count in the command window, -** checking for overflow. Returns the new value of the char count. -*/ + ** tuiIncrCommandCharCountBy() + ** Increment the current character count in the command window, + ** checking for overflow. Returns the new value of the char count. + */ int #ifdef __STDC__ tuiIncrCommandCharCountBy ( @@ -136,10 +136,10 @@ tuiIncrCommandCharCountBy (count) /* -** tuiDecrCommandCharCountBy() -** Decrement the current character count in the command window, -** checking for overflow. Returns the new value of the char count. -*/ + ** tuiDecrCommandCharCountBy() + ** Decrement the current character count in the command window, + ** checking for overflow. Returns the new value of the char count. + */ int #ifdef __STDC__ tuiDecrCommandCharCountBy ( @@ -163,9 +163,9 @@ tuiDecrCommandCharCountBy (count) /* -** tuiSetCommandCharCountTo() -** Set the character count to count. -*/ + ** tuiSetCommandCharCountTo() + ** Set the character count to count. + */ int #ifdef __STDC__ tuiSetCommandCharCountTo ( @@ -192,9 +192,9 @@ tuiSetCommandCharCountTo (count) /* -** tuiClearCommandCharCount() -** Clear the character count to count. -*/ + ** tuiClearCommandCharCount() + ** Clear the character count to count. + */ int #ifdef __STDC__ tuiClearCommandCharCount (void) diff --git a/gdb/tui/tuiCommand.h b/gdb/tui/tuiCommand.h index 206d918..68b12e0 100644 --- a/gdb/tui/tuiCommand.h +++ b/gdb/tui/tuiCommand.h @@ -1,8 +1,8 @@ #ifndef _TUI_COMMAND_H #define _TUI_COMMAND_H /* -** This header file supports -*/ + ** This header file supports + */ /***************************************** @@ -15,10 +15,11 @@ ** PUBLIC FUNCTION EXTERNAL DECLS ** ******************************************/ -extern unsigned int tuiDispatchCtrlChar PARAMS ((unsigned int)); -extern int tuiIncrCommandCharCountBy PARAMS ((int)); -extern int tuiDecrCommandCharCountBy PARAMS ((int)); -extern int tuiSetCommandCharCountTo PARAMS ((int)); -extern int tuiClearCommandCharCount PARAMS ((void)); +extern unsigned int tuiDispatchCtrlChar PARAMS ((unsigned int)); +extern int tuiIncrCommandCharCountBy PARAMS ((int)); +extern int tuiDecrCommandCharCountBy PARAMS ((int)); +extern int tuiSetCommandCharCountTo PARAMS ((int)); +extern int tuiClearCommandCharCount PARAMS ((void)); -#endif /*_TUI_COMMAND_H*/ +#endif +/*_TUI_COMMAND_H*/ diff --git a/gdb/tui/tuiData.c b/gdb/tui/tuiData.c index 758a6cd..a4e38f3 100644 --- a/gdb/tui/tuiData.c +++ b/gdb/tui/tuiData.c @@ -1,8 +1,8 @@ /* -** tuiData.c -** This module contains functions for manipulating the data -** structures used by the TUI -*/ + ** tuiData.c + ** This module contains functions for manipulating the data + ** structures used by the TUI + */ #include "defs.h" #include "tui.h" @@ -64,9 +64,9 @@ static void freeContentElements PARAMS ((TuiWinContent, int, TuiWinType)); ******************************************/ /* -** tuiWinResized(). -** Answer a whether the terminal window has been resized or not -*/ + ** tuiWinResized(). + ** Answer a whether the terminal window has been resized or not + */ int #ifdef __STDC__ tuiWinResized (void) @@ -79,9 +79,9 @@ tuiWinResized () /* -** tuiSetWinResized(). -** Set a whether the terminal window has been resized or not -*/ + ** tuiSetWinResized(). + ** Set a whether the terminal window has been resized or not + */ void #ifdef __STDC__ tuiSetWinResizedTo ( @@ -98,9 +98,9 @@ tuiSetWinResizedTo (resized) /* -** tuiLayoutDef(). -** Answer a pointer to the current layout definition -*/ + ** tuiLayoutDef(). + ** Answer a pointer to the current layout definition + */ TuiLayoutDefPtr #ifdef __STDC__ tuiLayoutDef (void) @@ -113,9 +113,9 @@ tuiLayoutDef () /* -** tuiWinWithFocus(). -** Answer the window with the logical focus -*/ + ** tuiWinWithFocus(). + ** Answer the window with the logical focus + */ TuiWinInfoPtr #ifdef __STDC__ tuiWinWithFocus (void) @@ -128,9 +128,9 @@ tuiWinWithFocus () /* -** tuiSetWinWithFocus(). -** Set the window that has the logical focus -*/ + ** tuiSetWinWithFocus(). + ** Set the window that has the logical focus + */ void #ifdef __STDC__ tuiSetWinWithFocus ( @@ -147,9 +147,9 @@ tuiSetWinWithFocus (winInfo) /* -** tuiDefaultTabLen(). -** Answer the length in chars, of tabs -*/ + ** tuiDefaultTabLen(). + ** Answer the length in chars, of tabs + */ int #ifdef __STDC__ tuiDefaultTabLen (void) @@ -162,9 +162,9 @@ tuiDefaultTabLen () /* -** tuiSetDefaultTabLen(). -** Set the length in chars, of tabs -*/ + ** tuiSetDefaultTabLen(). + ** Set the length in chars, of tabs + */ void #ifdef __STDC__ tuiSetDefaultTabLen ( @@ -181,11 +181,11 @@ tuiSetDefaultTabLen (len) /* -** currentSourceWin() -** Accessor for the current source window. Usually there is only -** one source window (either source or disassembly), but both can -** be displayed at the same time. -*/ + ** currentSourceWin() + ** Accessor for the current source window. Usually there is only + ** one source window (either source or disassembly), but both can + ** be displayed at the same time. + */ TuiListPtr #ifdef __STDC__ sourceWindows (void) @@ -198,11 +198,11 @@ sourceWindows () /* -** clearSourceWindows() -** Clear the list of source windows. Usually there is only one -** source window (either source or disassembly), but both can be -** displayed at the same time. -*/ + ** clearSourceWindows() + ** Clear the list of source windows. Usually there is only one + ** source window (either source or disassembly), but both can be + ** displayed at the same time. + */ void #ifdef __STDC__ clearSourceWindows (void) @@ -219,9 +219,9 @@ clearSourceWindows () /* -** clearSourceWindowsDetail() -** Clear the pertinant detail in the source windows. -*/ + ** clearSourceWindowsDetail() + ** Clear the pertinant detail in the source windows. + */ void #ifdef __STDC__ clearSourceWindowsDetail (void) @@ -239,11 +239,11 @@ clearSourceWindowsDetail () /* -** addSourceWindowToList(). -** Add a window to the list of source windows. Usually there is -** only one source window (either source or disassembly), but -** both can be displayed at the same time. -*/ + ** addSourceWindowToList(). + ** Add a window to the list of source windows. Usually there is + ** only one source window (either source or disassembly), but + ** both can be displayed at the same time. + */ void #ifdef __STDC__ addToSourceWindows ( @@ -261,9 +261,9 @@ addToSourceWindows (winInfo) /* -** clearWinDetail() -** Clear the pertinant detail in the windows. -*/ + ** clearWinDetail() + ** Clear the pertinant detail in the windows. + */ void #ifdef __STDC__ clearWinDetail ( @@ -308,9 +308,9 @@ clearWinDetail (winInfo) /* -** blankStr() -** Accessor for the blank string. -*/ + ** blankStr() + ** Accessor for the blank string. + */ char * #ifdef __STDC__ blankStr (void) @@ -323,9 +323,9 @@ blankStr () /* -** locationStr() -** Accessor for the location string. -*/ + ** locationStr() + ** Accessor for the location string. + */ char * #ifdef __STDC__ locationStr (void) @@ -338,9 +338,9 @@ locationStr () /* -** breakStr() -** Accessor for the break string. -*/ + ** breakStr() + ** Accessor for the break string. + */ char * #ifdef __STDC__ breakStr (void) @@ -353,9 +353,9 @@ breakStr () /* -** breakLocationStr() -** Accessor for the breakLocation string. -*/ + ** breakLocationStr() + ** Accessor for the breakLocation string. + */ char * #ifdef __STDC__ breakLocationStr (void) @@ -368,9 +368,9 @@ breakLocationStr () /* -** nullStr() -** Accessor for the null string. -*/ + ** nullStr() + ** Accessor for the null string. + */ char * #ifdef __STDC__ nullStr (void) @@ -383,9 +383,9 @@ nullStr () /* -** sourceExecInfoPtr(). -** Accessor for the source execution info ptr. -*/ + ** sourceExecInfoPtr(). + ** Accessor for the source execution info ptr. + */ TuiGenWinInfoPtr #ifdef __STDC__ sourceExecInfoWinPtr (void) @@ -398,9 +398,9 @@ sourceExecInfoWinPtr () /* -** disassemExecInfoPtr(). -** Accessor for the disassem execution info ptr. -*/ + ** disassemExecInfoPtr(). + ** Accessor for the disassem execution info ptr. + */ TuiGenWinInfoPtr #ifdef __STDC__ disassemExecInfoWinPtr (void) @@ -413,10 +413,10 @@ disassemExecInfoWinPtr () /* -** locatorWinInfoPtr(). -** Accessor for the locator win info. Answers a pointer to the -** static locator win info struct. -*/ + ** locatorWinInfoPtr(). + ** Accessor for the locator win info. Answers a pointer to the + ** static locator win info struct. + */ TuiGenWinInfoPtr #ifdef __STDC__ locatorWinInfoPtr (void) @@ -429,9 +429,9 @@ locatorWinInfoPtr () /* -** historyLimit(). -** Accessor for the history limit -*/ + ** historyLimit(). + ** Accessor for the history limit + */ int #ifdef __STDC__ historyLimit (void) @@ -444,9 +444,9 @@ historyLimit () /* -** setHistoryLimitTo(). -** Mutator for the history limit -*/ + ** setHistoryLimitTo(). + ** Mutator for the history limit + */ void #ifdef __STDC__ setHistoryLimitTo ( @@ -462,9 +462,9 @@ setHistoryLimitTo (h) } /* setHistoryLimitTo */ /* -** termHeight(). -** Accessor for the termHeight -*/ + ** termHeight(). + ** Accessor for the termHeight + */ int #ifdef __STDC__ termHeight (void) @@ -477,9 +477,9 @@ termHeight () /* -** setTermHeightTo(). -** Mutator for the term height -*/ + ** setTermHeightTo(). + ** Mutator for the term height + */ void #ifdef __STDC__ setTermHeightTo ( @@ -496,9 +496,9 @@ setTermHeightTo (h) /* -** termWidth(). -** Accessor for the termWidth -*/ + ** termWidth(). + ** Accessor for the termWidth + */ int #ifdef __STDC__ termWidth (void) @@ -511,9 +511,9 @@ termWidth () /* -** setTermWidth(). -** Mutator for the termWidth -*/ + ** setTermWidth(). + ** Mutator for the termWidth + */ void #ifdef __STDC__ setTermWidthTo ( @@ -530,9 +530,9 @@ setTermWidthTo (w) /* -** currentLayout(). -** Accessor for the current layout -*/ + ** currentLayout(). + ** Accessor for the current layout + */ TuiLayoutType #ifdef __STDC__ currentLayout (void) @@ -545,9 +545,9 @@ currentLayout () /* -** setCurrentLayoutTo(). -** Mutator for the current layout -*/ + ** setCurrentLayoutTo(). + ** Mutator for the current layout + */ void #ifdef __STDC__ setCurrentLayoutTo ( @@ -564,9 +564,9 @@ setCurrentLayoutTo (newLayout) /* -** setGenWinOrigin(). -** Set the origin of the window -*/ + ** setGenWinOrigin(). + ** Set the origin of the window + */ void #ifdef __STDC__ setGenWinOrigin ( @@ -593,10 +593,10 @@ setGenWinOrigin (winInfo, x, y) /* -** tuiNextWin(). -** Answer the next window in the list, cycling back to the top -** if necessary -*/ + ** tuiNextWin(). + ** Answer the next window in the list, cycling back to the top + ** if necessary + */ TuiWinInfoPtr #ifdef __STDC__ tuiNextWin ( @@ -631,10 +631,10 @@ tuiNextWin (curWin) /* -** tuiPrevWin(). -** Answer the prev window in the list, cycling back to the bottom -** if necessary -*/ + ** tuiPrevWin(). + ** Answer the prev window in the list, cycling back to the bottom + ** if necessary + */ TuiWinInfoPtr #ifdef __STDC__ tuiPrevWin ( @@ -669,11 +669,11 @@ tuiPrevWin (curWin) /* -** displayableWinContentOf(). -** Answer a the content at the location indicated by index. Note -** that if this is a locator window, the string returned should be -** freed after use. -*/ + ** displayableWinContentOf(). + ** Answer a the content at the location indicated by index. Note + ** that if this is a locator window, the string returned should be + ** freed after use. + */ char * #ifdef __STDC__ displayableWinContentOf ( @@ -691,8 +691,8 @@ displayableWinContentOf (winInfo, elementPtr) if (elementPtr != (TuiWinElementPtr) NULL || winInfo->type == LOCATOR_WIN) { /* - ** Now convert the line to a displayable string - */ + ** Now convert the line to a displayable string + */ switch (winInfo->type) { case SRC_WIN: @@ -712,12 +712,12 @@ displayableWinContentOf (winInfo, elementPtr) register int strSize = termWidth (), i, procWidth, fileWidth; /* - ** First determine the amount of file/proc name width - ** we have available - */ + ** First determine the amount of file/proc name width + ** we have available + */ i = strSize - (PC_WIDTH + LINE_WIDTH + 25 /* pc and line labels */ - + strlen (FILE_PREFIX) + 1 /* file label */ + + strlen (FILE_PREFIX) + 1 /* file label */ + 15 /* procedure label */ ); if (i >= FILE_WIDTH + PROC_WIDTH) { @@ -755,11 +755,11 @@ displayableWinContentOf (winInfo, elementPtr) else strcpy (pc, "??"); /* - ** Now create the locator line from the string version - ** of the elements. We could use sprintf() here but - ** that wouldn't ensure that we don't overrun the size - ** of the allocated buffer. strcat_to_buf() will. - */ + ** Now create the locator line from the string version + ** of the elements. We could use sprintf() here but + ** that wouldn't ensure that we don't overrun the size + ** of the allocated buffer. strcat_to_buf() will. + */ *string = (char) 0; /* Filename */ strcat_to_buf (string, strSize, " "); @@ -808,9 +808,9 @@ displayableWinContentOf (winInfo, elementPtr) /* -** winContentAt(). -** Answer a the content at the location indicated by index -*/ + ** winContentAt(). + ** Answer a the content at the location indicated by index + */ char * #ifdef __STDC__ displayableWinContentAt ( @@ -827,9 +827,9 @@ displayableWinContentAt (winInfo, index) /* -** winElementHeight(). -** Answer the height of the element in lines -*/ + ** winElementHeight(). + ** Answer the height of the element in lines + */ int #ifdef __STDC__ winElementHeight ( @@ -854,9 +854,9 @@ winElementHeight (winInfo, element) /* -** winByName(). -** Answer the window represented by name -*/ + ** winByName(). + ** Answer the window represented by name + */ TuiWinInfoPtr #ifdef __STDC__ winByName ( @@ -881,9 +881,9 @@ winByName (name) /* -** partialWinByName(). -** Answer the window represented by name -*/ + ** partialWinByName(). + ** Answer the window represented by name + */ TuiWinInfoPtr #ifdef __STDC__ partialWinByName ( @@ -914,9 +914,9 @@ partialWinByName (name) /* -** winName(). -** Answer the name of the window -*/ + ** winName(). + ** Answer the name of the window + */ char * #ifdef __STDC__ winName ( @@ -952,8 +952,8 @@ winName (winInfo) /* -** initializeStaticData -*/ + ** initializeStaticData + */ void #ifdef __STDC__ initializeStaticData (void) @@ -970,8 +970,8 @@ initializeStaticData () /* -** allocGenericWinInfo(). -*/ + ** allocGenericWinInfo(). + */ TuiGenWinInfoPtr #ifdef __STDC__ allocGenericWinInfo (void) @@ -990,8 +990,8 @@ allocGenericWinInfo () /* -** initGenericPart(). -*/ + ** initGenericPart(). + */ void #ifdef __STDC__ initGenericPart ( @@ -1018,8 +1018,8 @@ initGenericPart (win) /* -** initContentElement(). -*/ + ** initContentElement(). + */ void #ifdef __STDC__ initContentElement ( @@ -1075,8 +1075,8 @@ initContentElement (element, type) } /* initContentElement */ /* -** initWinInfo(). -*/ + ** initWinInfo(). + */ void #ifdef __STDC__ initWinInfo ( @@ -1122,8 +1122,8 @@ initWinInfo (winInfo) /* -** allocWinInfo(). -*/ + ** allocWinInfo(). + */ TuiWinInfoPtr #ifdef __STDC__ allocWinInfo ( @@ -1147,9 +1147,9 @@ allocWinInfo (type) /* -** allocContent(). -** Allocates the content and elements in a block. -*/ + ** allocContent(). + ** Allocates the content and elements in a block. + */ TuiWinContent #ifdef __STDC__ allocContent ( @@ -1168,10 +1168,10 @@ allocContent (numElements, type) if ((content = (TuiWinContent) xmalloc (sizeof (TuiWinElementPtr) * numElements)) != (TuiWinContent) NULL) { /* - ** All windows, except the data window, can allocate the elements - ** in a chunk. The data window cannot because items can be - ** added/removed from the data display by the user at any time. - */ + ** All windows, except the data window, can allocate the elements + ** in a chunk. The data window cannot because items can be + ** added/removed from the data display by the user at any time. + */ if (type != DATA_WIN) { if ((elementBlockPtr = (char *) @@ -1197,13 +1197,13 @@ allocContent (numElements, type) /* -** addContentElements(). -** Adds the input number of elements to the windows's content. If -** no content has been allocated yet, allocContent() is called to -** do this. The index of the first element added is returned, -** unless there is a memory allocation error, in which case, (-1) -** is returned. -*/ + ** addContentElements(). + ** Adds the input number of elements to the windows's content. If + ** no content has been allocated yet, allocContent() is called to + ** do this. The index of the first element added is returned, + ** unless there is a memory allocation error, in which case, (-1) + ** is returned. + */ int #ifdef __STDC__ addContentElements ( @@ -1236,7 +1236,7 @@ addContentElements (winInfo, numElements) initContentElement (elementPtr, winInfo->type); winInfo->contentSize++; } - else /* things must be really hosed now! We ran out of memory!?*/ + else /* things must be really hosed now! We ran out of memory!? */ return (-1); } } @@ -1246,10 +1246,10 @@ addContentElements (winInfo, numElements) /* -** tuiDelWindow(). -** Delete all curses windows associated with winInfo, leaving everything -** else in tact. -*/ + ** tuiDelWindow(). + ** Delete all curses windows associated with winInfo, leaving everything + ** else in tact. + */ void #ifdef __STDC__ tuiDelWindow ( @@ -1311,8 +1311,8 @@ tuiDelWindow (winInfo) /* -** freeWindow(). -*/ + ** freeWindow(). + */ void #ifdef __STDC__ freeWindow ( @@ -1385,8 +1385,8 @@ freeWindow (winInfo) /* -** freeAllSourceWinsContent(). -*/ + ** freeAllSourceWinsContent(). + */ void #ifdef __STDC__ freeAllSourceWinsContent (void) @@ -1412,8 +1412,8 @@ freeAllSourceWinsContent () /* -** freeWinContent(). -*/ + ** freeWinContent(). + */ void #ifdef __STDC__ freeWinContent ( @@ -1437,8 +1437,8 @@ freeWinContent (winInfo) /* -** freeAllWindows(). -*/ + ** freeAllWindows(). + */ void #ifdef __STDC__ freeAllWindows (void) @@ -1470,9 +1470,9 @@ tuiDelDataWindows (content, contentSize) int i; /* - ** Remember that data window content elements are of type TuiGenWinInfoPtr, - ** each of which whose single element is a data element. - */ + ** Remember that data window content elements are of type TuiGenWinInfoPtr, + ** each of which whose single element is a data element. + */ for (i = 0; i < contentSize; i++) { TuiGenWinInfoPtr genericWin = &content[i]->whichElement.dataWindow; @@ -1503,9 +1503,9 @@ freeDataContent (content, contentSize) int i; /* - ** Remember that data window content elements are of type TuiGenWinInfoPtr, - ** each of which whose single element is a data element. - */ + ** Remember that data window content elements are of type TuiGenWinInfoPtr, + ** each of which whose single element is a data element. + */ for (i = 0; i < contentSize; i++) { TuiGenWinInfoPtr genericWin = &content[i]->whichElement.dataWindow; @@ -1531,8 +1531,8 @@ freeDataContent (content, contentSize) /* -** freeContent(). -*/ + ** freeContent(). + */ static void #ifdef __STDC__ freeContent ( @@ -1557,8 +1557,8 @@ freeContent (content, contentSize, winType) /* -** freeContentElements(). -*/ + ** freeContentElements(). + */ static void #ifdef __STDC__ freeContentElements ( @@ -1598,9 +1598,9 @@ freeContentElements (content, contentSize, type) break; case DATA_ITEM_WIN: /* - ** Note that data elements are not allocated - ** in a single block, but individually, as needed. - */ + ** Note that data elements are not allocated + ** in a single block, but individually, as needed. + */ if (element->whichElement.data.type != TUI_REGISTER) tuiFree ((char *) element->whichElement.data.name); diff --git a/gdb/tui/tuiData.h b/gdb/tui/tuiData.h index bb4d19c..dc9c69179 100644 --- a/gdb/tui/tuiData.h +++ b/gdb/tui/tuiData.h @@ -41,163 +41,193 @@ #define TUI_GENERAL_SPECIAL_REGS_NAME_LOWER "$regs" /* Scroll direction enum */ -typedef enum { +typedef enum + { FORWARD_SCROLL, BACKWARD_SCROLL, LEFT_SCROLL, RIGHT_SCROLL -} TuiScrollDirection, *TuiScrollDirectionPtr; + } +TuiScrollDirection, *TuiScrollDirectionPtr; /* General list struct */ -typedef struct _TuiList { - OpaqueList list; - int count; -} TuiList, *TuiListPtr; +typedef struct _TuiList + { + OpaqueList list; + int count; + } +TuiList, *TuiListPtr; /* The kinds of layouts available */ -typedef enum { +typedef enum + { SRC_COMMAND, DISASSEM_COMMAND, SRC_DISASSEM_COMMAND, SRC_DATA_COMMAND, DISASSEM_DATA_COMMAND, UNDEFINED_LAYOUT -} TuiLayoutType, *TuiLayoutTypePtr; + } +TuiLayoutType, *TuiLayoutTypePtr; /* Basic data types that can be displayed in the data window. */ -typedef enum _TuiDataType { +typedef enum _TuiDataType + { TUI_REGISTER, TUI_SCALAR, TUI_COMPLEX, TUI_STRUCT -} TuiDataType, TuiDataTypePtr; + } +TuiDataType, TuiDataTypePtr; /* Types of register displays */ -typedef enum _TuiRegisterDisplayType { +typedef enum _TuiRegisterDisplayType + { TUI_UNDEFINED_REGS, TUI_GENERAL_REGS, TUI_SFLOAT_REGS, TUI_DFLOAT_REGS, TUI_SPECIAL_REGS, TUI_GENERAL_AND_SPECIAL_REGS -} TuiRegisterDisplayType, *TuiRegisterDisplayTypePtr; + } +TuiRegisterDisplayType, *TuiRegisterDisplayTypePtr; /* Structure describing source line or line address */ -typedef union _TuiLineOrAddress { - int lineNo; - Opaque addr; -} TuiLineOrAddress, *TuiLineOrAddressPtr; +typedef union _TuiLineOrAddress + { + int lineNo; + Opaque addr; + } +TuiLineOrAddress, *TuiLineOrAddressPtr; /* Current Layout definition */ -typedef struct _TuiLayoutDef { - TuiWinType displayMode; - int split; - TuiRegisterDisplayType regsDisplayType; - TuiRegisterDisplayType floatRegsDisplayType; -} TuiLayoutDef, *TuiLayoutDefPtr; +typedef struct _TuiLayoutDef + { + TuiWinType displayMode; + int split; + TuiRegisterDisplayType regsDisplayType; + TuiRegisterDisplayType floatRegsDisplayType; + } +TuiLayoutDef, *TuiLayoutDefPtr; /* Elements in the Source/Disassembly Window */ typedef struct _TuiSourceElement -{ - char *line; - TuiLineOrAddress lineOrAddr; - int isExecPoint; - int hasBreak; -} TuiSourceElement, *TuiSourceElementPtr; + { + char *line; + TuiLineOrAddress lineOrAddr; + int isExecPoint; + int hasBreak; + } +TuiSourceElement, *TuiSourceElementPtr; /* Elements in the data display window content */ typedef struct _TuiDataElement -{ - char *name; - int itemNo; /* the register number, or data display number */ + { + char *name; + int itemNo; /* the register number, or data display number */ TuiDataType type; - Opaque value; - int highlight; -} TuiDataElement, *TuiDataElementPtr; + Opaque value; + int highlight; + } +TuiDataElement, *TuiDataElementPtr; /* Elements in the command window content */ typedef struct _TuiCommandElement -{ - char *line; -} TuiCommandElement, *TuiCommandElementPtr; + { + char *line; + } +TuiCommandElement, *TuiCommandElementPtr; #define MAX_LOCATOR_ELEMENT_LEN 100 /* Elements in the locator window content */ typedef struct _TuiLocatorElement -{ - char fileName[MAX_LOCATOR_ELEMENT_LEN]; - char procName[MAX_LOCATOR_ELEMENT_LEN]; - int lineNo; - Opaque addr; -} TuiLocatorElement, *TuiLocatorElementPtr; + { + char fileName[MAX_LOCATOR_ELEMENT_LEN]; + char procName[MAX_LOCATOR_ELEMENT_LEN]; + int lineNo; + Opaque addr; + } +TuiLocatorElement, *TuiLocatorElementPtr; /* An content element in a window */ typedef union -{ - TuiSourceElement source; /* the source elements */ - TuiGenWinInfo dataWindow; /* data display elements */ - TuiDataElement data; /* elements of dataWindow */ - TuiCommandElement command; /* command elements */ - TuiLocatorElement locator; /* locator elements */ - char *simpleString; /* simple char based elements */ -} TuiWhichElement, *TuiWhichElementPtr; + { + TuiSourceElement source; /* the source elements */ + TuiGenWinInfo dataWindow; /* data display elements */ + TuiDataElement data; /* elements of dataWindow */ + TuiCommandElement command; /* command elements */ + TuiLocatorElement locator; /* locator elements */ + char *simpleString; /* simple char based elements */ + } +TuiWhichElement, *TuiWhichElementPtr; typedef struct _TuiWinElement -{ - int highlight; + { + int highlight; TuiWhichElement whichElement; -} TuiWinElement, *TuiWinElementPtr; + } +TuiWinElement, *TuiWinElementPtr; /* This describes the content of the window. */ -typedef TuiWinElementPtr *TuiWinContent; +typedef TuiWinElementPtr *TuiWinContent; /* This struct defines the specific information about a data display window */ -typedef struct _TuiDataInfo { - TuiWinContent dataContent; /* start of data display content */ - int dataContentCount; - TuiWinContent regsContent; /* start of regs display content */ - int regsContentCount; - TuiRegisterDisplayType regsDisplayType; - int regsColumnCount; - int displayRegs; /* Should regs be displayed at all? */ -} TuiDataInfo, *TuiDataInfoPtr; - - -typedef struct _TuiSourceInfo { - int hasLocator; /* Does locator belongs to this window? */ - TuiGenWinInfoPtr executionInfo; /* execution information window */ - int horizontalOffset; /* used for horizontal scroll */ - TuiLineOrAddress startLineOrAddr; -} TuiSourceInfo, *TuiSourceInfoPtr; - - -typedef struct _TuiCommandInfo { - int curLine; /* The current line position */ - int curch; /* The current cursor position */ -} TuiCommandInfo, *TuiCommandInfoPtr; +typedef struct _TuiDataInfo + { + TuiWinContent dataContent; /* start of data display content */ + int dataContentCount; + TuiWinContent regsContent; /* start of regs display content */ + int regsContentCount; + TuiRegisterDisplayType regsDisplayType; + int regsColumnCount; + int displayRegs; /* Should regs be displayed at all? */ + } +TuiDataInfo, *TuiDataInfoPtr; + + +typedef struct _TuiSourceInfo + { + int hasLocator; /* Does locator belongs to this window? */ + TuiGenWinInfoPtr executionInfo; /* execution information window */ + int horizontalOffset; /* used for horizontal scroll */ + TuiLineOrAddress startLineOrAddr; + } +TuiSourceInfo, *TuiSourceInfoPtr; + + +typedef struct _TuiCommandInfo + { + int curLine; /* The current line position */ + int curch; /* The current cursor position */ + } +TuiCommandInfo, *TuiCommandInfoPtr; /* This defines information about each logical window */ -typedef struct _TuiWinInfo { - TuiGenWinInfo generic; /* general window information */ - union { - TuiSourceInfo sourceInfo; - TuiDataInfo dataDisplayInfo; - TuiCommandInfo commandInfo; - Opaque opaque; - } detail; - int canHighlight; /* Can this window ever be highlighted? */ - int isHighlighted; /* Is this window highlighted? */ -} TuiWinInfo, *TuiWinInfoPtr; +typedef struct _TuiWinInfo + { + TuiGenWinInfo generic; /* general window information */ + union + { + TuiSourceInfo sourceInfo; + TuiDataInfo dataDisplayInfo; + TuiCommandInfo commandInfo; + Opaque opaque; + } + detail; + int canHighlight; /* Can this window ever be highlighted? */ + int isHighlighted; /* Is this window highlighted? */ + } +TuiWinInfo, *TuiWinInfoPtr; /* MACROS (prefixed with m_) */ @@ -229,8 +259,8 @@ typedef struct _TuiWinInfo { /* Global Data */ -extern TuiWinInfoPtr winList[MAX_MAJOR_WINDOWS]; -extern int tui_version; +extern TuiWinInfoPtr winList[MAX_MAJOR_WINDOWS]; +extern int tui_version; /* Macros */ #define srcWin winList[SRC_WIN] @@ -239,64 +269,64 @@ extern int tui_version; #define cmdWin winList[CMD_WIN] /* Data Manipulation Functions */ -extern void initializeStaticData PARAMS ((void)); -extern TuiGenWinInfoPtr allocGenericWinInfo PARAMS ((void)); -extern TuiWinInfoPtr allocWinInfo PARAMS ((TuiWinType)); -extern void initGenericPart PARAMS ((TuiGenWinInfoPtr)); -extern void initWinInfo PARAMS ((TuiWinInfoPtr)); -extern TuiWinContent allocContent PARAMS ((int, TuiWinType)); -extern int addContentElements - PARAMS ((TuiGenWinInfoPtr, int)); -extern void initContentElement - PARAMS ((TuiWinElementPtr, TuiWinType)); -extern void freeWindow PARAMS ((TuiWinInfoPtr)); -extern void freeAllWindows PARAMS ((void)); -extern void freeWinContent PARAMS ((TuiGenWinInfoPtr)); -extern void freeDataContent PARAMS ((TuiWinContent, int)); -extern void freeAllSourceWinsContent PARAMS ((void)); -extern void tuiDelWindow PARAMS ((TuiWinInfoPtr)); -extern void tuiDelDataWindows PARAMS ((TuiWinContent, int)); -extern TuiWinInfoPtr winByName PARAMS ((char *)); -extern TuiWinInfoPtr partialWinByName PARAMS ((char *)); -extern char *winName PARAMS ((TuiGenWinInfoPtr)); -extern char *displayableWinContentOf - PARAMS ((TuiGenWinInfoPtr, TuiWinElementPtr)); -extern char *displayableWinContentAt - PARAMS ((TuiGenWinInfoPtr, int)); -extern int winElementHeight - PARAMS ((TuiGenWinInfoPtr, TuiWinElementPtr)); -extern TuiLayoutType currentLayout PARAMS ((void)); -extern void setCurrentLayoutTo PARAMS ((TuiLayoutType)); -extern int termHeight PARAMS ((void)); -extern void setTermHeight PARAMS ((int)); -extern int termWidth PARAMS ((void)); -extern void setTermWidth PARAMS ((int)); -extern int historyLimit PARAMS ((void)); -extern void setHistoryLimit PARAMS ((int)); -extern void setGenWinOrigin PARAMS ((TuiGenWinInfoPtr, int, int)); -extern TuiGenWinInfoPtr locatorWinInfoPtr PARAMS ((void)); -extern TuiGenWinInfoPtr sourceExecInfoWinPtr PARAMS ((void)); -extern TuiGenWinInfoPtr disassemExecInfoWinPtr PARAMS ((void)); -extern char *nullStr PARAMS ((void)); -extern char *blankStr PARAMS ((void)); -extern char *locationStr PARAMS ((void)); -extern char *breakStr PARAMS ((void)); -extern char *breakLocationStr PARAMS ((void)); -extern TuiListPtr sourceWindows PARAMS ((void)); -extern void clearSourceWindows PARAMS ((void)); -extern void clearSourceWindowsDetail PARAMS ((void)); -extern void clearWinDetail PARAMS ((TuiWinInfoPtr winInfo)); -extern void tuiAddToSourceWindows PARAMS ((TuiWinInfoPtr)); -extern int tuiDefaultTabLen PARAMS ((void)); -extern void tuiSetDefaultTabLen PARAMS ((int)); -extern TuiWinInfoPtr tuiWinWithFocus PARAMS ((void)); -extern void tuiSetWinWithFocus PARAMS ((TuiWinInfoPtr)); -extern TuiLayoutDefPtr tuiLayoutDef PARAMS ((void)); -extern int tuiWinResized PARAMS ((void)); -extern void tuiSetWinResizedTo PARAMS ((int)); - -extern TuiWinInfoPtr tuiNextWin PARAMS ((TuiWinInfoPtr)); -extern TuiWinInfoPtr tuiPrevWin PARAMS ((TuiWinInfoPtr)); +extern void initializeStaticData PARAMS ((void)); +extern TuiGenWinInfoPtr allocGenericWinInfo PARAMS ((void)); +extern TuiWinInfoPtr allocWinInfo PARAMS ((TuiWinType)); +extern void initGenericPart PARAMS ((TuiGenWinInfoPtr)); +extern void initWinInfo PARAMS ((TuiWinInfoPtr)); +extern TuiWinContent allocContent PARAMS ((int, TuiWinType)); +extern int addContentElements + PARAMS ((TuiGenWinInfoPtr, int)); +extern void initContentElement + PARAMS ((TuiWinElementPtr, TuiWinType)); +extern void freeWindow PARAMS ((TuiWinInfoPtr)); +extern void freeAllWindows PARAMS ((void)); +extern void freeWinContent PARAMS ((TuiGenWinInfoPtr)); +extern void freeDataContent PARAMS ((TuiWinContent, int)); +extern void freeAllSourceWinsContent PARAMS ((void)); +extern void tuiDelWindow PARAMS ((TuiWinInfoPtr)); +extern void tuiDelDataWindows PARAMS ((TuiWinContent, int)); +extern TuiWinInfoPtr winByName PARAMS ((char *)); +extern TuiWinInfoPtr partialWinByName PARAMS ((char *)); +extern char *winName PARAMS ((TuiGenWinInfoPtr)); +extern char *displayableWinContentOf + PARAMS ((TuiGenWinInfoPtr, TuiWinElementPtr)); +extern char *displayableWinContentAt + PARAMS ((TuiGenWinInfoPtr, int)); +extern int winElementHeight + PARAMS ((TuiGenWinInfoPtr, TuiWinElementPtr)); +extern TuiLayoutType currentLayout PARAMS ((void)); +extern void setCurrentLayoutTo PARAMS ((TuiLayoutType)); +extern int termHeight PARAMS ((void)); +extern void setTermHeight PARAMS ((int)); +extern int termWidth PARAMS ((void)); +extern void setTermWidth PARAMS ((int)); +extern int historyLimit PARAMS ((void)); +extern void setHistoryLimit PARAMS ((int)); +extern void setGenWinOrigin PARAMS ((TuiGenWinInfoPtr, int, int)); +extern TuiGenWinInfoPtr locatorWinInfoPtr PARAMS ((void)); +extern TuiGenWinInfoPtr sourceExecInfoWinPtr PARAMS ((void)); +extern TuiGenWinInfoPtr disassemExecInfoWinPtr PARAMS ((void)); +extern char *nullStr PARAMS ((void)); +extern char *blankStr PARAMS ((void)); +extern char *locationStr PARAMS ((void)); +extern char *breakStr PARAMS ((void)); +extern char *breakLocationStr PARAMS ((void)); +extern TuiListPtr sourceWindows PARAMS ((void)); +extern void clearSourceWindows PARAMS ((void)); +extern void clearSourceWindowsDetail PARAMS ((void)); +extern void clearWinDetail PARAMS ((TuiWinInfoPtr winInfo)); +extern void tuiAddToSourceWindows PARAMS ((TuiWinInfoPtr)); +extern int tuiDefaultTabLen PARAMS ((void)); +extern void tuiSetDefaultTabLen PARAMS ((int)); +extern TuiWinInfoPtr tuiWinWithFocus PARAMS ((void)); +extern void tuiSetWinWithFocus PARAMS ((TuiWinInfoPtr)); +extern TuiLayoutDefPtr tuiLayoutDef PARAMS ((void)); +extern int tuiWinResized PARAMS ((void)); +extern void tuiSetWinResizedTo PARAMS ((int)); + +extern TuiWinInfoPtr tuiNextWin PARAMS ((TuiWinInfoPtr)); +extern TuiWinInfoPtr tuiPrevWin PARAMS ((TuiWinInfoPtr)); #endif /* TUI_DATA_H */ diff --git a/gdb/tui/tuiDataWin.c b/gdb/tui/tuiDataWin.c index 522730a..af09627 100644 --- a/gdb/tui/tuiDataWin.c +++ b/gdb/tui/tuiDataWin.c @@ -1,7 +1,7 @@ /* -** tuiDataWin.c -** This module contains functions to support the data/register window display. -*/ + ** tuiDataWin.c + ** This module contains functions to support the data/register window display. + */ #include "defs.h" @@ -22,10 +22,10 @@ /* -** tuiFirstDataItemDisplayed() -** Answer the index first element displayed. -** If none are displayed, then return (-1). -*/ + ** tuiFirstDataItemDisplayed() + ** Answer the index first element displayed. + ** If none are displayed, then return (-1). + */ int #ifdef __STDC__ tuiFirstDataItemDisplayed (void) @@ -51,10 +51,10 @@ tuiFirstDataItemDisplayed () /* -** tuiFirstDataElementNoInLine() -** Answer the index of the first element in lineNo. If lineNo is -** past the data area (-1) is returned. -*/ + ** tuiFirstDataElementNoInLine() + ** Answer the index of the first element in lineNo. If lineNo is + ** past the data area (-1) is returned. + */ int #ifdef __STDC__ tuiFirstDataElementNoInLine ( @@ -67,13 +67,13 @@ tuiFirstDataElementNoInLine (lineNo) int firstElementNo = (-1); /* - ** First see if there is a register on lineNo, and if so, set the - ** first element number - */ + ** First see if there is a register on lineNo, and if so, set the + ** first element number + */ if ((firstElementNo = tuiFirstRegElementNoInLine (lineNo)) == -1) { /* - ** Looking at the general data, the 1st element on lineNo - */ + ** Looking at the general data, the 1st element on lineNo + */ } return firstElementNo; @@ -81,10 +81,10 @@ tuiFirstDataElementNoInLine (lineNo) /* -** tuiDeleteDataContentWindows() -** Function to delete all the item windows in the data window. -** This is usually done when the data window is scrolled. -*/ + ** tuiDeleteDataContentWindows() + ** Function to delete all the item windows in the data window. + ** This is usually done when the data window is scrolled. + */ void #ifdef __STDC__ tuiDeleteDataContentWindows (void) @@ -140,10 +140,10 @@ tuiEraseDataContent (prompt) /* -** tuiDisplayAllData(). -** This function displays the data that is in the data window's -** content. It does not set the content. -*/ + ** tuiDisplayAllData(). + ** This function displays the data that is in the data window's + ** content. It does not set the content. + */ void #ifdef __STDC__ tuiDisplayAllData (void) @@ -160,8 +160,8 @@ tuiDisplayAllData () checkAndDisplayHighlightIfNeeded (dataWin); tuiDisplayRegistersFrom (0); /* - ** Then display the other data - */ + ** Then display the other data + */ if (dataWin->detail.dataDisplayInfo.dataContent != (TuiWinContent) NULL && dataWin->detail.dataDisplayInfo.dataContentCount > 0) @@ -173,10 +173,10 @@ tuiDisplayAllData () /* -** tuiDisplayDataFromLine() -** Function to display the data starting at line, lineNo, in the -** data window. -*/ + ** tuiDisplayDataFromLine() + ** Function to display the data starting at line, lineNo, in the + ** data window. + */ void #ifdef __STDC__ tuiDisplayDataFromLine ( @@ -205,20 +205,20 @@ tuiDisplayDataFromLine (lineNo) /* display regs if we can */ if (tuiDisplayRegistersFromLine (_lineNo, FALSE) < 0) { /* - ** _lineNo is past the regs display, so calc where the - ** start data element is - */ + ** _lineNo is past the regs display, so calc where the + ** start data element is + */ if (regsLastLine < _lineNo) { /* figure out how many lines each element is to obtain - the start elementNo */ + the start elementNo */ } } else { /* - ** calculate the starting element of the data display, given - ** regsLastLine and how many lines each element is, up to - ** _lineNo - */ + ** calculate the starting element of the data display, given + ** regsLastLine and how many lines each element is, up to + ** _lineNo + */ } /* Now display the data , starting at elementNo */ } @@ -228,9 +228,9 @@ tuiDisplayDataFromLine (lineNo) /* -** tuiDisplayDataFrom() -** Display data starting at element elementNo -*/ + ** tuiDisplayDataFrom() + ** Display data starting at element elementNo + */ void #ifdef __STDC__ tuiDisplayDataFrom ( @@ -263,9 +263,9 @@ tuiDisplayDataFrom (elementNo, reuseWindows) /* -** tuiRefreshDataWin() -** Function to redisplay the contents of the data window. -*/ + ** tuiRefreshDataWin() + ** Function to redisplay the contents of the data window. + */ void #ifdef __STDC__ tuiRefreshDataWin (void) @@ -287,9 +287,9 @@ tuiRefreshDataWin () /* -** tuiCheckDataValues(). -** Function to check the data values and hilite any that have changed -*/ + ** tuiCheckDataValues(). + ** Function to check the data values and hilite any that have changed + */ void #ifdef __STDC__ tuiCheckDataValues ( @@ -330,10 +330,10 @@ tuiCheckDataValues (frame) /* -** tui_vCheckDataValues(). -** Function to check the data values and hilite any that have -** changed with args in a va_list -*/ + ** tui_vCheckDataValues(). + ** Function to check the data values and hilite any that have + ** changed with args in a va_list + */ void #ifdef __STDC__ tui_vCheckDataValues ( @@ -352,9 +352,9 @@ tui_vCheckDataValues (args) /* -** tuiVerticalDataScroll() -** Scroll the data window vertically forward or backward. -*/ + ** tuiVerticalDataScroll() + ** Scroll the data window vertically forward or backward. + */ void #ifdef __STDC__ tuiVerticalDataScroll ( @@ -374,8 +374,8 @@ tuiVerticalDataScroll (scrollDirection, numToScroll) firstLine = tuiLineFromRegElementNo (firstElementNo); else { /* calculate the first line from the element number which is in - ** the general data content - */ + ** the general data content + */ } if (firstLine >= 0) diff --git a/gdb/tui/tuiDataWin.h b/gdb/tui/tuiDataWin.h index 8f9e46d..91ba9ec 100644 --- a/gdb/tui/tuiDataWin.h +++ b/gdb/tui/tuiDataWin.h @@ -1,8 +1,8 @@ #ifndef _TUI_DATAWIN_H #define _TUI_DATAWIN_H /* -** This header file supports the display of registers/data in the data window. -*/ + ** This header file supports the display of registers/data in the data window. + */ /***************************************** @@ -14,16 +14,17 @@ /***************************************** ** PUBLIC FUNCTION EXTERNAL DECLS ** ******************************************/ -extern void tuiEraseDataContent PARAMS ((char *)); -extern void tuiDisplayAllData PARAMS ((void)); -extern void tuiCheckDataValues PARAMS ((struct frame_info *)); -extern void tui_vCheckDataValues PARAMS ((va_list)); -extern void tuiDisplayDataFromLine PARAMS ((int)); -extern int tuiFirstDataItemDisplayed PARAMS ((void)); -extern int tuiFirstDataElementNoInLine PARAMS ((int)); -extern void tuiDeleteDataContentWindows PARAMS ((void)); -extern void tuiRefreshDataWin PARAMS ((void)); -extern void tuiDisplayDataFrom PARAMS ((int, int)); -extern void tuiVerticalDataScroll PARAMS ((TuiScrollDirection, int)); +extern void tuiEraseDataContent PARAMS ((char *)); +extern void tuiDisplayAllData PARAMS ((void)); +extern void tuiCheckDataValues PARAMS ((struct frame_info *)); +extern void tui_vCheckDataValues PARAMS ((va_list)); +extern void tuiDisplayDataFromLine PARAMS ((int)); +extern int tuiFirstDataItemDisplayed PARAMS ((void)); +extern int tuiFirstDataElementNoInLine PARAMS ((int)); +extern void tuiDeleteDataContentWindows PARAMS ((void)); +extern void tuiRefreshDataWin PARAMS ((void)); +extern void tuiDisplayDataFrom PARAMS ((int, int)); +extern void tuiVerticalDataScroll PARAMS ((TuiScrollDirection, int)); -#endif /*_TUI_DATAWIN_H*/ +#endif +/*_TUI_DATAWIN_H*/ diff --git a/gdb/tui/tuiDisassem.c b/gdb/tui/tuiDisassem.c index ad0b70f..1bc1b95 100644 --- a/gdb/tui/tuiDisassem.c +++ b/gdb/tui/tuiDisassem.c @@ -1,7 +1,7 @@ /* -** tuiDisassem.c -** This module contains functions for handling disassembly display. -*/ + ** tuiDisassem.c + ** This module contains functions for handling disassembly display. + */ #include "defs.h" @@ -28,16 +28,16 @@ static struct breakpoint *_hasBreak PARAMS ((CORE_ADDR)); ******************************************/ /* -** tuiSetDisassemContent(). -** Function to set the disassembly window's content. -*/ + ** tuiSetDisassemContent(). + ** Function to set the disassembly window's content. + */ TuiStatus #ifdef __STDC__ tuiSetDisassemContent ( - struct symtab *s, - Opaque startAddr) + struct symtab *s, + Opaque startAddr) #else - tuiSetDisassemContent (s, startAddr) +tuiSetDisassemContent (s, startAddr) struct symtab *s; Opaque startAddr; #endif @@ -66,7 +66,7 @@ tuiSetDisassemContent ( threshold = (lineWidth - 1) + offset; /* now init the gdb_file structure */ - gdb_dis_out = gdb_file_init_astring (threshold); + gdb_dis_out = gdb_file_init_astring (threshold); INIT_DISASSEMBLE_INFO_NO_ARCH (asmInfo, gdb_dis_out, (fprintf_ftype) fprintf_filtered); asmInfo.read_memory_func = dis_asm_read_memory; @@ -77,7 +77,7 @@ tuiSetDisassemContent ( /* Now construct each line */ for (curLine = 0, pc = (CORE_ADDR) startAddr; (curLine < maxLines);) { - TuiWinElementPtr element = (TuiWinElementPtr)disassemWin->generic.content[curLine]; + TuiWinElementPtr element = (TuiWinElementPtr) disassemWin->generic.content[curLine]; struct breakpoint *bp; print_address (pc, gdb_dis_out); @@ -85,9 +85,9 @@ tuiSetDisassemContent ( curLen = strlen (gdb_file_get_strbuf (gdb_dis_out)); i = curLen - ((curLen / tab_len) * tab_len); - /* adjust buffer length if necessary */ - gdb_file_adjust_strbuf ((tab_len - i > 0) ? (tab_len - i ) : 0, gdb_dis_out); - + /* adjust buffer length if necessary */ + gdb_file_adjust_strbuf ((tab_len - i > 0) ? (tab_len - i) : 0, gdb_dis_out); + /* Add spaces to make the instructions start onthe same column */ while (i < tab_len) { @@ -107,7 +107,7 @@ tuiSetDisassemContent ( element->whichElement.source.line[0] = '\0'; element->whichElement.source.lineOrAddr.addr = (Opaque) pc; element->whichElement.source.isExecPoint = - (pc == (CORE_ADDR) ((TuiWinElementPtr)locator->content[0])->whichElement.locator.addr); + (pc == (CORE_ADDR) ((TuiWinElementPtr) locator->content[0])->whichElement.locator.addr); bp = _hasBreak (pc); element->whichElement.source.hasBreak = (bp != (struct breakpoint *) NULL && @@ -115,7 +115,7 @@ tuiSetDisassemContent ( (bp->disposition != del || bp->hit_count <= 0))); curLine++; pc = newpc; - /* reset the buffer to empty */ + /* reset the buffer to empty */ gdb_file_get_strbuf (gdb_dis_out)[0] = '\0'; } gdb_file_deallocate (&gdb_dis_out); @@ -129,9 +129,9 @@ tuiSetDisassemContent ( /* -** tuiShowDisassem(). -** Function to display the disassembly window with disassembled code. -*/ + ** tuiShowDisassem(). + ** Function to display the disassembly window with disassembled code. + */ void #ifdef __STDC__ tuiShowDisassem ( @@ -147,9 +147,9 @@ tuiShowDisassem (startAddr) tuiAddWinToLayout (DISASSEM_WIN); tuiUpdateSourceWindow (disassemWin, s, startAddr, FALSE); /* - ** if the focus was in the src win, put it in the asm win, if the - ** source view isn't split - */ + ** if the focus was in the src win, put it in the asm win, if the + ** source view isn't split + */ if (currentLayout () != SRC_DISASSEM_COMMAND && winWithFocus == srcWin) tuiSetWinFocusTo (disassemWin); @@ -158,9 +158,9 @@ tuiShowDisassem (startAddr) /* -** tuiShowDisassemAndUpdateSource(). -** Function to display the disassembly window. -*/ + ** tuiShowDisassemAndUpdateSource(). + ** Function to display the disassembly window. + */ void #ifdef __STDC__ tuiShowDisassemAndUpdateSource ( @@ -177,9 +177,9 @@ tuiShowDisassemAndUpdateSource (startAddr) { TuiGenWinInfoPtr locator = locatorWinInfoPtr (); /* - ** Update what is in the source window if it is displayed too, - ** note that it follows what is in the disassembly window and visa-versa - */ + ** Update what is in the source window if it is displayed too, + ** note that it follows what is in the disassembly window and visa-versa + */ sal = find_pc_line ((CORE_ADDR) startAddr, 0); current_source_symtab = sal.symtab; tuiUpdateSourceWindow (srcWin, sal.symtab, (Opaque) sal.line, TRUE); @@ -191,10 +191,10 @@ tuiShowDisassemAndUpdateSource (startAddr) /* -** tuiShowDisassemAsIs(). -** Function to display the disassembly window. This function shows -** the disassembly as specified by the horizontal offset. -*/ + ** tuiShowDisassemAsIs(). + ** Function to display the disassembly window. This function shows + ** the disassembly as specified by the horizontal offset. + */ void #ifdef __STDC__ tuiShowDisassemAsIs ( @@ -207,9 +207,9 @@ tuiShowDisassemAsIs (addr) tuiAddWinToLayout (DISASSEM_WIN); tuiUpdateSourceWindowAsIs (disassemWin, (struct symtab *) NULL, addr, FALSE); /* - ** Update what is in the source window if it is displayed too, not that it - ** follows what is in the disassembly window and visa-versa - */ + ** Update what is in the source window if it is displayed too, not that it + ** follows what is in the disassembly window and visa-versa + */ if (currentLayout () == SRC_DISASSEM_COMMAND) tuiShowSourceContent (srcWin); /*???? Need to do more? */ @@ -218,8 +218,8 @@ tuiShowDisassemAsIs (addr) /* -** tuiGetBeginAsmAddress(). -*/ + ** tuiGetBeginAsmAddress(). + */ Opaque #ifdef __STDC__ tuiGetBeginAsmAddress (void) @@ -236,7 +236,7 @@ tuiGetBeginAsmAddress () if (element->addr == (Opaque) 0) { - /*the target is not executing, because the pc is 0*/ + /*the target is not executing, because the pc is 0 */ addr = (Opaque) parse_and_eval_address ("main"); @@ -252,9 +252,9 @@ tuiGetBeginAsmAddress () /* -** tuiVerticalDisassemScroll(). -** Scroll the disassembly forward or backward vertically -*/ + ** tuiVerticalDisassemScroll(). + ** Scroll the disassembly forward or backward vertically + */ void #ifdef __STDC__ tuiVerticalDisassemScroll ( @@ -314,10 +314,10 @@ tuiVerticalDisassemScroll (scrollDirection, numToScroll) ** STATIC LOCAL FUNCTIONS ** ******************************************/ /* -** _hasBreak(). -** Answer whether there is a break point at the input line in the -** source file indicated -*/ + ** _hasBreak(). + ** Answer whether there is a break point at the input line in the + ** source file indicated + */ static struct breakpoint * #ifdef __STDC__ _hasBreak ( diff --git a/gdb/tui/tuiDisassem.h b/gdb/tui/tuiDisassem.h index 711ac48..404b2f4 100644 --- a/gdb/tui/tuiDisassem.h +++ b/gdb/tui/tuiDisassem.h @@ -1,8 +1,8 @@ #ifndef _TUI_DISASSEM_H #define _TUI_DISASSEM_H /* -** This header file supports -*/ + ** This header file supports + */ /***************************************** ** TYPE DEFINITIONS ** @@ -13,10 +13,11 @@ /***************************************** ** PUBLIC FUNCTION EXTERNAL DECLS ** ******************************************/ -extern TuiStatus tuiSetDisassemContent PARAMS ((struct symtab *, Opaque)); -extern void tuiShowDisassem PARAMS ((Opaque)); -extern void tuiShowDisassemAndUpdateSource PARAMS ((Opaque)); -extern void tuiVerticalDisassemScroll PARAMS ((TuiScrollDirection, int)); -extern Opaque tuiGetBeginAsmAddress PARAMS ((void)); +extern TuiStatus tuiSetDisassemContent PARAMS ((struct symtab *, Opaque)); +extern void tuiShowDisassem PARAMS ((Opaque)); +extern void tuiShowDisassemAndUpdateSource PARAMS ((Opaque)); +extern void tuiVerticalDisassemScroll PARAMS ((TuiScrollDirection, int)); +extern Opaque tuiGetBeginAsmAddress PARAMS ((void)); -#endif /*_TUI_DISASSEM_H*/ +#endif +/*_TUI_DISASSEM_H*/ diff --git a/gdb/tui/tuiGeneralWin.c b/gdb/tui/tuiGeneralWin.c index 5af0cd7..b1caf69 100644 --- a/gdb/tui/tuiGeneralWin.c +++ b/gdb/tui/tuiGeneralWin.c @@ -1,7 +1,7 @@ /* -** TuiGeneralWin.c -** This module supports general window behavior -*/ + ** TuiGeneralWin.c + ** This module supports general window behavior + */ #include <curses.h> #include "defs.h" @@ -11,8 +11,8 @@ /* -** local support functions -*/ + ** local support functions + */ static void _winResize PARAMS ((void)); @@ -20,9 +20,9 @@ static void _winResize PARAMS ((void)); ** PUBLIC FUNCTIONS ***********************/ /* -** tuiRefreshWin() -** Refresh the window -*/ + ** tuiRefreshWin() + ** Refresh the window + */ void #ifdef __STDC__ tuiRefreshWin ( @@ -62,9 +62,9 @@ tuiRefreshWin (winInfo) /* -** tuiDelwin() -** Function to delete the curses window, checking for null -*/ + ** tuiDelwin() + ** Function to delete the curses window, checking for null + */ void #ifdef __STDC__ tuiDelwin ( @@ -82,8 +82,8 @@ tuiDelwin (window) /* -** boxWin(). -*/ + ** boxWin(). + */ void #ifdef __STDC__ boxWin ( @@ -101,9 +101,9 @@ boxWin (winInfo, highlightFlag) box (winInfo->handle, '|', '-'); else { -/* wattron(winInfo->handle, A_DIM);*/ +/* wattron(winInfo->handle, A_DIM); */ box (winInfo->handle, ':', '.'); -/* wattroff(winInfo->handle, A_DIM);*/ +/* wattroff(winInfo->handle, A_DIM); */ } } @@ -112,8 +112,8 @@ boxWin (winInfo, highlightFlag) /* -** unhighlightWin(). -*/ + ** unhighlightWin(). + */ void #ifdef __STDC__ unhighlightWin ( @@ -133,8 +133,8 @@ unhighlightWin (winInfo) /* -** highlightWin(). -*/ + ** highlightWin(). + */ void #ifdef __STDC__ highlightWin ( @@ -155,8 +155,8 @@ highlightWin (winInfo) /* -** checkAndDisplayHighlightIfNecessay -*/ + ** checkAndDisplayHighlightIfNecessay + */ void #ifdef __STDC__ checkAndDisplayHighlightIfNeeded ( @@ -179,8 +179,8 @@ checkAndDisplayHighlightIfNeeded (winInfo) /* -** makeWindow(). -*/ + ** makeWindow(). + */ void #ifdef __STDC__ makeWindow ( @@ -215,7 +215,7 @@ makeWindow (winInfo, boxIt) mvwaddstr (handle, 1, 1, winName (winInfo)); tuiRefreshWin (winInfo); } -#endif /*FOR_TEST*/ +#endif /*FOR_TEST */ } return; @@ -223,9 +223,9 @@ makeWindow (winInfo, boxIt) /* -** tuiClearWin(). -** Clear the window of all contents without calling wclear. -*/ + ** tuiClearWin(). + ** Clear the window of all contents without calling wclear. + */ void #ifdef __STDC__ tuiClearWin ( @@ -251,11 +251,11 @@ tuiClearWin (winInfo) /* -** makeVisible(). -** We can't really make windows visible, or invisible. So we -** have to delete the entire window when making it visible, -** and create it again when making it visible. -*/ + ** makeVisible(). + ** We can't really make windows visible, or invisible. So we + ** have to delete the entire window when making it visible, + ** and create it again when making it visible. + */ void #ifdef __STDC__ makeVisible ( @@ -296,9 +296,9 @@ makeVisible (winInfo, visible) /* -** makeAllVisible(). -** Makes all windows invisible (except the command and locator windows) -*/ + ** makeAllVisible(). + ** Makes all windows invisible (except the command and locator windows) + */ void #ifdef __STDC__ makeAllVisible ( @@ -327,8 +327,8 @@ makeAllVisible (visible) /* -** scrollWinForward -*/ + ** scrollWinForward + */ void #ifdef __STDC__ scrollWinForward ( @@ -377,8 +377,8 @@ scrollWinForward (winInfo, numLines) /* -** scrollWinBackward -*/ + ** scrollWinBackward + */ void #ifdef __STDC__ scrollWinBackward ( @@ -426,9 +426,9 @@ scrollWinBackward (winInfo, numLines) /* -** refreshAll(). -** Function to refresh all the windows currently displayed -*/ + ** refreshAll(). + ** Function to refresh all the windows currently displayed + */ void #ifdef __STDC__ refreshAll ( diff --git a/gdb/tui/tuiGeneralWin.h b/gdb/tui/tuiGeneralWin.h index 559f8ab..2c843ef 100644 --- a/gdb/tui/tuiGeneralWin.h +++ b/gdb/tui/tuiGeneralWin.h @@ -2,30 +2,30 @@ #define TUI_GENERAL_WIN_H /* -** Functions -*/ -extern void tuiClearWin PARAMS ((TuiGenWinInfoPtr)); -extern void unhighlightWin PARAMS ((TuiWinInfoPtr)); -extern void makeVisible PARAMS ((TuiGenWinInfoPtr, int)); -extern void makeAllVisible PARAMS ((int)); -extern void scrollWinForward PARAMS ((TuiGenWinInfoPtr, int)); -extern void scrollWinBackward PARAMS ((TuiGenWinInfoPtr, int)); -extern void makeWindow PARAMS ((TuiGenWinInfoPtr, int)); -extern TuiWinInfoPtr copyWin PARAMS ((TuiWinInfoPtr)); -extern void boxWin PARAMS ((TuiGenWinInfoPtr, int)); -extern void highlightWin PARAMS ((TuiWinInfoPtr)); -extern void checkAndDisplayHighlightIfNeeded PARAMS ((TuiWinInfoPtr)); -extern void refreshAll PARAMS ((TuiWinInfoPtr *)); -extern void tuiDelwin PARAMS ((WINDOW *window)); -extern void tuiRefreshWin PARAMS ((TuiGenWinInfoPtr)); + ** Functions + */ +extern void tuiClearWin PARAMS ((TuiGenWinInfoPtr)); +extern void unhighlightWin PARAMS ((TuiWinInfoPtr)); +extern void makeVisible PARAMS ((TuiGenWinInfoPtr, int)); +extern void makeAllVisible PARAMS ((int)); +extern void scrollWinForward PARAMS ((TuiGenWinInfoPtr, int)); +extern void scrollWinBackward PARAMS ((TuiGenWinInfoPtr, int)); +extern void makeWindow PARAMS ((TuiGenWinInfoPtr, int)); +extern TuiWinInfoPtr copyWin PARAMS ((TuiWinInfoPtr)); +extern void boxWin PARAMS ((TuiGenWinInfoPtr, int)); +extern void highlightWin PARAMS ((TuiWinInfoPtr)); +extern void checkAndDisplayHighlightIfNeeded PARAMS ((TuiWinInfoPtr)); +extern void refreshAll PARAMS ((TuiWinInfoPtr *)); +extern void tuiDelwin PARAMS ((WINDOW * window)); +extern void tuiRefreshWin PARAMS ((TuiGenWinInfoPtr)); /* -** Macros -*/ + ** Macros + */ #define m_beVisible(winInfo) makeVisible((TuiGenWinInfoPtr)(winInfo), TRUE) #define m_beInvisible(winInfo) \ makeVisible((TuiGenWinInfoPtr)(winInfo), FALSE) #define m_allBeVisible() makeAllVisible(TRUE) #define m_allBeInvisible() makeAllVisible(FALSE) -#endif /*TUI_GENERAL_WIN_H*/ +#endif /*TUI_GENERAL_WIN_H */ diff --git a/gdb/tui/tuiIO.c b/gdb/tui/tuiIO.c index 29a3613..f443bd0 100644 --- a/gdb/tui/tuiIO.c +++ b/gdb/tui/tuiIO.c @@ -1,7 +1,7 @@ /* -** This module contains functions to support i/o in the TUI -*/ + ** This module contains functions to support i/o in the TUI + */ #include <stdio.h> @@ -38,14 +38,14 @@ static unsigned int _tuiHandleResizeDuringIO PARAMS ((unsigned int)); *********************************************************************************/ /* -** tuiPuts_unfiltered(). -** Function to put a string to the command window -** When running in TUI mode, this is the "hook" -** for fputs_unfiltered(). That is, all debugger -** output eventually makes it's way to the bottom-level -** routine fputs_unfiltered (main.c), which (in TUI -** mode), calls tuiPuts_unfiltered(). -*/ + ** tuiPuts_unfiltered(). + ** Function to put a string to the command window + ** When running in TUI mode, this is the "hook" + ** for fputs_unfiltered(). That is, all debugger + ** output eventually makes it's way to the bottom-level + ** routine fputs_unfiltered (main.c), which (in TUI + ** mode), calls tuiPuts_unfiltered(). + */ void #ifdef __STDC__ tuiPuts_unfiltered ( @@ -159,11 +159,11 @@ tui_tputs (str, affcnt, putfunc) /* Backspace. */ /* We see this on an emacs control-B. - * I.e., it's like the left-arrow key (not like the backspace key). - * The effect that readline wants when it transmits this - * character to us is simply to back up one character - * (but not to write a space over the old character). - */ + * I.e., it's like the left-arrow key (not like the backspace key). + * The effect that readline wants when it transmits this + * character to us is simply to back up one character + * (but not to write a space over the old character). + */ _updateCommandInfo (-1); wmove (cmdWin->generic.handle, @@ -195,15 +195,15 @@ tui_tputs (str, affcnt, putfunc) { /* This is actually a tgoto() specifying a character position, - * followed by either a term_IC/term_DC which [I think] means - * insert/delete one character at that position. - * There are complications with this one - need to either - * extract the position from the string, or have a backdoor - * means of communicating it from ../readline/display.c. - * So this one is not yet implemented. - * Not doing it seems to have no ill effects on command-line-editing - * that I've noticed so far. - RT - */ + * followed by either a term_IC/term_DC which [I think] means + * insert/delete one character at that position. + * There are complications with this one - need to either + * extract the position from the string, or have a backdoor + * means of communicating it from ../readline/display.c. + * So this one is not yet implemented. + * Not doing it seems to have no ill effects on command-line-editing + * that I've noticed so far. - RT + */ } else if (str == term_dc) @@ -228,24 +228,24 @@ tui_tputs (str, affcnt, putfunc) insert_mode = 0; /* Strings we know about but don't handle - * specially here are just passed along to tputs(). - * - * These are not handled because (as far as I can tell) - * they are not actually emitted by the readline package - * in the course of doing command-line editing. Some of them - * theoretically could be used in the future, in which case we'd - * need to handle them. - */ + * specially here are just passed along to tputs(). + * + * These are not handled because (as far as I can tell) + * they are not actually emitted by the readline package + * in the course of doing command-line editing. Some of them + * theoretically could be used in the future, in which case we'd + * need to handle them. + */ } else if (str == term_ic || /* insert character */ str == term_cursor_move || /* cursor move */ - str == term_clrpag ||/* clear page */ + str == term_clrpag || /* clear page */ str == term_mm || /* turn on meta key */ str == term_mo || /* turn off meta key */ str == term_up || /* up one line (not expected) */ - str == term_scroll_region || /* set scroll region */ + str == term_scroll_region || /* set scroll region */ str == term_memory_lock || /* lock screen above cursor */ - str == term_memory_unlock || /* unlock screen above cursor */ + str == term_memory_unlock || /* unlock screen above cursor */ str == visible_bell) { /* flash screen */ tputs (str, affcnt, putfunc); @@ -258,9 +258,9 @@ tui_tputs (str, affcnt, putfunc) /* -** tui_vwgetch() -** Wrapper around wgetch with the window in a va_list -*/ + ** tui_vwgetch() + ** Wrapper around wgetch with the window in a va_list + */ unsigned int #ifdef __STDC__ tui_vwgetch (va_list args) @@ -279,9 +279,9 @@ tui_vwgetch (args) /* -** tui_vread() -** Wrapper around read() with paramets in a va_list -*/ + ** tui_vread() + ** Wrapper around read() with paramets in a va_list + */ unsigned int #ifdef __STDC__ tui_vread (va_list args) @@ -301,9 +301,9 @@ tui_vread (args) } /* tui_vread() */ /* -** tuiRead() -** Function to perform a read() catching resize events -*/ + ** tuiRead() + ** Function to perform a read() catching resize events + */ int #ifdef __STDC__ tuiRead ( @@ -327,14 +327,14 @@ tuiRead (filedes, buf, nbytes) /* -** tuiGetc(). -** Get a character from the command window. -** This is called from the readline package, -** that is, we have: -** tuiGetc() [here], called from -** readline code [in ../readline/], called from -** command_line_input() in top.c -*/ + ** tuiGetc(). + ** Get a character from the command window. + ** This is called from the readline package, + ** that is, we have: + ** tuiGetc() [here], called from + ** readline code [in ../readline/], called from + ** command_line_input() in top.c + */ unsigned int #ifdef __STDC__ tuiGetc (void) @@ -373,15 +373,15 @@ tuiGetc () /* -** tuiBufferGetc(). -*/ + ** tuiBufferGetc(). + */ /*elz: this function reads a line of input from the user and -puts it in a static buffer. Subsequent calls to this same function -obtain one char at the time, providing the caller with a behavior -similar to fgetc. When the input is buffered, the backspaces have -the needed effect, i.e. ignore the last char active in the buffer*/ + puts it in a static buffer. Subsequent calls to this same function + obtain one char at the time, providing the caller with a behavior + similar to fgetc. When the input is buffered, the backspaces have + the needed effect, i.e. ignore the last char active in the buffer */ /* so far this function is called only from the query function in -utils.c*/ + utils.c */ unsigned int #ifdef __STDC__ @@ -398,7 +398,7 @@ tuiBufferGetc () if (length_of_answer == -1) { - /* this is the first time through, need to read the answer*/ + /* this is the first time through, need to read the answer */ do { /* Call the curses routine that reads one character */ @@ -422,7 +422,7 @@ tuiBufferGetc () if (index_read == length_of_answer) { - /*this is the last time through, reset for next query*/ + /*this is the last time through, reset for next query */ index_read = -1; length_of_answer = -1; } @@ -434,8 +434,8 @@ tuiBufferGetc () /* -** tuiStartNewLines(). -*/ + ** tuiStartNewLines(). + */ void #ifdef __STDC__ tuiStartNewLines ( @@ -464,9 +464,9 @@ tuiStartNewLines (numLines) /* -** tui_vStartNewLines(). -** With numLines in a va_list -*/ + ** tui_vStartNewLines(). + ** With numLines in a va_list + */ void #ifdef __STDC__ tui_vStartNewLines ( @@ -490,11 +490,11 @@ tui_vStartNewLines (args) /* -** _tuiHandleResizeDuringIO -** This function manages the cleanup when a resize has occured -** From within a call to getch() or read. Returns the character -** to return from getc or read. -*/ + ** _tuiHandleResizeDuringIO + ** This function manages the cleanup when a resize has occured + ** From within a call to getch() or read. Returns the character + ** to return from getc or read. + */ static unsigned int #ifdef __STDC__ _tuiHandleResizeDuringIO ( @@ -518,9 +518,9 @@ _tuiHandleResizeDuringIO (originalCh) /* -** _updateCommandInfo(). -** Function to update the command window information. -*/ + ** _updateCommandInfo(). + ** Function to update the command window information. + */ static void #ifdef __STDC__ _updateCommandInfo ( @@ -580,7 +580,7 @@ tuiTermSetup (turn_off_echo) * case, since that is what applies on HP-UX. turn_off_echo * is 1 except for the case where we're being called * on a "quit", in which case we want to leave echo on. - */ + */ if (turn_off_echo) { #ifdef HAVE_TERMIOS @@ -593,7 +593,7 @@ tuiTermSetup (turn_off_echo) /* Compute the start and end lines of the command * region. (Actually we only use end here) - */ + */ start = winList[CMD_WIN]->generic.origin.y; end = start + winList[CMD_WIN]->generic.height - 1; endcol = winList[CMD_WIN]->generic.width - 1; @@ -623,22 +623,22 @@ tuiTermSetup (turn_off_echo) } /* else we're out of luck */ /* This is an attempt to keep the logical & physical - * cursor in synch, going into curses. Without this, - * curses seems to be confused by the fact that - * GDB has physically moved the curser on it. One - * visible effect of removing this code is that the - * locator window fails to get updated and the line - * of text that *should* go into the locator window - * often goes to the wrong place. - */ + * cursor in synch, going into curses. Without this, + * curses seems to be confused by the fact that + * GDB has physically moved the curser on it. One + * visible effect of removing this code is that the + * locator window fails to get updated and the line + * of text that *should* go into the locator window + * often goes to the wrong place. + */ /* What's done here is to tell curses to write a ' ' - * at the bottom right corner of the screen. - * The idea is to wind up with the cursor in a known - * place. - * Note I'm relying on refresh() - * only writing what changed (the space), - * not the whole screen. - */ + * at the bottom right corner of the screen. + * The idea is to wind up with the cursor in a known + * place. + * Note I'm relying on refresh() + * only writing what changed (the space), + * not the whole screen. + */ standend (); move (end, endcol - 1); addch (' '); @@ -677,7 +677,7 @@ tuiTermUnsetup (turn_on_echo, to_column) /* We need to turn on echoing, since the TUI turns it off */ /* Below I only put in the TERMIOS case, since that * is what applies on HP-UX. - */ + */ if (turn_on_echo) { #ifdef HAVE_TERMIOS @@ -692,7 +692,7 @@ tuiTermUnsetup (turn_on_echo, to_column) * region, as well as the last "real" line of * the region (normally same as end, except when * we're first populating the region) - */ + */ start = winList[CMD_WIN]->generic.origin.y; end = start + winList[CMD_WIN]->generic.height - 1; curline = start + winList[CMD_WIN]->detail.commandInfo.curLine; @@ -700,7 +700,7 @@ tuiTermUnsetup (turn_on_echo, to_column) /* We want to confine target I/O to the command region. * In order to do so, we must either have "memory lock" * (hpterm's) or "scroll regions" (xterm's). - */ + */ if (term_cursor_move && term_memory_lock) { diff --git a/gdb/tui/tuiIO.h b/gdb/tui/tuiIO.h index bcbeffe..adb7b15 100644 --- a/gdb/tui/tuiIO.h +++ b/gdb/tui/tuiIO.h @@ -1,21 +1,21 @@ #ifndef _TUI_IO_H #define _TUI_IO_H /* -** This header contains defitions to support tuiIO.c -*/ + ** This header contains defitions to support tuiIO.c + */ #include <stdio.h> -extern void tuiPuts_unfiltered PARAMS ((const char *, GDB_FILE *)); -extern unsigned int tuiGetc PARAMS ((void)); -extern unsigned int tuiBufferGetc PARAMS ((void)); -extern int tuiRead PARAMS ((int, char *, int)); -extern void tuiStartNewLines PARAMS ((int)); -extern void tui_vStartNewLines PARAMS ((va_list)); -extern unsigned int tui_vwgetch PARAMS ((va_list)); -extern void tuiTermSetup PARAMS ((int)); -extern void tuiTermUnsetup PARAMS ((int, int)); +extern void tuiPuts_unfiltered PARAMS ((const char *, GDB_FILE *)); +extern unsigned int tuiGetc PARAMS ((void)); +extern unsigned int tuiBufferGetc PARAMS ((void)); +extern int tuiRead PARAMS ((int, char *, int)); +extern void tuiStartNewLines PARAMS ((int)); +extern void tui_vStartNewLines PARAMS ((va_list)); +extern unsigned int tui_vwgetch PARAMS ((va_list)); +extern void tuiTermSetup PARAMS ((int)); +extern void tuiTermUnsetup PARAMS ((int, int)); @@ -40,4 +40,5 @@ extern void tuiTermUnsetup PARAMS ((int, int)); #define m_isXdbStyleCommandChar(ch) (m_isNextPage(ch) || m_isPrevPage(ch)) -#endif /*_TUI_IO_H*/ +#endif +/*_TUI_IO_H*/ diff --git a/gdb/tui/tuiLayout.c b/gdb/tui/tuiLayout.c index 6aa380c..23cd7d6 100644 --- a/gdb/tui/tuiLayout.c +++ b/gdb/tui/tuiLayout.c @@ -1,7 +1,7 @@ /* -** tuiLayout.c -** This module contains procedures for handling the layout of the windows. -*/ + ** tuiLayout.c + ** This module contains procedures for handling the layout of the windows. + */ #include "defs.h" @@ -65,9 +65,9 @@ static TuiLayoutType lastLayout = UNDEFINED_LAYOUT; ***************************************/ /* -** showLayout(). -** Show the screen layout defined -*/ + ** showLayout(). + ** Show the screen layout defined + */ void #ifdef __STDC__ showLayout ( @@ -82,10 +82,10 @@ showLayout (layout) if (layout != curLayout) { /* - ** Since the new layout may cause changes in window size, we - ** should free the content and reallocate on next display of - ** source/asm - */ + ** Since the new layout may cause changes in window size, we + ** should free the content and reallocate on next display of + ** source/asm + */ tuiClearAllSourceWinsContent (NO_EMPTY_SOURCE_PROMPT); freeAllSourceWinsContent (); clearSourceWindows (); @@ -127,13 +127,13 @@ showLayout (layout) /* -** tuiSetLayout() -** Function to set the layout to SRC_COMMAND, DISASSEM_COMMAND, -** SRC_DISASSEM_COMMAND, SRC_DATA_COMMAND, or DISASSEM_DATA_COMMAND. -** If the layout is SRC_DATA_COMMAND, DISASSEM_DATA_COMMAND, or -** UNDEFINED_LAYOUT, then the data window is populated according -** to regsDisplayType. -*/ + ** tuiSetLayout() + ** Function to set the layout to SRC_COMMAND, DISASSEM_COMMAND, + ** SRC_DISASSEM_COMMAND, SRC_DATA_COMMAND, or DISASSEM_DATA_COMMAND. + ** If the layout is SRC_DATA_COMMAND, DISASSEM_DATA_COMMAND, or + ** UNDEFINED_LAYOUT, then the data window is populated according + ** to regsDisplayType. + */ TuiStatus #ifdef __STDC__ tuiSetLayout ( @@ -181,8 +181,8 @@ tuiSetLayout (layoutType, regsDisplayType) tuiClearWinFocus (); showLayout (newLayout); /* - ** Now determine where focus should be - */ + ** Now determine where focus should be + */ if (winWithFocus != cmdWin) { switch (newLayout) @@ -194,12 +194,12 @@ tuiSetLayout (layoutType, regsDisplayType) break; case DISASSEM_COMMAND: /* the previous layout was not showing - ** code. this can happen if there is no - ** source available: - ** 1. if the source file is in another dir OR - ** 2. if target was compiled without -g - ** We still want to show the assembly though! - */ + ** code. this can happen if there is no + ** source available: + ** 1. if the source file is in another dir OR + ** 2. if target was compiled without -g + ** We still want to show the assembly though! + */ addr = vcatch_errors ((OpaqueFuncPtr) tuiGetBeginAsmAddress); tuiSetWinFocusTo (disassemWin); @@ -208,12 +208,12 @@ tuiSetLayout (layoutType, regsDisplayType) break; case SRC_DISASSEM_COMMAND: /* the previous layout was not showing - ** code. this can happen if there is no - ** source available: - ** 1. if the source file is in another dir OR - ** 2. if target was compiled without -g - ** We still want to show the assembly though! - */ + ** code. this can happen if there is no + ** source available: + ** 1. if the source file is in another dir OR + ** 2. if target was compiled without -g + ** We still want to show the assembly though! + */ addr = vcatch_errors ((OpaqueFuncPtr) tuiGetBeginAsmAddress); if (winWithFocus == srcWin) @@ -232,12 +232,12 @@ tuiSetLayout (layoutType, regsDisplayType) break; case DISASSEM_DATA_COMMAND: /* the previous layout was not showing - ** code. this can happen if there is no - ** source available: - ** 1. if the source file is in another dir OR - ** 2. if target was compiled without -g - ** We still want to show the assembly though! - */ + ** code. this can happen if there is no + ** source available: + ** 1. if the source file is in another dir OR + ** 2. if target was compiled without -g + ** We still want to show the assembly though! + */ addr = vcatch_errors ((OpaqueFuncPtr) tuiGetBeginAsmAddress); if (winWithFocus != dataWin) @@ -254,8 +254,8 @@ tuiSetLayout (layoutType, regsDisplayType) if (newWinWithFocus != (TuiWinInfoPtr) NULL) tuiSetWinFocusTo (newWinWithFocus); /* - ** Now update the window content - */ + ** Now update the window content + */ if (!regsPopulate && (newLayout == SRC_DATA_COMMAND || newLayout == DISASSEM_DATA_COMMAND)) @@ -280,10 +280,10 @@ tuiSetLayout (layoutType, regsDisplayType) /* -** tui_vSetLayoutTo() -** Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA, -** REGS, $REGS, $GREGS, $FREGS, $SREGS with arguments in a va_list -*/ + ** tui_vSetLayoutTo() + ** Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA, + ** REGS, $REGS, $GREGS, $FREGS, $SREGS with arguments in a va_list + */ TuiStatus #ifdef __STDC__ tui_vSetLayoutTo ( @@ -302,11 +302,11 @@ tui_vSetLayoutTo (args) /* -** tuiAddWinToLayout(). -** Add the specified window to the layout in a logical way. -** This means setting up the most logical layout given the -** window to be added. -*/ + ** tuiAddWinToLayout(). + ** Add the specified window to the layout in a logical way. + ** This means setting up the most logical layout given the + ** window to be added. + */ void #ifdef __STDC__ tuiAddWinToLayout ( @@ -363,10 +363,10 @@ tuiAddWinToLayout (type) /* -** tui_vAddWinToLayout(). -** Add the specified window to the layout in a logical way, -** with arguments in a va_list. -*/ + ** tui_vAddWinToLayout(). + ** Add the specified window to the layout in a logical way, + ** with arguments in a va_list. + */ void #ifdef __STDC__ tui_vAddWinToLayout ( @@ -385,11 +385,11 @@ tui_vAddWinToLayout (args) /* -** tuiDefaultWinHeight(). -** Answer the height of a window. If it hasn't been created yet, -** answer what the height of a window would be based upon its -** type and the layout. -*/ + ** tuiDefaultWinHeight(). + ** Answer the height of a window. If it hasn't been created yet, + ** answer what the height of a window would be based upon its + ** type and the layout. + */ int #ifdef __STDC__ tuiDefaultWinHeight ( @@ -435,11 +435,11 @@ tuiDefaultWinHeight (type, layout) /* -** tuiDefaultWinViewportHeight(). -** Answer the height of a window. If it hasn't been created yet, -** answer what the height of a window would be based upon its -** type and the layout. -*/ + ** tuiDefaultWinViewportHeight(). + ** Answer the height of a window. If it hasn't been created yet, + ** answer what the height of a window would be based upon its + ** type and the layout. + */ int #ifdef __STDC__ tuiDefaultWinViewportHeight ( @@ -465,10 +465,10 @@ tuiDefaultWinViewportHeight (type, layout) /* -** _initialize_tuiLayout(). -** Function to initialize gdb commands, for tui window layout -** manipulation. -*/ + ** _initialize_tuiLayout(). + ** Function to initialize gdb commands, for tui window layout + ** manipulation. + */ void _initialize_tuiLayout () { @@ -507,10 +507,10 @@ Source/Disassembly/Command layouts.\n"); /* -** _tuiSetLayoutTo() -** Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA, REGS, -** $REGS, $GREGS, $FREGS, $SREGS. -*/ + ** _tuiSetLayoutTo() + ** Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA, REGS, + ** $REGS, $GREGS, $FREGS, $SREGS. + */ static TuiStatus #ifdef __STDC__ _tuiSetLayoutTo ( @@ -767,9 +767,9 @@ _tuiLayout_command (arg, fromTTY) } /* _tuiLayout_command */ /* -** _nextLayout(). -** Answer the previous layout to cycle to. -*/ + ** _nextLayout(). + ** Answer the previous layout to cycle to. + */ static TuiLayoutType #ifdef __STDC__ _nextLayout (void) @@ -794,9 +794,9 @@ _nextLayout () /* -** _prevLayout(). -** Answer the next layout to cycle to. -*/ + ** _prevLayout(). + ** Answer the next layout to cycle to. + */ static TuiLayoutType #ifdef __STDC__ _prevLayout (void) @@ -822,8 +822,8 @@ _prevLayout () /* -** _makeCommandWindow(). -*/ + ** _makeCommandWindow(). + */ static void #ifdef __STDC__ _makeCommandWindow ( @@ -852,8 +852,8 @@ _makeCommandWindow (winInfoPtr, height, originY) /* -** _makeSourceWindow(). -*/ + ** _makeSourceWindow(). + */ static void #ifdef __STDC__ _makeSourceWindow ( @@ -874,8 +874,8 @@ _makeSourceWindow (winInfoPtr, height, originY) /* -** _makeDisassemWindow(). -*/ + ** _makeDisassemWindow(). + */ static void #ifdef __STDC__ _makeDisassemWindow ( @@ -896,8 +896,8 @@ _makeDisassemWindow (winInfoPtr, height, originY) /* -** _makeDataWindow(). -*/ + ** _makeDataWindow(). + */ static void #ifdef __STDC__ _makeDataWindow ( @@ -925,9 +925,9 @@ _makeDataWindow (winInfoPtr, height, originY) /* -** _showSourceCommand(). -** Show the Source/Command layout -*/ + ** _showSourceCommand(). + ** Show the Source/Command layout + */ static void #ifdef __STDC__ _showSourceCommand (void) @@ -942,9 +942,9 @@ _showSourceCommand () /* -** _showDisassemCommand(). -** Show the Dissassem/Command layout -*/ + ** _showDisassemCommand(). + ** Show the Dissassem/Command layout + */ static void #ifdef __STDC__ _showDisassemCommand (void) @@ -959,9 +959,9 @@ _showDisassemCommand () /* -** _showSourceDisassemCommand(). -** Show the Source/Disassem/Command layout -*/ + ** _showSourceDisassemCommand(). + ** Show the Source/Disassem/Command layout + */ static void #ifdef __STDC__ _showSourceDisassemCommand (void) @@ -1081,9 +1081,9 @@ _showSourceDisassemCommand () /* -** _showData(). -** Show the Source/Data/Command or the Dissassembly/Data/Command layout -*/ + ** _showData(). + ** Show the Source/Data/Command or the Dissassembly/Data/Command layout + */ static void #ifdef __STDC__ _showData ( @@ -1156,8 +1156,8 @@ _showData (newLayout) } /* _showData */ /* -** _initGenWinInfo(). -*/ + ** _initGenWinInfo(). + */ static void #ifdef __STDC__ _initGenWinInfo ( @@ -1197,8 +1197,8 @@ _initGenWinInfo (winInfo, type, height, width, originX, originY) } /* _initGenWinInfo */ /* -** _initAndMakeWin(). -*/ + ** _initAndMakeWin(). + */ static void #ifdef __STDC__ _initAndMakeWin ( @@ -1257,8 +1257,8 @@ _initAndMakeWin (winInfoPtr, winType, height, width, originX, originY, boxIt) /* -** _makeSourceOrDisassemWindow(). -*/ + ** _makeSourceOrDisassemWindow(). + */ static void #ifdef __STDC__ _makeSourceOrDisassemWindow ( @@ -1277,8 +1277,8 @@ _makeSourceOrDisassemWindow (winInfoPtr, type, height, originY) TuiGenWinInfoPtr executionInfo = (TuiGenWinInfoPtr) NULL; /* - ** Create the exeuction info window. - */ + ** Create the exeuction info window. + */ if (type == SRC_WIN) executionInfo = sourceExecInfoWinPtr (); else @@ -1291,8 +1291,8 @@ _makeSourceOrDisassemWindow (winInfoPtr, type, height, originY) originY, DONT_BOX_WINDOW); /* - ** Now create the source window. - */ + ** Now create the source window. + */ _initAndMakeWin ((Opaque *) winInfoPtr, type, height, @@ -1308,9 +1308,9 @@ _makeSourceOrDisassemWindow (winInfoPtr, type, height, originY) /* -** _showSourceOrDisassemAndCommand(). -** Show the Source/Command or the Disassem layout -*/ + ** _showSourceOrDisassemAndCommand(). + ** Show the Source/Command or the Disassem layout + */ static void #ifdef __STDC__ _showSourceOrDisassemAndCommand ( diff --git a/gdb/tui/tuiLayout.h b/gdb/tui/tuiLayout.h index 57d8bbc..81d6915 100644 --- a/gdb/tui/tuiLayout.h +++ b/gdb/tui/tuiLayout.h @@ -1,15 +1,15 @@ #ifndef TUI_LAYOUT_H #define TUI_LAYOUT_H -extern void showLayout PARAMS ((TuiLayoutType)); -extern void tuiAddWinToLayout PARAMS ((TuiWinType)); -extern void tui_vAddWinToLayout PARAMS ((va_list)); -extern int tuiDefaultWinHeight - PARAMS ((TuiWinType, TuiLayoutType)); -extern int tuiDefaultWinViewportHeight - PARAMS ((TuiWinType, TuiLayoutType)); -extern TuiStatus tuiSetLayout - PARAMS ((TuiLayoutType, TuiRegisterDisplayType)); -extern TuiStatus tui_vSetLayoutTo PARAMS ((va_list)); +extern void showLayout PARAMS ((TuiLayoutType)); +extern void tuiAddWinToLayout PARAMS ((TuiWinType)); +extern void tui_vAddWinToLayout PARAMS ((va_list)); +extern int tuiDefaultWinHeight + PARAMS ((TuiWinType, TuiLayoutType)); +extern int tuiDefaultWinViewportHeight + PARAMS ((TuiWinType, TuiLayoutType)); +extern TuiStatus tuiSetLayout + PARAMS ((TuiLayoutType, TuiRegisterDisplayType)); +extern TuiStatus tui_vSetLayoutTo PARAMS ((va_list)); -#endif /*TUI_LAYOUT_H*/ +#endif /*TUI_LAYOUT_H */ diff --git a/gdb/tui/tuiRegs.c b/gdb/tui/tuiRegs.c index b78b9bc..92eec56 100644 --- a/gdb/tui/tuiRegs.c +++ b/gdb/tui/tuiRegs.c @@ -1,9 +1,9 @@ /* -** tuiRegs.c -** This module contains functions to support display of registers -** in the data window. -*/ + ** tuiRegs.c + ** This module contains functions to support display of registers + ** in the data window. + */ #include "defs.h" @@ -32,7 +32,7 @@ #define SINGLE_LABEL_WIDTH 10 #define SINGLE_LABEL_FMT "%10.10s: " -#define SINGLE_VALUE_WIDTH 14/* minimum of 8 but may be in sci notation */ +#define SINGLE_VALUE_WIDTH 14 /* minimum of 8 but may be in sci notation */ /* In the code HP gave Cygnus, this was actually a function call to a PA-specific function, which was supposed to determine whether the @@ -86,10 +86,10 @@ static void _tui_vShowRegisters_commandSupport PARAMS ((va_list)); ******************************************/ /* -** tuiLastRegsLineNo() -** Answer the number of the last line in the regs display. -** If there are no registers (-1) is returned. -*/ + ** tuiLastRegsLineNo() + ** Answer the number of the last line in the regs display. + ** If there are no registers (-1) is returned. + */ int #ifdef __STDC__ tuiLastRegsLineNo (void) @@ -112,11 +112,11 @@ tuiLastRegsLineNo () /* -** tuiLineFromRegElementNo() -** Answer the line number that the register element at elementNo is -** on. If elementNo is greater than the number of register elements -** there are, -1 is returned. -*/ + ** tuiLineFromRegElementNo() + ** Answer the line number that the register element at elementNo is + ** on. If elementNo is greater than the number of register elements + ** there are, -1 is returned. + */ int #ifdef __STDC__ tuiLineFromRegElementNo ( @@ -148,10 +148,10 @@ tuiLineFromRegElementNo (elementNo) /* -** tuiFirstRegElementNoInLine() -** Answer the index of the first element in lineNo. If lineNo is -** past the register area (-1) is returned. -*/ + ** tuiFirstRegElementNoInLine() + ** Answer the index of the first element in lineNo. If lineNo is + ** past the register area (-1) is returned. + */ int #ifdef __STDC__ tuiFirstRegElementNoInLine ( @@ -172,10 +172,10 @@ tuiFirstRegElementNoInLine (lineNo) /* -** tuiLastRegElementNoInLine() -** Answer the index of the last element in lineNo. If lineNo is past -** the register area (-1) is returned. -*/ + ** tuiLastRegElementNoInLine() + ** Answer the index of the last element in lineNo. If lineNo is past + ** the register area (-1) is returned. + */ int #ifdef __STDC__ tuiLastRegElementNoInLine ( @@ -195,10 +195,10 @@ tuiLastRegElementNoInLine (lineNo) /* -** tuiCalculateRegsColumnCount -** Calculate the number of columns that should be used to display -** the registers. -*/ + ** tuiCalculateRegsColumnCount + ** Calculate the number of columns that should be used to display + ** the registers. + */ int #ifdef __STDC__ tuiCalculateRegsColumnCount ( @@ -226,11 +226,11 @@ tuiCalculateRegsColumnCount (dpyType) /* -** tuiShowRegisters(). -** Show the registers int the data window as indicated by dpyType. -** If there is any other registers being displayed, then they are -** cleared. What registers are displayed is dependent upon dpyType. -*/ + ** tuiShowRegisters(). + ** Show the registers int the data window as indicated by dpyType. + ** If there is any other registers being displayed, then they are + ** cleared. What registers are displayed is dependent upon dpyType. + */ void #ifdef __STDC__ tuiShowRegisters ( @@ -304,12 +304,12 @@ tuiShowRegisters (dpyType) /* -** tuiDisplayRegistersFrom(). -** Function to display the registers in the content from -** 'startElementNo' until the end of the register content or the -** end of the display height. No checking for displaying past -** the end of the registers is done here. -*/ + ** tuiDisplayRegistersFrom(). + ** Function to display the registers in the content from + ** 'startElementNo' until the end of the register content or the + ** end of the display height. No checking for displaying past + ** the end of the registers is done here. + */ void #ifdef __STDC__ tuiDisplayRegistersFrom ( @@ -351,8 +351,8 @@ tuiDisplayRegistersFrom (startElementNo) } itemWinWidth = valueCharsWide + labelWidth; /* - ** Now create each data "sub" window, and write the display into it. - */ + ** Now create each data "sub" window, and write the display into it. + */ curY = 1; while (i < dataWin->detail.dataDisplayInfo.regsContentCount && curY <= dataWin->generic.viewportHeight) @@ -364,7 +364,7 @@ tuiDisplayRegistersFrom (startElementNo) TuiGenWinInfoPtr dataItemWin; TuiDataElementPtr dataElementPtr; - /* create the window if necessary*/ + /* create the window if necessary */ dataItemWin = &dataWin->detail.dataDisplayInfo. regsContent[i]->whichElement.dataWindow; dataElementPtr = &((TuiWinElementPtr) @@ -379,9 +379,9 @@ tuiDisplayRegistersFrom (startElementNo) makeWindow (dataItemWin, DONT_BOX_WINDOW); } /* - ** Get the printable representation of the register - ** and display it - */ + ** Get the printable representation of the register + ** and display it + */ _tuiDisplayRegister ( dataElementPtr->itemNo, dataItemWin, precision); i++; /* next register */ @@ -395,13 +395,13 @@ tuiDisplayRegistersFrom (startElementNo) /* -** tuiDisplayRegElementAtLine(). -** Function to display the registers in the content from -** 'startElementNo' on 'startLineNo' until the end of the -** register content or the end of the display height. -** This function checks that we won't display off the end -** of the register display. -*/ + ** tuiDisplayRegElementAtLine(). + ** Function to display the registers in the content from + ** 'startElementNo' on 'startLineNo' until the end of the + ** register content or the end of the display height. + ** This function checks that we won't display off the end + ** of the register display. + */ void #ifdef __STDC__ tuiDisplayRegElementAtLine ( @@ -427,10 +427,10 @@ tuiDisplayRegElementAtLine (startElementNo, startLineNo) if (firstLineOnLastPage < 0) firstLineOnLastPage = 0; /* - ** If there is no other data displayed except registers, - ** and the elementNo causes us to scroll past the end of the - ** registers, adjust what element to really start the display at. - */ + ** If there is no other data displayed except registers, + ** and the elementNo causes us to scroll past the end of the + ** registers, adjust what element to really start the display at. + */ if (dataWin->detail.dataDisplayInfo.dataContentCount <= 0 && startLineNo > firstLineOnLastPage) elementNo = tuiFirstRegElementNoInLine (firstLineOnLastPage); @@ -444,11 +444,11 @@ tuiDisplayRegElementAtLine (startElementNo, startLineNo) /* -** tuiDisplayRegistersFromLine(). -** Function to display the registers starting at line lineNo in -** the data window. Answers the line number that the display -** actually started from. If nothing is displayed (-1) is returned. -*/ + ** tuiDisplayRegistersFromLine(). + ** Function to display the registers starting at line lineNo in + ** the data window. Answers the line number that the display + ** actually started from. If nothing is displayed (-1) is returned. + */ int #ifdef __STDC__ tuiDisplayRegistersFromLine ( @@ -470,9 +470,9 @@ tuiDisplayRegistersFromLine (lineNo, forceDisplay) line = 0; else if (forceDisplay) { /* - ** If we must display regs (forceDisplay is true), then make - ** sure that we don't display off the end of the registers. - */ + ** If we must display regs (forceDisplay is true), then make + ** sure that we don't display off the end of the registers. + */ if (lineNo >= tuiLastRegsLineNo ()) { if ((line = tuiLineFromRegElementNo ( @@ -499,11 +499,11 @@ tuiDisplayRegistersFromLine (lineNo, forceDisplay) /* -** tuiCheckRegisterValues() -** This function check all displayed registers for changes in -** values, given a particular frame. If the values have changed, -** they are updated with the new value and highlighted. -*/ + ** tuiCheckRegisterValues() + ** This function check all displayed registers for changes in + ** values, given a particular frame. If the values have changed, + ** they are updated with the new value and highlighted. + */ void #ifdef __STDC__ tuiCheckRegisterValues ( @@ -566,8 +566,8 @@ tuiCheckRegisterValues (frame) /* -** tuiToggleFloatRegs(). -*/ + ** tuiToggleFloatRegs(). + */ void #ifdef __STDC__ tuiToggleFloatRegs (void) @@ -626,9 +626,9 @@ registers.\n", /* -** _tuiRegisterName(). -** Return the register name. -*/ + ** _tuiRegisterName(). + ** Return the register name. + */ static char * #ifdef __STDC__ _tuiRegisterName ( @@ -646,10 +646,10 @@ _tuiRegisterName (regNum) /* -** _tuiRegisterFormat -** Function to format the register name and value into a buffer, -** suitable for printing or display -*/ + ** _tuiRegisterFormat + ** Function to format the register name and value into a buffer, + ** suitable for printing or display + */ static void #ifdef __STDC__ _tuiRegisterFormat ( @@ -671,10 +671,10 @@ _tuiRegisterFormat (buf, bufLen, regNum, dataElement, precision) char *fmt; GDB_FILE *stream; - stream = gdb_file_init_astring(bufLen); + stream = gdb_file_init_astring (bufLen); pa_do_strcat_registers_info (regNum, 0, stream, precision); - strcpy (buf, gdb_file_get_strbuf(stream)); - gdb_file_deallocate(&stream); + strcpy (buf, gdb_file_get_strbuf (stream)); + gdb_file_deallocate (&stream); return; } /* _tuiRegisterFormat */ @@ -682,9 +682,9 @@ _tuiRegisterFormat (buf, bufLen, regNum, dataElement, precision) #define NUM_GENERAL_REGS 32 /* -** _tuiSetGeneralRegsContent(). -** Set the content of the data window to consist of the general registers. -*/ + ** _tuiSetGeneralRegsContent(). + ** Set the content of the data window to consist of the general registers. + */ static TuiStatus #ifdef __STDC__ _tuiSetGeneralRegsContent ( @@ -705,9 +705,9 @@ _tuiSetGeneralRegsContent (refreshValuesOnly) #define START_SPECIAL_REGS PCOQ_HEAD_REGNUM /* -** _tuiSetSpecialRegsContent(). -** Set the content of the data window to consist of the special registers. -*/ + ** _tuiSetSpecialRegsContent(). + ** Set the content of the data window to consist of the special registers. + */ static TuiStatus #ifdef __STDC__ _tuiSetSpecialRegsContent ( @@ -738,9 +738,9 @@ _tuiSetSpecialRegsContent (refreshValuesOnly) /* -** _tuiSetGeneralAndSpecialRegsContent(). -** Set the content of the data window to consist of the special registers. -*/ + ** _tuiSetGeneralAndSpecialRegsContent(). + ** Set the content of the data window to consist of the special registers. + */ static TuiStatus #ifdef __STDC__ _tuiSetGeneralAndSpecialRegsContent ( @@ -767,9 +767,9 @@ _tuiSetGeneralAndSpecialRegsContent (refreshValuesOnly) } /* _tuiSetGeneralAndSpecialRegsContent */ /* -** _tuiSetFloatRegsContent(). -** Set the content of the data window to consist of the float registers. -*/ + ** _tuiSetFloatRegsContent(). + ** Set the content of the data window to consist of the float registers. + */ static TuiStatus #ifdef __STDC__ _tuiSetFloatRegsContent ( @@ -802,10 +802,10 @@ _tuiSetFloatRegsContent (dpyType, refreshValuesOnly) /* -** _tuiRegValueHasChanged(). -** Answer TRUE if the register's value has changed, FALSE otherwise. -** If TRUE, newValue is filled in with the new value. -*/ + ** _tuiRegValueHasChanged(). + ** Answer TRUE if the register's value has changed, FALSE otherwise. + ** If TRUE, newValue is filled in with the new value. + */ static int #ifdef __STDC__ _tuiRegValueHasChanged ( @@ -845,9 +845,9 @@ _tuiRegValueHasChanged (dataElement, frame, newValue) /* -** _tuiGetRegisterRawValue(). -** Get the register raw value. The raw value is returned in regValue. -*/ + ** _tuiGetRegisterRawValue(). + ** Get the register raw value. The raw value is returned in regValue. + */ static TuiStatus #ifdef __STDC__ _tuiGetRegisterRawValue ( @@ -875,10 +875,10 @@ _tuiGetRegisterRawValue (regNum, regValue, frame) /* -** _tuiSetRegisterElement(). -** Function to initialize a data element with the input and -** the register value. -*/ + ** _tuiSetRegisterElement(). + ** Function to initialize a data element with the input and + ** the register value. + */ static void #ifdef __STDC__ _tuiSetRegisterElement ( @@ -913,11 +913,11 @@ _tuiSetRegisterElement (regNum, frame, dataElement, refreshValueOnly) /* -** _tuiSetRegsContent(). -** Set the content of the data window to consist of the registers -** numbered from startRegNum to endRegNum. Note that if -** refreshValuesOnly is TRUE, startRegNum and endRegNum are ignored. -*/ + ** _tuiSetRegsContent(). + ** Set the content of the data window to consist of the registers + ** numbered from startRegNum to endRegNum. Note that if + ** refreshValuesOnly is TRUE, startRegNum and endRegNum are ignored. + */ static TuiStatus #ifdef __STDC__ _tuiSetRegsContent ( @@ -967,8 +967,8 @@ _tuiSetRegsContent (startRegNum, endRegNum, frame, dpyType, refreshValuesOnly) dataWin->detail.dataDisplayInfo.regsContentCount = numRegs; } /* - ** Now set the register names and values - */ + ** Now set the register names and values + */ for (i = startRegNum; (i <= endRegNum); i++) { TuiGenWinInfoPtr dataItemWin; @@ -1002,15 +1002,15 @@ _tuiSetRegsContent (startRegNum, endRegNum, frame, dpyType, refreshValuesOnly) /* -** _tuiDisplayRegister(). -** Function to display a register in a window. If hilite is TRUE, -** than the value will be displayed in reverse video -*/ + ** _tuiDisplayRegister(). + ** Function to display a register in a window. If hilite is TRUE, + ** than the value will be displayed in reverse video + */ static void #ifdef __STDC__ _tuiDisplayRegister ( int regNum, - TuiGenWinInfoPtr winInfo, /* the data item window */ + TuiGenWinInfoPtr winInfo, /* the data item window */ enum precision_type precision) #else _tuiDisplayRegister (regNum, winInfo, precision) diff --git a/gdb/tui/tuiRegs.h b/gdb/tui/tuiRegs.h index 4a777ec..a9f077d 100644 --- a/gdb/tui/tuiRegs.h +++ b/gdb/tui/tuiRegs.h @@ -1,8 +1,8 @@ #ifndef _TUI_REGS_H #define _TUI_REGS_H /* -** This header file supports the display of registers in the data window. -*/ + ** This header file supports the display of registers in the data window. + */ /***************************************** ** TYPE DEFINITIONS ** @@ -13,16 +13,17 @@ /***************************************** ** PUBLIC FUNCTION EXTERNAL DECLS ** ******************************************/ -extern void tuiCheckRegisterValues PARAMS ((struct frame_info *)); -extern void tuiShowRegisters PARAMS ((TuiRegisterDisplayType)); -extern void tuiDisplayRegistersFrom PARAMS ((int)); -extern int tuiDisplayRegistersFromLine PARAMS ((int, int)); -extern int tuiLastRegsLineNo PARAMS ((void)); -extern int tuiFirstRegElementInLine PARAMS ((int)); -extern int tuiLastRegElementInLine PARAMS ((int)); -extern int tuiLineFromRegElementNo PARAMS ((int)); -extern void tuiToggleFloatRegs PARAMS ((void)); -extern int tuiCalculateRegsColumnCount PARAMS ((TuiRegisterDisplayType)); +extern void tuiCheckRegisterValues PARAMS ((struct frame_info *)); +extern void tuiShowRegisters PARAMS ((TuiRegisterDisplayType)); +extern void tuiDisplayRegistersFrom PARAMS ((int)); +extern int tuiDisplayRegistersFromLine PARAMS ((int, int)); +extern int tuiLastRegsLineNo PARAMS ((void)); +extern int tuiFirstRegElementInLine PARAMS ((int)); +extern int tuiLastRegElementInLine PARAMS ((int)); +extern int tuiLineFromRegElementNo PARAMS ((int)); +extern void tuiToggleFloatRegs PARAMS ((void)); +extern int tuiCalculateRegsColumnCount PARAMS ((TuiRegisterDisplayType)); -#endif /*_TUI_REGS_H*/ +#endif +/*_TUI_REGS_H*/ diff --git a/gdb/tui/tuiSource.c b/gdb/tui/tuiSource.c index e0259d0..36c1e7c 100644 --- a/gdb/tui/tuiSource.c +++ b/gdb/tui/tuiSource.c @@ -1,7 +1,7 @@ /* -** tuiSource.c -** This module contains functions for displaying source in the source window -*/ + ** tuiSource.c + ** This module contains functions for displaying source in the source window + */ #include "defs.h" #include <ctype.h> @@ -51,9 +51,9 @@ static struct breakpoint *_hasBreak PARAMS ((char *, int)); *********************************/ /* -** tuiSetSourceContent(). -** Function to display source in the source window. -*/ + ** tuiSetSourceContent(). + ** Function to display source in the source window. + */ TuiStatus #ifdef __STDC__ tuiSetSourceContent ( @@ -79,9 +79,9 @@ tuiSetSourceContent (s, lineNo, noerror) { lineWidth = srcWin->generic.width - 1; /* - ** Take hilite (window border) into account, when calculating - ** the number of lines - */ + ** Take hilite (window border) into account, when calculating + ** the number of lines + */ nlines = (lineNo + (srcWin->generic.height - 2)) - lineNo; desc = open_source_file (s); if (desc < 0) @@ -116,9 +116,9 @@ tuiSetSourceContent (s, lineNo, noerror) register int offset, curLineNo, curLine, curLen, threshold; TuiGenWinInfoPtr locator = locatorWinInfoPtr (); /* - ** Determine the threshold for the length of the line - ** and the offset to start the display - */ + ** Determine the threshold for the length of the line + ** and the offset to start the display + */ offset = srcWin->detail.sourceInfo.horizontalOffset; threshold = (lineWidth - 1) + offset; stream = fdopen (desc, FOPEN_RT); @@ -156,9 +156,9 @@ tuiSetSourceContent (s, lineNo, noerror) srcLine[curLen] = (char) 0; /* - ** Set whether element is the execution point and - ** whether there is a break point on it. - */ + ** Set whether element is the execution point and + ** whether there is a break point on it. + */ element->whichElement.source.lineOrAddr.lineNo = curLineNo; element->whichElement.source.isExecPoint = @@ -192,12 +192,12 @@ tuiSetSourceContent (s, lineNo, noerror) } else { /* - ** Store the charcter in the line - ** buffer. If it is a tab, then - ** translate to the correct number of - ** chars so we don't overwrite our - ** buffer. - */ + ** Store the charcter in the line + ** buffer. If it is a tab, then + ** translate to the correct number of + ** chars so we don't overwrite our + ** buffer. + */ if (c == '\t') { int j, maxTabLen = tuiDefaultTabLen (); @@ -217,9 +217,9 @@ tuiSetSourceContent (s, lineNo, noerror) } else { /* - ** if we have not reached EOL, then eat - ** chars until we do - */ + ** if we have not reached EOL, then eat + ** chars until we do + */ while (c != EOF && c != '\n' && c != '\r') c = fgetc (stream); } @@ -256,7 +256,7 @@ tuiSetSourceContent (s, lineNo, noerror) except for a line in the middle with a warning message about the source not being available. This function is called by tuiEraseSourceContents, which in turn is invoked when the source files - cannot be accessed*/ + cannot be accessed */ void #ifdef __STDC__ @@ -277,12 +277,12 @@ tuiSetSourceContentNil (winInfo, warning_string) nLines = winInfo->generic.height - 2; /* set to empty each line in the window, except for the one - which contains the message*/ + which contains the message */ while (curr_line < winInfo->generic.contentSize) { /* set the information related to each displayed line - to null: i.e. the line number is 0, there is no bp, - it is not where the program is stopped */ + to null: i.e. the line number is 0, there is no bp, + it is not where the program is stopped */ TuiWinElementPtr element = (TuiWinElementPtr) winInfo->generic.content[curr_line]; @@ -290,14 +290,14 @@ tuiSetSourceContentNil (winInfo, warning_string) element->whichElement.source.isExecPoint = FALSE; element->whichElement.source.hasBreak = FALSE; - /* set the contents of the line to blank*/ + /* set the contents of the line to blank */ element->whichElement.source.line[0] = (char) 0; /* if the current line is in the middle of the screen, then we want to - display the 'no source available' message in it. - Note: the 'weird' arithmetic with the line width and height comes from - the function tuiEraseSourceContent. We need to keep the screen and the - window's actual contents in synch */ + display the 'no source available' message in it. + Note: the 'weird' arithmetic with the line width and height comes from + the function tuiEraseSourceContent. We need to keep the screen and the + window's actual contents in synch */ if (curr_line == (nLines / 2 + 1)) { @@ -327,18 +327,18 @@ tuiSetSourceContentNil (winInfo, warning_string) curr_line++; - } /* end while*/ + } /* end while */ -} /*tuiSetSourceContentNil*/ +} /*tuiSetSourceContentNil */ /* -** tuiShowSource(). -** Function to display source in the source window. This function -** initializes the horizontal scroll to 0. -*/ + ** tuiShowSource(). + ** Function to display source in the source window. This function + ** initializes the horizontal scroll to 0. + */ void #ifdef __STDC__ tuiShowSource ( @@ -360,9 +360,9 @@ tuiShowSource (s, line, noerror) /* -** tuiSourceIsDisplayed(). -** Answer whether the source is currently displayed in the source window. -*/ + ** tuiSourceIsDisplayed(). + ** Answer whether the source is currently displayed in the source window. + */ int #ifdef __STDC__ tuiSourceIsDisplayed ( @@ -379,9 +379,9 @@ tuiSourceIsDisplayed (fname) /* -** tuiVerticalSourceScroll(). -** Scroll the source forward or backward vertically -*/ + ** tuiVerticalSourceScroll(). + ** Scroll the source forward or backward vertically + */ void #ifdef __STDC__ tuiVerticalSourceScroll ( @@ -410,8 +410,8 @@ tuiVerticalSourceScroll (scrollDirection, numToScroll) line = content[0]->whichElement.source.lineOrAddr.lineNo + numToScroll; if (line > s->nlines) - /*line = s->nlines - winInfo->generic.contentSize + 1;*/ - /*elz: fix for dts 23398*/ + /*line = s->nlines - winInfo->generic.contentSize + 1; */ + /*elz: fix for dts 23398 */ line = content[0]->whichElement.source.lineOrAddr.lineNo; } else @@ -433,10 +433,10 @@ tuiVerticalSourceScroll (scrollDirection, numToScroll) ******************************************/ /* -** _hasBreak(). -** Answer whether there is a break point at the input line in -** the source file indicated -*/ + ** _hasBreak(). + ** Answer whether there is a break point at the input line in + ** the source file indicated + */ static struct breakpoint * #ifdef __STDC__ _hasBreak ( diff --git a/gdb/tui/tuiSource.h b/gdb/tui/tuiSource.h index f898c61..8545c1f 100644 --- a/gdb/tui/tuiSource.h +++ b/gdb/tui/tuiSource.h @@ -1,8 +1,8 @@ #ifndef _TUI_SOURCE_H #define _TUI_SOURCE_H /* -** This header file supports -*/ + ** This header file supports + */ #include "defs.h" @@ -11,11 +11,11 @@ #include "breakpoint.h" #endif -extern TuiStatus tuiSetSourceContent PARAMS ((struct symtab *, int, int)); -extern void tuiShowSource PARAMS ((struct symtab *, Opaque, int)); -extern void tuiShowSourceAsIs PARAMS ((struct symtab *, Opaque, int)); -extern int tuiSourceIsDisplayed PARAMS ((char *)); -extern void tuiVerticalSourceScroll PARAMS ((TuiScrollDirection, int)); +extern TuiStatus tuiSetSourceContent PARAMS ((struct symtab *, int, int)); +extern void tuiShowSource PARAMS ((struct symtab *, Opaque, int)); +extern void tuiShowSourceAsIs PARAMS ((struct symtab *, Opaque, int)); +extern int tuiSourceIsDisplayed PARAMS ((char *)); +extern void tuiVerticalSourceScroll PARAMS ((TuiScrollDirection, int)); /******************* @@ -24,4 +24,5 @@ extern void tuiVerticalSourceScroll PARAMS ((TuiScrollDirection, int)); #define m_tuiShowSourceAsIs(s, line, noerror) tuiUpdateSourceWindowAsIs(srcWin, s, line, noerror) -#endif /*_TUI_SOURCE_H*/ +#endif +/*_TUI_SOURCE_H*/ diff --git a/gdb/tui/tuiSourceWin.c b/gdb/tui/tuiSourceWin.c index e203925..4b9d50c 100644 --- a/gdb/tui/tuiSourceWin.c +++ b/gdb/tui/tuiSourceWin.c @@ -1,8 +1,8 @@ /* -** tuiSourceWin.c -** This module contains functions for displaying source or assembly in the "source" window. -* The "source" window may be the assembly or the source windows. -*/ + ** tuiSourceWin.c + ** This module contains functions for displaying source or assembly in the "source" window. + * The "source" window may be the assembly or the source windows. + */ #include "defs.h" #include <ctype.h> @@ -47,8 +47,8 @@ extern struct symtab *current_source_symtab; *********************************/ /* -** tuiSrcWinIsDisplayed(). -*/ + ** tuiSrcWinIsDisplayed(). + */ int #ifdef __STDC__ tuiSrcWinIsDisplayed (void) @@ -61,8 +61,8 @@ tuiSrcWinIsDisplayed () /* -** tuiAsmWinIsDisplayed(). -*/ + ** tuiAsmWinIsDisplayed(). + */ int #ifdef __STDC__ tuiAsmWinIsDisplayed (void) @@ -75,9 +75,9 @@ tuiAsmWinIsDisplayed () /* -** tuiDisplayMainFunction(). -** Function to display the "main" routine" -*/ + ** tuiDisplayMainFunction(). + ** Function to display the "main" routine" + */ void #ifdef __STDC__ tuiDisplayMainFunction (void) @@ -108,10 +108,10 @@ tuiDisplayMainFunction () /* -** tuiUpdateSourceWindow(). -** Function to display source in the source window. This function -** initializes the horizontal scroll to 0. -*/ + ** tuiUpdateSourceWindow(). + ** Function to display source in the source window. This function + ** initializes the horizontal scroll to 0. + */ void #ifdef __STDC__ tuiUpdateSourceWindow ( @@ -135,10 +135,10 @@ tuiUpdateSourceWindow (winInfo, s, lineOrAddr, noerror) /* -** tuiUpdateSourceWindowAsIs(). -** Function to display source in the source/asm window. This -** function shows the source as specified by the horizontal offset. -*/ + ** tuiUpdateSourceWindowAsIs(). + ** Function to display source in the source/asm window. This + ** function shows the source as specified by the horizontal offset. + */ void #ifdef __STDC__ tuiUpdateSourceWindowAsIs ( @@ -177,9 +177,9 @@ tuiUpdateSourceWindowAsIs (winInfo, s, lineOrAddr, noerror) (winInfo->generic.contentSize - 2); current_source_symtab = s; /* - ** If the focus was in the asm win, put it in the src - ** win if we don't have a split layout - */ + ** If the focus was in the asm win, put it in the src + ** win if we don't have a split layout + */ if (tuiWinWithFocus () == disassemWin && currentLayout () != SRC_DISASSEM_COMMAND) tuiSetWinFocusTo (srcWin); @@ -192,10 +192,10 @@ tuiUpdateSourceWindowAsIs (winInfo, s, lineOrAddr, noerror) /* -** tuiUpdateSourceWindowsWithAddr(). -** Function to ensure that the source and/or disassemly windows -** reflect the input address. -*/ + ** tuiUpdateSourceWindowsWithAddr(). + ** Function to ensure that the source and/or disassemly windows + ** reflect the input address. + */ void #ifdef __STDC__ tuiUpdateSourceWindowsWithAddr ( @@ -244,9 +244,9 @@ tuiUpdateSourceWindowsWithAddr (addr) /* -** tui_vUpdateSourceWindowsWithAddr() -** Update the source window with the address in a va_list -*/ + ** tui_vUpdateSourceWindowsWithAddr() + ** Update the source window with the address in a va_list + */ void #ifdef __STDC__ tui_vUpdateSourceWindowsWithAddr ( @@ -265,10 +265,10 @@ tui_vUpdateSourceWindowsWithAddr (args) /* -** tuiUpdateSourceWindowsWithLine(). -** Function to ensure that the source and/or disassemly windows -** reflect the input address. -*/ + ** tuiUpdateSourceWindowsWithLine(). + ** Function to ensure that the source and/or disassemly windows + ** reflect the input address. + */ void #ifdef __STDC__ tuiUpdateSourceWindowsWithLine ( @@ -298,9 +298,9 @@ tuiUpdateSourceWindowsWithLine (s, line) /* -** tui_vUpdateSourceWindowsWithLine() -** Update the source window with the line number in a va_list -*/ + ** tui_vUpdateSourceWindowsWithLine() + ** Update the source window with the line number in a va_list + */ void #ifdef __STDC__ tui_vUpdateSourceWindowsWithLine ( @@ -320,8 +320,8 @@ tui_vUpdateSourceWindowsWithLine (args) /* -** tuiClearSourceContent(). -*/ + ** tuiClearSourceContent(). + */ void #ifdef __STDC__ tuiClearSourceContent ( @@ -353,8 +353,8 @@ tuiClearSourceContent (winInfo, displayPrompt) /* -** tuiClearAllSourceWinsContent(). -*/ + ** tuiClearAllSourceWinsContent(). + */ void #ifdef __STDC__ tuiClearAllSourceWinsContent ( @@ -375,8 +375,8 @@ tuiClearAllSourceWinsContent (displayPrompt) /* -** tuiEraseSourceContent(). -*/ + ** tuiEraseSourceContent(). + */ void #ifdef __STDC__ tuiEraseSourceContent ( @@ -413,9 +413,9 @@ tuiEraseSourceContent (winInfo, displayPrompt) noSrcStr); /* elz: added this function call to set the real contents of - the window to what is on the screen, so that later calls - to refresh, do display - the correct stuff, and not the old image */ + the window to what is on the screen, so that later calls + to refresh, do display + the correct stuff, and not the old image */ tuiSetSourceContentNil (winInfo, noSrcStr); } @@ -426,8 +426,8 @@ tuiEraseSourceContent (winInfo, displayPrompt) /* -** tuiEraseAllSourceContent(). -*/ + ** tuiEraseAllSourceContent(). + */ void #ifdef __STDC__ tuiEraseAllSourceWinsContent ( @@ -448,8 +448,8 @@ tuiEraseAllSourceWinsContent (displayPrompt) /* -** tuiShowSourceContent(). -*/ + ** tuiShowSourceContent(). + */ void #ifdef __STDC__ tuiShowSourceContent ( @@ -483,8 +483,8 @@ tuiShowSourceContent (winInfo) /* -** tuiShowAllSourceWinsContent() -*/ + ** tuiShowAllSourceWinsContent() + */ void #ifdef __STDC__ tuiShowAllSourceWinsContent (void) @@ -502,9 +502,9 @@ tuiShowAllSourceWinsContent () /* -** tuiHorizontalSourceScroll(). -** Scroll the source forward or backward horizontally -*/ + ** tuiHorizontalSourceScroll(). + ** Scroll the source forward or backward horizontally + */ void #ifdef __STDC__ tuiHorizontalSourceScroll ( @@ -553,9 +553,9 @@ tuiHorizontalSourceScroll (winInfo, direction, numToScroll) /* -** tuiSetHasExecPointAt(). -** Set or clear the hasBreak flag in the line whose line is lineNo. -*/ + ** tuiSetHasExecPointAt(). + ** Set or clear the hasBreak flag in the line whose line is lineNo. + */ void #ifdef __STDC__ tuiSetIsExecPointAt ( @@ -585,9 +585,9 @@ tuiSetIsExecPointAt (lineOrAddr, winInfo) /* -** tuiSetHasBreakAt(). -** Set or clear the hasBreak flag in the line whose line is lineNo. -*/ + ** tuiSetHasBreakAt(). + ** Set or clear the hasBreak flag in the line whose line is lineNo. + */ void #ifdef __STDC__ tuiSetHasBreakAt ( @@ -643,9 +643,9 @@ tuiSetHasBreakAt (bp, winInfo, hasBreak) /* -** tuiAllSetHasBreakAt(). -** Set or clear the hasBreak flag in all displayed source windows. -*/ + ** tuiAllSetHasBreakAt(). + ** Set or clear the hasBreak flag in all displayed source windows. + */ void #ifdef __STDC__ tuiAllSetHasBreakAt ( @@ -668,10 +668,10 @@ tuiAllSetHasBreakAt (bp, hasBreak) /* -** tui_vAllSetHasBreakAt() -** Set or clear the hasBreak flag in all displayed source windows, -** with params in a va_list -*/ + ** tui_vAllSetHasBreakAt() + ** Set or clear the hasBreak flag in all displayed source windows, + ** with params in a va_list + */ void #ifdef __STDC__ tui_vAllSetHasBreakAt ( @@ -696,11 +696,11 @@ tui_vAllSetHasBreakAt (args) *********************************/ /* -** tuiSetExecInfoContent(). -** Function to initialize the content of the execution info window, -** based upon the input window which is either the source or -** disassembly window. -*/ + ** tuiSetExecInfoContent(). + ** Function to initialize the content of the execution info window, + ** based upon the input window which is either the source or + ** disassembly window. + */ TuiStatus #ifdef __STDC__ tuiSetExecInfoContent ( @@ -732,10 +732,10 @@ tuiSetExecInfoContent (winInfo) element = (TuiWinElementPtr) execInfoPtr->content[i]; srcElement = (TuiWinElementPtr) winInfo->generic.content[i]; /* - ** First check to see if we have a breakpoint that is - ** temporary. If so, and this is our current execution point, - ** then clear the break indicator. - */ + ** First check to see if we have a breakpoint that is + ** temporary. If so, and this is our current execution point, + ** then clear the break indicator. + */ if (srcElement->whichElement.source.hasBreak && srcElement->whichElement.source.isExecPoint) { @@ -762,9 +762,9 @@ tuiSetExecInfoContent (winInfo) srcElement->whichElement.source.hasBreak = FALSE; } /* - ** Now update the exec info content based upon the state - ** of each line as indicated by the source content. - */ + ** Now update the exec info content based upon the state + ** of each line as indicated by the source content. + */ if (srcElement->whichElement.source.hasBreak && srcElement->whichElement.source.isExecPoint) element->whichElement.simpleString = breakLocationStr (); @@ -786,8 +786,8 @@ tuiSetExecInfoContent (winInfo) /* -** tuiShowExecInfoContent(). -*/ + ** tuiShowExecInfoContent(). + */ void #ifdef __STDC__ tuiShowExecInfoContent ( @@ -816,8 +816,8 @@ tuiShowExecInfoContent (winInfo) /* -** tuiShowAllExecInfosContent() -*/ + ** tuiShowAllExecInfosContent() + */ void #ifdef __STDC__ tuiShowAllExecInfosContent (void) @@ -835,8 +835,8 @@ tuiShowAllExecInfosContent () /* -** tuiEraseExecInfoContent(). -*/ + ** tuiEraseExecInfoContent(). + */ void #ifdef __STDC__ tuiEraseExecInfoContent ( @@ -856,8 +856,8 @@ tuiEraseExecInfoContent (winInfo) /* -** tuiEraseAllExecInfosContent() -*/ + ** tuiEraseAllExecInfosContent() + */ void #ifdef __STDC__ tuiEraseAllExecInfosContent (void) @@ -875,8 +875,8 @@ tuiEraseAllExecInfosContent () /* -** tuiClearExecInfoContent(). -*/ + ** tuiClearExecInfoContent(). + */ void #ifdef __STDC__ tuiClearExecInfoContent ( @@ -894,8 +894,8 @@ tuiClearExecInfoContent (winInfo) /* -** tuiClearAllExecInfosContent() -*/ + ** tuiClearAllExecInfosContent() + */ void #ifdef __STDC__ tuiClearAllExecInfosContent (void) @@ -913,9 +913,9 @@ tuiClearAllExecInfosContent () /* -** tuiUpdateExecInfo(). -** Function to update the execution info window -*/ + ** tuiUpdateExecInfo(). + ** Function to update the execution info window + */ void #ifdef __STDC__ tuiUpdateExecInfo ( @@ -930,9 +930,9 @@ tuiUpdateExecInfo (winInfo) } /* tuiUpdateExecInfo -/* -** tuiUpdateAllExecInfos() -*/ + /* + ** tuiUpdateAllExecInfos() + */ void #ifdef __STDC__ tuiUpdateAllExecInfos (void) @@ -946,16 +946,16 @@ tuiUpdateAllExecInfos () tuiUpdateExecInfo ((TuiWinInfoPtr) (sourceWindows ())->list[i]); return; -} /* tuiUpdateAllExecInfos*/ +} /* tuiUpdateAllExecInfos */ /* tuiUpdateOnEnd() -** elz: This function clears the execution info from the source windows -** and resets the locator to display no line info, procedure info, pc -** info. It is called by stack_publish_stopped_with_no_frame, which -** is called then the target terminates execution -*/ + ** elz: This function clears the execution info from the source windows + ** and resets the locator to display no line info, procedure info, pc + ** info. It is called by stack_publish_stopped_with_no_frame, which + ** is called then the target terminates execution + */ void #ifdef __STDC__ tuiUpdateOnEnd (void) @@ -977,11 +977,11 @@ tuiUpdateOnEnd () tuiSetIsExecPointAt ((Opaque) - 1, winInfo); /* the target is'n running */ /* -1 should not match any line number or pc */ - tuiSetExecInfoContent (winInfo); /*set winInfo so that > is'n displayed*/ - tuiShowExecInfoContent (winInfo); /* display the new contents */ + tuiSetExecInfoContent (winInfo); /*set winInfo so that > is'n displayed */ + tuiShowExecInfoContent (winInfo); /* display the new contents */ } - /*now update the locator*/ + /*now update the locator */ tuiClearLocatorDisplay (); tuiGetLocatorFilename (locator, &filename); tuiSetLocatorInfo ( @@ -1013,10 +1013,10 @@ tuiAllocSourceBuffer (winInfo) maxLines = winInfo->generic.height; /* less the highlight box */ lineWidth = winInfo->generic.width - 1; /* - ** Allocate the buffer for the source lines. Do this only once since they - ** will be re-used for all source displays. The only other time this will - ** be done is when a window's size changes. - */ + ** Allocate the buffer for the source lines. Do this only once since they + ** will be re-used for all source displays. The only other time this will + ** be done is when a window's size changes. + */ if (winInfo->generic.content == (OpaquePtr) NULL) { srcLineBuf = (char *) xmalloc ((maxLines * lineWidth) * sizeof (char)); @@ -1051,10 +1051,10 @@ tuiAllocSourceBuffer (winInfo) /* -** tuiLineIsDisplayed(). -** Answer whether the a particular line number or address is displayed -** in the current source window. -*/ + ** tuiLineIsDisplayed(). + ** Answer whether the a particular line number or address is displayed + ** in the current source window. + */ int #ifdef __STDC__ tuiLineIsDisplayed ( diff --git a/gdb/tui/tuiSourceWin.h b/gdb/tui/tuiSourceWin.h index 13f3a78..2da0191 100644 --- a/gdb/tui/tuiSourceWin.h +++ b/gdb/tui/tuiSourceWin.h @@ -1,57 +1,57 @@ #ifndef _TUI_SOURCEWIN_H #define _TUI_SOURCEWIN_H /* -** This header file supports -*/ + ** This header file supports + */ -extern void tuiDisplayMainFunction PARAMS ((void)); -extern void tuiUpdateSourceWindow PARAMS - ((TuiWinInfoPtr, struct symtab *, Opaque, int)); -extern void tuiUpdateSourceWindowAsIs PARAMS - ((TuiWinInfoPtr, struct symtab *, Opaque, int)); -extern void tuiUpdateSourceWindowsWithAddr PARAMS ((Opaque)); -extern void tui_vUpdateSourceWindowsWithAddr PARAMS ((va_list)); -extern void tuiUpdateSourceWindowsWithLine PARAMS ((struct symtab *, int)); -extern void tui_vUpdateSourceWindowsWithLine PARAMS ((va_list)); -extern void tuiUpdateSourceWindowsFromLocator PARAMS ((void)); -extern void tuiClearSourceContent PARAMS ((TuiWinInfoPtr, int)); -extern void tuiClearAllSourceWinsContent PARAMS ((int)); -extern void tuiEraseSourceContent PARAMS ((TuiWinInfoPtr, int)); -extern void tuiEraseAllSourceWinsContent PARAMS ((int)); -extern void tuiSetSourceContentNil PARAMS ((TuiWinInfoPtr, char *)); -extern void tuiShowSourceContent PARAMS ((TuiWinInfoPtr)); -extern void tuiShowAllSourceWinsContent PARAMS ((void)); -extern void tuiHorizontalSourceScroll PARAMS ((TuiWinInfoPtr, TuiScrollDirection, int)); -extern void tuiUpdateOnEnd PARAMS ((void)); +extern void tuiDisplayMainFunction PARAMS ((void)); +extern void tuiUpdateSourceWindow PARAMS + ((TuiWinInfoPtr, struct symtab *, Opaque, int)); +extern void tuiUpdateSourceWindowAsIs PARAMS + ((TuiWinInfoPtr, struct symtab *, Opaque, int)); +extern void tuiUpdateSourceWindowsWithAddr PARAMS ((Opaque)); +extern void tui_vUpdateSourceWindowsWithAddr PARAMS ((va_list)); +extern void tuiUpdateSourceWindowsWithLine PARAMS ((struct symtab *, int)); +extern void tui_vUpdateSourceWindowsWithLine PARAMS ((va_list)); +extern void tuiUpdateSourceWindowsFromLocator PARAMS ((void)); +extern void tuiClearSourceContent PARAMS ((TuiWinInfoPtr, int)); +extern void tuiClearAllSourceWinsContent PARAMS ((int)); +extern void tuiEraseSourceContent PARAMS ((TuiWinInfoPtr, int)); +extern void tuiEraseAllSourceWinsContent PARAMS ((int)); +extern void tuiSetSourceContentNil PARAMS ((TuiWinInfoPtr, char *)); +extern void tuiShowSourceContent PARAMS ((TuiWinInfoPtr)); +extern void tuiShowAllSourceWinsContent PARAMS ((void)); +extern void tuiHorizontalSourceScroll PARAMS ((TuiWinInfoPtr, TuiScrollDirection, int)); +extern void tuiUpdateOnEnd PARAMS ((void)); -extern TuiStatus tuiSetExecInfoContent PARAMS ((TuiWinInfoPtr)); -extern void tuiShowExecInfoContent PARAMS ((TuiWinInfoPtr)); -extern void tuiShowAllExecInfosContent PARAMS ((void)); -extern void tuiEraseExecInfoContent PARAMS ((TuiWinInfoPtr)); -extern void tuiEraseAllExecInfosContent PARAMS ((void)); -extern void tuiClearExecInfoContent PARAMS ((TuiWinInfoPtr)); -extern void tuiClearAllExecInfosContent PARAMS ((void)); -extern void tuiUpdateExecInfo PARAMS ((TuiWinInfoPtr)); -extern void tuiUpdateAllExecInfos PARAMS ((void)); +extern TuiStatus tuiSetExecInfoContent PARAMS ((TuiWinInfoPtr)); +extern void tuiShowExecInfoContent PARAMS ((TuiWinInfoPtr)); +extern void tuiShowAllExecInfosContent PARAMS ((void)); +extern void tuiEraseExecInfoContent PARAMS ((TuiWinInfoPtr)); +extern void tuiEraseAllExecInfosContent PARAMS ((void)); +extern void tuiClearExecInfoContent PARAMS ((TuiWinInfoPtr)); +extern void tuiClearAllExecInfosContent PARAMS ((void)); +extern void tuiUpdateExecInfo PARAMS ((TuiWinInfoPtr)); +extern void tuiUpdateAllExecInfos PARAMS ((void)); -extern void tuiSetIsExecPointAt PARAMS ((Opaque, TuiWinInfoPtr)); -extern void tuiSetHasBreakAt PARAMS ((struct breakpoint *, TuiWinInfoPtr, int)); -extern void tuiAllSetHasBreakAt PARAMS ((struct breakpoint *, int)); -extern void tui_vAllSetHasBreakAt PARAMS ((va_list)); -extern TuiStatus tuiAllocSourceBuffer PARAMS ((TuiWinInfoPtr)); -extern int tuiLineIsDisplayed PARAMS ((Opaque, TuiWinInfoPtr, int)); +extern void tuiSetIsExecPointAt PARAMS ((Opaque, TuiWinInfoPtr)); +extern void tuiSetHasBreakAt PARAMS ((struct breakpoint *, TuiWinInfoPtr, int)); +extern void tuiAllSetHasBreakAt PARAMS ((struct breakpoint *, int)); +extern void tui_vAllSetHasBreakAt PARAMS ((va_list)); +extern TuiStatus tuiAllocSourceBuffer PARAMS ((TuiWinInfoPtr)); +extern int tuiLineIsDisplayed PARAMS ((Opaque, TuiWinInfoPtr, int)); /* -** Constant definitions -*/ -#define SCROLL_THRESHOLD 2 /* threshold for lazy scroll */ + ** Constant definitions + */ +#define SCROLL_THRESHOLD 2 /* threshold for lazy scroll */ /* -** Macros -*/ + ** Macros + */ #define m_tuiSetBreakAt(bp, winInfo) tuiSetHasBreakAt((bp, winInfo, TRUE) #define m_tuiClearBreakAt(bp, winInfo) tuiSetHasBreakAt(bp, winInfo, FALSE) @@ -71,4 +71,5 @@ extern int tuiLineIsDisplayed PARAMS ((Opaque, TuiWinInfoPtr, int)); -#endif /*_TUI_SOURCEWIN_H */ +#endif +/*_TUI_SOURCEWIN_H */ diff --git a/gdb/tui/tuiStack.c b/gdb/tui/tuiStack.c index 401dfe2..c9c95d2 100644 --- a/gdb/tui/tuiStack.c +++ b/gdb/tui/tuiStack.c @@ -1,6 +1,6 @@ /* -** This module contains functions for displaying the locator information in the locator window. -*/ + ** This module contains functions for displaying the locator information in the locator window. + */ #include "defs.h" #include "symtab.h" @@ -27,8 +27,8 @@ static void _tuiUpdateLocation_command PARAMS ((char *, int)); ******************************************/ /* -** tuiClearLocatorDisplay() -*/ + ** tuiClearLocatorDisplay() + */ void #ifdef __STDC__ tuiClearLocatorDisplay (void) @@ -43,7 +43,7 @@ tuiClearLocatorDisplay () { /* No need to werase, since writing a line of * blanks which we do below, is equivalent. - */ + */ /* werase(locator->handle); */ wmove (locator->handle, 0, 0); wstandout (locator->handle); @@ -60,8 +60,8 @@ tuiClearLocatorDisplay () /* -** tuiShowLocatorContent() -*/ + ** tuiShowLocatorContent() + */ void #ifdef __STDC__ tuiShowLocatorContent (void) @@ -96,9 +96,9 @@ tuiShowLocatorContent () /* -** tuiSetLocatorInfo(). -** Function to update the locator, with the provided arguments. -*/ + ** tuiSetLocatorInfo(). + ** Function to update the locator, with the provided arguments. + */ void #ifdef __STDC__ tuiSetLocatorInfo ( @@ -145,9 +145,9 @@ tuiSetLocatorInfo (fname, procname, lineNo, addr, element) /* -** tuiUpdateLocatorFilename(). -** Update only the filename portion of the locator. -*/ + ** tuiUpdateLocatorFilename(). + ** Update only the filename portion of the locator. + */ void #ifdef __STDC__ tuiUpdateLocatorFilename ( @@ -173,9 +173,9 @@ tuiUpdateLocatorFilename (fileName) /* -** tui_vUpdateLocatorFilename(). -** Update only the filename portion of the locator with args in a va_list. -*/ + ** tui_vUpdateLocatorFilename(). + ** Update only the filename portion of the locator with args in a va_list. + */ void #ifdef __STDC__ tui_vUpdateLocatorFilename ( @@ -195,10 +195,10 @@ tui_vUpdateLocatorFilename (args) /* -** tuiSwitchFilename(). -** Update the filename portion of the locator. Clear the other info in locator. -** (elz) -*/ + ** tuiSwitchFilename(). + ** Update the filename portion of the locator. Clear the other info in locator. + ** (elz) + */ void #ifdef __STDC__ tuiSwitchFilename ( @@ -227,10 +227,10 @@ tuiSwitchFilename (fileName) /* -** tuiGetLocatorFilename(). -** Get the filename portion of the locator. -** (elz) -*/ + ** tuiGetLocatorFilename(). + ** Get the filename portion of the locator. + ** (elz) + */ void #ifdef __STDC__ tuiGetLocatorFilename ( @@ -260,9 +260,9 @@ tuiGetLocatorFilename (locator, filename) /* -** tuiUpdateLocatorInfoFromFrame(). -** Function to update the locator, with the information extracted from frameInfo -*/ + ** tuiUpdateLocatorInfoFromFrame(). + ** Function to update the locator, with the information extracted from frameInfo + */ void #ifdef __STDC__ tuiUpdateLocatorInfoFromFrame ( @@ -299,9 +299,9 @@ tuiUpdateLocatorInfoFromFrame (frameInfo, element) /* -** tuiSetLocatorContent(). -** Function to set the content of the locator -*/ + ** tuiSetLocatorContent(). + ** Function to set the content of the locator + */ void #ifdef __STDC__ tuiSetLocatorContent ( @@ -339,9 +339,9 @@ tuiSetLocatorContent (frameInfo) /* -** tuiUpdateLocatorDisplay(). -** Function to update the locator display -*/ + ** tuiUpdateLocatorDisplay(). + ** Function to update the locator display + */ void #ifdef __STDC__ tuiUpdateLocatorDisplay ( @@ -360,9 +360,9 @@ tuiUpdateLocatorDisplay (frameInfo) /* -** tuiShowFrameInfo(). -** Function to print the frame inforrmation for the TUI. -*/ + ** tuiShowFrameInfo(). + ** Function to print the frame inforrmation for the TUI. + */ void #ifdef __STDC__ tuiShowFrameInfo ( @@ -449,9 +449,9 @@ tuiShowFrameInfo (fi) /* -** tui_vShowFrameInfo(). -** Function to print the frame inforrmation for the TUI with args in a va_list. -*/ + ** tui_vShowFrameInfo(). + ** Function to print the frame inforrmation for the TUI with args in a va_list. + */ void #ifdef __STDC__ tui_vShowFrameInfo ( @@ -471,9 +471,9 @@ tui_vShowFrameInfo (args) /* -** _initialize_tuiStack(). -** Function to initialize gdb commands, for tui window stack manipulation. -*/ + ** _initialize_tuiStack(). + ** Function to initialize gdb commands, for tui window stack manipulation. + */ void _initialize_tuiStack () { @@ -492,8 +492,8 @@ _initialize_tuiStack () ******************************************/ /* -** _getFuncNameFromFrame(). -*/ + ** _getFuncNameFromFrame(). + */ static char * #ifdef __STDC__ _getFuncNameFromFrame ( @@ -514,9 +514,9 @@ _getFuncNameFromFrame (frameInfo) /* -** _tuiUpdateLocation_command(). -** Command to update the display with the current execution point -*/ + ** _tuiUpdateLocation_command(). + ** Command to update the display with the current execution point + */ static void #ifdef __STDC__ _tuiUpdateLocation_command ( diff --git a/gdb/tui/tuiStack.h b/gdb/tui/tuiStack.h index 20e9a92..4d7f2f0 100644 --- a/gdb/tui/tuiStack.h +++ b/gdb/tui/tuiStack.h @@ -1,22 +1,23 @@ #ifndef _TUI_STACK_H #define _TUI_STACK_H /* -** This header file supports -*/ + ** This header file supports + */ -extern void tuiSetLocatorInfo PARAMS ((char *, char *, int, Opaque, TuiLocatorElementPtr)); -extern void tuiUpdateLocatorFilename PARAMS ((char *)); -extern void tui_vUpdateLocatorFilename PARAMS ((va_list)); -extern void tuiUpdateLocatorInfoFromFrame - PARAMS ((struct frame_info *, TuiLocatorElementPtr)); -extern void tuiUpdateLocatorDisplay PARAMS ((struct frame_info *)); -extern void tuiSetLocatorContent PARAMS ((struct frame_info *)); -extern void tuiShowLocatorContent PARAMS ((void)); -extern void tuiClearLocatorContent PARAMS ((void)); -extern void tuiSwitchFilename PARAMS ((char *)); -extern void tuiShowFrameInfo PARAMS ((struct frame_info *)); -extern void tui_vShowFrameInfo PARAMS ((va_list)); -extern void tuiGetLocatorFilename PARAMS ((TuiGenWinInfoPtr, char **)); +extern void tuiSetLocatorInfo PARAMS ((char *, char *, int, Opaque, TuiLocatorElementPtr)); +extern void tuiUpdateLocatorFilename PARAMS ((char *)); +extern void tui_vUpdateLocatorFilename PARAMS ((va_list)); +extern void tuiUpdateLocatorInfoFromFrame + PARAMS ((struct frame_info *, TuiLocatorElementPtr)); +extern void tuiUpdateLocatorDisplay PARAMS ((struct frame_info *)); +extern void tuiSetLocatorContent PARAMS ((struct frame_info *)); +extern void tuiShowLocatorContent PARAMS ((void)); +extern void tuiClearLocatorContent PARAMS ((void)); +extern void tuiSwitchFilename PARAMS ((char *)); +extern void tuiShowFrameInfo PARAMS ((struct frame_info *)); +extern void tui_vShowFrameInfo PARAMS ((va_list)); +extern void tuiGetLocatorFilename PARAMS ((TuiGenWinInfoPtr, char **)); -#endif /*_TUI_STACK_H*/ +#endif +/*_TUI_STACK_H*/ diff --git a/gdb/tui/tuiWin.c b/gdb/tui/tuiWin.c index 45bb0f6..9e09911c 100644 --- a/gdb/tui/tuiWin.c +++ b/gdb/tui/tuiWin.c @@ -1,10 +1,10 @@ /* -** tuiWin.c -** This module contains procedures for handling tui window functions -** like resize, scrolling, scrolling, changing focus, etc. -** -** Author: Susan B. Macchia -*/ + ** tuiWin.c + ** This module contains procedures for handling tui window functions + ** like resize, scrolling, scrolling, changing focus, etc. + ** + ** Author: Susan B. Macchia + */ #include <string.h> @@ -58,9 +58,9 @@ static void _parseScrollingArgs PARAMS ((char *, TuiWinInfoPtr *, int *)); ***************************************/ /* -** _initialize_tuiWin(). -** Function to initialize gdb commands, for tui window manipulation. -*/ + ** _initialize_tuiWin(). + ** Function to initialize gdb commands, for tui window manipulation. + */ void _initialize_tuiWin () { @@ -112,9 +112,9 @@ Usage: w <#lines>\n"); /* -** tuiClearWinFocusFrom -** Clear the logical focus from winInfo -*/ + ** tuiClearWinFocusFrom + ** Clear the logical focus from winInfo + */ void #ifdef __STDC__ tuiClearWinFocusFrom ( @@ -136,9 +136,9 @@ tuiClearWinFocusFrom (winInfo) /* -** tuiClearWinFocus(). -** Clear the window that has focus. -*/ + ** tuiClearWinFocus(). + ** Clear the window that has focus. + */ void #ifdef __STDC__ tuiClearWinFocus (void) @@ -153,9 +153,9 @@ tuiClearWinFocus () /* -** tuiSetWinFocusTo -** Set the logical focus to winInfo -*/ + ** tuiSetWinFocusTo + ** Set the logical focus to winInfo + */ void #ifdef __STDC__ tuiSetWinFocusTo ( @@ -203,8 +203,8 @@ tuiStrDup (str) /* -** tuiScrollForward(). -*/ + ** tuiScrollForward(). + */ void #ifdef __STDC__ tuiScrollForward ( @@ -223,11 +223,11 @@ tuiScrollForward (winToScroll, numToScroll) if (numToScroll == 0) _numToScroll = winToScroll->generic.height - 3; /* - ** If we are scrolling the source or disassembly window, do a - ** "psuedo" scroll since not all of the source is in memory, - ** only what is in the viewport. If winToScroll is the - ** command window do nothing since the term should handle it. - */ + ** If we are scrolling the source or disassembly window, do a + ** "psuedo" scroll since not all of the source is in memory, + ** only what is in the viewport. If winToScroll is the + ** command window do nothing since the term should handle it. + */ if (winToScroll == srcWin) tuiVerticalSourceScroll (FORWARD_SCROLL, _numToScroll); else if (winToScroll == disassemWin) @@ -241,8 +241,8 @@ tuiScrollForward (winToScroll, numToScroll) /* -** tuiScrollBackward(). -*/ + ** tuiScrollBackward(). + */ void #ifdef __STDC__ tuiScrollBackward ( @@ -261,11 +261,11 @@ tuiScrollBackward (winToScroll, numToScroll) if (numToScroll == 0) _numToScroll = winToScroll->generic.height - 3; /* - ** If we are scrolling the source or disassembly window, do a - ** "psuedo" scroll since not all of the source is in memory, - ** only what is in the viewport. If winToScroll is the - ** command window do nothing since the term should handle it. - */ + ** If we are scrolling the source or disassembly window, do a + ** "psuedo" scroll since not all of the source is in memory, + ** only what is in the viewport. If winToScroll is the + ** command window do nothing since the term should handle it. + */ if (winToScroll == srcWin) tuiVerticalSourceScroll (BACKWARD_SCROLL, _numToScroll); else if (winToScroll == disassemWin) @@ -278,8 +278,8 @@ tuiScrollBackward (winToScroll, numToScroll) /* -** tuiScrollLeft(). -*/ + ** tuiScrollLeft(). + */ void #ifdef __STDC__ tuiScrollLeft ( @@ -298,11 +298,11 @@ tuiScrollLeft (winToScroll, numToScroll) if (_numToScroll == 0) _numToScroll = 1; /* - ** If we are scrolling the source or disassembly window, do a - ** "psuedo" scroll since not all of the source is in memory, - ** only what is in the viewport. If winToScroll is the - ** command window do nothing since the term should handle it. - */ + ** If we are scrolling the source or disassembly window, do a + ** "psuedo" scroll since not all of the source is in memory, + ** only what is in the viewport. If winToScroll is the + ** command window do nothing since the term should handle it. + */ if (winToScroll == srcWin || winToScroll == disassemWin) tuiHorizontalSourceScroll (winToScroll, LEFT_SCROLL, _numToScroll); } @@ -311,8 +311,8 @@ tuiScrollLeft (winToScroll, numToScroll) /* -** tuiScrollRight(). -*/ + ** tuiScrollRight(). + */ void #ifdef __STDC__ tuiScrollRight ( @@ -331,11 +331,11 @@ tuiScrollRight (winToScroll, numToScroll) if (_numToScroll == 0) _numToScroll = 1; /* - ** If we are scrolling the source or disassembly window, do a - ** "psuedo" scroll since not all of the source is in memory, - ** only what is in the viewport. If winToScroll is the - ** command window do nothing since the term should handle it. - */ + ** If we are scrolling the source or disassembly window, do a + ** "psuedo" scroll since not all of the source is in memory, + ** only what is in the viewport. If winToScroll is the + ** command window do nothing since the term should handle it. + */ if (winToScroll == srcWin || winToScroll == disassemWin) tuiHorizontalSourceScroll (winToScroll, RIGHT_SCROLL, _numToScroll); } @@ -344,9 +344,9 @@ tuiScrollRight (winToScroll, numToScroll) /* -** tui_vScroll(). -** Scroll a window. Arguments are passed through a va_list. -*/ + ** tui_vScroll(). + ** Scroll a window. Arguments are passed through a va_list. + */ void #ifdef __STDC__ tui_vScroll ( @@ -383,8 +383,8 @@ tui_vScroll (args) /* -** tuiRefreshAll(). -*/ + ** tuiRefreshAll(). + */ void #ifdef __STDC__ tuiRefreshAll (void) @@ -427,10 +427,10 @@ tuiRefreshAll () /* -** tuiResizeAll(). -** Resize all the windows based on the the terminal size. This -** function gets called from within the readline sinwinch handler. -*/ + ** tuiResizeAll(). + ** Resize all the windows based on the the terminal size. This + ** function gets called from within the readline sinwinch handler. + */ void #ifdef __STDC__ tuiResizeAll (void) @@ -439,7 +439,7 @@ tuiResizeAll () #endif { int heightDiff, widthDiff; - extern int screenheight, screenwidth; /* in readline */ + extern int screenheight, screenwidth; /* in readline */ widthDiff = screenwidth - termWidth (); heightDiff = screenheight - termHeight (); @@ -571,9 +571,9 @@ tuiResizeAll () break; } /* - ** Now remove all invisible windows, and their content so that they get - ** created again when called for with the new size - */ + ** Now remove all invisible windows, and their content so that they get + ** created again when called for with the new size + */ for (winType = SRC_WIN; (winType < MAX_MAJOR_WINDOWS); winType++) { if (winType != CMD_WIN && m_winPtrNotNull (winList[winType]) && @@ -593,11 +593,11 @@ tuiResizeAll () /* -** tuiSigwinchHandler() -** SIGWINCH signal handler for the tui. This signal handler is -** always called, even when the readline package clears signals -** because it is set as the old_sigwinch() (TUI only) -*/ + ** tuiSigwinchHandler() + ** SIGWINCH signal handler for the tui. This signal handler is + ** always called, even when the readline package clears signals + ** because it is set as the old_sigwinch() (TUI only) + */ void #ifdef __STDC__ tuiSigwinchHandler ( @@ -608,9 +608,9 @@ tuiSigwinchHandler (signal) #endif { /* - ** Say that a resize was done so that the readline can do it - ** later when appropriate. - */ + ** Say that a resize was done so that the readline can do it + ** later when appropriate. + */ tuiSetWinResizedTo (TRUE); return; @@ -624,8 +624,8 @@ tuiSigwinchHandler (signal) /* -** _tuiScrollForward_command(). -*/ + ** _tuiScrollForward_command(). + */ static void #ifdef __STDC__ _tuiScrollForward_command ( @@ -654,8 +654,8 @@ _tuiScrollForward_command (arg, fromTTY) /* -** _tuiScrollBackward_command(). -*/ + ** _tuiScrollBackward_command(). + */ static void #ifdef __STDC__ _tuiScrollBackward_command ( @@ -684,8 +684,8 @@ _tuiScrollBackward_command (arg, fromTTY) /* -** _tuiScrollLeft_command(). -*/ + ** _tuiScrollLeft_command(). + */ static void #ifdef __STDC__ _tuiScrollLeft_command ( @@ -711,8 +711,8 @@ _tuiScrollLeft_command (arg, fromTTY) /* -** _tuiScrollRight_command(). -*/ + ** _tuiScrollRight_command(). + */ static void #ifdef __STDC__ _tuiScrollRight_command ( @@ -738,9 +738,9 @@ _tuiScrollRight_command (arg, fromTTY) /* -** _tuiSetFocus(). -** Set focus to the window named by 'arg' -*/ + ** _tuiSetFocus(). + ** Set focus to the window named by 'arg' + */ static void #ifdef __STDC__ _tuiSetFocus ( @@ -791,8 +791,8 @@ The window name specified must be valid and visible.\n"); /* -** _tui_vSetFocus() -*/ + ** _tui_vSetFocus() + */ static void #ifdef __STDC__ _tui_vSetFocus ( @@ -812,8 +812,8 @@ _tui_vSetFocus (args) /* -** _tuiSetFocus_command() -*/ + ** _tuiSetFocus_command() + */ static void #ifdef __STDC__ _tuiSetFocus_command ( @@ -832,8 +832,8 @@ _tuiSetFocus_command (arg, fromTTY) /* -** _tuiAllWindowsInfo(). -*/ + ** _tuiAllWindowsInfo(). + */ static void #ifdef __STDC__ _tuiAllWindowsInfo ( @@ -866,8 +866,8 @@ _tuiAllWindowsInfo (arg, fromTTY) /* -** _tuiRefreshAll_command(). -*/ + ** _tuiRefreshAll_command(). + */ static void #ifdef __STDC__ _tuiRefreshAll_command ( @@ -884,9 +884,9 @@ _tuiRefreshAll_command (arg, fromTTY) /* -** _tuiSetWinTabWidth_command(). -** Set the height of the specified window. -*/ + ** _tuiSetWinTabWidth_command(). + ** Set the height of the specified window. + */ static void #ifdef __STDC__ _tuiSetTabWidth_command ( @@ -914,9 +914,9 @@ _tuiSetTabWidth_command (arg, fromTTY) /* -** _tuiSetWinHeight(). -** Set the height of the specified window. -*/ + ** _tuiSetWinHeight(). + ** Set the height of the specified window. + */ static void #ifdef __STDC__ _tuiSetWinHeight ( @@ -943,8 +943,8 @@ _tuiSetWinHeight (arg, fromTTY) *bufPtr = (char) 0; /* - ** Validate the window name - */ + ** Validate the window name + */ for (i = 0; i < strlen (wname); i++) wname[i] = toupper (wname[i]); winInfo = partialWinByName (wname); @@ -981,9 +981,9 @@ The window name specified must be valid and visible.\n"); else newHeight = winInfo->generic.height + inputNo; /* - ** Now change the window's height, and adjust all - ** other windows around it - */ + ** Now change the window's height, and adjust all + ** other windows around it + */ if (_tuiAdjustWinHeights (winInfo, newHeight) == TUI_FAILURE) warning ("Invalid window height specified.\n%s", @@ -1011,9 +1011,9 @@ The window name specified must be valid and visible.\n"); /* -** _tui_vSetWinHeight(). -** Set the height of the specified window, with va_list. -*/ + ** _tui_vSetWinHeight(). + ** Set the height of the specified window, with va_list. + */ static void #ifdef __STDC__ _tui_vSetWinHeight ( @@ -1033,9 +1033,9 @@ _tui_vSetWinHeight (args) /* -** _tuiSetWinHeight_command(). -** Set the height of the specified window, with va_list. -*/ + ** _tuiSetWinHeight_command(). + ** Set the height of the specified window, with va_list. + */ static void #ifdef __STDC__ _tuiSetWinHeight_command ( @@ -1054,10 +1054,10 @@ _tuiSetWinHeight_command (arg, fromTTY) /* -** _tuiXDBsetWinHeight(). -** XDB Compatibility command for setting the window height. This will -** increase or decrease the command window by the specified amount. -*/ + ** _tuiXDBsetWinHeight(). + ** XDB Compatibility command for setting the window height. This will + ** increase or decrease the command window by the specified amount. + */ static void #ifdef __STDC__ _tuiXDBsetWinHeight ( @@ -1095,9 +1095,9 @@ _tuiXDBsetWinHeight (arg, fromTTY) /* -** _tui_vXDBsetWinHeight(). -** Set the height of the specified window, with va_list. -*/ + ** _tui_vXDBsetWinHeight(). + ** Set the height of the specified window, with va_list. + */ static void #ifdef __STDC__ _tui_vXDBsetWinHeight ( @@ -1117,9 +1117,9 @@ _tui_vXDBsetWinHeight (args) /* -** _tuiSetWinHeight_command(). -** Set the height of the specified window, with va_list. -*/ + ** _tuiSetWinHeight_command(). + ** Set the height of the specified window, with va_list. + */ static void #ifdef __STDC__ _tuiXDBsetWinHeight_command ( @@ -1138,9 +1138,9 @@ _tuiXDBsetWinHeight_command (arg, fromTTY) /* -** _tuiAdjustWinHeights(). -** Function to adjust all window heights around the primary -*/ + ** _tuiAdjustWinHeights(). + ** Function to adjust all window heights around the primary + */ static TuiStatus #ifdef __STDC__ _tuiAdjustWinHeights ( @@ -1204,9 +1204,9 @@ _tuiAdjustWinHeights (primaryWinInfo, newHeight) } if (primaryWinInfo == cmdWin) { /* - ** Split the change in height accross the 1st & 2nd windows - ** adjusting them as well. - */ + ** Split the change in height accross the 1st & 2nd windows + ** adjusting them as well. + */ int firstSplitDiff = diff / 2; /* subtract the locator */ int secondSplitDiff = firstSplitDiff; @@ -1250,9 +1250,9 @@ _tuiAdjustWinHeights (primaryWinInfo, newHeight) { if ((cmdWin->generic.height + diff) < 1) { /* - ** If there is no way to increase the command window - ** take real estate from the 1st or 2nd window. - */ + ** If there is no way to increase the command window + ** take real estate from the 1st or 2nd window. + */ if ((cmdWin->generic.height + diff) < 1) { int i; @@ -1299,10 +1299,10 @@ _tuiAdjustWinHeights (primaryWinInfo, newHeight) /* -** _makeInvisibleAndSetNewHeight(). -** Function make the target window (and auxillary windows associated -** with the targer) invisible, and set the new height and location. -*/ + ** _makeInvisibleAndSetNewHeight(). + ** Function make the target window (and auxillary windows associated + ** with the targer) invisible, and set the new height and location. + */ static void #ifdef __STDC__ _makeInvisibleAndSetNewHeight ( @@ -1370,11 +1370,11 @@ _makeInvisibleAndSetNewHeight (winInfo, height) /* -** _makeVisibleWithNewHeight(). -** Function to make the windows with new heights visible. -** This means re-creating the windows' content since the window -** had to be destroyed to be made invisible. -*/ + ** _makeVisibleWithNewHeight(). + ** Function to make the windows with new heights visible. + ** This means re-creating the windows' content since the window + ** had to be destroyed to be made invisible. + */ static void #ifdef __STDC__ _makeVisibleWithNewHeight ( @@ -1505,14 +1505,14 @@ _newHeightOk (primaryWinInfo, newHeight) secondWin = (TuiWinInfoPtr) (sourceWindows ())->list[0]; } /* - ** We could simply add all the heights to obtain the same result - ** but below is more explicit since we subtract 1 for the - ** line that the first and second windows share, and add one - ** for the locator. - */ + ** We could simply add all the heights to obtain the same result + ** but below is more explicit since we subtract 1 for the + ** line that the first and second windows share, and add one + ** for the locator. + */ curTotalHeight = (firstWin->generic.height + secondWin->generic.height - 1) - + cmdWin->generic.height + 1 /*locator*/ ; + + cmdWin->generic.height + 1 /*locator */ ; if (primaryWinInfo == cmdWin) { /* locator included since first & second win share a line */ @@ -1531,16 +1531,16 @@ _newHeightOk (primaryWinInfo, newHeight) { minHeight = MIN_WIN_HEIGHT; /* - ** First see if we can increase/decrease the command - ** window. And make sure that the command window is - ** at least 1 line - */ + ** First see if we can increase/decrease the command + ** window. And make sure that the command window is + ** at least 1 line + */ ok = ((cmdWin->generic.height + diff) > 0); if (!ok) { /* - ** Looks like we have to increase/decrease one of - ** the other windows - */ + ** Looks like we have to increase/decrease one of + ** the other windows + */ if (primaryWinInfo == firstWin) ok = (secondWin->generic.height + diff) >= minHeight; else @@ -1559,9 +1559,9 @@ _newHeightOk (primaryWinInfo, newHeight) } } /* - ** Now make sure that the proposed total height doesn't exceed - ** the old total height. - */ + ** Now make sure that the proposed total height doesn't exceed + ** the old total height. + */ if (ok) ok = (newHeight >= minHeight && totalHeight <= curTotalHeight); } @@ -1572,8 +1572,8 @@ _newHeightOk (primaryWinInfo, newHeight) /* -** _parseScrollingArgs(). -*/ + ** _parseScrollingArgs(). + */ static void #ifdef __STDC__ _parseScrollingArgs ( @@ -1592,9 +1592,9 @@ _parseScrollingArgs (arg, winToScroll, numToScroll) *winToScroll = tuiWinWithFocus (); /* - ** First set up the default window to scroll, in case there is no - ** window name arg - */ + ** First set up the default window to scroll, in case there is no + ** window name arg + */ if (arg != (char *) NULL) { char *buf, *bufPtr; diff --git a/gdb/tui/tuiWin.h b/gdb/tui/tuiWin.h index cb8455d..70bf68b 100644 --- a/gdb/tui/tuiWin.h +++ b/gdb/tui/tuiWin.h @@ -1,8 +1,8 @@ #ifndef _TUI_WIN_H #define _TUI_WIN_H /* -** This header file supports -*/ + ** This header file supports + */ /***************************************** ** TYPE DEFINITIONS ** @@ -13,16 +13,17 @@ /***************************************** ** PUBLIC FUNCTION EXTERNAL DECLS ** ******************************************/ -extern void tuiScrollForward PARAMS ((TuiWinInfoPtr, int)); -extern void tuiScrollBackward PARAMS ((TuiWinInfoPtr, int)); -extern void tuiScrollLeft PARAMS ((TuiWinInfoPtr, int)); -extern void tuiScrollRight PARAMS ((TuiWinInfoPtr, int)); -extern void tui_vScroll PARAMS ((va_list)); -extern void tuiSetWinFocusTo PARAMS ((TuiWinInfoPtr)); -extern void tuiClearWinFocusFrom PARAMS ((TuiWinInfoPtr)); -extern void tuiClearWinFocus PARAMS ((void)); -extern void tuiResizeAll PARAMS ((void)); -extern void tuiRefreshAll PARAMS ((void)); -extern void tuiSigwinchHandler PARAMS ((int)); +extern void tuiScrollForward PARAMS ((TuiWinInfoPtr, int)); +extern void tuiScrollBackward PARAMS ((TuiWinInfoPtr, int)); +extern void tuiScrollLeft PARAMS ((TuiWinInfoPtr, int)); +extern void tuiScrollRight PARAMS ((TuiWinInfoPtr, int)); +extern void tui_vScroll PARAMS ((va_list)); +extern void tuiSetWinFocusTo PARAMS ((TuiWinInfoPtr)); +extern void tuiClearWinFocusFrom PARAMS ((TuiWinInfoPtr)); +extern void tuiClearWinFocus PARAMS ((void)); +extern void tuiResizeAll PARAMS ((void)); +extern void tuiRefreshAll PARAMS ((void)); +extern void tuiSigwinchHandler PARAMS ((int)); -#endif /*_TUI_WIN_H*/ +#endif +/*_TUI_WIN_H*/ |