mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
restructing...automake now used sql stuff working
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <readline.h>
|
||||
#ifdef HAVE_READLINE
|
||||
#include <readline/readline.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include "mdbsql.h"
|
||||
|
||||
@@ -7,6 +9,30 @@ extern MdbSQL *g_sql;
|
||||
|
||||
char *g_input_ptr;
|
||||
|
||||
#ifndef HAVE_READLINE
|
||||
char *readline(char *prompt)
|
||||
{
|
||||
char *buf, line[1000];
|
||||
int i = 0;
|
||||
|
||||
printf("%s",prompt);
|
||||
fgets(line,1000,stdin);
|
||||
for (i=strlen(line);i>0;i--) {
|
||||
if (line[i]=='\n') {
|
||||
line[i]='\0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
buf = (char *) malloc(strlen(line)+1);
|
||||
strcpy(buf,line);
|
||||
|
||||
return buf;
|
||||
}
|
||||
add_history(char *s)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
int mdb_sql_yyinput(char *buf, int need)
|
||||
{
|
||||
int cplen, have;
|
||||
|
||||
Reference in New Issue
Block a user