08eb2a6b04
OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive?expand=0&rev=122
22 lines
507 B
Plaintext
22 lines
507 B
Plaintext
--- utils/asymptote/interact.cc
|
|
+++ utils/asymptote/interact.cc 2013-05-03 10:25:51.255472000 +0000
|
|
@@ -85,14 +85,10 @@ FILE *fin=NULL;
|
|
|
|
char *readpipeline(const char *prompt)
|
|
{
|
|
- const int max_size=256;
|
|
- static char buf[max_size];
|
|
- ostringstream s;
|
|
- do {
|
|
- if(fgets(buf,max_size-1,fin) == NULL) break;
|
|
- s << buf;
|
|
- } while(buf[strlen(buf)-1] != '\n');
|
|
- return StrdupMalloc(s.str());
|
|
+ char *line=NULL;
|
|
+ size_t n;
|
|
+ getline(&line,&n,fin);
|
|
+ return line;
|
|
}
|
|
|
|
void pre_readline()
|