Do not try to launch dotty when debugging

This commit is contained in:
Olivier Teulière 2012-05-16 20:49:00 +02:00
parent 418bf51781
commit 50998079c2
3 changed files with 1 additions and 50 deletions

View file

@ -86,7 +86,7 @@ dnl --------------------------------------------------------------
dnl Checks for header files.
dnl --------------------------------------------------------------
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h unistd.h sys/wait.h sys/stats.h sys/types.h)
AC_CHECK_HEADERS(fcntl.h unistd.h sys/stats.h sys/types.h)
AC_CHECK_HEADERS(arpa/inet.h netinet/in.h)
AC_CHECK_HEADERS([readline/readline.h], [has_readline=1], [has_readline=0])
AM_CONDITIONAL(HAS_READLINE, test "$has_readline" = "1")

View file

@ -26,10 +26,6 @@
#include <sstream>
#include <cstring>
#include <cstdio>
#include <sys/types.h>
#ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif
#include "dic.h"
#include "regexp.h"
@ -244,20 +240,6 @@ void Automaton::dump(const string &iFileName) const
fprintf(f, "fontsize=20;\n");
fprintf(f, "}\n");
fclose(f);
#ifdef HAVE_SYS_WAIT_H
pid_t pid = fork ();
if (pid > 0)
{
wait(NULL);
}
else if (pid == 0)
{
execlp("dotty", "dotty", iFileName.c_str(), NULL);
printf("exec dotty failed\n");
exit(1);
}
#endif
}
@ -560,20 +542,6 @@ void AutomatonHelper::dump(const string &iFileName) const
fprintf(f, "fontsize=20;\n");
fprintf(f, "}\n");
fclose(f);
#ifdef HAVE_SYS_WAIT_H
pid_t pid = fork();
if (pid > 0)
{
wait(NULL);
}
else if (pid == 0)
{
execlp("dotty", "dotty", iFileName.c_str(), NULL);
printf("exec dotty failed\n");
exit(1);
}
#endif
}
#endif

View file

@ -25,9 +25,6 @@
#include <cstdio>
#include <cstdlib>
#include <cstring>
#ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif
#include <unistd.h>
#include "dic.h"
@ -264,20 +261,6 @@ void Node::printTreeDot(const string &iFileName, int detail) const
fprintf(f, "fontsize=20;\n");
fprintf(f, "}\n");
fclose(f);
#ifdef HAVE_SYS_WAIT_H
pid_t pid = fork();
if (pid > 0)
{
wait(NULL);
}
else if (pid == 0)
{
execlp("dotty", "dotty", iFileName.c_str(), NULL);
printf("exec dotty failed\n");
exit(1);
}
#endif
}
#endif