--- gnuplot-4.0.0.orig/src/term.c +++ gnuplot-4.0.0/src/term.c @@ -1278,6 +1278,33 @@ return (t); } +#ifdef X11 +int +x11driver_found() +{ + char *binname = "/gnuplot_x11"; + char *fullname; + struct stat buf; + + fullname = (char*)malloc(sizeof(X11_DRIVER_DIR) + sizeof(binname) + 1); + strcat(fullname, X11_DRIVER_DIR); + strcat(fullname, binname); + + /* exists? */ + if (stat(fullname, &buf)) { + free(fullname); + return 0; + } + + free(fullname); + /* executable? */ + if (buf.st_mode && S_IXOTH) + return 1; + + return 0; +} +#endif + /* * Routine to detect what terminal is being used (or do anything else * that would be nice). One anticipated (or allowed for) side effect @@ -1356,12 +1383,18 @@ env_term = getenv("TERM"); /* try $TERM */ if (term_name == (char *) NULL && env_term != (char *) NULL && strcmp(env_term, "xterm") == 0) - term_name = "x11"; + term_name = "x11"; display = getenv("DISPLAY"); if (term_name == (char *) NULL && display != (char *) NULL) - term_name = "x11"; + term_name = "x11"; if (X11_Display) - term_name = "x11"; + term_name = "x11"; + /* if x11 was selected check for driver */ + if (term_name && (strcmp(term_name, "x11") == 0) && !x11driver_found() && isatty(fileno(stdin))) { + printf("*** X11 output driver not found, switching to dumb terminal!\n"); + printf("*** If you want to use the X11 output, please install the ""gnuplot-x11"" package\n"); + term_name = "dumb"; + }; #endif /* x11 */ #ifdef AMIGA e.git/tree/packages/openzaurus?id=4b11fd6647232e69daf1a351cfe5d74c3d4ae506'>treecommitdiff
path: root/packages/openzaurus
left'>Author
AgeCommit message (Expand)AuthorFiles
Files
2006-12-31remove extra whitespace at end-of-line in about 900 bb files.Rolf Leggewie2
2006-10-10Remove MAINTAINER fields from recipes, add MAINTAINER file to replace them.Koen Kooi1
2006-08-05packages: sed -i s/^"include "/"require "/ */*.bb GNU sed rocks!Holger Freyther2
2006-07-02Opie: Rename Opie 1.2.1 to 1.2.2, Remove PRsHolger Freyther1
2006-01-12Correct Opie PV format to preserve upgradability of packages but note where c...Richard Purdie1
2006-01-07Convert CVSDATE -> SRCDATE. Also standardise cvs and svn PVs to x.x.x+cvsYYYY...Richard Purdie1
2005-09-12Opie 1.2.1:Holger Freyther2
2005-06-30import clean BK tree at cset 1.3670Koen Kooi3
2005-03-26Merge nslu2-linux@nslu2-linux.bkbits.net:openembeddedg2@giantshoulder.com4
2005-02-03upgrade PV for opie_cvs packagesMichael Lauer1
2005-02-02opie files: remove tag line (now in opie.bbclass) and reset PRMichael Lauer1
2005-02-02compute TAG line in opie.bbclass instead of in (all) opie filesMichael Lauer1
2005-02-02Merge bk://oe-devel@oe-devel.bkbits.net/openembeddedMichael Lauer2