mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-15 02:01:07 +00:00
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:
6
term.c
6
term.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user