Page 1 of 1
Porting Unix programs with C68
Posted: Sun May 25, 2014 5:19 am
by swensont
I'm very rusty with C and have little experiece with C programs in the Unix environment. I have an old Unix program circa 1988 that uses termcap for screen handling. Does C68 have a library for termcap? The output is all ascii, so I could convert the termcap calls to something more QDOS-like, but I was wondering it if was possible to port with little changes.
Re: Porting Unix programs with C68
Posted: Sun May 25, 2014 11:30 am
by tofro
Tim,
C68 is very well set to port (older) UNIX applications to QDOS - Much better than, for example Metacomco C. Most of (older, non-graphics) Unix application will just require make and you're done.
And it does, in fact have curses/termcap support (although not for a lot of particularly complicated functions, rather bare-bone vt52, but that''s enough for most UNIX apps.)
Make sure you download and install the curses companion disk for C68, though.
Tobias
Re: Porting Unix programs with C68
Posted: Sun May 25, 2014 8:20 pm
by prime
Now what I'd like to see ported is Joe, it would be nice to have a proper text editor that uses the Wordstar keys
Cheers.
Phill.
Re: Porting Unix programs with C68
Posted: Fri Jul 04, 2014 1:04 pm
by Derek_Stewart
Hi,
I have looking at some Linux source code, Joe is amonst them, which should be able to be ported.
I have been looking at some Turbo C source code from DOS. Which uses conio.h, graphics.h incluxe ciles, which not ANSI C standard.
Does anyone have any experience of porting msdos/turbo c source code?
Re: Porting Unix programs with C68
Posted: Sat Jul 05, 2014 6:37 am
by tofro
Derek,
depending on the features used from conio - This might be a major exercise.
DOS programs typically were very hardware-dependant, with direct access to screen memory, or using ANSI VT52 escape codes directly - If this is the case, the program would need to be re-written to use QDOS functions instead (Which is kind of daunting with the direct screen access on the PC, considering that you're poking characters in a text oriented screen memory in DOS which will not work on the QL)
In a nutshell: Your mileage may vary.
Regards,
Tobias