Re: exu 3, key.ex
- Posted by Chris Burch <chriscrylex at aol.com> Jun 21, 2006
- 597 views
Robert Craig wrote: > > Elliott S. de Andrade wrote: > > Robert Craig wrote: > > > I couldn't figure out how to get the brighter versions > > > of the colors using ANSI codes. Maybe someone has an idea. > > > > Apparently, you need to turn Bold on. > > <a > > href="http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html">http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html</a> > > <a > > href="http://en.wikipedia.org/wiki/ANSI_escape_code#Examples">http://en.wikipedia.org/wiki/ANSI_escape_code#Examples</a> > > That worked. Excellent. Thanks. > The bright colors now appear. > You can download exu pre-alpha-3 for Linux from: > > <a > href="http://www.rapideuphoria.com/uploads/exu">http://www.rapideuphoria.com/uploads/exu</a> > > (I'm still investigating the LINES & COLUMNS environment issue) > > Regards, > Rob Craig > Rapid Deployment Software > <a href="http://www.RapidEuphoria.com">http://www.RapidEuphoria.com</a> Will this help #include <stdio.h> #include <stdlib.h> #include <sys/ioctl.h> #include <unistd.h> struct winsize ws; int main() { char *buffer, *env; int lines; int rows, cols; buffer = getenv("LINES"); if (buffer != NULL ) printf("LINES are %s\n", buffer); //lines = atoi("400"); //printf("Lines number :%d\n", lines); if (ioctl(1, TIOCGWINSZ, &ws) == -1) { rows = 24; cols = 80; } else { if (!ioctl(STDIN_FILENO, TIOCGWINSZ, &ws)) { rows = ws.ws_row; cols = ws.ws_col; if (!rows) { env = getenv("LINES"); if (env) rows = atoi(env); if (!rows) rows = 24; } if (!cols) { env = getenv("COLUMNS"); if (env) cols = atoi(env); if (!cols) cols = 80; } } } if (!rows) { env = getenv("LINES"); if (env) rows = atoi(env); if (!rows) rows = 24; } if (!cols) { env = getenv("COLUMNS"); if (env) cols = atoi(env); if (!cols) cols = 80; } printf("%d %d\n", rows, cols); printf("Program completed successfully\n"); } Note, this was trawled off the net, and involves very little in the way of personal knowledge Chris http://members.aol.com/chriscrylex/euphoria.htm http://uboard.proboards32.com/ http://members.aol.com/chriscrylex/EUSQLite/eusql.html