summaryrefslogtreecommitdiffstats
path: root/libopkg/user.c
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-14 23:53:45 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-14 23:53:45 (EST)
commit08a92571872aaa6d4cb8d43c6170c358f8ef0d94 (patch)
treee9a41af0904d1c8d9d35003e5bc9f088622a8133 /libopkg/user.c
parent77bfb4c70257f7c85ace0e5ee975e4321fdd667a (diff)
opkg: remove redundant OPKG_LIB conditional code
git-svn-id: http://opkg.googlecode.com/svn/trunk@49 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/user.c')
-rw-r--r--libopkg/user.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/libopkg/user.c b/libopkg/user.c
index 98ab7b9..557f7ce 100644
--- a/libopkg/user.c
+++ b/libopkg/user.c
@@ -20,15 +20,12 @@
#include <stdarg.h>
#include "file_util.h"
#include "str_util.h"
-#ifdef OPKG_LIB
#include "libopkg.h"
-#endif
-#ifdef OPKG_LIB
static char *question = NULL;
static int question_len = 255;
-#endif
+
char *get_user_response(const char *format, ...)
{
int len = question_len;
@@ -36,12 +33,6 @@ char *get_user_response(const char *format, ...)
char *response;
va_start(ap, format);
-#ifndef OPKG_LIB
- vprintf(format, ap);
- do {
- response = file_read_line_alloc(stdin);
- } while (response == NULL);
-#else
do {
if (question == NULL || len > question_len) {
question = realloc(question, len + 1);
@@ -50,7 +41,6 @@ char *get_user_response(const char *format, ...)
len = vsnprintf(question,question_len,format,ap);
} while (len > question_len);
response = strdup(opkg_cb_response(question));
-#endif
str_chomp(response);
str_tolower(response);