[rkward-cvs] rkward/rkward/rbackend rthread.cpp,1.41,1.42
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Mon Sep 11 09:52:42 UTC 2006
Update of /cvsroot/rkward/rkward/rkward/rbackend
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22455/rbackend
Modified Files:
rthread.cpp
Log Message:
Initialize command history position correctly
Do not add empty lines to history
Keep a temporary copy of the already edited line when going up in the command list
Index: rthread.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rbackend/rthread.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** rthread.cpp 10 Sep 2006 23:01:07 -0000 1.41
--- rthread.cpp 11 Sep 2006 09:52:40 -0000 1.42
***************
*** 162,180 ****
MUTEX_LOCK;
if (error != NoError) {
command->status |= RCommand::WasTried | RCommand::Failed;
if (error == Incomplete) {
command->status |= RCommand::ErrorIncomplete;
! RK_DO (qDebug ("Command failed (incomplete)"), RBACKEND, DL_WARNING);
} else if (error == SyntaxError) {
command->status |= RCommand::ErrorSyntax;
! RK_DO (qDebug ("Command failed (syntax)"), RBACKEND, DL_WARNING);
} else if (command->status & RCommand::Canceled) {
! RK_DO (qDebug ("Command failed (interrupted)"), RBACKEND, DL_WARNING);
} else {
command->status |= RCommand::ErrorOther;
! RK_DO (qDebug ("Command failed (other)"), RBACKEND, DL_WARNING);
}
! RK_DO (qDebug ("failed command was: '%s'", command->command ().latin1 ()), RBACKEND, DL_INFO);
} else {
command->status |= RCommand::WasTried;
--- 162,187 ----
MUTEX_LOCK;
+ #ifdef RKWARD_DEBUG
+ int dl = DL_WARNING; // failed application commands are an issue worth reporting, failed user commands are not
+ if (command->type () | RCommand::User) dl = DL_DEBUG;
+ #endif
if (error != NoError) {
command->status |= RCommand::WasTried | RCommand::Failed;
if (error == Incomplete) {
command->status |= RCommand::ErrorIncomplete;
! RK_DO (qDebug ("Command failed (incomplete)"), RBACKEND, dl);
} else if (error == SyntaxError) {
command->status |= RCommand::ErrorSyntax;
! RK_DO (qDebug ("Command failed (syntax)"), RBACKEND, dl);
} else if (command->status & RCommand::Canceled) {
! RK_DO (qDebug ("Command failed (interrupted)"), RBACKEND, dl);
} else {
command->status |= RCommand::ErrorOther;
! #ifdef RKWARD_DEBUG
! dl = DL_WARNING; // always interested in strange errors
! #endif
! RK_DO (qDebug ("Command failed (other)"), RBACKEND, dl);
}
! RK_DO (qDebug ("failed command was: '%s'", command->command ().latin1 ()), RBACKEND, dl);
} else {
command->status |= RCommand::WasTried;
***************
*** 187,191 ****
if (error) {
! RK_DO (qDebug ("- error message was: '%s'", command->error ().latin1 ()), RBACKEND, DL_WARNING);
// runCommandInternal (".rk.init.handlers ()\n", &dummy);
}
--- 194,198 ----
if (error) {
! RK_DO (qDebug ("- error message was: '%s'", command->error ().latin1 ()), RBACKEND, dl);
// runCommandInternal (".rk.init.handlers ()\n", &dummy);
}
More information about the rkward-tracker
mailing list