I use rlwrap often with Rhino. It works O.K.
I think using rlwrap is better than bothering you unessential issue.

Cheers,
- Takashi

Ian Piumarta wrote:
On Jun 27, 2008, at 8:05 PM, Krzysztof Kowalczyk wrote:

fgetln() seems to be *BSD-specific function, not available on Linux.

Sorry, my mistake.  I thought I'd seen it in Linux man pages.

You can re-implement it easily using fgetc() or copy existing
implementation e.g.
http://www.koders.com/c/fid66062EDD2D0F4A1EA102F4C24CEBCCE33E830660.aspx?s=fgetln#L9
I don't see how that one would be any better, since getline() is specific to GNU libc. There is already a replacement fgetln for win32 that only assumes fgetc, so I just renamed it and enabled its use everywhere to remove dependencies on fgetln. HTH.

This whole thing would be moot if built-in command-line editing wasn't so useful. Yoshiki recently pointed me to rlwrap which would certainly simplify the situation, at least for systems that support it. Does anyone have experience with and/or strong opinions about rlwrap?

Cheers,
Ian

On Fri, Jun 27, 2008 at 7:10 PM, Rob Grainger
<[EMAIL PROTECTED]> wrote:
Hi,

I'm trying to get FONC working on a Ubuntu distro (8.04) on a VM.

I've got a long way through the build (many of the posts here have helped),
but it's failing with the following messages eventually (stage 2):

./idc -g -g -k -I../objects main.st readline.o jolt.a -L/usr/local/lib
-lreadline -o main
jolt.a(debug.o): In function `freedlineLoadHistory':
/home/user/trunk/function/objects/freedline.c:573: undefined reference to
`fgetln'
collect2: ld returned 1 exit status

(I must apologise, I'm a relative newcomer to Linux generally, so may have
missed something obvious).

Any suggestions?

Thanks,

Rob Grainger

----- Original Message ----
From: Michael Haupt <[EMAIL PROTECTED]>
To: Fundamentals of New Computing <[email protected]>
Sent: Sunday, 22 June, 2008 1:58:53 PM
Subject: Re: [fonc] 64-bit? was: fonc on ubuntu.

Hi Ian,

Am 21.06.2008 um 20:17 schrieb Ian Piumarta:
Hmm, Mac OS has a /usr/lib/readline that doesn't provide the above
function.  (It looks like a wrapper around the BSD editline
library.)  I removed the call to the above and replaced it with a
home-made almost-equivalent.  (I'll remove the 'almost-' later.)
Hope this helps.

it does, thank you.

So now I can report that "make spotless && make" works fine on Leopard
for revision 469. :-)

Best,

Michael


_______________________________________________
fonc mailing list
[email protected]
http://vpri.org/mailman/listinfo/fonc

Reply via email to