*----------------------------------------------------------------------
*/
-void
-Tcl_InitHistory(interp)
- Tcl_Interp *interp; /* Interpreter to initialize. */
+void
+Tcl_InitHistory (
+ Tcl_Interp *interp /* Interpreter to initialize. */
+)
{
register Interp *iPtr = (Interp *) interp;
int i;
iPtr->curEvent = 0;
iPtr->curEventNum = 0;
Tcl_CreateCommand((Tcl_Interp *) iPtr, "history", Tcl_HistoryCmd,
- (ClientData) NULL, (void (*)()) NULL);
+ (ClientData) NULL, (void (*)(int *)) NULL);
}
\f
/*
*----------------------------------------------------------------------
*/
-int
-Tcl_RecordAndEval(interp, cmd, flags)
- Tcl_Interp *interp; /* Token for interpreter in which command
+int
+Tcl_RecordAndEval (
+ Tcl_Interp *interp, /* Token for interpreter in which command
* will be executed. */
- char *cmd; /* Command to record. */
- int flags; /* Additional flags to pass to Tcl_Eval.
+ char *cmd, /* Command to record. */
+ int flags /* Additional flags to pass to Tcl_Eval.
* TCL_NO_EVAL means only record: don't
* execute command. */
+)
{
register Interp *iPtr = (Interp *) interp;
register HistoryEvent *eventPtr;
/* ARGSUSED */
int
-Tcl_HistoryCmd(dummy, interp, argc, argv)
- ClientData dummy; /* Not used. */
- Tcl_Interp *interp; /* Current interpreter. */
- int argc; /* Number of arguments. */
- char **argv; /* Argument strings. */
+Tcl_HistoryCmd(
+ ClientData dummy, /* Not used. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int argc, /* Number of arguments. */
+ char **argv /* Argument strings. */
+)
{
register Interp *iPtr = (Interp *) interp;
register HistoryEvent *eventPtr;
*----------------------------------------------------------------------
*/
-static void
-MakeSpace(hPtr, size)
- HistoryEvent *hPtr;
- int size; /* # of bytes needed in hPtr. */
+static void
+MakeSpace (
+ HistoryEvent *hPtr,
+ int size /* # of bytes needed in hPtr. */
+)
{
if (hPtr->bytesAvl < size) {
ckfree(hPtr->command);
*----------------------------------------------------------------------
*/
-static void
-InsertRev(iPtr, revPtr)
- Interp *iPtr; /* Interpreter to use. */
- register HistoryRev *revPtr; /* Revision to add to iPtr's list. */
+static void
+InsertRev (
+ Interp *iPtr, /* Interpreter to use. */
+ register HistoryRev *revPtr /* Revision to add to iPtr's list. */
+)
{
register HistoryRev *curPtr;
register HistoryRev *prevPtr;
*----------------------------------------------------------------------
*/
-static void
-RevCommand(iPtr, string)
- register Interp *iPtr; /* Interpreter in which to perform the
+static void
+RevCommand (
+ register Interp *iPtr, /* Interpreter in which to perform the
* substitution. */
- char *string; /* String to substitute. */
+ char *string /* String to substitute. */
+)
{
register HistoryRev *revPtr;
*----------------------------------------------------------------------
*/
-static void
-RevResult(iPtr, string)
- register Interp *iPtr; /* Interpreter in which to perform the
+static void
+RevResult (
+ register Interp *iPtr, /* Interpreter in which to perform the
* substitution. */
- char *string; /* String to substitute. */
+ char *string /* String to substitute. */
+)
{
register HistoryRev *revPtr;
char *evalFirst, *evalLast;
*----------------------------------------------------------------------
*/
-static void
-DoRevs(iPtr)
- register Interp *iPtr; /* Interpreter whose history is to
+static void
+DoRevs (
+ register Interp *iPtr /* Interpreter whose history is to
* be modified. */
+)
{
register HistoryRev *revPtr;
register HistoryEvent *eventPtr;
*/
static HistoryEvent *
-GetEvent(iPtr, string)
- register Interp *iPtr; /* Interpreter in which to look. */
- char *string; /* Description of event. */
+GetEvent (
+ register Interp *iPtr, /* Interpreter in which to look. */
+ char *string /* Description of event. */
+)
{
int eventNum, index;
register HistoryEvent *eventPtr;
*----------------------------------------------------------------------
*/
-static int
-SubsAndEval(iPtr, cmd, old, new)
- register Interp *iPtr; /* Interpreter in which to execute
+static int
+SubsAndEval (
+ register Interp *iPtr, /* Interpreter in which to execute
* new command. */
- char *cmd; /* Command in which to substitute. */
- char *old; /* String to search for in command. */
- char *new; /* Replacement string for "old". */
+ char *cmd, /* Command in which to substitute. */
+ char *old, /* String to search for in command. */
+ char *new /* Replacement string for "old". */
+)
{
char *src, *dst, *newCmd;
int count, oldLength, newLength, length, result;
*/
static char *
-GetWords(iPtr, command, words)
- register Interp *iPtr; /* Tcl interpreter in which to place
+GetWords (
+ register Interp *iPtr, /* Tcl interpreter in which to place
* an error message if needed. */
- char *command; /* Command string. */
- char *words; /* Description of which words to extract
+ char *command, /* Command string. */
+ char *words /* Description of which words to extract
* from the command. Either num[-num] or
* a pattern. */
+)
{
char *result;
char *start, *end, *dst;