merged in changes to allow native Win32 build with no cygwin DLL dependancy

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@419 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
kiwi64ajs
2004-06-24 11:05:07 +00:00
parent 91d893eb52
commit be4f46c49e
14 changed files with 472 additions and 91 deletions

6
term.c
View File

@@ -28,9 +28,11 @@
#include <limits.h>
#if defined(HAVE_LIBREADLINE)
#if !defined(WIN32NATIVE)
# include <readline/readline.h>
# include <readline/history.h>
#endif
#endif
#include "avr.h"
#include "config.h"
@@ -754,7 +756,7 @@ int do_cmd(PROGRAMMER * pgm, struct avrpart * p, int argc, char * argv[])
char * terminal_get_input(const char *prompt)
{
#if defined(HAVE_LIBREADLINE)
#if defined(HAVE_LIBREADLINE) && !defined(WIN32NATIVE)
char *input;
input = readline(prompt);
if ((input != NULL) && (strlen(input) >= 1))
@@ -767,7 +769,7 @@ char * terminal_get_input(const char *prompt)
if (fgets(input, sizeof(input), stdin))
{
/* FIXME: readline strips the '\n', should this too? */
strdup(input);
return strdup(input);
}
else
return NULL;