From: Paul K. <pki...@ja...> - 2002-09-20 13:24:54
|
On Fri, Sep 20, 2002 at 02:01:23PM +0200, Quentin Spencer wrote: > Hello All, > > I have written a function that approximates the functionality of the > Matlab waitbar function, which shows a progress bar for lengthy > calculations. I would like to submit it for inclusion in octave-forge, > but first I have a couple of questions. First is licensing--is there a > preferred or required license to use? Scripts must be freely redistributable with modifications. Either GPL, BSD or public domain is fine. For oct-files, the portion which interfaces with octave must be GPL (because the octave support routines are GPL) and the rest must be compatible with the GPL (because they are called by a GPL program). > > My second question has to do with the function itself. It is written in > C, to make it as fast and unobtrusive (CPU-wise) as possible, and has > similar syntax to the Matlab version, but with some differences because > it is text, rather than graphics based. Originally I used a row of ASCII > "#" characters across the terminal (which will look familiar to Linux > users who have used the rpm -ivh command), however I have since modified > the function to use reverse-video spaces using color-changing commands > such as "\033[7m" in the printf command. I like the look of it better, > but this raises the question of whether it will work in all > environments. If this is to be made available to a wide audience, it > needs to work in all possible environments. Are these commands > universally recognized by all terminal programs in use today? Is there a > better way to implement this that uses libraries already linked to by > Octave? Is there a way to detect whether smart terminals are available > at compile time? You might find something in the curses library (man ncurses on my box). You are going to need some configuration information in the form of a configure.add and Makeconf.add. You can model them after the ones in image for detecting the jpeg library. Check for both curses and ncurses, and if neither exist fall back to '#'. Note that octave already checks for these because readline needs them, but readline can also fall back to termio or termios which are no good to you. > > regards, > Quentin Spencer > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Octave-dev mailing list > Oct...@li... > https://lists.sourceforge.net/lists/listinfo/octave-dev |