Index: trunk/FACT++/src/Readline.cc
===================================================================
--- trunk/FACT++/src/Readline.cc	(revision 12960)
+++ trunk/FACT++/src/Readline.cc	(revision 12961)
@@ -96,5 +96,5 @@
 //
 Readline::Readline(const char *prgname) :
-    fMaxLines(500), fLine(0), fCompletion(0)
+    fMaxLines(500), fLine(0), fLabel(-1), fCompletion(0)
 {
     if (This)
@@ -952,4 +952,7 @@
     fprintf(rl_outstream, "   .w n         Sleep n milliseconds\n");
     fprintf(rl_outstream, "   .x filename  Execute a script of commands\n");
+    fprintf(rl_outstream, "   .x file:N    Execute a script of commands, start at label N\n");
+    fprintf(rl_outstream, "   .j N         Forward jump to label N\n");
+    fprintf(rl_outstream, "   : N          Defines a label\n");
     fprintf(rl_outstream, "   .q,quit      Quit\n");
     fprintf(rl_outstream, "\n");
@@ -994,6 +997,41 @@
 //!
 //
+bool Readline::PreProcess(const string &str)
+{
+    // ----------- Labels -------------
+
+    if (str[0]==':')
+    {
+        if (fLabel!=atoi(str.substr(1).c_str()))
+            return true;
+
+        fLabel=-1;
+        return false;
+    }
+
+    if (fLabel>=0)
+    {
+        fCommandLog << "# SKIP[" << fLabel << "]: " << str << endl;
+        return true;
+    }
+
+    if (str.substr(0, 3)==".j ")
+    {
+        fLabel = atoi(str.substr(3).c_str());
+        return false;
+    }
+
+    return Process(str);
+
+}
+
+// --------------------------------------------------------------------------
+//
+//!
+//
 bool Readline::Process(const string &str)
 {
+    // ----------- Common commands -------------
+
     if (str.substr(0, 3)==".w ")
     {
@@ -1116,5 +1154,5 @@
 void Readline::ProcessLine(const string &str)
 {
-    const bool rc = Process(str);
+    const bool rc = PreProcess(str);
 
     AddToHistory(str);
@@ -1186,7 +1224,14 @@
         return 0;
 
-    int rc = 0;
-
-    const string name = Tools::Trim(fname);
+    fLabel = -1;
+
+    string name = Tools::Trim(fname);
+
+    const size_t p = name.find_last_of(':');
+    if (p!=string::npos)
+    {
+        fLabel = atoi(name.substr(p+1).c_str());
+        name = name.substr(0, p);
+    }
 
     ifstream fin(name.c_str());
@@ -1194,5 +1239,10 @@
         return -1;
 
-    fCommandLog << "# " << Time() << " - " << name << " (START)" << endl;
+    fCommandLog << "# " << Time() << " - " << name << " (START";
+    if (fLabel>=0)
+        fCommandLog << ':' << fLabel;
+    fCommandLog << ")" << endl;
+
+    int rc = 0;
 
     string buffer;
@@ -1214,4 +1264,6 @@
     }
 
+    fLabel = -1;
+
     fCommandLog << "# " << Time() << " - " << name << " (FINISHED)" << endl;
 
Index: trunk/FACT++/src/Readline.h
===================================================================
--- trunk/FACT++/src/Readline.h	(revision 12960)
+++ trunk/FACT++/src/Readline.h	(revision 12961)
@@ -26,4 +26,5 @@
 
     int fLine;
+    int fLabel;
 
     // Static member function which are used to adapt readline to ncurses
@@ -54,4 +55,6 @@
     void SetCompletion(const std::vector<std::string> *v) { fCompletion = v; }
     char **Complete(const std::vector<std::string> &v, const char *text);
+
+    void SetLabel(int l) { fLabel = l; }
 
 public:
@@ -84,4 +87,5 @@
     void UpdatePrompt() const { UpdatePrompt(GetUpdatePrompt()); }
 
+    virtual bool PreProcess(const std::string &str);
     virtual bool Process(const std::string &str);
     virtual std::string GetUpdatePrompt() const { return ""; }
