Task #153 has been updated.
Project: LrdeTools
Subproject: prcs2svn
Summary: oln conversion
Complete: 80%
Status: Open
Description: Fix bugs in prcs2svn to allow the oln conversion. Usually they are due to an inconsistent order of prcs2svn to do successive merge and normal operations.
Follow-Ups:
-------------------------------------------------------
Date: 19/07/2004 13:32
By: odou_s
Comment:
In features.11, oln/oln/basics_graph.hh must be renamed to olena/oln/basics_graph.hh before the merge with 8.24.
Now reaches 8.40.
-------------------------------------------------------
Date: 12/07/2004 17:32
By: odou_s
Comment:
reaches PRCS revision 8.11. Stops in features.11.
-------------------------------------------------------
For more info, visit:
http://gforge.lrde.epita.fr/pm/task.php?func=detailtask&project_task_id=153…
Index: ChangeLog
from Benoît Perrot <benoit(a)lrde.epita.fr>
* src/shell/shell.cc: Move readline wrapper to...
* src/misc/readline.hh: This file.
* src/misc/Makefile.am: Distribute readline.hh
Index: src/shell/shell.cc
--- src/shell/shell.cc (revision 116)
+++ src/shell/shell.cc (working copy)
@@ -17,54 +17,14 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-#include "config.h"
+#include "misc/readline.hh"
#include "shell/shell.hh"
#include "shell/cmd.hh"
-#ifdef HAVE_READLINE_READLINE_H
-# include <readline/readline.h>
-// #ifdef HAVE_READLINE_HISTORY_H
-# include <readline/history.h>
-// #endif HAVE_READLINE_HISTORY_H
-#endif // HAVE_READLINE_READLINE_H
-
namespace shell
{
- static bool readline(const std::string &prompt, std::string &line);
-
- // Get a line from the user, returning false on EOF
- static
- bool
- readline(const std::string &prompt, std::string &line)
- {
-#ifdef HAVE_READLINE_READLINE_H
- char *str = ::readline(prompt.c_str());
-
- if (!str)
- return false;
-
-// #ifdef HAVE_READLINE_HISTORY_H
- // If the line has any text in it, save it on the history.
- if (*str)
- add_history(str);
-// #endif // HAVE_READLINE_HISTORY_H
-
- line = str;
- free(str);
-
- return true;
-
-#else // !HAVE_READLINE_READLINE_H
- std::cout << prompt;
- getline(std::cin, line);
- return !std::cin.eof();
-
-#endif // HAVE_READLINE_READLINE_H
- }
-
-
// --------------------------------------------------------------------------
// Shell
// --------------------------------------------------------------------------
@@ -138,7 +98,7 @@
Cmd *command = new Cmd(Cmd::cmd_null, *this);
std::string line;
- while ((command->execute() == 0) && shell::readline("(nolimips) ", line))
+ while ((command->execute() == 0) && misc::readline("(nolimips) ", line))
{
display();
Index: src/misc/readline.hh
--- src/misc/readline.hh (revision 0)
+++ src/misc/readline.hh (revision 0)
@@ -0,0 +1,63 @@
+//
+// This file is part of Nolimips, a MIPS simulator with unlimited registers
+// Copyright (C) 2004 Benoit Perrot <benoit(a)lrde.epita.fr>
+//
+// Nolimips is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// Nolimips is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+
+#include "config.h"
+
+#ifdef HAVE_READLINE_READLINE_H
+# include <readline/readline.h>
+// #ifdef HAVE_READLINE_HISTORY_H
+# include <readline/history.h>
+// #endif HAVE_READLINE_HISTORY_H
+#endif // HAVE_READLINE_READLINE_H
+
+#include <string>
+#include <iostream>
+
+namespace misc
+{
+
+ /// Get a line from the user, returning false on EOF
+ inline bool
+ readline(const std::string &prompt, std::string &line)
+ {
+#ifdef HAVE_READLINE_READLINE_H
+ char *str = ::readline(prompt.c_str());
+
+ if (!str)
+ return false;
+
+ // #ifdef HAVE_READLINE_HISTORY_H
+ // If the line has any text in it, save it on the history.
+ if (*str)
+ add_history(str);
+ // #endif // HAVE_READLINE_HISTORY_H
+
+ line = str;
+ free(str);
+
+ return true;
+
+#else // !HAVE_READLINE_READLINE_H
+ std::cout << prompt;
+ getline(std::cin, line);
+ return !std::cin.eof();
+#endif // HAVE_READLINE_READLINE_H
+ }
+
+} // namespace misc
Index: src/misc/Makefile.am
--- src/misc/Makefile.am (revision 109)
+++ src/misc/Makefile.am (working copy)
@@ -6,4 +6,5 @@
escape.hh \
has.hh \
counted_ptr.hh \
- select_const.hh
+ select_const.hh \
+ readline.hh
The original message was received at Fri, 16 Jul 2004 10:13:18 -0400 (EDT)
from ZO113240.ppp.dion.ne.jp [222.11.113.240]
----- The following addresses had permanent fatal errors -----
<sugarman(a)roadrunner.com>
(reason: 550 Invalid recipient: <sugarman(a)roadrunner.com>)
----- Transcript of session follows -----
... while talking to fep.biz.rr.com.:
>>> DATA
<<< 550 Invalid recipient: <sugarman(a)roadrunner.com>
550 5.1.1 <sugarman(a)roadrunner.com>... User unknown
<<< 503 No recipients specified