From 16baacb54f788d5fe20658960cf696993e6b9d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20B=C3=BCrgmann?= Date: Mon, 18 Feb 2002 00:00:00 +0000 Subject: [PATCH 1/6] bvi-1.3.1.src.tar.gz --- CHANGES | 16 + CREDITS | 4 + README | 19 +- bm_dos.c | 8 +- bm_unix.c | 59 +- bmore.1 | 2 +- bmore.c | 95 +- bmore.h | 24 +- bmore.man | 2 +- bvi.1 | 6 +- bvi.c | 47 +- bvi.h | 15 +- bvi.man | 6 +- comm.c | 10 +- config.guess | 879 +++++-- config.h.in | 6 +- config.sub | 565 ++++- configure | 4891 ++++++++++++++++++++++++++++---------- configure.in | 17 +- edit.c | 11 +- html/bmore.html | 36 +- html/bmore_cmd.html | 6 +- html/bmore_opt.html | 6 +- html/download.html | 63 +- html/german.html | 6 +- html/gif/.xvpics/bg2.gif | 5 + html/gif/bg2.gif | Bin 86 -> 91 bytes html/index.html | 41 +- html/install.html | 60 +- html/new120.html | 17 +- html/new130.html | 7 +- html/new131.html | 96 + html/overview.html | 6 +- html/qt_bit.html | 2 +- html/qt_edit.html | 6 +- html/qt_find.html | 6 +- html/qt_partial.html | 6 +- html/qt_search.html | 6 +- html/qt_set.html | 6 +- html/qt_yank.html | 6 +- html/quick.html | 6 +- html/sitemap.html | 11 +- install-sh | 57 +- mkinstalldirs | 38 +- patchlevel.h | 2 +- set.c | 7 +- 46 files changed, 5276 insertions(+), 1914 deletions(-) mode change 100755 => 100644 config.guess mode change 100755 => 100644 config.sub create mode 100644 html/gif/.xvpics/bg2.gif create mode 100644 html/new131.html diff --git a/CHANGES b/CHANGES index 707bee1..942a16d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,19 @@ +New in release 1.3.1 +==================== + +* autoconf 2.52 +* do_back() fix +* replace sys_errlist[errno] with strerror(errno) (Debian #106762) +* deleting bytes in empty file fixed (Debian #121934) +* no ":set mm" for x at eof (Debian #122240) +* cast for alloc_buf() in set.c +* r-bug fix in edit.c and bvi.c +* renamed CTRL to BVICTRL (AIX problem) +* bmore: nicer last line +* bmore: bmbeep() instead of beep() +* bmore: subshell support fixes + + New in release 1.3.0 ==================== diff --git a/CREDITS b/CREDITS index 011a17d..92b05d1 100644 --- a/CREDITS +++ b/CREDITS @@ -6,6 +6,10 @@ Peter J. Holzer setlocale Albert Chin-A-Young Makefile.in Ralf AIX fixes Claudio Nieder Makefile +Nico Schmidt r-bug fix +Steve Waltner Mac OS X support +Andre Wobst AIX fixes +SimoN bmore: subshell support fixes Packages: Christian "naddy" Weisgerber Source RPM diff --git a/README b/README index f15c975..67bc989 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ BVI - Binary visual editor ========================== -http://bvi.linuxave.net/ +http://bvi.sourceforge.net/ This editor for binary files was written by Gerhard Buergmann and is distributed under the GPL (GNU Public License). @@ -9,17 +9,26 @@ and is distributed under the GPL (GNU Public License). How to compile ============== - gunzip -c bvi-1.3.0.tar.gz | tar xvf - - cd bvi-1.3.0 + gunzip -c bvi-1.3.1.tar.gz | tar xvf - + cd bvi-1.3.1 ./configure make make install + +MAC OS X +======== +Looks like the curses implementation in Darwin is really limited. +You should install and use ncurses instead. You can download it from +ftp.gnu.org; install it and then use + ./configure --with-ncurses=/usr/local/ncurses-5.2 + + HTML documentation in subdirectory html/ Subscribe to the bvi mailing for support, updates and other news: - Send a blank email to bvi-subscribe@eGroups.com. You will receive a + Send a blank email to bvi-subscribe@yahoogroups.com. You will receive a subscription confirmation message. Simply reply this message and your subscription will be complete. @@ -30,6 +39,6 @@ comments, questions, etc. (even flames) to: Gerhard Buergmann Vienna, Austria -E-mail: Gerhard.Buergmann@altavista.net +E-mail: Gerhard.Buergmann@utanet.at diff --git a/bm_dos.c b/bm_dos.c index 8a4d61c..45d7f83 100755 --- a/bm_dos.c +++ b/bm_dos.c @@ -2,6 +2,7 @@ * * 2000-05-10 V 1.3.0 alpha * 2000-07-07 V 1.3.0 final + * 2001-12-07 V 1.3.1 * * NOTE: Edit this file with tabstop=4 ! * @@ -117,10 +118,3 @@ cleareol() } -void -beep(void) -{ - putchar(7); -} - - diff --git a/bm_unix.c b/bm_unix.c index dd63f31..b97b82d 100644 --- a/bm_unix.c +++ b/bm_unix.c @@ -2,10 +2,11 @@ * * 2000-05-31 V 1.3.0 beta * 2000-10-12 V 1.3.0 final + * 2002-02-10 V 1.3.1 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2000 by Gerhard Buergmann + * Copyright 1996-2002 by Gerhard Buergmann * Gerhard.Buergmann@altavista.net * * This program is free software; you can redistribute it and/or modify it @@ -32,10 +33,10 @@ struct termios ostate, nstate; -char *rev_start, *rev_end;/* enter and exit standout mode */ -char *Home; /* go to home */ -char *clear_sc; /* clear screen */ -char *erase_ln; /* erase line */ +char *rev_start, *rev_end; /* enter and exit standout mode */ +char *Home; /* go to home */ +char *clear_sc; /* clear screen */ +char *erase_ln; /* erase line */ extern off_t bytepos, screen_home; extern FILE *curr_file; @@ -44,7 +45,9 @@ int got_int; int fnum, no_intty, no_tty, slow_tty; int dum_opt, dlines; - +#ifdef HAVE_NCURSES_H +# undef NEED_PUTC_CHAR +#endif /* * A real function, for the tputs routine */ @@ -75,11 +78,13 @@ initterm() struct termios nstate; no_tty = tcgetattr(fileno(stdout), &ostate); - nstate = ostate; - nstate.c_lflag &= ~(ICANON|ECHO|ECHOE|ECHOK|ECHONL); - nstate.c_cc[VMIN] = 1; - nstate.c_cc[VTIME] = 0; - tcsetattr(fileno(stdin), TCSADRAIN, &nstate); + if (!no_tty) { + nstate = ostate; + nstate.c_lflag &= ~(ICANON|ECHO|ECHOE|ECHONL); + nstate.c_cc[VMIN] = 1; + nstate.c_cc[VTIME] = 0; + tcsetattr(fileno(stdin), TCSADRAIN, &nstate); + } if ((term = getenv("TERM")) == 0 || tgetent(buf, term) <= 0) { printf("Dumb terminal\n"); @@ -98,17 +103,19 @@ initterm() no_intty = tcgetattr(fileno(stdin), &ostate); tcgetattr(fileno(stderr), &ostate); - nstate = ostate; - if (!no_tty) - ostate.c_lflag &= ~(ICANON|ECHO); + nstate = ostate; + if (!no_tty) { + ostate.c_lflag &= ~(ICANON|ECHO); + } } void set_tty() { - ostate.c_lflag &= ~(ICANON|ECHO); - stty(fileno(stderr), &ostate); + if (no_tty) return; + ostate.c_lflag &= ~(ICANON|ECHO); + stty(fileno(stderr), &ostate); } @@ -139,23 +146,23 @@ doshell(cmd) char *cmd; { char *getenv(); + char *shell; char cline[128]; - /* - outstr("\r\n"); - flushbuf(); - */ + printf("\n"); - if (cmd == NULL) { - if ((cmd = getenv("SHELL")) == NULL) - cmd = "/bin/sh"; - sprintf(cline, "%s -i", cmd); + if ((shell = getenv("SHELL")) == NULL) shell = "sh"; + else if(strrchr(shell,'/')) shell=(char *)(strrchr(shell,'/')+1); + + if (cmd[0] == '\0') { + sprintf(cline, "%s -i", shell); + cmd = cline; + } else { + sprintf(cline, "%s -c \"%s\"", shell, cmd); cmd = cline; } - printf(cmd); reset_tty(); - system(cmd); set_tty(); printf("\r"); diff --git a/bmore.1 b/bmore.1 index d8b9ca9..429eabd 100644 --- a/bmore.1 +++ b/bmore.1 @@ -1,4 +1,4 @@ -.TH BMORE 1 "13 June 2000" +.TH BMORE 1 "3 Jan 2002" .SH NAME bmore \- browse through a binary file .SH SYNOPSIS diff --git a/bmore.c b/bmore.c index f155c86..e1a3500 100644 --- a/bmore.c +++ b/bmore.c @@ -4,10 +4,11 @@ * 1990-09-04 V 1.1.0 * 2000-05-31 V 1.3.0 beta * 2000-10-18 V 1.3.0 final + * 2002-01-16 V 1.3.1 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1990-2000 by Gerhard Buergmann + * Copyright 1990-2002 by Gerhard Buergmann * Gerhard.Buergmann@altavista.net * * This program is free software; you can redistribute it and/or modify it @@ -35,17 +36,18 @@ #else # define PRINTF printf #ifndef HELPFILE -# define HELPFILE "/usr/local/lib/bmore.help" +# define HELPFILE "/usr/local/share/bmore.help" #endif #endif #include "bmore.h" -char *copyright = "Copyright (C) 1990-2000 by Gerhard Buergmann"; +char *copyright = "Copyright (C) 1990-2002 by Gerhard Buergmann"; int maxx, maxy; char *name = NULL; -char sstring[MAXCMD] = ""; +char sstring[MAXCMD] = ""; /* string for search */ +char estring[MAXCMD] = ""; /* string for shell escape */ char string[MAXCMD]; FILE *curr_file = NULL, *help_file; int AnzAdd; @@ -186,7 +188,7 @@ main(argc, argv) strcpy(addr_form, "%08lX "); if (ascii_flag) - out_len = ((maxx - AnzAdd - 1) / 4) * 4; + out_len = ((maxx - AnzAdd - 1) / 4) * 4; else out_len = ((maxx - AnzAdd - 1) / 16) * 4; @@ -195,6 +197,7 @@ main(argc, argv) if (no_tty) { while(!printout(1)); + fclose(curr_file); reset_tty(); exit(0); } @@ -260,6 +263,7 @@ main(argc, argv) case 'q': case 'Q': clreol(); + fclose(curr_file); reset_tty(); exit(0); case ':' : @@ -292,29 +296,38 @@ main(argc, argv) break; case 'q': clreol(); + fclose(curr_file); reset_tty(); exit(0); break; case '!': if (!no_intty) { clreol(); - if (rdline(ch)) break; - doshell(sstring); + if (rdline(colon, estring)) break; + doshell(estring); PRINTF("------------------------\r\n"); break; } default: - beep(); + bmbeep(); } break; + case '!': + if (!no_intty) { + clreol(); + if (rdline(ch, estring)) break; + doshell(estring); + PRINTF("------------------------\r\n"); + break; + } case 'd': /* Scroll k lines [current scroll size, initially 11]* */ - case CTRL('D'): + case BVICTRL('D'): if (precount > 0) d_line = precount; to_print = d_line; break; - case CTRL('L'): /*** REDRAW SCREEN ***/ + case BVICTRL('L'): /*** REDRAW SCREEN ***/ if (no_intty) { - beep(); + bmbeep(); } else { clrscr(); to_print = maxy + 1; @@ -323,9 +336,9 @@ main(argc, argv) } break; case 'b': /* Skip backwards k screenfuls of text [1] */ - case CTRL('B'): + case BVICTRL('B'): if (no_intty) { - beep(); + bmbeep(); } else { if (precount < 1) precount = 1; PRINTF("...back %ld page", precount); @@ -364,12 +377,13 @@ main(argc, argv) break; case '\\': if (ascii_flag) { - beep(); + bmbeep(); break; } case '/': /**** Search String ****/ if (!repeat) { - if (rdline(ch)) break; + clreol(); + if (rdline(ch, sstring)) break; } case 'n': /**** Search Next ****/ case 'N': @@ -380,7 +394,7 @@ main(argc, argv) break; case '\'': if (no_intty) { - beep(); + bmbeep(); } else { bytepos = last_search; fseek(curr_file, bytepos, SEEK_SET); @@ -431,7 +445,7 @@ main(argc, argv) if (d_flag) { emsg("[Press 'h' for instructions.]"); } else { - beep(); + bmbeep(); } break; } @@ -445,13 +459,18 @@ main(argc, argv) int -rdline(ch) - int ch; +rdline(ch, sstring) + int ch; + char *sstring; { - int i = 0; - int ch1 = 0; - - clreol(); + int i = 0; + int ch1 = 0; + char bstring[MAXCMD]; + + if (ch == '!') { + strcpy(bstring, sstring); + sstring[0] = '\0'; + } putchar(ch); fflush(stdout); @@ -468,6 +487,15 @@ rdline(ch) ch1 = ESC; break; } + } else if (ch1 == '!' && i == 0) { + if (bstring[0] == '\0') { + emsg("No previous command"); + return 1; + } + putchar(ch1); + PRINTF("\r%c%s", ch, bstring); + strcat(sstring, bstring); + i = strlen(sstring); } else { putchar(ch1); sstring[i++] = ch1; @@ -490,6 +518,7 @@ do_next(n) { if (numfiles) { if (n == 1 && file_nr == numfiles) { + fclose(curr_file); reset_tty(); exit(0); } @@ -503,6 +532,7 @@ do_next(n) free(name); name = strdup(*(files + file_nr - 1)); } else { + fclose(curr_file); reset_tty(); exit(0); } @@ -526,7 +556,7 @@ open_file(name) } if (curr_file != NULL) fclose(curr_file); if ((curr_file = fopen(name, "rb")) == NULL) { - reset_tty(); + /* reset_tty(); */ perror(name); exit(1); } @@ -554,6 +584,13 @@ putline(buf, num) else *(string + print_pos) = '.'; } + for (; print_pos < out_len; print_pos++) { + if (!ascii_flag) { + PRINTF(" "); + } + ++bytepos; + *(string + print_pos) = ' '; + } *(string + num) = '\0'; PRINTF("%s\r\n", string); } @@ -792,11 +829,11 @@ bmsearch(ch) PRINTF("\r\nPattern not found\r\n"); do_next(1); } else { +/* sprintf(string, "Pattern not found %d - %ul", i, (unsigned long)bytepos); emsg(string); -/* - emsg("Pattern not found"); */ + emsg("Pattern not found"); bytepos = oldpos; fseek(curr_file, bytepos, SEEK_SET); break; @@ -825,3 +862,9 @@ emsg(s) fflush(stdout); prompt = 0; } + + +void +bmbeep() { + putchar(7); +} diff --git a/bmore.h b/bmore.h index 54b0790..c1521f1 100644 --- a/bmore.h +++ b/bmore.h @@ -7,10 +7,11 @@ * 1999-08-21 V 1.2.0 final * 2000-05-31 V 1.3.0 beta * 2000-10-04 V 1.3.0 final + * 2002-01-16 V 1.3.1 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2000 by Gerhard Buergmann + * Copyright 1996-2002 by Gerhard Buergmann * Gerhard.Buergmann@altavista.net * * This program is free software; you can redistribute it and/or modify it @@ -47,10 +48,11 @@ # include #if HAVE_NCURSES_H # include +# include #else # include +# include #endif -#include #endif /* defines for filemode */ @@ -76,9 +78,7 @@ #define ESC 27 #define SEARCH 0 #define REPLACE 1 -#ifndef CTRL -# define CTRL(n) (n&0x1f) -#endif +#define BVICTRL(n) (n&0x1f) #ifndef NULL # define NULL ((void *)0) @@ -109,13 +109,11 @@ extern FILE *debug_fp; #endif -extern char *version; - -#ifdef NO_SYSERRL - extern char *sys_errlist[]; +#ifndef HAVE_STRERROR + extern char *sys_errlist[]; #endif - +extern char *version; extern int maxx, maxy; extern int ignore_case, magic; extern int no_tty, no_intty; @@ -126,13 +124,13 @@ extern int no_tty, no_intty; #ifdef ANSI void initterm(void), set_tty(void), reset_tty(void); void clreol(void), clrscr(void), highvideo(void), normvideo(void); - void /* beep(void), */ home(void); + void bmbeep(void), home(void), sig(void); void doshell(char *), emsg(char *); void do_next(int); void open_file(char *); void bmsearch(int); void pushback(int, char *); - int printout(int), rdline(int); + int printout(int), rdline(int, char *); int nextchar(void), vgetc(void); int sbracket(int, char *, int); int bmregexec(char *); @@ -141,7 +139,7 @@ extern int no_tty, no_intty; #else void initterm(), set_tty(), reset_tty(); void clreol(), clrscr(), highvideo(), normvideo(); - void /* beep(), */ home(); + void bmbeep(), home(), sig(); void doshell(), emsg(); void do_next(); void open_file(); diff --git a/bmore.man b/bmore.man index ec58167..62b9582 100644 --- a/bmore.man +++ b/bmore.man @@ -193,6 +193,6 @@ SSEEEE AALLSSOO - 13 June 2000 3 + 3 Jan 2002 3 diff --git a/bvi.1 b/bvi.1 index 207823d..092384b 100644 --- a/bvi.1 +++ b/bvi.1 @@ -93,7 +93,7 @@ .nr % 0 .rr F .\} -.TH BVI 1 "BVI Version 1.3.0" "18/Oct/2000" "User Commands" +.TH BVI 1 "BVI Version 1.3.1" "3/Jan/2002" "User Commands" .IX Title "BVI 1" .UC .IX Name "bvi, bview - visual display editor for binary files" @@ -194,7 +194,7 @@ bvi, bview \- visual editor for binary files .SH "VERSION" .IX Header "VERSION" -bvi-1.3.0 +bvi-1.3.1 .SH "SYNOPSIS" .IX Header "SYNOPSIS" \fBbvi\fR\ \ \ [\fB\-R\fR]\ [\fB\-c\fR\ \fIcmd\fR]\ [\fB\-f\fR\ \fIscript\fR]\ [\fB\-b\fR\ \fIbegin\fR]\ [\fB\-e\fR\ \fIend\fR]\ [\fB\-s\fR\ \fIsize\fR]\ \fIfile\fR... @@ -597,7 +597,7 @@ bvi was developed by Gerhard Buergmann, Vienna, Austria \fIGerhard.Buergmann@altavista.net\fR .SH "WWW" .IX Header "WWW" -Bvi\ Homepage:\ \ http://bvi.linuxave.net/ +Bvi\ Homepage:\ \ http://bvi.sourceforge.net/ Vi\ Pages:\ \ \ \ \ \ http://www.math.fu-berlin.de/~guckes/vi/ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (all\ about\ Vi\ and\ its\ clones) .SH "FILES" diff --git a/bvi.c b/bvi.c index f1611e3..f23bda6 100644 --- a/bvi.c +++ b/bvi.c @@ -7,10 +7,11 @@ * 1999-10-22 V 1.2.0 final * 2000-05-10 V 1.3.0 alpha * 2000-10-24 V 1.3.0 final + * 2002-01-03 V 1.3.1 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2000 by Gerhard Buergmann + * Copyright 1996-2002 by Gerhard Buergmann * Gerhard.Buergmann@altavista.net * * This program is free software; you can redistribute it and/or modify it @@ -36,7 +37,7 @@ #endif -char *copyright = "Copyright (C) 1996-2000 by Gerhard Buergmann"; +char *copyright = "Copyright (C) 1996-2002 by Gerhard Buergmann"; jmp_buf env; /* context for `longjmp' function */ @@ -329,7 +330,7 @@ main(argc, argv) if (loc == HEX) x = AnzAdd; else x = AnzAdd + Anzahl3; break; - case CTRL('H'): + case BVICTRL('H'): case KEY_BACKSPACE: case KEY_LEFT: case 'h': do { @@ -344,7 +345,10 @@ main(argc, argv) case ' ': case KEY_RIGHT: case 'l': do { + /* if (x < (Anzahl3 + 6)) x += 3; + */ + if (x < (Anzahl3 + AnzAdd - 2)) x += 3; else if (x > (Anzahl3 + 3) && x < (Anzahl3 + AnzAdd - 1 + Anzahl)) x++; @@ -363,8 +367,8 @@ main(argc, argv) case CR: if (loc == HEX) x = AnzAdd; else x = AnzAdd + Anzahl3; case 'j': - case CTRL('J'): - case CTRL('N'): + case BVICTRL('J'): + case BVICTRL('N'): case KEY_DOWN: do { if ((PTR)((pagepos + (y + 1) * Anzahl)) > maxpos) break; @@ -386,25 +390,25 @@ main(argc, argv) if (strlen(cmdstr)) docmdline(cmdstr); break; - case CTRL('B'): + case BVICTRL('B'): case KEY_PPAGE: /**** Previous Page ****/ if (mem <= (PTR)(pagepos - screen)) pagepos -= screen; else pagepos = mem; repaint(); break; - case CTRL('D'): + case BVICTRL('D'): if (precount > 1) scrolly = precount; scrolldown(scrolly); break; - case CTRL('U'): + case BVICTRL('U'): if (precount > 1) scrolly = precount; scrollup(scrolly); break; - case CTRL('E'): + case BVICTRL('E'): if (y > 0) y--; scrolldown(1); break; - case CTRL('F'): + case BVICTRL('F'): case KEY_NPAGE: /**** Next Page *****/ if (maxpos >= (PTR)(pagepos + screen)) { pagepos += screen; @@ -416,14 +420,14 @@ main(argc, argv) repaint(); } break; - case CTRL('G'): + case BVICTRL('G'): fileinfo(name); wrstat = 0; break; - case CTRL('L'): /*** REDRAW SCREEN ***/ + case BVICTRL('L'): /*** REDRAW SCREEN ***/ new_screen(); break; - case CTRL('Y'): + case BVICTRL('Y'): if (y < maxy) y++; scrollup(1); break; @@ -540,6 +544,7 @@ main(argc, argv) break; case 'r': case 'R': if (filesize == 0L) break; + if (precount < 1) precount = 1; sprintf(rep_buf, "%ld%c", precount, ch); undo_count = edit(ch); lflag++; @@ -619,7 +624,7 @@ main(argc, argv) if (count > 0) do_delete((off_t)count, current); else if (count < 0) - do_back(-count, current); + do_back(-(off_t)count, current); if (ch == 'c') { precount = 1; undo_count = edit('i'); @@ -637,7 +642,7 @@ main(argc, argv) break; case 'X': sprintf(rep_buf, "%ldX", precount); - do_back(precount, current); + do_back((off_t)precount, current); break; default: flushinp(); @@ -645,11 +650,21 @@ main(argc, argv) } } else { switch (ch) { + case 'x': + if (precount < 1) precount = 1; + if ((off_t)precount + current == maxpos) { + sprintf(rep_buf, "%ldx", precount); + do_delete((off_t)precount, current); + } else { + movebyte(); + flushinp(); + beep(); + } + break; case 'd': case 'i': case 'I': case 'p': - case 'x': case 'X': movebyte(); default: diff --git a/bvi.h b/bvi.h index 56be4f6..62c2d82 100644 --- a/bvi.h +++ b/bvi.h @@ -7,10 +7,11 @@ * 1999-08-21 V 1.2.0 final * 2000-05-10 V 1.3.0 alpha * 2000-10-24 V 1.3.0 final + * 2001-10-29 V 1.3.1 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2000 by Gerhard Buergmann + * Copyright 1996-2001 by Gerhard Buergmann * Gerhard.Buergmann@altavista.net * * This program is free software; you can redistribute it and/or modify it @@ -95,10 +96,7 @@ #define BS 8 #define ESC 27 #define SEARCH 0 -#define REPLACE 1 -#ifndef CTRL -# define CTRL(n) (n&0x1f) -#endif +#define BVICTRL(n) (n&0x1f) #define CMDLNG(a,b) (len <= a && len >= b) @@ -134,12 +132,11 @@ extern FILE *debug_fp; #endif -extern char *version; - -#ifdef NO_SYSERRL - extern char *sys_errlist[]; +#ifndef HAVE_STRERROR + extern char *sys_errlist[]; #endif +extern char *version; extern char addr_form[]; extern char pattern[]; extern char rep_buf[]; diff --git a/bvi.man b/bvi.man index 24a5907..43f8c98 100644 --- a/bvi.man +++ b/bvi.man @@ -5,7 +5,7 @@ NAME bvi, bview - visual display editor for binary files VERSION - bvi-1.2.0 + bvi-1.3.1 SYNOPSIS bvi [-R] [-c cmd] [-f script] file... @@ -385,7 +385,7 @@ AUTHOR Gerhard.Buergmann@altavista.net WWW - Bvi Homepage: http://bvi.linuxave.net/ + Bvi Homepage: http://bvi.sourceforge.net/ Vi Pages: http://www.math.fu-berlin.de/~guckes/vi/ (all about Vi and its clones) @@ -401,4 +401,4 @@ SEE ALSO vi(1), strings(1), ascii(5) -31/Oct/99 BVI Version 1.2.0 8 +3/Jan/2002 BVI Version 1.3.1 8 diff --git a/comm.c b/comm.c index 1b6501a..e3d5b8e 100644 --- a/comm.c +++ b/comm.c @@ -8,10 +8,11 @@ * 1999-09-10 V 1.2.0 final * 2000-03-03 V 1.3.0 beta * 2000-07-15 V 1.3.0 final + * 2001-10-10 V 1.3.1 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2000 by Gerhard Buergmann + * Copyright 1996-2001 by Gerhard Buergmann * Gerhard.Buergmann@altavista.net * * This program is free software; you can redistribute it and/or modify it @@ -220,7 +221,7 @@ docmdline(cmdline) if (repl_count == -1) { emsg("No previous substitute re|No previous substitute regular expression"); return; /* No prev subst */ - } + } repaint(); if (!repl_count) { emsg("Fail|Substitute pattern matching failed"); @@ -726,7 +727,12 @@ sysemsg(s) { char string[256]; +#ifdef HAVE_STRERROR + sprintf(string, "%s: %s", s, strerror(errno)); +#else sprintf(string, "%s: %s", s, sys_errlist[errno]); +#endif + emsg(string); } diff --git a/config.guess b/config.guess old mode 100755 new mode 100644 index 413ed41..6012b39 --- a/config.guess +++ b/config.guess @@ -1,7 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. -# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-07-12' + # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -22,35 +25,153 @@ # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . -# The master version of this file is at the FSF in /home/gd/gnu/lib. +# Please send patches to . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you -# don't specify an explicit system type (host/target name). -# -# Only a few systems have been added to this list; please add others -# (but try to keep the structure clean). -# +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + + +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c ; + for c in cc gcc c89 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + rm -f $dummy.c $dummy.o $dummy.rel ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) +# (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 - # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # Netbsd (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-unknown ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE}" in + i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -59,59 +180,76 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - cat <dummy.s + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text .globl main + .align 4 .ent main main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit .end main EOF - ${CC-cc} dummy.s -o dummy 2>/dev/null + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; - 15) + 1-0) UNAME_MACHINE="alphaev5" ;; - 14) + 1-1) UNAME_MACHINE="alphaev56" ;; - 10) + 1-101) UNAME_MACHINE="alphapca56" ;; - 16) + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; esac fi - rm -f dummy.s dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-cbm-sysv4 + echo m68k-unknown-sysv4 exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; arc64:OpenBSD:*:*) echo mips64el-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -130,16 +268,16 @@ EOF wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; - arm32:NetBSD:*:*) - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - SR2?01:HI-UX/MPP:*:*) + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; - Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 @@ -147,9 +285,12 @@ EOF echo pyramid-pyramid-bsd fi exit 0 ;; - NILE:*:*:dcosx) + NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; @@ -189,21 +330,38 @@ EOF aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} - exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -225,12 +383,17 @@ EOF VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; - 2020:CLIX:*:*) + 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) - sed 's/^ //' << EOF >dummy.c - int main (argc, argv) int argc; char **argv; { + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); @@ -245,12 +408,16 @@ EOF exit (-1); } EOF - ${CC-cc} dummy.c -o dummy \ - && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; @@ -266,15 +433,18 @@ EOF AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then echo m88k-dg-dgux${UNAME_RELEASE} - else + else echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 @@ -295,12 +465,20 @@ EOF ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i?86:AIX:*:*) + i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >dummy.c + sed 's/^ //' << EOF >$dummy.c #include main() @@ -311,8 +489,9 @@ EOF exit(0); } EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 @@ -320,8 +499,9 @@ EOF echo rs6000-ibm-aix3.2 fi exit 0 ;; - *:AIX:*:4) - if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc @@ -329,7 +509,7 @@ EOF if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=4.${UNAME_RELEASE} + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; @@ -339,7 +519,7 @@ EOF ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) @@ -354,18 +534,76 @@ EOF hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; - 9000/[3478]??:HP-UX:*:*) + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; - 9000/8?? ) HP_ARCH=hppa1.0 ;; + 9000/[678][0-9][0-9]) + case "${HPUX_REV}" in + 11.[0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + esac ;; + esac + fi ;; + esac + if [ "${HP_ARCH}" = "" ]; then + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + eval $set_cc_for_build + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy + fi ;; esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >dummy.c + sed 's/^ //' << EOF >$dummy.c #include int main () @@ -390,8 +628,9 @@ EOF exit (0); } EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) @@ -400,13 +639,16 @@ EOF 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; - i?86:OSF1:*:*) + i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else @@ -416,6 +658,9 @@ EOF parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; + hppa*:OpenBSD:*:*) + echo hppa-unknown-openbsd + exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; @@ -438,53 +683,73 @@ EOF echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3D:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; - F300:UNIX_System_V:*:*) - FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - F301:UNIX_System_V:*:*) - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` - exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} - exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - i?86:BSD/386:*:* | *:BSD/OS:*:*) + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) - echo i386-pc-cygwin32 + echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) - echo i386-pc-mingw32 + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i386-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin32 + echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` @@ -492,138 +757,127 @@ EOF *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; - *:Linux:*:*) + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in + big) echo mips-unknown-linux-gnu && exit 0 ;; + little) echo mipsel-unknown-linux-gnu && exit 0 ;; + esac + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev67 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so - # first see if it will tell us. - ld_help_string=`ld --help 2>&1` - ld_supported_emulations=`echo $ld_help_string \ - | sed -ne '/supported emulations:/!d + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_supported_targets=`cd /; ld --help 2>&1 \ + | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g - s/.*supported emulations: *// + s/.*supported targets: *// s/ .*// p'` - case "$ld_supported_emulations" in - i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; - i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; - sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; esac - - if test "${UNAME_MACHINE}" = "alpha" ; then - sed 's/^ //' <dummy.s - .globl main - .ent main - main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - LIBC="" - ${CC-cc} dummy.s -o dummy 2>/dev/null - if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - - objdump --private-headers dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f dummy.s dummy - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 - elif test "${UNAME_MACHINE}" = "mips" ; then - cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - else - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" - test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - - case "${UNAME_MACHINE}" in - i?86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; - esac - # Determine whether the default compiler is a.out or elf - cat >dummy.c <$dummy.c < -main(argc, argv) - int argc; - char *argv[]; -{ +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); + printf ("%s-pc-linux-gnu\n", argv[1]); # else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); + printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif # else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); + printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif #else - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); + printf ("%s-pc-linux-gnuaout\n", argv[1]); #endif return 0; } EOF - ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - fi ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i?86:DYNIX/ptx:4*:*) + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; - i?86:UNIX_SV:4.2MP:2.*) + i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, @@ -631,14 +885,23 @@ EOF # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; - i?86:*:3.2:*) + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 + (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; pc:*:*:*) + # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp @@ -676,7 +947,7 @@ EOF exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -687,24 +958,30 @@ EOF 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:*) + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i?86:LynxOS:2.*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; - rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; @@ -732,22 +1009,101 @@ EOF mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; - news*:NEWS-OS:*:6*) + news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; - R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[KW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 -cat >dummy.c <$dummy.c < # include @@ -785,7 +1141,10 @@ main () #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif @@ -830,11 +1189,24 @@ main () #endif #if defined (vax) -#if !defined (ultrix) - printf ("vax-dec-bsd\n"); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif #endif #if defined (alliant) && defined (i860) @@ -845,8 +1217,9 @@ main () } EOF -${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 -rm -f dummy.c dummy +eval $set_cc_for_build +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 +rm -f $dummy.c $dummy # Apollos put the system type in the environment. @@ -878,6 +1251,48 @@ then esac fi -#echo '(Unable to guess system type)' 1>&2 +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.h.in b/config.h.in index 47ddc48..a0cd505 100644 --- a/config.h.in +++ b/config.h.in @@ -15,8 +15,6 @@ /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS -#undef NO_SYSERRL - /* Define if you have the memmove function. */ #undef HAVE_MEMMOVE @@ -26,6 +24,9 @@ /* Define if you have the strtol function. */ #undef HAVE_STRTOL +/* Define if you have the strerror function. */ +#undef HAVE_STRERROR + /* Define if you have the header file. */ #undef HAVE_CURSES_H @@ -43,3 +44,4 @@ /* Define if your tputs need putc(char) */ #undef NEED_PUTC_CHAR + diff --git a/config.sub b/config.sub old mode 100755 new mode 100644 index 213a6d4..578b302 --- a/config.sub +++ b/config.sub @@ -1,6 +1,10 @@ #! /bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-06-08' + # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. @@ -25,6 +29,8 @@ # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. +# Please send patches to . +# # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. @@ -45,30 +51,73 @@ # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -if [ x$1 = x ] -then - echo Configuration name missing. 1>&2 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 - echo "or $0 ALIAS" 1>&2 - echo where ALIAS is a recognized configuration type. 1>&2 - exit 1 -fi +me=`echo "$0" | sed -e 's,.*/,,'` -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - linux-gnu*) + nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -94,15 +143,33 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple) + -apple | -axis) os= basic_machine=$1 ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; -hiux*) os=-hiuxwe2 ;; -sco5) - os=sco3.2v5 + os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) @@ -121,6 +188,9 @@ case $os in os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -143,26 +213,50 @@ case $os in -psos*) os=-psos ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ - | arme[lb] | pyramid | mn10200 | mn10300 \ - | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ - | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ - | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ - | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ - | mipstx39 | mipstx39el \ - | sparc | sparclet | sparclite | sparc64 | v850) + tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ + | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ + | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 \ + | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ + | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ + | hppa64 \ + | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ + | alphaev6[78] \ + | we32k | ns16k | clipper | i370 | sh | sh[34] \ + | powerpc | powerpcle \ + | 1750a | dsp16xx | pdp10 | pdp11 \ + | mips16 | mips64 | mipsel | mips64el \ + | mips64orion | mips64orionel | mipstx39 | mipstx39el \ + | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ + | mips64vr5000 | mips64vr5000el | mcore | s390 | s390x \ + | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \ + | v850 | c4x \ + | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ + | pj | pjl | h8500 | z8k) basic_machine=$basic_machine-unknown ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. - i[3456]86) + i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. @@ -171,27 +265,52 @@ case $basic_machine in exit 1 ;; # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ + # FIXME: clean up the formatting here. + vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ + | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ - | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \ - | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ - | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ - | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mipstx39-* | mipstx39el-* \ - | f301-*) + | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ + | xmp-* | ymp-* \ + | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ + | hppa2.0n-* | hppa64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ + | alphaev6[78]-* \ + | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ + | clipper-* | orion-* \ + | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \ + | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \ + | mips16-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ + | mipstx39-* | mipstx39el-* | mcore-* \ + | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ + | [cjt]90-* \ + | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ + | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ + | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; alliant | fx80) basic_machine=fx80-alliant ;; @@ -207,20 +326,24 @@ case $basic_machine in os=-sysv ;; amiga | amiga-*) - basic_machine=m68k-cbm + basic_machine=m68k-unknown ;; amigaos | amigados) - basic_machine=m68k-cbm + basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) - basic_machine=m68k-cbm + basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; aux) basic_machine=m68k-apple os=-aux @@ -257,13 +380,16 @@ case $basic_machine in basic_machine=cray2-cray os=-unicos ;; - [ctj]90-cray) - basic_machine=c90-cray + [cjt]90) + basic_machine=${basic_machine}-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -297,6 +423,10 @@ case $basic_machine in encore | umax | mmax) basic_machine=ns32k-encore ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; fx2800) basic_machine=i860-alliant ;; @@ -307,6 +437,10 @@ case $basic_machine in basic_machine=tron-gmicro os=-sysv ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 @@ -315,6 +449,14 @@ case $basic_machine in basic_machine=h8300-hitachi os=-hms ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; harris) basic_machine=m88k-harris os=-sysv3 @@ -330,13 +472,30 @@ case $basic_machine in basic_machine=m68k-hp os=-hpux ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) @@ -345,27 +504,42 @@ case $basic_machine in hppa-next) os=-nextstep3 ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; i370-ibm* | ibm*) basic_machine=i370-ibm - os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[3456]86v32) + i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; - i[3456]86v4*) + i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; - i[3456]86v) + i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; - i[3456]86sol2) + i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; iris | iris4d) basic_machine=mips-sgi case $os in @@ -391,9 +565,17 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; miniframe) basic_machine=m68000-convergent ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; mipsel*-linux*) basic_machine=mipsel-unknown os=-linux-gnu @@ -408,10 +590,34 @@ case $basic_machine in mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos @@ -424,6 +630,10 @@ case $basic_machine in basic_machine=mips-sony os=-newsos ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; next | m*-next ) basic_machine=m68k-next case $os in @@ -449,9 +659,32 @@ case $basic_machine in basic_machine=i960-intel os=-nindy ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; np1) basic_machine=np1-gould ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 @@ -469,30 +702,28 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium | p5) - basic_machine=i586-intel + pentium | p5 | k5 | k6 | nexgen) + basic_machine=i586-pc ;; - pentiumpro | p6) - basic_machine=i686-intel + pentiumpro | p6 | 6x86 | athlon) + basic_machine=i686-pc ;; - pentium-* | p5-*) + pentiumii | pentium2) + basic_machine=i686-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumpro-* | p6-*) + pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - k5) - # We don't have specific support for AMD's K5 yet, so just call it a Pentium - basic_machine=i586-amd - ;; - nexen) - # We don't have specific support for Nexgen yet, so just call it a Pentium - basic_machine=i586-nexgen + pentiumii-* | pentium2-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; - power) basic_machine=rs6000-ibm + power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; @@ -507,12 +738,24 @@ case $basic_machine in ps2) basic_machine=i386-ibm ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; sequent) basic_machine=i386-sequent ;; @@ -520,6 +763,10 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sparclite-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; sps7) basic_machine=m68k-bull os=-sysv2 @@ -527,6 +774,13 @@ case $basic_machine in spur) basic_machine=spur-unknown ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; sun2) basic_machine=m68000-sun ;; @@ -567,10 +821,22 @@ case $basic_machine in sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; symmetry) basic_machine=i386-sequent os=-dynix ;; + t3e) + basic_machine=t3e-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; tx39) basic_machine=mipstx39-unknown ;; @@ -588,6 +854,10 @@ case $basic_machine in basic_machine=a29k-nyu os=-sym1 ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; vaxv) basic_machine=vax-dec os=-sysv @@ -611,6 +881,18 @@ case $basic_machine in basic_machine=a29k-wrs os=-vxworks ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + windows32) + basic_machine=i386-pc + os=-windows32-msvcrt + ;; xmp) basic_machine=xmp-cray os=-unicos @@ -618,6 +900,10 @@ case $basic_machine in xps | xps100) basic_machine=xps100-honeywell ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -625,6 +911,15 @@ case $basic_machine in # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; mips) if [ x$os = x-linux-gnu ]; then basic_machine=mips-unknown @@ -641,13 +936,20 @@ case $basic_machine in vax) basic_machine=vax-dec ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; - sparc) + sh3 | sh4) + basic_machine=sh-unknown + ;; + sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -659,6 +961,19 @@ case $basic_machine in orion105) basic_machine=clipper-highlevel ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + c4x*) + basic_machine=c4x-none + os=-coff + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 @@ -712,13 +1027,36 @@ case $os in | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv*) + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) # Remember, each alternative MUST END IN *, to match a version number. ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; @@ -728,6 +1066,12 @@ case $os in -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; -osfrose*) os=-osfrose ;; @@ -743,12 +1087,18 @@ case $os in -acis*) os=-aos ;; + -386bsd) + os=-bsd + ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; + -nsk*) + os=-nsk + ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` @@ -774,9 +1124,18 @@ case $os in # This must come after -sysvr4. -sysv*) ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; -xenix) os=-xenix ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; -none) ;; *) @@ -802,9 +1161,15 @@ case $basic_machine in *-acorn) os=-riscix1.2 ;; + arm*-rebel) + os=-linux + ;; arm*-semi) os=-aout ;; + pdp10-*) + os=-tops20 + ;; pdp11-*) os=-none ;; @@ -823,15 +1188,36 @@ case $basic_machine in # default. # os=-sunos4 ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; + *-be) + os=-beos + ;; *-ibm) os=-aix ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; *-hp) os=-hpux ;; @@ -892,9 +1278,21 @@ case $basic_machine in *-masscomp) os=-rtu ;; - f301-fujitsu) + f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; *) os=-none ;; @@ -916,9 +1314,15 @@ case $basic_machine in -aix*) vendor=ibm ;; + -beos*) + vendor=be + ;; -hpux*) vendor=hp ;; + -mpeix*) + vendor=hp + ;; -hiux*) vendor=hitachi ;; @@ -934,7 +1338,7 @@ case $basic_machine in -genix*) vendor=ns ;; - -mvs*) + -mvs* | -opened*) vendor=ibm ;; -ptx*) @@ -946,9 +1350,26 @@ case $basic_machine in -aux*) vendor=apple ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure b/configure index 6a7b191..d5e08af 100755 --- a/configure +++ b/configure @@ -1,28 +1,155 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by Autoconf 2.52. # +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -# Defaults: -ac_help= +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Name of the executable. +as_me=`echo "$0" |sed 's,.*[\\/],,'` + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +# NLS nuisances. +$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } +$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } +$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } +$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } +$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } +$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } +$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } +$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --with-ncurses[=DIR] path to ncurses" +cross_compiling=no +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +ac_unique_file="bvi.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" # Initialize some variables set by options. +ac_init_help= +ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -31,10 +158,15 @@ program_transform_name=s,x,x, silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' @@ -48,17 +180,16 @@ oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" @@ -66,59 +197,59 @@ do continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) - datadir="$ac_optarg" ;; + datadir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -127,95 +258,47 @@ do -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ @@ -224,12 +307,12 @@ EOF -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. @@ -250,26 +333,26 @@ EOF -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -286,7 +369,7 @@ EOF | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -296,7 +379,7 @@ EOF ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -307,58 +390,57 @@ EOF | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -369,98 +451,98 @@ EOF ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac done -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +build=$build_alias +host=$host_alias +target=$target_alias -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=bvi.c +# FIXME: should be removed in autoconf 3.0. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then @@ -471,13 +553,304 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources in $srcdir" >&2 + { (exit 1); exit 1; }; } fi fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat < if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +EOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue + cd $ac_subdir + # A "../" for each directory in /$ac_subdir. + ac_dots=`echo $ac_subdir | + sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` + + case $srcdir in + .) # No --srcdir option. We are building in place. + ac_sub_srcdir=$srcdir ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_sub_srcdir=$srcdir/$ac_subdir ;; + *) # Relative path. + ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;; + esac + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_sub_srcdir/configure.gnu; then + echo + $SHELL $ac_sub_srcdir/configure.gnu --help=recursive + elif test -f $ac_sub_srcdir/configure; then + echo + $SHELL $ac_sub_srcdir/configure --help=recursive + elif test -f $ac_sub_srcdir/configure.ac || + test -f $ac_sub_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\EOF + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +EOF + exit 0 +fi +exec 5>config.log +cat >&5 </dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +PATH = $PATH + +_ASUNAME +} >&5 + +cat >&5 <\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + ac_sep=" " ;; + *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" + ac_sep=" " ;; + esac + # Get rid of the leading space. +done + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + echo >&5 + echo "## ----------------- ##" >&5 + echo "## Cache variables. ##" >&5 + echo "## ----------------- ##" >&5 + echo >&5 + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} >&5 + sed "/^$/d" confdefs.h >conftest.log + if test -s conftest.log; then + echo >&5 + echo "## ------------ ##" >&5 + echo "## confdefs.h. ##" >&5 + echo "## ------------ ##" >&5 + echo >&5 + cat conftest.log >&5 + fi + (echo; echo) >&5 + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" >&5 + echo "$as_me: exit $exit_status" >&5 + rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then @@ -488,42 +861,109 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" + { echo "$as_me:864: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + cat "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:875: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi else - echo "creating cache $cache_file" - > $cache_file + { echo "$as_me:883: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:899: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:903: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:909: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:911: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:913: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. It doesn't matter if + # we pass some twice (in addition to the command line arguments). + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" + ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:932: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:934: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac +echo "#! $SHELL" >conftest.sh +echo "exit 0" >>conftest.sh +chmod +x conftest.sh +if { (echo "$as_me:954: PATH=\".;.\"; conftest.sh") >&5 + (PATH=".;."; conftest.sh) 2>&5 + ac_status=$? + echo "$as_me:957: \$? = $ac_status" >&5 + (exit $ac_status); }; then + ac_path_separator=';' else - ac_n= ac_c='\c' ac_t= + ac_path_separator=: fi +PATH_SEPARATOR="$ac_path_separator" +rm -f conftest.sh - - +ac_config_headers="$ac_config_headers config.h" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do @@ -535,257 +975,653 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } + { { echo "$as_me:985: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:995: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:999: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:1008: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:1012: error: $ac_config_sub $ac_cv_build_alias failed." >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} + { (exit 1); exit 1; }; } + fi +echo "$as_me:1017: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:555: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 +echo "$as_me:1024: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:1033: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:1038: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` case "$host_os" in sunos4*) - echo "$ac_t"""using /usr/5bin/cc"" 1>&6 + echo "$as_me:1047: result: \"using /usr/5bin/cc\"" >&5 +echo "${ECHO_T}\"using /usr/5bin/cc\"" >&6 CC="/usr/5bin/cc" + ac_objext="o" ;; *) - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:585: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:1061: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="${ac_tool_prefix}gcc" +echo "$as_me:1076: found $ac_dir/$ac_word" >&5 +break +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:1084: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:1087: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:1096: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="gcc" +echo "$as_me:1111: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1119: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1122: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:615: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:1135: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="${ac_tool_prefix}cc" +echo "$as_me:1150: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:1158: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:1161: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:1170: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="cc" +echo "$as_me:1185: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1193: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1196: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:1209: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue +fi +ac_cv_prog_CC="cc" +echo "$as_me:1229: found $ac_dir/$ac_word" >&5 +break +done + if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift - if test $# -gt 0; then + if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" "$@" + set dummy "$ac_dir/$ac_word" ${1+"$@"} shift ac_cv_prog_CC="$@" fi fi fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:1251: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:1254: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:666: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:1265: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="$ac_tool_prefix$ac_prog" +echo "$as_me:1280: found $ac_dir/$ac_word" >&5 +break +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:1288: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } + echo "$as_me:1291: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:698: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:1304: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="$ac_prog" +echo "$as_me:1319: found $ac_dir/$ac_word" >&5 +break +done -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1327: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1330: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -cat > conftest.$ac_ext << EOF + test -n "$ac_ct_CC" && break +done -#line 709 "configure" + CC=$ac_ct_CC +fi + +fi + +test -z "$CC" && { { echo "$as_me:1342: error: no acceptable cc found in \$PATH" >&5 +echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:1347:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:1350: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:1353: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:1355: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:1358: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:1360: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:1363: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +#line 1367 "configure" #include "confdefs.h" -main(){return(0);} -EOF -if { (eval echo configure:714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:1383: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:1386: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:1389: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. +for ac_file in `ls a.exe conftest.exe 2>/dev/null; + ls a.out conftest 2>/dev/null; + ls a.* conftest.* 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + a.out ) # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool --akim. + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:1412: error: C compiler cannot create executables" >&5 +echo "$as_me: error: C compiler cannot create executables" >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:1418: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:1423: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:1429: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1432: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no else - ac_cv_prog_cc_cross=yes + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:1439: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&2;} + { (exit 1); exit 1; }; } + fi fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +echo "$as_me:1447: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:740: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross +rm -f a.out a.exe conftest$ac_cv_exeext +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:1454: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:1456: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:745: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:1459: checking for executable suffix" >&5 +echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 +if { (eval echo "$as_me:1461: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:1464: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done else - cat > conftest.c <&5 +echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:1486: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:1492: checking for object suffix" >&5 +echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 1498 "configure" +#include "confdefs.h" + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:1510: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1513: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:1525: error: cannot compute OBJEXT: cannot compile" >&5 +echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:1532: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:1536: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 1542 "configure" +#include "confdefs.h" + +int +main () +{ +#ifndef __GNUC__ + choke me #endif -EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1557: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1560: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1563: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1566: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes else - GCC= + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_compiler_gnu=no fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:773: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +echo "$as_me:1578: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:1584: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + cat >conftest.$ac_ext <<_ACEOF +#line 1590 "configure" +#include "confdefs.h" + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1602: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1605: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1608: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1611: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else - ac_cv_prog_cc_g=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_prog_cc_g=no fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +echo "$as_me:1621: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" + CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" @@ -799,15 +1635,124 @@ else CFLAGS= fi fi +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1648: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1651: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1654: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1657: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line 1669 "configure" +#include "confdefs.h" +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1682: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1685: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1688: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1691: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line 1701 "configure" +#include "confdefs.h" +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1713: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1716: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1719: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1722: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu ;; esac - case "$host_os" in solaris*) CPPFLAGS="${CPPFLAGS} -D_MSE_INT_H" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\EOF #define NEED_PUTC_CHAR 1 EOF @@ -816,7 +1761,6 @@ hpux9*) DEFS=${DEFS-"-DMINICURSES"} ;; esac - # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -824,31 +1768,39 @@ esac # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:833: checking for a BSD compatible install" >&5 +echo "$as_me:1776: checking for a BSD compatible install" >&5 +echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + ac_save_IFS=$IFS; IFS=$ac_path_separator for ac_dir in $PATH; do + IFS=$ac_save_IFS # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + case $ac_dir/ in + / | ./ | .// | /cC/* \ + | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \ + | /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then + if $as_executable_p "$ac_dir/$ac_prog"; then if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -858,268 +1810,280 @@ else ;; esac done - IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" + INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. - INSTALL="$ac_install_sh" + INSTALL=$ac_install_sh fi fi -echo "$ac_t""$INSTALL" 1>&6 +echo "$as_me:1825: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:887: checking size of int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); -} -EOF -if { (eval echo configure:906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_int=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_int=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 -cat >> confdefs.h <&6 -echo "configure:926: checking size of long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long)); - exit(0); -} -EOF -if { (eval echo configure:945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_long=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_long" 1>&6 -cat >> confdefs.h <&6 -echo "configure:965: checking size of void *" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(void *)); - exit(0); -} -EOF -if { (eval echo configure:984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - ac_cv_sizeof_void_p=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_void_p=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 -cat >> confdefs.h <&6 -echo "configure:1005: checking how to run the C preprocessor" >&5 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:1841: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 1862 "configure" #include "confdefs.h" #include -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then + Syntax error +_ACEOF +if { (eval echo "$as_me:1867: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:1873: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp + # Broken: fails on valid input. +continue fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 +rm -f conftest.err conftest.$ac_ext -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1085: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line 1896 "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:1900: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:1906: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext <&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:1943: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line 1953 "configure" +#include "confdefs.h" +#include + Syntax error +_ACEOF +if { (eval echo "$as_me:1958: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:1964: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line 1987 "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:1991: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:1997: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:2025: error: C preprocessor \"$CPP\" fails sanity check" >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +echo "$as_me:2036: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2042 "configure" #include "confdefs.h" #include #include #include #include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* + +_ACEOF +if { (eval echo "$as_me:2050: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2056: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_cv_header_stdc=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* ac_cv_header_stdc=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2078 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -1128,16 +2092,16 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2096 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -1146,184 +2110,980 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2117 "configure" #include "confdefs.h" #include -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif -EOF -if { (eval echo configure:1165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:2143: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:2146: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:2148: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2151: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then : else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_header_stdc=no fi -rm -fr conftest* -fi - +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 +fi +echo "$as_me:2164: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi -echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1189: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:2180: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2186 "configure" #include "confdefs.h" -#include -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_size_t=yes +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2192: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2195: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2198: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2201: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" else - rm -rf conftest* - ac_cv_type_size_t=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:2211: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF +done + +echo "$as_me:2221: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6 +if test "${ac_cv_type_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2227 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((int *) 0) + return 0; +if (sizeof (int)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2242: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2245: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2248: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2251: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_int=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_int=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:2261: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6 + +echo "$as_me:2264: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6 +if test "${ac_cv_sizeof_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_int" = yes; then + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line 2273 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (int)) >= 0)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2285: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2288: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2291: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2294: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 2299 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2311: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2314: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2317: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2320: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 2336 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2348: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2351: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2354: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2357: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line 2373 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2385: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2388: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2391: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2394: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +ac_cv_sizeof_int=$ac_lo +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:2407: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line 2412 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +FILE *f = fopen ("conftest.val", "w"); +if (!f) + exit (1); +fprintf (f, "%d", (sizeof (int))); +fclose (f); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:2428: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:2431: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:2433: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2436: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_int=0 +fi +fi +echo "$as_me:2452: result: $ac_cv_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6 +cat >>confdefs.h <&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6 +if test "${ac_cv_type_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2464 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((long *) 0) + return 0; +if (sizeof (long)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2479: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2482: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2485: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2488: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_long=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:2498: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6 + +echo "$as_me:2501: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_long" = yes; then + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line 2510 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (long)) >= 0)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2522: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2525: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2528: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2531: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 2536 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2548: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2551: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2554: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2557: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 2573 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (long)) >= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2585: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2588: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2591: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2594: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line 2610 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2622: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2625: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2628: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2631: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +ac_cv_sizeof_long=$ac_lo +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:2644: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line 2649 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +FILE *f = fopen ("conftest.val", "w"); +if (!f) + exit (1); +fprintf (f, "%d", (sizeof (long))); +fclose (f); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:2665: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:2668: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:2670: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2673: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_long=0 +fi +fi +echo "$as_me:2689: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6 +cat >>confdefs.h <&5 +echo $ECHO_N "checking for void *... $ECHO_C" >&6 +if test "${ac_cv_type_void_p+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2701 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((void * *) 0) + return 0; +if (sizeof (void *)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2716: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2719: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2722: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2725: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_void_p=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_void_p=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:2735: result: $ac_cv_type_void_p" >&5 +echo "${ECHO_T}$ac_cv_type_void_p" >&6 + +echo "$as_me:2738: checking size of void *" >&5 +echo $ECHO_N "checking size of void *... $ECHO_C" >&6 +if test "${ac_cv_sizeof_void_p+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_void_p" = yes; then + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +#line 2747 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (void *)) >= 0)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2759: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2762: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2765: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2768: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 2773 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (void *)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2785: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2788: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2791: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2794: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +#line 2810 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (void *)) >= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2822: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2825: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2828: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2831: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.$ac_objext conftest.$ac_ext + done +fi +rm -f conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +#line 2847 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !((sizeof (void *)) <= $ac_mid)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2859: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2862: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2865: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2868: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_lo=`expr $ac_mid + 1` +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +ac_cv_sizeof_void_p=$ac_lo +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:2881: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line 2886 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +FILE *f = fopen ("conftest.val", "w"); +if (!f) + exit (1); +fprintf (f, "%d", (sizeof (void *))); +fclose (f); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:2902: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:2905: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:2907: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2910: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_void_p=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_void_p=0 +fi +fi +echo "$as_me:2926: result: $ac_cv_sizeof_void_p" >&5 +echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 +cat >>confdefs.h <&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2938 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((size_t *) 0) + return 0; +if (sizeof (size_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2953: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2956: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2959: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2962: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_size_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:2972: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <&6 -echo "configure:1222: checking for off_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2984: checking for off_t" >&5 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6 +if test "${ac_cv_type_off_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2990 "configure" #include "confdefs.h" -#include -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* +$ac_includes_default +int +main () +{ +if ((off_t *) 0) + return 0; +if (sizeof (off_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3005: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3008: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3011: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3014: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_off_t=yes else - rm -rf conftest* - ac_cv_type_off_t=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_off_t=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:3024: result: $ac_cv_type_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_off_t" >&6 +if test $ac_cv_type_off_t = yes; then + : +else -fi -echo "$ac_t""$ac_cv_type_off_t" 1>&6 -if test $ac_cv_type_off_t = no; then - cat >> confdefs.h <<\EOF +cat >>confdefs.h <&6 -echo "configure:1255: checking for mode_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3036: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_mode_t=yes -else - rm -rf conftest* - ac_cv_type_mode_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_mode_t" 1>&6 -if test $ac_cv_type_mode_t = no; then - cat >> confdefs.h <<\EOF -#define mode_t u_short -EOF - -fi - - -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1289: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3042 "configure" #include "confdefs.h" #include #include #include #include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* + +_ACEOF +if { (eval echo "$as_me:3050: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3056: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_cv_header_stdc=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* ac_cv_header_stdc=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3078 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -1332,16 +3092,16 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3096 "configure" #include "confdefs.h" #include -EOF + +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then : else - rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* @@ -1350,400 +3110,460 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3117 "configure" #include "confdefs.h" #include -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif -EOF -if { (eval echo configure:1369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:3143: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3146: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:3148: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3151: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then : else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_header_stdc=no fi -rm -fr conftest* -fi - +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 +fi +echo "$as_me:3164: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi -for ac_hdr in fcntl.h termcap.h termio.h termios.h unistd.h +for ac_header in fcntl.h termcap.h termio.h termios.h unistd.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1396: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:3177: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3183 "configure" #include "confdefs.h" -#include <$ac_hdr> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:3187: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3193: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + eval "$as_ac_Header=no" fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&6 + fi done - _cppflags="${CPPFLAGS}" _ldflags="${LDFLAGS}" # Check whether --with-ncurses or --without-ncurses was given. if test "${with_ncurses+set}" = set; then withval="$with_ncurses" - + if test "$withval" != "no"; then CPPFLAGS="${CPPFLAGS} -I$withval/include -I$withval/include/ncurses" LDFLAGS="${LDFLAGS} -L$withval/lib" fi -fi +fi; - -ac_safe=`echo "ncurses.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for ncurses.h""... $ac_c" 1>&6 -echo "configure:1450: checking for ncurses.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3236: checking for ncurses.h" >&5 +echo $ECHO_N "checking for ncurses.h... $ECHO_C" >&6 +if test "${ac_cv_header_ncurses_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3242 "configure" #include "confdefs.h" #include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" +_ACEOF +if { (eval echo "$as_me:3246: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3252: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_cv_header_ncurses_h=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_cv_header_ncurses_h=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:1477: checking for initscr in -lncurses" >&5 -ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3271: result: $ac_cv_header_ncurses_h" >&5 +echo "${ECHO_T}$ac_cv_header_ncurses_h" >&6 +if test $ac_cv_header_ncurses_h = yes; then + echo "$as_me:3274: checking for initscr in -lncurses" >&5 +echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6 +if test "${ac_cv_lib_ncurses_initscr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3282 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char initscr(); - -int main() { -initscr() -; return 0; } -EOF -if { (eval echo configure:1496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + builtin and then its argument prototype would still apply. */ +char initscr (); +int +main () +{ +initscr (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3301: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3304: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3307: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3310: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ncurses_initscr=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_ncurses_initscr=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" - +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF +echo "$as_me:3321: result: $ac_cv_lib_ncurses_initscr" >&5 +echo "${ECHO_T}$ac_cv_lib_ncurses_initscr" >&6 +if test $ac_cv_lib_ncurses_initscr = yes; then + cat >>confdefs.h <<\EOF #define HAVE_NCURSES_H 1 EOF LIBS="${LIBS} -lncurses" else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6 -echo "configure:1518: checking for initscr in -lcurses" >&5 -ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:3329: checking for initscr in -lcurses" >&5 +echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6 +if test "${ac_cv_lib_curses_initscr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3337 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char initscr(); - -int main() { -initscr() -; return 0; } -EOF -if { (eval echo configure:1537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + builtin and then its argument prototype would still apply. */ +char initscr (); +int +main () +{ +initscr (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3356: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3359: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3362: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3365: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_curses_initscr=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_curses_initscr=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" - +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF +echo "$as_me:3376: result: $ac_cv_lib_curses_initscr" >&5 +echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6 +if test $ac_cv_lib_curses_initscr = yes; then + cat >>confdefs.h <<\EOF #define HAVE_CURSES_H 1 EOF LIBS="${LIBS} -lcurses" else - echo "$ac_t""no" 1>&6 -{ echo "configure: error: bvi requires the curses library" 1>&2; exit 1; } + { { echo "$as_me:3384: error: bvi requires the curses library" >&5 +echo "$as_me: error: bvi requires the curses library" >&2;} + { (exit 1); exit 1; }; } fi fi else - echo "$ac_t""no" 1>&6 -ac_safe=`echo "curses.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for curses.h""... $ac_c" 1>&6 -echo "configure:1567: checking for curses.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:3392: checking for curses.h" >&5 +echo $ECHO_N "checking for curses.h... $ECHO_C" >&6 +if test "${ac_cv_header_curses_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3398 "configure" #include "confdefs.h" #include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" +_ACEOF +if { (eval echo "$as_me:3402: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3408: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_cv_header_curses_h=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_cv_header_curses_h=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6 -echo "configure:1594: checking for initscr in -lcurses" >&5 -ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3427: result: $ac_cv_header_curses_h" >&5 +echo "${ECHO_T}$ac_cv_header_curses_h" >&6 +if test $ac_cv_header_curses_h = yes; then + echo "$as_me:3430: checking for initscr in -lcurses" >&5 +echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6 +if test "${ac_cv_lib_curses_initscr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3438 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char initscr(); - -int main() { -initscr() -; return 0; } -EOF -if { (eval echo configure:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + builtin and then its argument prototype would still apply. */ +char initscr (); +int +main () +{ +initscr (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3457: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3460: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3463: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3466: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_curses_initscr=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_curses_initscr=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" - +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF +echo "$as_me:3477: result: $ac_cv_lib_curses_initscr" >&5 +echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6 +if test $ac_cv_lib_curses_initscr = yes; then + cat >>confdefs.h <<\EOF #define HAVE_CURSES_H 1 EOF LIBS="${LIBS} -lcurses" else - echo "$ac_t""no" 1>&6 -{ echo "configure: error: bvi requires the curses library" 1>&2; exit 1; } + { { echo "$as_me:3485: error: bvi requires the curses library" >&5 +echo "$as_me: error: bvi requires the curses library" >&2;} + { (exit 1); exit 1; }; } fi else - echo "$ac_t""no" 1>&6 -{ echo "configure: error: bvi requires the curses library" 1>&2; exit 1; } + { { echo "$as_me:3491: error: bvi requires the curses library" >&5 +echo "$as_me: error: bvi requires the curses library" >&2;} + { (exit 1); exit 1; }; } fi fi - - -for ac_func in strdup strtol memmove +for ac_func in strdup strtol strerror memmove do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1649: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:3501: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3507 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:1677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3538: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3541: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3544: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3547: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi +echo "$as_me:3557: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done - -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "sys_errlist" >/dev/null 2>&1; then - rm -rf conftest* - errl=ok -else - rm -rf conftest* - errl=no -fi -rm -f conftest* - -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "sys_errlist" >/dev/null 2>&1; then - rm -rf conftest* - errl=ok -fi -rm -f conftest* - -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "sys_errlist" >/dev/null 2>&1; then - rm -rf conftest* - errl=ok -fi -rm -f conftest* - -if test $errl = no; then - cat >> confdefs.h <<\EOF -#define NO_SYSERRL 1 -EOF - -fi - # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -1751,31 +3571,39 @@ fi # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1760: checking for a BSD compatible install" >&5 +echo "$as_me:3579: checking for a BSD compatible install" >&5 +echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + ac_save_IFS=$IFS; IFS=$ac_path_separator for ac_dir in $PATH; do + IFS=$ac_save_IFS # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + case $ac_dir/ in + / | ./ | .// | /cC/* \ + | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \ + | /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then + if $as_executable_p "$ac_dir/$ac_prog"; then if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -1785,389 +3613,850 @@ else ;; esac done - IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" + INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. - INSTALL="$ac_install_sh" + INSTALL=$ac_install_sh fi fi -echo "$ac_t""$INSTALL" 1>&6 +echo "$as_me:3628: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +ac_config_files="$ac_config_files Makefile" -trap '' 1 2 15 -cat > confcache <<\EOF +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overriden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if cmp -s $cache_file confcache; then :; else if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' fi -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - DEFS=-DHAVE_CONFIG_H -# Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL # Generated automatically by configure. # Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done +debug=false +SHELL=\${CONFIG_SHELL-$SHELL} +ac_cs_invocation="\$0 \$@" -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" +_ACEOF -trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@CC@%$CC%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@CPP@%$CPP%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +cat >>$CONFIG_STATUS <<\_ACEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi + +# Name of the executable. +as_me=`echo "$0" |sed 's,.*[\\/],,'` + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +# NLS nuisances. +$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } +$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } +$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } +$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } +$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } +$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } +$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } +$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } + +exec 6>&1 + +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\EOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." EOF -cat >> $CONFIG_STATUS <>$CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + +cat >>$CONFIG_STATUS <<\EOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + shift + set dummy "$ac_option" "$ac_optarg" ${1+"$@"} + shift + ;; + -*);; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_need_defaults=false;; esac - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + case $1 in + # Handling of the options. +EOF +cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:3893: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + shift + CONFIG_FILES="$CONFIG_FILES $1" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + shift + CONFIG_HEADERS="$CONFIG_HEADERS $1" + ac_need_defaults=false;; - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + # This is an error. + -*) { { echo "$as_me:3912: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +exec 5>>config.log +cat >&5 << _ACEOF + +## ----------------------- ## +## Running config.status. ## +## ----------------------- ## + +This file was extended by $as_me 2.52, executed with + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + > $ac_cs_invocation +on `(hostname || uname -n) 2>/dev/null | sed 1q` + +_ACEOF +EOF + +cat >>$CONFIG_STATUS <<\EOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + *) { { echo "$as_me:3949: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. +: ${TMPDIR=/tmp} +{ + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=$TMPDIR/cs$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } +} + +EOF + +cat >>$CONFIG_STATUS <\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@DEFS@,$DEFS,;t t +s,@LIBS@,$LIBS,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CPP@,$CPP,;t t +CEOF + +EOF + + cat >>$CONFIG_STATUS <<\EOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +EOF +cat >>$CONFIG_STATUS <<\EOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || mkdir "$as_incr_dir" + ;; + esac +done; } + + ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` else ac_dir_suffix= ac_dots= fi - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + case $srcdir in + .) ac_srcdir=. + if test -z "$ac_dots"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; + ac_srcdir=$ac_dots$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_dots$srcdir ;; esac - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_dots$INSTALL ;; esac - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac + if test x"$ac_file" != x-; then + { echo "$as_me:4163: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated automatically by config.status. */ + configure_input="Generated automatically from `echo $ac_file_in | + sed 's,.*/,,'` by configure." - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:4181: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:4194: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +EOF +cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +EOF +cat >>$CONFIG_STATUS <<\EOF + +# +# CONFIG_HEADER section. +# # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' +ac_uD=',;t' -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - echo creating $ac_file + test x"$ac_file" != x- && { echo "$as_me:4255: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:4266: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:4279: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in EOF -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\EOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +cat >>conftest.undefs <<\EOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, EOF -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS rm -f conftest.tail -while : +while grep . conftest.defines >/dev/null do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines done -rm -f conftest.vals +rm -f conftest.defines +echo ' fi # egrep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\EOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated automatically by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated automatically by configure. */" >$tmp/config.h else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file + echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h fi -fi; done + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if cmp -s $ac_file $tmp/config.h 2>/dev/null; then + { echo "$as_me:4396: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || mkdir "$as_incr_dir" + ;; + esac +done; } + fi + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +done EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\EOF -exit 0 +{ (exit 0); exit 0; } EOF chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +ac_clean_files=$ac_clean_files_save + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + exec 5>/dev/null + $SHELL $CONFIG_STATUS || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi diff --git a/configure.in b/configure.in index 7536ee9..bc5152f 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(bvi.c) +AC_INIT +AC_CONFIG_SRCDIR([bvi.c]) AC_CONFIG_HEADER(config.h) AC_CANONICAL_HOST @@ -10,6 +11,7 @@ case "$host_os" in sunos4*) AC_MSG_RESULT("using /usr/5bin/cc") CC="/usr/5bin/cc" + ac_objext="o" ;; *) AC_PROG_CC @@ -39,7 +41,6 @@ AC_CHECK_SIZEOF(void *) AC_CHECK_TYPE(size_t, unsigned int) AC_CHECK_TYPE(off_t, int) -AC_CHECK_TYPE(mode_t, u_short) dnl Checks for header files. AC_HEADER_STDC @@ -74,15 +75,9 @@ dnl AC_TYPE_SIZE_T dnl Checks for library functions. dnl AC_TYPE_SIGNAL -AC_CHECK_FUNCS(strdup strtol memmove) - -AC_EGREP_HEADER(sys_errlist, stdio.h, errl=ok, errl=no) -AC_EGREP_HEADER(sys_errlist, errno.h, errl=ok,) -AC_EGREP_HEADER(sys_errlist, sys/types.h, errl=ok,) -if test $errl = no; then - AC_DEFINE(NO_SYSERRL) -fi +AC_CHECK_FUNCS(strdup strtol strerror memmove) AC_PROG_INSTALL -AC_OUTPUT(Makefile) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/edit.c b/edit.c index e0c22ad..ed8e8ba 100644 --- a/edit.c +++ b/edit.c @@ -7,8 +7,9 @@ * 1999-10-30 V 1.2.0 final * 2000-05-14 V 1.3.0 alpha * 2000-07-15 V 1.3.0 final + * 2001-12-07 V 1.3.1 * - * Copyright 1996-2000 by Gerhard Buergmann + * Copyright 1996-2001 by Gerhard Buergmann * Gerhard.Buergmann@altavista.net * * This program is free software; you can redistribute it and/or modify it @@ -111,7 +112,7 @@ edit(mode) setcur(); continue; } - if (ch == KEY_BACKSPACE || ch == CTRL('H')) { + if (ch == KEY_BACKSPACE || ch == BVICTRL('H')) { if (count > 0) { len--; count--; @@ -142,7 +143,7 @@ edit(mode) ch1 = -1; } } while (ch1 == -1); - rep_buf[len++] = ch; + rep_buf[len++] = ch1; mvaddch(y, x + 1, ch1); sprintf(tmpbuf, "%c%c", ch, ch1); sscanf(tmpbuf, "%2x", &ch); @@ -747,7 +748,7 @@ do_delete(n, start) memmove(start, start + undo_count, maxpos - (start + undo_count)); filesize -= undo_count; maxpos -= undo_count; - if (start == maxpos) { + if (start == maxpos && start > mem) { start--; cur_back(); } @@ -893,5 +894,5 @@ do_mark(mark, addr) void movebyte() { - emsg("Command disabled@- use ':set memmove' to enable"); + emsg("Command disabled@- use ':set memmove' to enable "); } diff --git a/html/bmore.html b/html/bmore.html index 54b2f41..4081da7 100644 --- a/html/bmore.html +++ b/html/bmore.html @@ -1,4 +1,4 @@ - + BVI: bmore @@ -7,7 +7,7 @@ - +
- +

@@ -37,7 +37,7 @@


@@ -54,14 +54,14 @@ height="62" border="0">

-bmore is a filter that displays the contents of a binary +bmore is a filter that displays the contents of a binary file on the terminal, one screenful at a time. It normally pauses after each -screenful, and prints --More-- at the bottom of the screen. -bmore provides a two-line over­ lap between screens for +screenful, and prints --More-- at the bottom of the screen. +bmore provides a two-line over­ lap between screens for continuity. If bmore is reading from a file rather than a pipe, the percentage of characters displayed so far is also shown. -

-bmore scrolls up to display one more screen line in +

+bmore scrolls up to display one more screen line in response to a RETURN character; it displays another screenful in response to a SPACE character. Other commands are listed below.

@@ -74,8 +74,8 @@ screen line. Note that (as one would expect) the first byte has the offset 0 (zero).

- - +
+
+
-
+
-
 000000
 00000C
 000018
@@ -90,7 +90,7 @@ byte has the offset 0 (zero).
 000178
 000184
 000190
-00009C
+00009C
  7F 45 4C 46 01 01
  00 00 00 00 01 00
  00 00 00 00 00 00
@@ -105,7 +105,7 @@ byte has the offset 0 (zero).
  45 08 50 E8 FC FF
  0C 85 D2 75 17 6A
  E9 43 02 00 00 8D
- 0C 85 D2 75 0D C7
+ 0C 85 D2 75 0D C7
  01 00 00 00 00 00
  03 00 01 00 00 00
  00 00 0C 07 00 00
@@ -120,7 +120,7 @@ byte has the offset 0 (zero).
  FF FF 89 C2 83 C4
  01 E8 60 02 00 00
  74 26 00 8D BC 27
- 45 A0 00 00 00 00
+ 45 A0 00 00 00 00
  .ELF........
  ............
  ............
@@ -135,12 +135,12 @@ byte has the offset 0 (zero).
  E.P.........
  ...u.j..`...
  .C....t&...'
- ...u..E.....
+ ...u..E.....
--More--(5%) -
- +
+

Equal lines will only displayed once, a star (*) is the placeholder for one or more lines equal to the line above. diff --git a/html/bmore_cmd.html b/html/bmore_cmd.html index 6ada4f9..1b40a7d 100644 --- a/html/bmore_cmd.html +++ b/html/bmore_cmd.html @@ -1,4 +1,4 @@ - + BVI: Commands @@ -7,7 +7,7 @@ - +
- +

@@ -37,7 +37,7 @@


diff --git a/html/bmore_opt.html b/html/bmore_opt.html index bd1ba47..75f887e 100644 --- a/html/bmore_opt.html +++ b/html/bmore_opt.html @@ -1,4 +1,4 @@ - +BVI: Command Line Options @@ -7,7 +7,7 @@
- +
- +

@@ -37,7 +37,7 @@


diff --git a/html/download.html b/html/download.html index 58e90d2..99340a8 100644 --- a/html/download.html +++ b/html/download.html @@ -1,4 +1,4 @@ - +BVI: Download Page @@ -7,7 +7,7 @@
- +
- +

@@ -18,6 +18,7 @@

Download
+New in 1.3.1
New in 1.3.0
New in 1.2.0

@@ -36,7 +37,7 @@
@@ -54,45 +55,33 @@ height="62" border="0">

NOTE: All packages are compressed with the GNU gzip program. You -can download it from ftp://ftp.gnu.org/gnu/gzip/. -

-Current stable release of bvi is 1.3.0 -(Check out what's new): -

-

Sources

- -

Executables

- +can download it from ftp://ftp.gnu.org/gnu/gzip/. +

+Current stable release of bvi is 1.3.1 +(Check out what's new): +

+

Sources

+ +

Executables

+ +

Back to the topBack to the top


-Last update: October 23rd 22:36:45 CEST 2000 by Gerhard Bürgmann +Last update: February 12th 2002 by Gerhard Bürgmann
diff --git a/html/german.html b/html/german.html index a228d76..8b39ef3 100644 --- a/html/german.html +++ b/html/german.html @@ -1,4 +1,4 @@ - + BVI: Deutsche Beschreibung @@ -7,7 +7,7 @@ - +
- +

@@ -34,7 +34,7 @@


diff --git a/html/gif/.xvpics/bg2.gif b/html/gif/.xvpics/bg2.gif new file mode 100644 index 0000000..94f1144 --- /dev/null +++ b/html/gif/.xvpics/bg2.gif @@ -0,0 +1,5 @@ +P7 332 +#IMGINFO:1600x1 Indexed (91 bytes) +#END_OF_COMMENTS +80 1 255 +I$IIÛ¶¶¶IH%IÛ¶¶Ú%HI%Û¶Ú¶%HII·Ú¶¶%HIIÛ¶¶¶I$IIÛ¶¶Û$I$IÛ¶Ú·$IH%Û¶Ú·$IHI·Ú¶·H%HIÛ¶¶· \ No newline at end of file diff --git a/html/gif/bg2.gif b/html/gif/bg2.gif index 452982e55fe77410ccea83a91f885d5f156c6a78..4a4166f725513c49bdfe1dd285a0c8157caebdc3 100644 GIT binary patch delta 54 zcmWHGR(1Duv#?BbU}I!h$iVO)2+p5p05f!e6az?{fyrc|st(tpj~zZ*(^oPvSOWm` CDiNUo delta 49 vcmazJQ+4-rvoKF&U}a?Z$iVO)2+p5p00SK`2^42w(x0fR!>Y85fx#L8PlF3v diff --git a/html/index.html b/html/index.html index e3200cb..3bc5def 100644 --- a/html/index.html +++ b/html/index.html @@ -1,23 +1,23 @@ - + -BVI Home Page +BVI - Binary VIsual editor - +Bvi is a display oriented editor for binary files. +Its command set is based on those of the vi texteditor."> +
- - +
+

@@ -62,13 +62,16 @@ Hex-Editors

+ +SourceForge Logo +

Welcome to the
-bvi
+bvi
Homepage

Here you can find all the informations about bvi you need.
@@ -81,31 +84,31 @@ If you never heard about vi, maybe bvi is not choice for you.

-

Original site: http://bvi.linuxave.net

-

+

Original site: http://bvi.sourceforge.net

You can download source and compiled versions from the download page.
-Check out whats new in 1.3.0! -

+Check out whats new in 1.3.1! +

Newsgroup: comp.editors -

+ +

Mailing List:

To join this list, simply send a blank email to -bvi-subscribe@eGroups.com. +bvi-subscribe@yahoogroups.com. You will receive a subscription confirmation message. Simply reply this message and your subscription will be complete.
Bvi was developed by Gerhard Bürgmann and is published -under the GNU Public License. Current stable version is 1.3.0. +under the GNU Public License. Current stable version is 1.3.1. Bvi is running on most UNIX - like operating systems and on MSDOS.

If you want to contact me:
-Gerhard Bürgmann, Vienna / Austria / Europe
-Email: +Gerhard Bürgmann, Vienna ( Purkersdorf ) / Austria / Europe
+E-mail: Gerhard.Buergmann@altavista.net

@@ -115,7 +118,7 @@ Gerhard.Buergmann@altavista.net alt="Back to the top">Back to the top


-Last update: October 23rd 2000 by Gerhard Bürgmann +Last update: February 12th 2002 by Gerhard Bürgmann

diff --git a/html/install.html b/html/install.html index 2ebe9c3..e7e89e5 100644 --- a/html/install.html +++ b/html/install.html @@ -1,4 +1,4 @@ - + BVI: Installation @@ -7,7 +7,7 @@
- +

@@ -52,20 +52,20 @@ height="62" border="0">

The following steps are necessary to get bvi running: -

UNIX

+

UNIX

The Unix version of bvi needs the curses (ncurses) library for cursor movement. -
    -
  1. Download the source package from the Download Page -
  2. Unzip the package with the command: -
    -    # gunzip -c bvi-1.3.0.src.tar.gz | tar xvf
    -
    -
  3. Change to the directory bvi-1.3.0 and type -
    +
      +
    1. Download the source package from the Download Page
    2. +
    3. Unzip the package with the command:
    4. +
      +    # gunzip -c bvi-1.3.1.src.tar.gz | tar xvf
      +
      +
    5. Change to the directory bvi-1.3.1 and type +
           # ./configure
           # make
      -
      +
  4. Type `make install' for copying the executable files and manual pages to the final directories. @@ -86,45 +86,47 @@ You will find now four new commands: bview The readonly version of bvi bedit The beginners version of bvi bmore The binary more program - +
  5. Use `make uninstall' to remove the installed files from your file system.
    You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for -a different kind of computer), type `make distclean'. +a different kind of computer), type `make distclean'.
-

MSDOS

+

MSDOS

You have to convert the sourcefiles from the UNIX textformat to the MSDOS textformat first. This can be done e.g. by loading and saving them with the MSDOS standard editor `edit'. -

+

The MSDOS version is using the conio routines of the -Borland - C compilers for cursor movement. The doscur.h -header file substitutes the curses commands.
+Borland - C compilers for cursor movement. The doscur.h +header file substitutes the curses commands.
Bvi is using the "HUGE" memory model, bmore needs the "TINY" model to be able to convert it to a .COM file. -

    -
  1. Download the source package from the Download Page -
  2. Unzip the package with the command: -
    -    gunzip -c bvi-1.3.0.src.tar.gz | tar xvf
    -
    -
  3. Load the tcconfig file (located in the bc subdirectory -for Borland - C). +
      +
    1. Download the source package from the Download Page
    2. +
    3. Unzip the package with the command: +
      +    gunzip -c bvi-1.3.1.src.tar.gz | tar xvf
      +
    4. +
    5. Load the tcconfig file (located in the bc subdirectory +for Borland - C).
    6. -
    7. Press F9-Make -
    +
  4. Press F9-Make
  5. +
+The MSDOS version exists for historical reasons and is not really +supported anymore.

Back to the topBack to the top


-Last update: Thu Oct 19 21:31:04 CEST 2000 by Gerhard Bürgmann +Last update: February 12th 2002 by Gerhard Bürgmann
diff --git a/html/new120.html b/html/new120.html index 4a5b8cd..0b755e8 100644 --- a/html/new120.html +++ b/html/new120.html @@ -1,4 +1,4 @@ - + BVI: CHANGES in bvi 1.2.0 @@ -7,7 +7,7 @@ - +
- +

@@ -18,6 +18,7 @@

Download
+New in 1.3.1
New in 1.3.0
New in 1.2.0

@@ -36,7 +37,7 @@
@@ -53,11 +54,11 @@ height="62" border="0">

-

    -
  • Configuration with GNU autoconfig -
  • New :set options: -
      -
    • :set columns=n
      +
        +
      • Configuration with GNU autoconfig +
      • New :set options: +
          +
        • :set columns=n
          You can set the number of columns on the screen to an arbitrary value. This might be useful if you edit a file with a fixed record length.
          diff --git a/html/new130.html b/html/new130.html index 5d349a9..79a0cf0 100644 --- a/html/new130.html +++ b/html/new130.html @@ -1,4 +1,4 @@ - + BVI: CHANGES in bvi 1.3.0 @@ -7,7 +7,7 @@ - +
          - +

          @@ -18,6 +18,7 @@

          Download
          +New in 1.3.1
          New in 1.3.0
          New in 1.2.0

          @@ -36,7 +37,7 @@
          diff --git a/html/new131.html b/html/new131.html new file mode 100644 index 0000000..e11a840 --- /dev/null +++ b/html/new131.html @@ -0,0 +1,96 @@ + + +BVI: CHANGES in bvi 1.3.1 + + + + +
          + + +
          + + +
          +

          +Home
          +

          +

          +Quick Tutorial
          +

          +

          +Download
          +New in 1.3.1
          +New in 1.3.0
          +New in 1.2.0
          +

          +

          +Installation
          +

          +

          +Command Overview
          +

          +

          +bmore
          +

          +

          +Deutsche Beschreibung
          +

          +
          + +
          + + + + +
          +CHANGES in bvi 1.3.1 + + +BVI +
          +
          +
          + +

          +This is a bugfix release. +

          +BVI: +

            +
          • autoconf 2.52 used +

            +

          • do_back() fixed (cast)
          • +

            +

          • replace sys_errlist[errno] with strerror(errno) (Debian #106762)
          • +

            +

          • fix: one can continue deleting bytes even when file is empty (Debian #121934)
          • +

            +

          • wish: no ":set mm" to delete bytes from end of file (Debian #122240)
          • +

            +

          • cast for alloc_buf() in set.c
          • +

            +

          • r-bug fix in edit.c and bvi.c
          • +

            +

          • renamed CTRL to BVICTRL (AIX problem)
          • +

            +

          + +BMORE: +
            +
          • nicer last line
          • +

            +

          • bmbeep() instead of beep() (SOLARIS problem)
          • +

            +

          • subshell support fixes
          • +
          + +

          + +Back to the top + +


          +Last update: February 12th 2002 by Gerhard Bürgmann +
          + diff --git a/html/overview.html b/html/overview.html index a4815d8..7fd05f8 100644 --- a/html/overview.html +++ b/html/overview.html @@ -1,4 +1,4 @@ - + BVI: Command Overview @@ -7,7 +7,7 @@ - +
          - +

          @@ -40,7 +40,7 @@


          diff --git a/html/qt_bit.html b/html/qt_bit.html index 9c49532..356eda5 100644 --- a/html/qt_bit.html +++ b/html/qt_bit.html @@ -1,4 +1,4 @@ - +BVI: Bit-wise Operations diff --git a/html/qt_edit.html b/html/qt_edit.html index 929be3a..60e2615 100644 --- a/html/qt_edit.html +++ b/html/qt_edit.html @@ -1,4 +1,4 @@ - +BVI: Editing Files @@ -7,7 +7,7 @@
          - +
          - +

          @@ -41,7 +41,7 @@


          diff --git a/html/qt_find.html b/html/qt_find.html index 832ca6b..69ea036 100644 --- a/html/qt_find.html +++ b/html/qt_find.html @@ -1,4 +1,4 @@ - +BVI: Find and Replace @@ -7,7 +7,7 @@
          - +
          - +

          @@ -41,7 +41,7 @@


          diff --git a/html/qt_partial.html b/html/qt_partial.html index e487ac9..482b642 100644 --- a/html/qt_partial.html +++ b/html/qt_partial.html @@ -1,4 +1,4 @@ - +BVI: Partial File Read @@ -7,7 +7,7 @@
          - +
          - +

          @@ -41,7 +41,7 @@


          diff --git a/html/qt_search.html b/html/qt_search.html index 4af55c5..8325485 100644 --- a/html/qt_search.html +++ b/html/qt_search.html @@ -1,4 +1,4 @@ - +BVI: Search Commands @@ -7,7 +7,7 @@
          - +
          - +

          @@ -41,7 +41,7 @@


          diff --git a/html/qt_set.html b/html/qt_set.html index b7710ed..962221b 100644 --- a/html/qt_set.html +++ b/html/qt_set.html @@ -1,4 +1,4 @@ - +BVI: Settings @@ -7,7 +7,7 @@
          - +
          - +

          @@ -41,7 +41,7 @@


          diff --git a/html/qt_yank.html b/html/qt_yank.html index d55e2f7..5227dd9 100644 --- a/html/qt_yank.html +++ b/html/qt_yank.html @@ -1,4 +1,4 @@ - +BVI: Yank and Put @@ -7,7 +7,7 @@
          - +
          - +

          @@ -41,7 +41,7 @@


          diff --git a/html/quick.html b/html/quick.html index 5fc839f..b80629a 100644 --- a/html/quick.html +++ b/html/quick.html @@ -1,4 +1,4 @@ - +BVI: Quick Tutorial @@ -7,7 +7,7 @@
          - +
          - +

          @@ -41,7 +41,7 @@


          diff --git a/html/sitemap.html b/html/sitemap.html index fe1ffcd..427300a 100644 --- a/html/sitemap.html +++ b/html/sitemap.html @@ -1,4 +1,4 @@ - +BVI: Sitemap @@ -7,7 +7,7 @@
          - +
          - +

          @@ -34,7 +34,7 @@


          @@ -88,6 +88,9 @@ height="62" border="0">
          • +New in 1.3.1
            +
          • +
          • New in 1.3.0
          • @@ -148,6 +151,6 @@ height="62" border="0"> alt="Back to the top">Back to the top
            -Last update: Thu Oct 12 20:42:01 CEST 2000 by Gerhard Bürgmann +Last update: February 12th 2002 by Gerhard Bürgmann
          diff --git a/install-sh b/install-sh index 89fc9b0..398a88e 100755 --- a/install-sh +++ b/install-sh @@ -1,15 +1,27 @@ -#! /bin/sh +#!/bin/sh # # install - install a program, script, or datafile -# This comes from X11R5. +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. -# +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. # set DOITPROG to echo to test this script @@ -29,7 +41,7 @@ stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" -tranformbasename="" +transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" @@ -97,7 +109,7 @@ then echo "install: no input file specified" exit 1 else - true + : fi if [ x"$dir_arg" != x ]; then @@ -106,8 +118,9 @@ if [ x"$dir_arg" != x ]; then if [ -d $dst ]; then instcmd=: + chmodcmd="" else - instcmd=mkdir + instcmd=$mkdirprog fi else @@ -117,7 +130,7 @@ else if [ -f $src -o -d $src ] then - true + : else echo "install: $src does not exist" exit 1 @@ -128,7 +141,7 @@ else echo "install: no destination specified" exit 1 else - true + : fi # If destination is a directory, append the input filename; if your system @@ -138,7 +151,7 @@ else then dst="$dst"/`basename $src` else - true + : fi fi @@ -150,8 +163,8 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then -defaultIFS=' -' +defaultIFS=' + ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" @@ -170,7 +183,7 @@ while [ $# -ne 0 ] ; do then $mkdirprog "${pathcomp}" else - true + : fi pathcomp="${pathcomp}/" @@ -181,10 +194,10 @@ if [ x"$dir_arg" != x ] then $doit $instcmd $dst && - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi else # If we're going to rename the final executable, determine the name now. @@ -203,7 +216,7 @@ else then dstfile=`basename $dst` else - true + : fi # Make a temp file name in the proper directory. @@ -222,10 +235,10 @@ else # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && # Now rename the file to the real destination. diff --git a/mkinstalldirs b/mkinstalldirs index a62468a..1f25cd9 100755 --- a/mkinstalldirs +++ b/mkinstalldirs @@ -4,9 +4,29 @@ # Created: 1993-05-16 # Public domain -# $Id: mkinstalldirs,v 1.12.2.1 1998/12/26 17:32:14 bje Exp $ +# $Id: mkinstalldirs,v 1.1 2001/05/22 14:43:50 akim Exp $ errstatus=0 +dirmode="" + +usage="\ +Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." + +# process command line arguments +while test $# -gt 0 ; do + case "${1}" in + -h | --help | --h* ) # -h for help + echo "${usage}" 1>&2; exit 0 ;; + -m ) # -m PERM arg + shift + test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } + dirmode="${1}" + shift ;; + -- ) shift; break ;; # stop option processing + -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option + * ) break ;; # first non-opt arg + esac +done for file do @@ -28,6 +48,17 @@ do if test ! -d "$pathcomp"; then errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + + lasterr="" + chmod $dirmode "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi fi fi @@ -36,3 +67,8 @@ do done exit $errstatus + +# Local Variables: +# mode:shell-script +# sh-indentation:3 +# End: diff --git a/patchlevel.h b/patchlevel.h index 2397ce3..e2dcba9 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -1 +1 @@ -#define VERSION "1.3.0" +#define VERSION "1.3.1" diff --git a/set.c b/set.c index 7681285..fefd2cc 100644 --- a/set.c +++ b/set.c @@ -9,8 +9,9 @@ * 1999-07-02 V 1.2.0 beta * 1999-08-14 V 1.2.0 final * 2000-07-15 V 1.3.0 final + * 2001-10-10 V 1.3.1 cast for alloc_buf * - * Copyright 1996-2000 by Gerhard Buergmann + * Copyright 1996-2001 by Gerhard Buergmann * Gerhard.Buergmann@altavista.net * * This program is free software; you can redistribute it and/or modify it @@ -258,7 +259,7 @@ do_logic(mode, str) return 1; } } - if ((undo_count = alloc_buf(end_addr - start_addr + 1, &undo_buf))) { + if ((undo_count = alloc_buf((off_t)(end_addr - start_addr + 1), &undo_buf))) { memcpy(undo_buf, start_addr, undo_count); } undo_start = start_addr; @@ -326,7 +327,7 @@ getcmdstr(p, x) move(maxy, x); do { switch (c = vgetc()) { - case CTRL('H'): + case BVICTRL('H'): case KEY_BACKSPACE: case KEY_LEFT: if (p > buff) { From 12a0ed970c5ba350ea32157d08fd6276165145d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20B=C3=BCrgmann?= Date: Fri, 7 Jan 2005 00:00:00 +0000 Subject: [PATCH 2/6] bvi-1.3.2.src.tar.gz --- CHANGES | 17 + CREDITS | 3 +- Makefile.in | 17 +- README | 6 +- acconfig.h | 4 + bm_dos.c | 52 ++- bm_unix.c | 71 +++- bmore.1 | 19 +- bmore.c | 224 +++++++---- bmore.c.old | 871 ++++++++++++++++++++++++++++++++++++++++++ bmore.h | 35 +- bmore.man | 224 +++++------ bvi.1 | 8 +- bvi.c | 7 +- bvi.h | 11 +- bvi.man | 196 +++++----- comm.c | 7 +- config.guess | 444 ++++++++++++--------- config.h.in | 118 ++++-- config.sub | 320 ++++++++++------ configure | 2 +- configure.in | 2 +- dosconf.h | 4 +- doscur.h | 5 +- dosio.c | 4 +- edit.c | 7 +- html/bmore.html | 15 +- html/bmore_opt.html | 15 +- html/colon.html | 3 +- html/cursor.html | 3 +- html/download.html | 31 +- html/edit.html | 3 +- html/german.html | 11 +- html/index.html | 39 +- html/install.html | 25 +- html/man_bmore.html | 202 +++++----- html/man_bvi.html | 124 +++--- html/new120.html | 8 +- html/new130.html | 8 +- html/new131.html | 8 +- html/new132.html | 93 +++++ html/overview.html | 15 +- html/qt_bit.html | 3 +- html/qt_edit.html | 3 +- html/qt_edit.tmp.html | 113 ------ html/qt_find.html | 3 +- html/qt_partial.html | 3 +- html/qt_search.html | 3 +- html/qt_set.html | 3 +- html/qt_yank.html | 3 +- html/quick.html | 3 +- html/set.html | 3 +- html/sitemap.html | 10 +- html/yank.html | 3 +- install-sh | 109 ++++-- io.c | 21 +- mkinstalldirs | 123 +++--- patchlevel.h | 2 +- re.c | 27 +- recomp.c | 4 +- script | 4 + set.c | 11 +- set.h | 4 +- 63 files changed, 2580 insertions(+), 1159 deletions(-) create mode 100644 bmore.c.old mode change 100644 => 100755 config.guess mode change 100644 => 100755 config.sub create mode 100644 html/new132.html delete mode 100644 html/qt_edit.tmp.html create mode 100644 script diff --git a/CHANGES b/CHANGES index 942a16d..29a07f7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,20 @@ +New in release 1.3.2 +==================== + +* configure: checking term.h and ncurses/term.h +* cast in bmore.c in putline(); +* ported to compile under DJGPP v2.0 w/ PDCURSES (by simoN) +* fixed multiple file handling for "bmore" (by simoN) +* renamed several local screen processing routines to avoid compiler conflicts +* several minor fixes to "bmore" code (by simoN) +* reset tty after CTRL-C in bmore +* -c option in bmore (clear before displaying) +* -n num option in bmore (display the indicated number of lines in each + screenful +* -w num option in bmore (display the indicated number of bytes in each + line) + + New in release 1.3.1 ==================== diff --git a/CREDITS b/CREDITS index 92b05d1..306802c 100644 --- a/CREDITS +++ b/CREDITS @@ -9,13 +9,14 @@ Claudio Nieder Makefile Nico Schmidt r-bug fix Steve Waltner Mac OS X support Andre Wobst AIX fixes -SimoN bmore: subshell support fixes +SimoN bmore: subshell support fixes, DJGPP support Packages: Christian "naddy" Weisgerber Source RPM Christian Kurz Debian package Stijn de Bekker Debian package Troy Engel i386 RPM package +Thomas Steudten RH alpha and x86 RPM package Doc: Sven Guckes diff --git a/Makefile.in b/Makefile.in index a0bef99..55e9b25 100644 --- a/Makefile.in +++ b/Makefile.in @@ -6,8 +6,8 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# Copyright (c) 1996-2000 by Gerhard Buergmann -# Gerhard.Buergmann@altavista.net +# Copyright (c) 1996-2003 by Gerhard Buergmann +# gerhard@puon.at # # 1996-01-18 V 1.0.0 # 1999-01-15 V 1.1.0 @@ -15,6 +15,7 @@ # 1999-10-22 V 1.2.0 # 2000-05-31 V 1.3.0 beta # 2000-10-01 V 1.3.0 final +# 2003-07-03 V 1.3.2 # ############################################### @@ -24,7 +25,7 @@ exec_prefix = @exec_prefix@ bindir = $(DESTDIR)@bindir@ mandir = $(DESTDIR)@mandir@ -datadir = $(DESTDIR)@datadir@ +libdir = $(DESTDIR)@libdir@ man1dir = $(mandir)/man1 @@ -57,7 +58,7 @@ bmore: $(BMOBJ) $(CC) $(CFLAGS) $(DEFS) -c $< bmore.o: bmore.c - $(CC) $(CFLAGS) $(DEFS) -DHELPFILE=\"$(datadir)/bmore.help\" -c $< + $(CC) $(CFLAGS) $(DEFS) -DHELPFILE=\"$(libdir)/bmore.help\" -c $< install: all installdirs @@ -65,14 +66,14 @@ install: all installdirs @$(INSTALL_DATA) bvi.1 bmore.1 $(man1dir) @$(INSTALL_PROGRAM) -s bvi $(bindir) @$(INSTALL_PROGRAM) -s bmore $(bindir) - @$(INSTALL_DATA) bmore.help $(datadir) + @$(INSTALL_DATA) bmore.help $(libdir) @if [ -f $(bindir)/bview ]; then rm $(bindir)/bview; fi @if [ -f $(bindir)/bvedit ]; then rm $(bindir)/bvedit; fi @ln $(bindir)/bvi $(bindir)/bview @ln $(bindir)/bvi $(bindir)/bvedit installdirs: - $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(datadir) $(man1dir) + $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(libdir) $(man1dir) uninstall: @echo "Uninstalling bvi" @@ -80,12 +81,12 @@ uninstall: @if [ -f $(bindir)/bvedit ]; then rm $(bindir)/bvedit; fi @if [ -f $(bindir)/bvi ]; then rm $(bindir)/bvi; fi @if [ -f $(bindir)/bmore ]; then rm $(bindir)/bmore; fi - @if [ -f $(datadir)/bmore.help ]; then rm $(datadir)/bmore.help; fi + @if [ -f $(libdir)/bmore.help ]; then rm $(libdir)/bmore.help; fi @if [ -f $(man1dir)/bvi.1 ]; then rm $(man1dir)/bvi.1; fi @if [ -f $(man1dir)/bmore.1 ]; then rm $(man1dir)/bmore.1; fi clean: - rm -f core *.o bvi bmore a.out + rm -f core *.o bvi bvi.exe bmore bmore.exe a.out distclean: clean rm -f Makefile config.cache config.h config.log config.status diff --git a/README b/README index 67bc989..b80a99b 100644 --- a/README +++ b/README @@ -9,8 +9,8 @@ and is distributed under the GPL (GNU Public License). How to compile ============== - gunzip -c bvi-1.3.1.tar.gz | tar xvf - - cd bvi-1.3.1 + gunzip -c bvi-1.3.2.tar.gz | tar xvf - + cd bvi-1.3.2 ./configure make make install @@ -39,6 +39,6 @@ comments, questions, etc. (even flames) to: Gerhard Buergmann Vienna, Austria -E-mail: Gerhard.Buergmann@utanet.at +E-mail: gerhard@puon.at diff --git a/acconfig.h b/acconfig.h index eb56d2d..8941d4c 100644 --- a/acconfig.h +++ b/acconfig.h @@ -5,3 +5,7 @@ #undef HAVE_CURSES_H #undef NO_SYSERRL + +#undef NEED_PUTC_CHAR + +#undef HAVE_NCURSES_TERM_H diff --git a/bm_dos.c b/bm_dos.c index 45d7f83..29ccf8c 100755 --- a/bm_dos.c +++ b/bm_dos.c @@ -3,11 +3,12 @@ * 2000-05-10 V 1.3.0 alpha * 2000-07-07 V 1.3.0 final * 2001-12-07 V 1.3.1 + * 2003-07-03 V 1.3.2 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2000 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1996-2003 by Gerhard Buergmann + * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -81,24 +82,47 @@ char *cmd; { system(cmd); printf("\r"); - clrscr(); + clearscreen(); fseek(curr_file, screen_home, SEEK_SET); bytepos = screen_home; } +void +highlight() +{ + highvideo(); +} + + +void +normal() +{ + normvideo(); +} + + +void +clearscreen() +{ + clrscr(); +} + + void home() { - /* - tputs(Home, 1, putch); - - screenlines = 0; - */ gotoxy(1, 1); } +/* force clear to end of line */ +cleartoeol() +{ + clreol(); +} + + int vgetc() { @@ -106,15 +130,3 @@ vgetc() } -/* - * force clear to end of line - */ -cleareol() -{ - /* - tputs(erase_ln, 1, putch); - */ - clreol(); -} - - diff --git a/bm_unix.c b/bm_unix.c index b97b82d..7da803c 100644 --- a/bm_unix.c +++ b/bm_unix.c @@ -1,13 +1,14 @@ -/* BM_UNIX.C - Unix specific subroutines for BMORE +/* bm_unix.c - Unix specific subroutines for BMORE * * 2000-05-31 V 1.3.0 beta * 2000-10-12 V 1.3.0 final * 2002-02-10 V 1.3.1 + * 2003-07-04 V 1.3.2 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2002 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1996-2003 by Gerhard Buergmann + * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -80,12 +81,21 @@ initterm() no_tty = tcgetattr(fileno(stdout), &ostate); if (!no_tty) { nstate = ostate; + /* + * is this really necessary?? + * + nstate.c_lflag &= ~(ICANON|ECHO|ECHOE|ECHONL); + */ nstate.c_lflag &= ~(ICANON|ECHO|ECHOE|ECHONL); nstate.c_cc[VMIN] = 1; nstate.c_cc[VTIME] = 0; tcsetattr(fileno(stdin), TCSADRAIN, &nstate); } +#ifdef DJGPP + maxx = 80; + maxy = 25; +#else if ((term = getenv("TERM")) == 0 || tgetent(buf, term) <= 0) { printf("Dumb terminal\n"); maxx = 80; @@ -99,6 +109,7 @@ initterm() clear_sc = tgetstr("cl", &clearptr); rev_start = tgetstr("so", &clearptr); rev_end = tgetstr("se", &clearptr); +#endif no_intty = tcgetattr(fileno(stdin), &ostate); tcgetattr(fileno(stderr), &ostate); @@ -129,12 +140,12 @@ reset_tty() void -sig() +sig(sig) + int sig; { - signal(SIGINT, sig); - signal(SIGQUIT, sig); - - got_int = TRUE; + reset_tty(); + printf("\r\n"); + exit(0); } @@ -145,12 +156,15 @@ void doshell(cmd) char *cmd; { +#ifndef DJGPP char *getenv(); char *shell; char cline[128]; +#endif printf("\n"); +#ifndef DJGPP if ((shell = getenv("SHELL")) == NULL) shell = "sh"; else if(strrchr(shell,'/')) shell=(char *)(strrchr(shell,'/')+1); @@ -161,6 +175,7 @@ doshell(cmd) sprintf(cline, "%s -c \"%s\"", shell, cmd); cmd = cline; } +#endif reset_tty(); system(cmd); @@ -173,40 +188,68 @@ doshell(cmd) void -highvideo() +highlight() { +#ifndef DJGPP if (rev_start && rev_end) tputs(rev_start, 1, putchr); +#endif } void -normvideo() +normal() { +#ifndef DJGPP if (rev_start && rev_end) tputs(rev_end, 1, putchr); +#endif } void -clrscr() +clearscreen() { - tputs(clear_sc, 1, putchr); +#ifdef DJGPP + /* if (!no_tty) + { + int n; + + for (n = 0; n < maxy; n++) { + cleartoeol(); + printf("\n"); + } + } */ +#else + tputs(clear_sc, 1, putchr); +#endif } void home() { - tputs(Home, 1, putchr); +#ifdef DJGPP + if (!no_tty) printf("\r"); +#else + tputs(Home, 1, putchr); +#endif } /* force clear to end of line */ void -clreol() +cleartoeol() { +#ifdef DJGPP + int n; + + home(); + if (!no_tty) for (n = 1; n < maxx; n++) printf(" "); + home(); +#else tputs(erase_ln, 1, putchr); +#endif } diff --git a/bmore.1 b/bmore.1 index 429eabd..4749154 100644 --- a/bmore.1 +++ b/bmore.1 @@ -1,10 +1,14 @@ -.TH BMORE 1 "3 Jan 2002" +.TH BMORE 1 "3 Jan 2004" .SH NAME bmore \- browse through a binary file .SH SYNOPSIS .B bmore [ -.B \-adi +.B \-acdi +] [ +.B \-n \fIlines\fP +] [ +.B \-w \fIcols\fP ] [ .B +\fIlinenumber\fP ] [ @@ -76,6 +80,9 @@ except that a header is printed before each file in a series. ASCII mode: no hex representation of the contents. Non printable characters are displayed as a dot (.) .TP +.B \-c +Clear before displaying. Redrawing the screen instead of scrolling. +.TP .B \-d Display error messages rather than ringing the terminal bell if an unrecognized command is used. @@ -84,6 +91,14 @@ This is helpful for inexperienced users. .B \-i Ignore case for searching. .TP +.B \-n \fIlines\fP +Displays the indicated number of \fIlines\fP in each screenful, +rather than the default (the number of lines in the terminal screen +less two). +.TP +.B \-w \fIcols\fP +Display number of \fIcols\fP in each line. +.TP .BI + linenumber\fP Start up at .IR linenumber . diff --git a/bmore.c b/bmore.c index e1a3500..d7c9485 100644 --- a/bmore.c +++ b/bmore.c @@ -5,11 +5,12 @@ * 2000-05-31 V 1.3.0 beta * 2000-10-18 V 1.3.0 final * 2002-01-16 V 1.3.1 + * 2004-01-09 V 1.3.2 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1990-2002 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1990-2004 by Gerhard Buergmann + * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -31,20 +32,25 @@ # include #endif -#ifdef __MSDOS__ +#if defined(__MSDOS__) && !defined(DJGPP) # define PRINTF cprintf #else # define PRINTF printf #ifndef HELPFILE -# define HELPFILE "/usr/local/share/bmore.help" +# ifdef DJGPP +# define HELPFILE "/dev/env/DJDIR/lib/bmore.help" +# else +# define HELPFILE "/usr/local/lib/bmore.help" +# endif #endif #endif #include "bmore.h" -char *copyright = "Copyright (C) 1990-2002 by Gerhard Buergmann"; +char *copyright = "Copyright (C) 1990-2004 by Gerhard Buergmann"; int maxx, maxy; +int mymaxx = 0, mymaxy = 0; char *name = NULL; char sstring[MAXCMD] = ""; /* string for search */ char estring[MAXCMD] = ""; /* string for shell escape */ @@ -62,11 +68,12 @@ char numarr[64]; /* string for collecting number */ char addr_form[15]; int ascii_flag = 0; -int d_flag = 0; +int c_flag = 0, d_flag = 0; +int exval = 0; int init_search = 0; char buffer1[MAXCMD], buffer2[MAXCMD]; int out_len; -int corr = 0, to_print; +int corr = 0, do_header = 0, to_print; off_t init_byte = 0; off_t last_search = 0; off_t screen_home, filesize; @@ -74,7 +81,7 @@ off_t bytepos, oldpos; int prompt = 1; char helppath[MAXCMD]; -static char *progname; +static char progname[10]; static char cmdbuf[MAXCMD]; static int cnt = 0; static int icnt = 0; @@ -86,12 +93,15 @@ char *emptyclass = "Empty byte class '[]' or '[^]'"; /* -a ASCII mode * -d beginners mode + * -c clear before displaying * -i ignore case + * -n number of lines/screen + * -w width of screen */ void usage() { - fprintf(stderr, "Usage: %s [-adi] [+linenum | +/pattern] name1 name2 ...\n", progname); + fprintf(stderr, "Usage: %s [-acdi] [-lines] [+linenum | +/pattern] name1 name2 ...\n", progname); exit(1); } @@ -108,15 +118,14 @@ main(argc, argv) long count; int i, n = 1; int d_line, r_line, z_line; - - -#ifdef __MSDOS__ char *poi; + +#if defined(__MSDOS__) && !defined(DJGPP) strcpy(helppath, argv[0]); poi = strrchr(helppath, '\\'); *poi = '\0'; - strcat(helppath, "\\MORE.HLP"); + strcat(helppath, "\\BMORE.HLP"); #else strncpy(helppath, HELPFILE, MAXCMD - 1); #endif @@ -125,23 +134,46 @@ main(argc, argv) setlocale(LC_ALL, ""); #endif - progname = argv[0]; + poi = strrchr(argv[0], DELIM); + + if (poi) strncpy(progname, ++poi, 9); + else strncpy(progname, argv[0], 9); + strtok(progname, "."); while (n < argc) { switch (argv[n][0]) { case '-': - i = 1; - while (argv[n][i] != '\0') { - switch (argv[n][i]) { - case 'a': ascii_flag++; - break; - case 'd': d_flag++; - break; - case 'i': ignore_case++; - break; - default: usage(); + if (argv[n][1] >= '0' && argv[n][1] <= '9') { + sscanf(&argv[n][1], "%dx%d", &mymaxy, &mymaxx); + } else if (argv[n][1] == 'n') { + if (argv[n+1] == NULL || argv[n+1][0] == '-') { + usage(); + } else { + sscanf(&argv[++n][0], "%d", &mymaxy); + } + } else if (argv[n][1] == 'w') { + if (argv[n+1] == NULL || argv[n+1][0] == '-') { + usage(); + } else { + sscanf(&argv[++n][0], "%d", &mymaxx); + } + } else { + i = 1; + while (argv[n][i] != '\0') { + switch (argv[n][i]) { + case 'a': ascii_flag++; + break; + case 'c': c_flag++; + break; + case 'd': d_flag++; + break; + case 'i': ignore_case++; + break; + default: + usage(); + } + i++; } - i++; } n++; break; @@ -166,24 +198,35 @@ main(argc, argv) break; } } - if (numfiles == 0) { - curr_file = stdin; - if (isatty(fileno(stdin)) != 0) usage(); - } else { - open_file(name); - file_nr = 1; - fseek(curr_file, init_byte, SEEK_SET); - bytepos += init_byte; - } - screen_home = bytepos; - initterm(); set_tty(); maxy -= 2; + if (mymaxy) { + maxy = mymaxy; + } z_line = maxy; d_line = maxy / 2; r_line = 1; + if (numfiles == 0) { + curr_file = stdin; + if (isatty(fileno(stdin)) != 0) { + reset_tty(); + usage(); + } + } else { + file_nr = 1; + while (open_file(name)) { + do_next(1); + } + if (exval) { + } else { + fseek(curr_file, init_byte, SEEK_SET); + bytepos += init_byte; + } + } + screen_home = bytepos; + AnzAdd = 10; strcpy(addr_form, "%08lX "); @@ -191,24 +234,42 @@ main(argc, argv) out_len = ((maxx - AnzAdd - 1) / 4) * 4; else out_len = ((maxx - AnzAdd - 1) / 16) * 4; + if (mymaxx) { + out_len = mymaxx; + } if (init_search) bmsearch(init_search); if (no_tty) { - while(!printout(1)); + int fileloop; + + for (fileloop = 0; fileloop < numfiles; fileloop++) { + while(!printout(1)); + do_next(1); + open_file(name); + } fclose(curr_file); reset_tty(); - exit(0); + exit(exval); } - if (printout(maxy)) { - do_next(1); + if (!exval) { + if (printout(maxy)) { + do_next(1); + } } + signal(SIGINT, sig); + signal(SIGQUIT, sig); /* main loop */ do { to_print = 0; if (prompt) { - highvideo(); + if (prompt == 2) { + while (open_file(name)) { + do_next(1); + } + } + highlight(); PRINTF("--More--"); if (prompt == 2) { PRINTF("(Next file: %s)", name); @@ -217,13 +278,15 @@ main(argc, argv) } if (d_flag) PRINTF("[Press space to continue, 'q' to quit]"); - normvideo(); + normal(); fflush(stdout); } ch = vgetc(); + /* if (prompt == 2) { open_file(name); } + */ prompt = 1; PRINTF("\r"); while (ch >= '0' && ch <= '9') { @@ -262,10 +325,10 @@ main(argc, argv) break; case 'q': case 'Q': - clreol(); + cleartoeol(); fclose(curr_file); reset_tty(); - exit(0); + exit(exval); case ':' : switch (colon) { case 'f': @@ -282,7 +345,7 @@ main(argc, argv) if (precount < 1) precount = 1; do_next(precount); PRINTF("\r"); - clreol(); + cleartoeol(); PRINTF("\n...Skipping to file %s\r\n\r\n", name); prompt = 2; break; @@ -290,19 +353,19 @@ main(argc, argv) if (precount < 1) precount = 1; do_next(-precount); PRINTF("\r"); - clreol(); + cleartoeol(); PRINTF("\n...Skipping back to file %s\r\n\r\n", name); prompt = 2; break; case 'q': - clreol(); + cleartoeol(); fclose(curr_file); reset_tty(); - exit(0); + exit(exval); break; case '!': if (!no_intty) { - clreol(); + cleartoeol(); if (rdline(colon, estring)) break; doshell(estring); PRINTF("------------------------\r\n"); @@ -314,7 +377,7 @@ main(argc, argv) break; case '!': if (!no_intty) { - clreol(); + cleartoeol(); if (rdline(ch, estring)) break; doshell(estring); PRINTF("------------------------\r\n"); @@ -329,7 +392,7 @@ main(argc, argv) if (no_intty) { bmbeep(); } else { - clrscr(); + clearscreen(); to_print = maxy + 1; fseek(curr_file, screen_home, SEEK_SET); bytepos = screen_home; @@ -363,7 +426,7 @@ main(argc, argv) count = precount; } putchar('\r'); - clreol(); + cleartoeol(); PRINTF("\n...skipping %ld line", count); if (count > 1) { PRINTF("s\r\n\r\n"); @@ -382,7 +445,7 @@ main(argc, argv) } case '/': /**** Search String ****/ if (!repeat) { - clreol(); + cleartoeol(); if (rdline(ch, sstring)) break; } case 'n': /**** Search Next ****/ @@ -401,13 +464,13 @@ main(argc, argv) screen_home = bytepos; to_print = maxy; PRINTF("\r"); - clreol(); + cleartoeol(); PRINTF("\n\r\n***Back***\r\n\r\n"); } break; case '=': prompt = 0; - clreol(); + cleartoeol(); PRINTF("%lX hex %lu dec", (unsigned long)bytepos, (unsigned long)bytepos); fflush(stdout); @@ -426,7 +489,7 @@ main(argc, argv) case 'w': case 'v': if (!no_intty) { - clreol(); + cleartoeol(); if (ch == 'v') { sprintf(string, "bvi +%lu %s", (unsigned long)(screen_home + @@ -482,7 +545,7 @@ rdline(ch, sstring) if (i) { sstring[--i] = '\0'; PRINTF("\r%c%s", ch, sstring); - clreol(); + cleartoeol(); } else { ch1 = ESC; break; @@ -504,7 +567,7 @@ rdline(ch, sstring) } if (ch1 == ESC) { putchar('\r'); - clreol(); + cleartoeol(); return 1; } if (i) sstring[i] = '\0'; @@ -520,7 +583,7 @@ do_next(n) if (n == 1 && file_nr == numfiles) { fclose(curr_file); reset_tty(); - exit(0); + exit(exval); } if ((file_nr + n) > numfiles) file_nr = numfiles; @@ -534,12 +597,12 @@ do_next(n) } else { fclose(curr_file); reset_tty(); - exit(0); + exit(exval); } } -void +int open_file(name) char *name; { @@ -548,19 +611,15 @@ open_file(name) if (stat(name, &buf) > -1) { filesize = buf.st_size; } - if (numfiles > 1) { - PRINTF("\r"); - clreol(); - PRINTF("\n::::::::::::::\r\n%s\r\n::::::::::::::\r\n", name); - corr = 2; - } if (curr_file != NULL) fclose(curr_file); + if (numfiles > 1) do_header = 1; if ((curr_file = fopen(name, "rb")) == NULL) { - /* reset_tty(); */ perror(name); - exit(1); + exval = 1; + return 1; } bytepos = screen_home = 0; + return 0; } @@ -572,7 +631,7 @@ putline(buf, num) int print_pos; unsigned char ch; - PRINTF(addr_form, bytepos); + PRINTF(addr_form, (unsigned long)bytepos); for (print_pos = 0; print_pos < num; print_pos++) { ch = buf[print_pos]; if (!ascii_flag) { @@ -592,7 +651,8 @@ putline(buf, num) *(string + print_pos) = ' '; } *(string + num) = '\0'; - PRINTF("%s\r\n", string); + if (no_tty) PRINTF("%s\n", string); + else PRINTF("%s\r\n", string); } @@ -604,6 +664,20 @@ printout(lns) int doub = 0; static int flag; + if (c_flag) { + clearscreen(); + } + if (do_header) { + if (no_tty) { + PRINTF("::::::::::::::\n%s\n::::::::::::::\n", name); + } else { + PRINTF("\r"); + cleartoeol(); + PRINTF("::::::::::::::\r\n%s\r\n::::::::::::::\r\n", name); + } + do_header = 0; + corr = 2; + } if (corr && (lns > maxy - 2)) lns -= corr; corr = 0; do { @@ -619,7 +693,7 @@ printout(lns) lns--; } else { if (flag) { - clreol(); + cleartoeol(); PRINTF("*\r\n"); lns--; } else { @@ -855,10 +929,10 @@ emsg(s) char *s; { putchar('\r'); - clreol(); - highvideo(); + cleartoeol(); + highlight(); PRINTF(s); - normvideo(); + normal(); fflush(stdout); prompt = 0; } diff --git a/bmore.c.old b/bmore.c.old new file mode 100644 index 0000000..ad016b9 --- /dev/null +++ b/bmore.c.old @@ -0,0 +1,871 @@ +/* BMORE - binary more + * + * 1990-01-31 V 1.0.0 + * 1990-09-04 V 1.1.0 + * 2000-05-31 V 1.3.0 beta + * 2000-10-18 V 1.3.0 final + * 2002-01-16 V 1.3.1 + * 2002-02-22 V 1.3.2 line 576 + * + * NOTE: Edit this file with tabstop=4 ! + * + * Copyright 1990-2003 by Gerhard Buergmann + * gerhard@puon.at + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * See file COPYING for information on distribution conditions. + */ + + +#include + +#ifdef HAVE_LOCALE_H +# include +#endif + +#ifdef __MSDOS__ +# define PRINTF cprintf +#else +# define PRINTF printf +#ifndef HELPFILE +# define HELPFILE "/usr/local/share/bmore.help" +#endif +#endif + +#include "bmore.h" + +char *copyright = "Copyright (C) 1990-2003 by Gerhard Buergmann"; + +int maxx, maxy; +char *name = NULL; +char sstring[MAXCMD] = ""; /* string for search */ +char estring[MAXCMD] = ""; /* string for shell escape */ +char string[MAXCMD]; +FILE *curr_file = NULL, *help_file; +int AnzAdd; +long precount = -1; /* number preceding command */ + +char **files; /* list of input files */ +int numfiles; /* number of input files */ +int file_nr = 0; /* number of current input file */ + +int arrnum = 0; +char numarr[64]; /* string for collecting number */ +char addr_form[15]; + +int ascii_flag = 0; +int d_flag = 0; +int init_search = 0; +char buffer1[MAXCMD], buffer2[MAXCMD]; +int out_len; +int corr = 0, to_print; +off_t init_byte = 0; +off_t last_search = 0; +off_t screen_home, filesize; +off_t bytepos, oldpos; +int prompt = 1; +char helppath[MAXCMD]; + +static char *progname; +static char cmdbuf[MAXCMD]; +static int cnt = 0; +static int icnt = 0; +static int smode; + +char search_pat[BUFFER]; /* / or ? command */ +char *emptyclass = "Empty byte class '[]' or '[^]'"; + + +/* -a ASCII mode + * -d beginners mode + * -i ignore case + */ +void +usage() +{ + fprintf(stderr, "Usage: %s [-adi] [+linenum | +/pattern] name1 name2 ...\n", progname); + exit(1); +} + + +int +main(argc, argv) + int argc; + char *argv[]; +{ + int ch, ch1; + int colon = 0, last_ch = 0; + long last_pre = 0; + int lflag, repeat; + long count; + int i, n = 1; + int d_line, r_line, z_line; + + +#ifdef __MSDOS__ + char *poi; + + strcpy(helppath, argv[0]); + poi = strrchr(helppath, '\\'); + *poi = '\0'; + strcat(helppath, "\\MORE.HLP"); +#else + strncpy(helppath, HELPFILE, MAXCMD - 1); +#endif + +#ifdef HAVE_LOCALE_H + setlocale(LC_ALL, ""); +#endif + + progname = argv[0]; + + while (n < argc) { + switch (argv[n][0]) { + case '-': + i = 1; + while (argv[n][i] != '\0') { + switch (argv[n][i]) { + case 'a': ascii_flag++; + break; + case 'd': d_flag++; + break; + case 'i': ignore_case++; + break; + default: usage(); + } + i++; + } + n++; + break; + case '+': /* +cmd */ + if (argv[n][1] == '/' || argv[n][1] == '\\') { + init_search = argv[n][1]; + strcpy(sstring, &argv[n][2]); + } else { + if (argv[n][1] == '0') { + init_byte = (off_t)strtol(argv[n] + 1, NULL, 16); + } else { + init_byte = (off_t)strtol(argv[n] + 1, NULL, 10); + } + } + n++; + break; + default: /* must be a file name */ + name = strdup(argv[n]); + files = &(argv[n]); + numfiles = argc - n; + n = argc; + break; + } + } + if (numfiles == 0) { + curr_file = stdin; + if (isatty(fileno(stdin)) != 0) usage(); + } else { + open_file(name); + file_nr = 1; + fseek(curr_file, init_byte, SEEK_SET); + bytepos += init_byte; + } + screen_home = bytepos; + + initterm(); + set_tty(); + maxy -= 2; + z_line = maxy; + d_line = maxy / 2; + r_line = 1; + + AnzAdd = 10; + strcpy(addr_form, "%08lX "); + + if (ascii_flag) + out_len = ((maxx - AnzAdd - 1) / 4) * 4; + else + out_len = ((maxx - AnzAdd - 1) / 16) * 4; + + if (init_search) + bmsearch(init_search); + + if (no_tty) { + while(!printout(1)); + fclose(curr_file); + reset_tty(); + exit(0); + } + if (printout(maxy)) { + do_next(1); + } + /* main loop */ + do { + to_print = 0; + if (prompt) { + highvideo(); + PRINTF("--More--"); + if (prompt == 2) { + PRINTF("(Next file: %s)", name); + } else if (!no_intty && filesize) { + PRINTF("(%d%%)", (int)((bytepos * 100) / filesize)); + } + + if (d_flag) PRINTF("[Press space to continue, 'q' to quit]"); + normvideo(); + fflush(stdout); + } + ch = vgetc(); + if (prompt == 2) { + open_file(name); + } + prompt = 1; + PRINTF("\r"); + while (ch >= '0' && ch <= '9') { + numarr[arrnum++] = ch; + ch = vgetc(); + } + numarr[arrnum] = '\0'; + if (arrnum != 0) precount = strtol(numarr, (char **)NULL, 10); + else precount = -1; + lflag = arrnum = 0; + + if (ch == '.') { + precount = last_pre; + ch = last_ch; + repeat = 1; + } else { + last_pre = precount; + last_ch = ch; + if (ch == ':') colon = vgetc(); + repeat = 0; + } + + switch (ch) { + case ' ': /* Display next k lines of text [current screen size] */ + if (precount > 0) to_print = precount; + else to_print = maxy; + break; + case 'z': /* Display next k lines of bytes [current screen size]* */ + if (precount > 0) z_line = precount; + to_print = z_line; + break; + case '\r': + case '\n': /* Display next k lines of text [current screen size]* */ + if (precount > 0) r_line = precount; + to_print = r_line; + break; + case 'q': + case 'Q': + clreol(); + fclose(curr_file); + reset_tty(); + exit(0); + case ':' : + switch (colon) { + case 'f': + prompt = 0; + if (!no_intty) + PRINTF("\"%s\" line %lu", name, + (unsigned long)(bytepos - out_len)); + else + PRINTF("[Not a file] line %lu", + (unsigned long)(bytepos - out_len)); + fflush(stdout); + break; + case 'n': + if (precount < 1) precount = 1; + do_next(precount); + PRINTF("\r"); + clreol(); + PRINTF("\n...Skipping to file %s\r\n\r\n", name); + prompt = 2; + break; + case 'p': + if (precount < 1) precount = 1; + do_next(-precount); + PRINTF("\r"); + clreol(); + PRINTF("\n...Skipping back to file %s\r\n\r\n", name); + prompt = 2; + break; + case 'q': + clreol(); + fclose(curr_file); + reset_tty(); + exit(0); + break; + case '!': + if (!no_intty) { + clreol(); + if (rdline(colon, estring)) break; + doshell(estring); + PRINTF("------------------------\r\n"); + break; + } + default: + bmbeep(); + } + break; + case '!': + if (!no_intty) { + clreol(); + if (rdline(ch, estring)) break; + doshell(estring); + PRINTF("------------------------\r\n"); + break; + } + case 'd': /* Scroll k lines [current scroll size, initially 11]* */ + case BVICTRL('D'): + if (precount > 0) d_line = precount; + to_print = d_line; + break; + case BVICTRL('L'): /*** REDRAW SCREEN ***/ + if (no_intty) { + bmbeep(); + } else { + clrscr(); + to_print = maxy + 1; + fseek(curr_file, screen_home, SEEK_SET); + bytepos = screen_home; + } + break; + case 'b': /* Skip backwards k screenfuls of text [1] */ + case BVICTRL('B'): + if (no_intty) { + bmbeep(); + } else { + if (precount < 1) precount = 1; + PRINTF("...back %ld page", precount); + if (precount > 1) { + PRINTF("s\r\n"); + } else { + PRINTF("\r\n"); + } + screen_home -= (maxy + 1) * out_len; + if (screen_home < 0) screen_home = 0; + fseek(curr_file, screen_home, SEEK_SET); + bytepos = screen_home; + to_print = maxy + 1; + } + break; + case 'f': /* Skip forward k screenfuls of bytes [1] */ + case 's': /* Skip forward k lines of bytes [1] */ + if (precount < 1) precount = 1; + if (ch == 'f') { + count = maxy * precount; + } else { + count = precount; + } + putchar('\r'); + clreol(); + PRINTF("\n...skipping %ld line", count); + if (count > 1) { + PRINTF("s\r\n\r\n"); + } else { + PRINTF("\r\n\r\n"); + } + screen_home += (count + maxy) * out_len; + fseek(curr_file, screen_home, SEEK_SET); + bytepos = screen_home; + to_print = maxy; + break; + case '\\': + if (ascii_flag) { + bmbeep(); + break; + } + case '/': /**** Search String ****/ + if (!repeat) { + clreol(); + if (rdline(ch, sstring)) break; + } + case 'n': /**** Search Next ****/ + case 'N': + bmsearch(ch); + /* + to_print--; + */ + break; + case '\'': + if (no_intty) { + bmbeep(); + } else { + bytepos = last_search; + fseek(curr_file, bytepos, SEEK_SET); + screen_home = bytepos; + to_print = maxy; + PRINTF("\r"); + clreol(); + PRINTF("\n\r\n***Back***\r\n\r\n"); + } + break; + case '=': + prompt = 0; + clreol(); + PRINTF("%lX hex %lu dec", (unsigned long)bytepos, + (unsigned long)bytepos); + fflush(stdout); + break; + case '?': + case 'h': + if ((help_file = fopen(helppath, "r")) == NULL) { + emsg("Can't open help file"); + break; + } + while ((ch1 = getc(help_file)) != EOF) + putchar(ch1); + fclose(help_file); + to_print = 0; + break; + case 'w': + case 'v': + if (!no_intty) { + clreol(); + if (ch == 'v') { + sprintf(string, "bvi +%lu %s", + (unsigned long)(screen_home + + (maxy + 1) / 2 * out_len), name); + } else { + if (precount < 1) precount = bytepos - screen_home; + sprintf(string, "bvi -b %lu -s %lu %s", + (unsigned long)screen_home, + (unsigned long)precount, name); + } + doshell(string); + to_print = maxy + 1; + break; + } + default : + if (d_flag) { + emsg("[Press 'h' for instructions.]"); + } else { + bmbeep(); + } + break; + } + if (to_print) { + if (printout(to_print)) { + do_next(1); + } + } + } while (1); +} + + +int +rdline(ch, sstring) + int ch; + char *sstring; +{ + int i = 0; + int ch1 = 0; + char bstring[MAXCMD]; + + if (ch == '!') { + strcpy(bstring, sstring); + sstring[0] = '\0'; + } + putchar(ch); + fflush(stdout); + + while (i < MAXCMD) { + ch1 = vgetc(); + if (ch1 == '\n' || ch1 == '\r' || ch1 == ESC) { + break; + } else if (ch1 == 8) { + if (i) { + sstring[--i] = '\0'; + PRINTF("\r%c%s", ch, sstring); + clreol(); + } else { + ch1 = ESC; + break; + } + } else if (ch1 == '!' && i == 0) { + if (bstring[0] == '\0') { + emsg("No previous command"); + return 1; + } + putchar(ch1); + PRINTF("\r%c%s", ch, bstring); + strcat(sstring, bstring); + i = strlen(sstring); + } else { + putchar(ch1); + sstring[i++] = ch1; + } + fflush(stdout); + } + if (ch1 == ESC) { + putchar('\r'); + clreol(); + return 1; + } + if (i) sstring[i] = '\0'; + return 0; +} + + +void +do_next(n) + int n; +{ + if (numfiles) { + if (n == 1 && file_nr == numfiles) { + fclose(curr_file); + reset_tty(); + exit(0); + } + if ((file_nr + n) > numfiles) + file_nr = numfiles; + else if ((file_nr + n) < 1) + file_nr = 1; + else + file_nr += n; + prompt = 2; + free(name); + name = strdup(*(files + file_nr - 1)); + } else { + fclose(curr_file); + reset_tty(); + exit(0); + } +} + + +void +open_file(name) + char *name; +{ + struct stat buf; + + if (stat(name, &buf) > -1) { + filesize = buf.st_size; + } + if (numfiles > 1) { + PRINTF("\r"); + clreol(); + PRINTF("\n::::::::::::::\r\n%s\r\n::::::::::::::\r\n", name); + corr = 2; + } + if (curr_file != NULL) fclose(curr_file); + if ((curr_file = fopen(name, "rb")) == NULL) { + /* reset_tty(); */ + perror(name); + exit(1); + } + bytepos = screen_home = 0; +} + + +void +putline(buf, num) + char *buf; + int num; +{ + int print_pos; + unsigned char ch; + + PRINTF(addr_form, (unsigned long)bytepos); + for (print_pos = 0; print_pos < num; print_pos++) { + ch = buf[print_pos]; + if (!ascii_flag) { + PRINTF("%02X ", ch); + } + ++bytepos; + if ((ch > 31) && (ch < 127)) + *(string + print_pos) = ch; + else + *(string + print_pos) = '.'; + } + for (; print_pos < out_len; print_pos++) { + if (!ascii_flag) { + PRINTF(" "); + } + ++bytepos; + *(string + print_pos) = ' '; + } + *(string + num) = '\0'; + PRINTF("%s\r\n", string); +} + + +int +printout(lns) + int lns; +{ + int c, num; + int doub = 0; + static int flag; + + if (corr && (lns > maxy - 2)) lns -= corr; + corr = 0; + do { + for (num = 0; num < out_len; num++) { + if ((c = nextchar()) == -1) break; + buffer1[num] = c; + } + if (!num) return 1; + if (memcmp(buffer1, buffer2, num) || !bytepos ) { + memcpy(buffer2, buffer1, num); + putline(buffer2, num); + if (!no_tty) flag = TRUE; + lns--; + } else { + if (flag) { + clreol(); + PRINTF("*\r\n"); + lns--; + } else { + doub++; + } + flag = FALSE; + bytepos += num; + } + if (lns == 0) { + screen_home = bytepos - ((maxy + 1 + doub) * out_len); + if (screen_home < 0) screen_home = 0; + return 0; + } + } while(num); + return 1; +} + + +int +nextchar() +{ + if (cnt == 0) return fgetc(curr_file); + cnt--; + return cmdbuf[icnt++] & 0xff; +} + + +void +pushback(n, where) + int n; + char *where; +{ + if (cnt) memmove(cmdbuf + n, cmdbuf, n); + memcpy(cmdbuf, where, n); + icnt = 0; + cnt += n; +} + + + + +/* Return: + * -1 EOF + * 0 not found at current position + * 1 found + */ +int +bmregexec(scan) + char *scan; +{ + char *act; + int count, test; + int l; + char act_pat[MAXCMD]; /* found pattern */ + + act = act_pat; + l = 0; + while (*scan != 0) { + if ((test = nextchar()) == -1) return -1; + *act++ = test; + if (++l == MAXCMD) { + pushback(l, act_pat); + return 0; + } + if (ignore_case && smode == ASCII) test = toupper(test); + switch (*scan++) { + case ONE: /* exactly one character */ + count = *scan++; + if (count == 1) { + if (test != *scan) { + bytepos++; + if (l > 1) pushback(--l, act_pat + 1); + return 0; + } + scan++; + } else if (count > 1) { + if (sbracket(test, scan, count)) { + bytepos++; + if (l > 1) pushback(--l, act_pat + 1); + return 0; + } + scan += count; + } + break; + case STAR: /* zero or more characters */ + count = *scan++; + if (count == 1) { /* only one character, 0 - n times */ + while (test == *scan) { + if ((test = nextchar()) == -1) return -2; + *act++ = test; + if (++l == MAXCMD) { + pushback(l, act_pat); + return 0; + } + if (ignore_case && smode == ASCII) + test = toupper(test); + } + pushback(1, --act); + l--; + scan++; + } else if (count > 1) { /* characters in bracket */ + if (*scan == '^') { + do { +/* If we found something matching the next part of the expression, we + * abandon the search for not-matching characters. */ + if (bmregexec(scan + count)) { + *act++ = test; /* May be wrong case !! */ + l++; + scan += count; + bytepos--; + break; + } + if (sbracket(test, scan, count)) { + bytepos++; + if (l > 1) pushback(--l, act_pat + 1); + return 0; + } else { + if ((test = nextchar()) == -1) return -3; + *act++ = test; + if (++l == MAXCMD) { + pushback(l, act_pat); + return 0; + } + if (ignore_case && smode == ASCII) + test = toupper(test); + } + } while(1); + } else { + while(!sbracket(test, scan, count)) { + if ((test = nextchar()) == -1) return -4; + *act++ = test; + if (++l == MAXCMD) { + pushback(l, act_pat); + return 0; + } + if (ignore_case && smode == ASCII) + test = toupper(test); + } + scan += count; + pushback(1, --act); + l--; + } + } else { /* ".*" */ + do { + if ((test = nextchar()) == -1) return -5; + *act++ = test; + if (++l == MAXCMD) { + pushback(l, act_pat); + return 0; + } + pushback(1, act - 1); + bytepos--; + } while (bmregexec(scan) == 0); + bytepos++; + act--; + l--; + } + break; + } + } + pushback(l, act_pat); + return 1; /* found */ +} + + +int +sbracket(start, scan, count) + int start; + char *scan; + int count; +{ + if (*scan++ == '^') { + if (!memchr(scan, start, --count)) return 0; + } else { + if (memchr(scan, start, --count)) return 0; + } + return 1; +} + + +void +bmsearch(ch) + int ch; +{ + int i; + + if (sstring[0] == '\0') { + emsg("No previous regular expression"); + return; + } + if (ch == '/') { + if (ascii_comp(search_pat, sstring)) return; + } + if (ch == '\\') { + if (hex_comp(search_pat, sstring)) return; + } + oldpos = bytepos; + last_search = screen_home; + if (precount < 1) precount = 1; + while (precount--) { + while ((i = bmregexec(search_pat)) == 0); + if (i == 1) { + screen_home = bytepos; + to_print = maxy; + } else { /* i == -1 -> EOF */ + if (no_intty) { + PRINTF("\r\nPattern not found\r\n"); + do_next(1); + } else { +/* +sprintf(string, "Pattern not found %d - %ul", i, (unsigned long)bytepos); +emsg(string); +*/ + emsg("Pattern not found"); + bytepos = oldpos; + fseek(curr_file, bytepos, SEEK_SET); + break; + } + } + if (precount) { + nextchar(); + bytepos++; + } + } + if (prompt) { + PRINTF("\r\n...skipping\r\n"); + } +} + + +void +emsg(s) + char *s; +{ + putchar('\r'); + clreol(); + highvideo(); + PRINTF(s); + normvideo(); + fflush(stdout); + prompt = 0; +} + + +void +bmbeep() { + putchar(7); +} diff --git a/bmore.h b/bmore.h index c1521f1..18d5aab 100644 --- a/bmore.h +++ b/bmore.h @@ -8,11 +8,12 @@ * 2000-05-31 V 1.3.0 beta * 2000-10-04 V 1.3.0 final * 2002-01-16 V 1.3.1 + * 2003-02-20 V 1.3.2 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2002 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1996-2003 by Gerhard Buergmann + * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -36,7 +37,7 @@ #include #include -#ifdef __MSDOS__ +#if defined(__MSDOS__) && !defined(DJGPP) # include "patchlev.h" # include "dosconf.h" # include @@ -46,15 +47,21 @@ # include "patchlevel.h" # include "config.h" # include -#if HAVE_NCURSES_H +# if HAVE_NCURSES_H # include -# include -#else +# else # include +# endif +# if HAVE_TERM_H # include -#endif +# else +# if HAVE_NCURSES_TERM_H +# include +# endif +# endif #endif + /* defines for filemode */ #define ERROR -1 #define REGULAR 0 @@ -89,7 +96,7 @@ # define FALSE 0 #endif -#ifdef __MSDOS__ +#if defined(__MSDOS__) && !defined(DJGPP) # define ANSI # define PTR char huge * # define off_t long @@ -123,13 +130,13 @@ extern int no_tty, no_intty; #ifdef ANSI void initterm(void), set_tty(void), reset_tty(void); - void clreol(void), clrscr(void), highvideo(void), normvideo(void); - void bmbeep(void), home(void), sig(void); + void cleartoeol(void), clearscreen(void), highlight(void); + void normal(void), bmbeep(void), home(void), sig(void); void doshell(char *), emsg(char *); void do_next(int); - void open_file(char *); void bmsearch(int); void pushback(int, char *); + int open_file(void); int printout(int), rdline(int, char *); int nextchar(void), vgetc(void); int sbracket(int, char *, int); @@ -138,13 +145,13 @@ extern int no_tty, no_intty; void putline(char *, int); #else void initterm(), set_tty(), reset_tty(); - void clreol(), clrscr(), highvideo(), normvideo(); - void bmbeep(), home(), sig(); + void cleartoeol(), clearscreen(), highlight(); + void normal(), bmbeep(), home(), sig(); void doshell(), emsg(); void do_next(); - void open_file(); void bmsearch(); void pushback(); + int open_file(); int printout(), rdline(); int nextchar(), vgetc(); int sbracket(); diff --git a/bmore.man b/bmore.man index 62b9582..da13196 100644 --- a/bmore.man +++ b/bmore.man @@ -1,29 +1,26 @@ - - - BMORE(1) BMORE(1) -NNAAMMEE +NAME bmore - browse through a binary file -SSYYNNOOPPSSIISS - bbmmoorree [ --aaddii ] [ ++_l_i_n_e_n_u_m_b_e_r ] [ ++//_A_S_C_I_I_-_p_a_t_t_e_r_n ] [ - ++\\_H_e_x_-_p_a_t_t_e_r_n ] [ _f_i_l_e_n_a_m_e ... ] +SYNOPSIS + bmore [ -acdi ] [ -n lines ] [ -w cols ] [ +linenumber ] [ + +/ASCII-pattern ] [ +\Hex-pattern ] [ filename ... ] -DDEESSCCRRIIPPTTIIOONN - mmoorree is a filter that displays the contents of a binary - file on the terminal, one screenful at a time. It nor­ - mally pauses after each screenful, and prints ----MMoorree---- at - the bottom of the screen. bbmmoorree provides a two-line over­ - lap between screens for continuity. If bbmmoorree is reading - from a file rather than a pipe, the percentage of charac­ +DESCRIPTION + more is a filter that displays the contents of a binary + file on the terminal, one screenful at a time. It nor- + mally pauses after each screenful, and prints --More-- at + the bottom of the screen. bmore provides a two-line over- + lap between screens for continuity. If bmore is reading + from a file rather than a pipe, the percentage of charac- ters displayed so far is also shown. - bbmmoorree scrolls up to display one more screen line in + bmore scrolls up to display one more screen line in response to a RETURN character; it displays another - screenful in response to a SPACE character. Other com­ + screenful in response to a SPACE character. Other com- mands are listed below. The screen is divided in three sections or panes: The byte @@ -34,165 +31,148 @@ DDEESSCCRRIIPPTTIIOONN screen line. Note that (as one would expect) the first byte has the offset 0 (zero). - bbmmoorree sets the terminal to _n_o_e_c_h_o mode, so that the output + bmore sets the terminal to noecho mode, so that the output can be continuous. Commands that you type do not normally - show up on your terminal, except for the // , \\ and !! com­ + show up on your terminal, except for the / , \ and ! com- mands. - If the standard output is not a terminal, mmoorree acts just - like ccaatt(1V), except that a header is printed before each + If the standard output is not a terminal, more acts just + like cat(1V), except that a header is printed before each file in a series. -OOPPTTIIOONNSS - --aa ASCII mode: no hex representation of the contents. +OPTIONS + -a ASCII mode: no hex representation of the contents. Non printable characters are displayed as a dot (.) - --dd Display error messages rather than ringing the ter­ - minal bell if an unrecognized command is used. + -c Clear before displaying. Redrawing the screen + instead of scrolling. + + -d Display error messages rather than ringing the ter- + minal bell if an unrecognized command is used. This is helpful for inexperienced users. - --ii Ignore case for searching. + -i Ignore case for searching. - ++_l_i_n_e_n_u_m_b_e_r - Start up at _l_i_n_e_n_u_m_b_e_r. + -n lines + Displays the indicated number of lines in each + screenful, rather than the default (the number of + lines in the terminal screen less two). - ++//_A_S_C_I_I_-_p_a_t_t_e_r_n - Start up at the line containing the regular + -w cols + Display number of cols in each line. + + +linenumber + Start up at linenumber. + + +/ASCII-pattern + Start up at the line containing the regular expres- + sion pattern. Note: unlike editors, this construct + should not end with a `/'. If it does, then the + trailing slash is taken as a character in the + search pattern. +USAGE - 13 June 2000 1 - - - - - -BMORE(1) BMORE(1) - - - expression _p_a_t_t_e_r_n. Note: unlike editors, this - construct should _n_o_t end with a `//'. If it does, - then the trailing slash is taken as a character in - the search pattern. - - - UUSSAAGGEE - - CCoommmmaannddss + Commands The commands take effect immediately; it is not necessary - to type a carriage return. Up to the time when the com­ + to type a carriage return. Up to the time when the com- mand character itself is given, the user may type the line - kill character to cancel the numerical argument being - formed. In addition, the user may type the erase charac­ - ter to redisplay the `----MMoorree----((_x_x%%))' message. + kill character to cancel the numerical argument being + formed. In addition, the user may type the erase charac- + ter to redisplay the `--More--(xx%)' message. - In the following commands, _i is a numerical argument (11 by + In the following commands, i is a numerical argument (1 by default). - _iSPACE Display another screenful, or _i more lines if _i + iSPACE Display another screenful, or i more lines if i is specified. - _iRETURN Display another line, or _i more lines, if speci­ + iRETURN Display another line, or i more lines, if speci- fied. - _i^^DD (CTRL-D) Display (scroll down) 11 more lines. _i - is given, the scroll size is set to _i. + i^D (CTRL-D) Display (scroll down) 11 more lines. i + is given, the scroll size is set to i. - _id Same as ^^DD. + id Same as ^D. - _izz Same as SPACE, except that _i, if present, - becomes the new default number of lines per + iz Same as SPACE, except that i, if present, + becomes the new default number of lines per screenful. - _iss Skip _i lines and then print a screenful. + is Skip i lines and then print a screenful. - _iff Skip _i screenfuls and then print a screenful. + if Skip i screenfuls and then print a screenful. - _i^^BB (CTRL-B) Skip back _i screenfuls and then print a + i^B (CTRL-B) Skip back i screenfuls and then print a screenful. - _b Same as ^^BB (CTRL-D). + b Same as ^B (CTRL-D). - qq - QQ Exit from mmoorree. + q + Q Exit from more. - == Display the current line number. + = Display the current line number. - vv Drop into the bbvvii(1) editor at the current off­ + v Drop into the bvi(1) editor at the current off- set of the current file. - - ww Drop into the bbvvii(1) editor at the current off­ + w Drop into the bvi(1) editor at the current off- set of the current file. Only the portion of the file displayed on the screen will be loaded. - - - 13 June 2000 2 - - - - - -BMORE(1) BMORE(1) - - - hh Help. Give a description of all the mmoorree com­ + h Help. Give a description of all the more com- mands. - _i//_p_a_t_t_e_r_n Search for the _ith occurrence of the regular - expression _p_a_t_t_e_r_n. Display the screenful - starting at the file position that contains the - _ith match for the regular expression _A_S_C_I_I_-_p_a_t_­ - _t_e_r_n, or the end of a pipe, whichever comes - first. If bbmmoorree is displaying a file and there - is no such match, its position in the file - remains unchanged. Regular expressions can be + i/pattern Search for the ith occurrence of the regular + expression pattern. Display the screenful + starting at the file position that contains the + ith match for the regular expression ASCII-pat- + tern, or the end of a pipe, whichever comes + first. If bmore is displaying a file and there + is no such match, its position in the file + remains unchanged. Regular expressions can be edited using erase and kill characters. Erasing - back past the first column cancels the search + back past the first column cancels the search command. - ´´ Single quote. Go to the point from which the - last search started. If no search has been per­ - formed in the current file, go to the beginning + ' Single quote. Go to the point from which the + last search started. If no search has been per- + formed in the current file, go to the beginning of the file. - !!_c_o_m_m_a_n_d Invoke a shell to execute _c_o_m_m_a_n_d. The charac­ - ters %% and !!, when used within _c_o_m_m_a_n_d are - replaced with the current filename and the pre­ - vious shell command, respectively. If there is - no current filename, %% is not expanded. Prepend - a backslash to these characters to escape expan­ + !command Invoke a shell to execute command. The charac- + ters % and !, when used within command are + replaced with the current filename and the pre- + vious shell command, respectively. If there is + no current filename, % is not expanded. Prepend + a backslash to these characters to escape expan- sion. - _i::nn Skip to the _ith next filename given in the com­ - mand line, or to the last filename in the list - if _i is out of range. + i:n Skip to the ith next filename given in the com- + mand line, or to the last filename in the list + if i is out of range. - _i::pp Skip to the _ith previous filename given in the - command line, or to the first filename if _i is - out of range. If given while mmoorree is positioned - within a file, go to the beginning of the file. - If mmoorree is reading from a pipe, mmoorree simply + i:p Skip to the ith previous filename given in the + command line, or to the first filename if i is + out of range. If given while more is positioned + within a file, go to the beginning of the file. + If more is reading from a pipe, more simply rings the terminal bell. - ::ff Display the current filename and offset number. + :f Display the current filename and offset number. - ::qq - ::QQ Exit from bbmmoorree (same as qq or QQ )).. + :q + :Q Exit from bmore (same as q or Q ). - .. Dot. Repeat the previous command. + . Dot. Repeat the previous command. - FFIILLEESS - //eettcc//tteerrmmccaapp terminal data base - //uussrr//llooccaall//sshhaarree//bbmmoorree..hheellpp + FILES + /etc/termcap terminal data base + /usr/local/share/bmore.help help file -SSEEEE AALLSSOO - bbvvii(1), tteerrmmccaapp(5) - - - - 3 Jan 2002 3 - - +SEE ALSO + bvi(1), termcap(5) + + 3 Jan 2004 diff --git a/bvi.1 b/bvi.1 index 092384b..44d3cc1 100644 --- a/bvi.1 +++ b/bvi.1 @@ -93,7 +93,7 @@ .nr % 0 .rr F .\} -.TH BVI 1 "BVI Version 1.3.1" "3/Jan/2002" "User Commands" +.TH BVI 1 "BVI Version 1.3.2" "3/Jan/2004" "User Commands" .IX Title "BVI 1" .UC .IX Name "bvi, bview - visual display editor for binary files" @@ -194,7 +194,7 @@ bvi, bview \- visual editor for binary files .SH "VERSION" .IX Header "VERSION" -bvi-1.3.1 +bvi-1.3.2 .SH "SYNOPSIS" .IX Header "SYNOPSIS" \fBbvi\fR\ \ \ [\fB\-R\fR]\ [\fB\-c\fR\ \fIcmd\fR]\ [\fB\-f\fR\ \fIscript\fR]\ [\fB\-b\fR\ \fIbegin\fR]\ [\fB\-e\fR\ \fIend\fR]\ [\fB\-s\fR\ \fIsize\fR]\ \fIfile\fR... @@ -594,11 +594,11 @@ the file. If you use ASCII mode you can use the special characters .SH "AUTHOR" .IX Header "AUTHOR" bvi was developed by Gerhard Buergmann, Vienna, Austria -\fIGerhard.Buergmann@altavista.net\fR +\fIGerhard.Buergmann@puon.at\fR .SH "WWW" .IX Header "WWW" Bvi\ Homepage:\ \ http://bvi.sourceforge.net/ -Vi\ Pages:\ \ \ \ \ \ http://www.math.fu-berlin.de/~guckes/vi/ +Vi\ Pages:\ \ \ \ \ \ http://www.guckes.net/vi/clones.php3 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (all\ about\ Vi\ and\ its\ clones) .SH "FILES" .IX Header "FILES" diff --git a/bvi.c b/bvi.c index f23bda6..7fc4b9e 100644 --- a/bvi.c +++ b/bvi.c @@ -8,11 +8,12 @@ * 2000-05-10 V 1.3.0 alpha * 2000-10-24 V 1.3.0 final * 2002-01-03 V 1.3.1 + * 2004-01-04 V 1.3.2 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2002 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1996-2004 by Gerhard Buergmann + * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -37,7 +38,7 @@ #endif -char *copyright = "Copyright (C) 1996-2002 by Gerhard Buergmann"; +char *copyright = "Copyright (C) 1996-2004 by Gerhard Buergmann"; jmp_buf env; /* context for `longjmp' function */ diff --git a/bvi.h b/bvi.h index 62c2d82..b019465 100644 --- a/bvi.h +++ b/bvi.h @@ -8,11 +8,12 @@ * 2000-05-10 V 1.3.0 alpha * 2000-10-24 V 1.3.0 final * 2001-10-29 V 1.3.1 + * 2003-07-04 V 1.3.2 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2001 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1996-2003 by Gerhard Buergmann + * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -36,7 +37,7 @@ #include #include -#ifdef __MSDOS__ +#if defined(__MSDOS__) && !defined(DJGPP) # include "patchlev.h" # include "dosconf.h" # include "doscur.h" @@ -109,7 +110,7 @@ # define FALSE 0 #endif -#ifdef __MSDOS__ +#if defined(__MSDOS__) && !defined(DJGPP) # define ANSI # define PTR char huge * # define off_t long @@ -185,7 +186,7 @@ extern off_t block_begin, block_end, block_size; #define S_ISFIFO(m) ((m & 0170000) == 0010000) /* fifo */ #endif -#ifdef __MSDOS__ +#if defined(__MSDOS__) && !defined(DJGPP) void d_memcpy(PTR, PTR, off_t); void d_memmove(PTR, PTR, off_t); #endif diff --git a/bvi.man b/bvi.man index 43f8c98..b0e0b11 100644 --- a/bvi.man +++ b/bvi.man @@ -2,28 +2,48 @@ BVI(1) User Commands BVI(1) NAME - bvi, bview - visual display editor for binary files + bvi, bview - visual editor for binary files VERSION - bvi-1.3.1 + bvi-1.3.2 SYNOPSIS - bvi [-R] [-c cmd] [-f script] file... - bview [-R] [-c cmd] [-f script] file... + bvi [-R] [-c cmd] [-f script] [-b begin] [-e end] [-s size] file... + bview [-R] [-c cmd] [-f script] [-b begin] [-e end] [-s size] file... OPTIONS file... - One or more files. The file argument indicates one or - more files to be edited. + A list of filenames. The first one will be the + current file and will be read into the buffer. The + cursor will be positioned on the first line of the + buffer. You can get to the other files with the + ":next" command. -R "Readonly": The readonly flag is set for all the files, preventing accidental overwriting with a write command. + + -b begin + causes bvi to load a file not from the start but from + offset begin. + + + -e end + causes bvi to load a file not till end but till + address end. + + + -s size + causes bvi not to load the complete file but only size + bytes. + + -c cmd - Execute command cmd. Begin editing by executing the - specified editor command (usually a search or - positioning command). + cmd will be executed after the first file has + been read. If the cmd contains spaces it must be + enclosed in double quotes (this depends on the shell + that is used). -f script This command provides a means for collecting a series @@ -33,39 +53,38 @@ OPTIONS to make several global changes in a binary file. DESCRIPTION - Bvi stands for "Binary VIsual editor". Bvi is a display + Bvi stands for "Binary VIsual editor". Bvi is a screen oriented editor for binary files; its command set is based - on those of the vi(1) texteditor. As a binary editor - cannot have the concept of "lines" there are several - differences to Vi commands (see COMPARISON). + on that of the vi(1) text editor. As a binary editor does + not have the concept of "lines" there are differences from + Vi commands wherever the latter are line orientate. COMPARISON The main differences between Vi and Bvi are: - The screen is divided in three sections/windows: The byte - offset (at the left side), the hex window (in the middle), - and the ascii window (to the right) which shows the ascii - values of those bytes in the hex window. On an 80 column - terminal you will therefore see sixteen hex values and - their ASCII values on each screen line. Note that the - first byte has the offset '0' (zero). + The screen is divided in three sections or panes: The byte + offset (extreme left), the hex pane (middle), and an ascii + pane (right) which shows as printable characters those + bytes in the hex pane. On an 80 column terminal there + will be sixteen hex values and their ASCII values on each + screen line. Note that (as one would expect) the first + byte has the offset '0' (zero). You can toggle between the hex and ascii windows with the - tabulator key (TAB). Toggling between these two windows - does not change the current position within the file. + tab key (TAB). Toggling between these two windows does + not change the current position (offset) within the file. - No "lines" concept: Files are treated as one long series - of bytes only. These characters "newline" and "carriage - return" thus are not special, ie they do not mark the end - of lines. Therefore the lines on the screen do not - represent lines in the usual way. Data is broken across - screen lines as they happen to fit in. As a consequence - there are no commands in bvi from ex or vi that are based - on line numbers, eg "dd", "yy", 'C', 'S', 'o', 'O'. This - also changes the meaning of "range" before the ":write" - command to a byte offset, ie the command ":100,200w foo" - writes all *bytes* (not lines) from offset 100 to offset - 200 to the file "foo". + No "lines" concept: Files are treated as one long stream + of bytes. The characters "newline" and "carriage return" + are not special, id est they never mark the end of lines. + Therefore the lines on the screen do not represent lines + in the usual way. Data is broken across screen lines + arbitarily. As a consequence there are no commands in bvi + from ex or vi that are based on line numbers, eg "dd", + "yy", 'C', 'S', 'o', 'O'. This also changes the meaning + of "range" before the ":write" command to a byte offset, + ie the command ":100,200w foo" writes all *bytes* (not + lines) from offset 100 to offset 200 to the file "foo". No "text objects": There are also no text-specific arrangements like words, paragraphs, sentences, sections @@ -102,38 +121,41 @@ COMPARISON between hex value are optional, so searching for "6775636B6573" will find "guckes". - Changing data (insertion, deletion) moves the data to - other addresses; this is bad for many cases (eg. - databases, program files) and is thus disabled by default. - You can enable this commands by typing + Changing the length of data (insertion, deletion) moves + the data to other addresses; this is bad for many cases + (eg. databases, program files) and is thus disabled by + default. You can enable this commands by typing :set memmove - BVI Modes: + BVI Modes: - Command Mode aka Normal Mode: + Command Mode (Normal Mode): - Input is treated as commands. Note that command mode is - the default mode after startup and when you escape/quit - from either command line mode or input mode. Use ESC - (escape) to cancel a partial (uncompleted) command. + Input is treated as command. Note that command mode is + the default mode after startup and after escaping from + input mode. Use ESC (escape) to cancel a partial + (uncompleted) command. - Input Mode: + Input Mode: - Input is treated as replacement of current character or is - appended to the current file. This mode is entered from - command mode by typing either of 'i', 'I', 'A', 'r', or - 'R'. You can enter the character itself (in the ASCII - window) or its hexadecimal value (in the HEX window). - Type TAB to switch between these two windows. Type ESC to - cancel current command and return to command mode. Type - CTRL-C to cancel current command abnormally. + Input is treated as replacement of current characters or + (after the end of the file) is appended to the current + file. This mode is entered from command mode by typing + one of 'i', 'I', 'A', 'r', or 'R'. You can enter the + characters from the keyboard (in the ASCII window) or + hexadecimal values (in the HEX window). Type TAB to + switch between these two windows. Type ESC to finish the + current input and return to command mode. Type CTRL-C to + cancel current command abnormally. - Command line mode (aka Last Line Mode): + Command line mode (Last Line Mode or : mode): - Reading input for : / ? \ # or !; terminate by typing a - carriage return; an interrupt cancels termination. Type - ESC to cancel current command and return to command mode. + Similar to vi, this mode is entered by typing one of the + characters : / ? \ # ! The command is terminated and + executed by typing a carriage return; to cancel a + partially typed command, type ESC to cancel the current + command and return to command mode. ENVIRONMENT The editor recognizes the environment variable BVIINIT as @@ -166,11 +188,11 @@ COMMAND SUMMARY abbreviations used within the following description of commands. - Abstract: - Arrow keys move the cursor on the screen within the + Abstract: + Arrow keys move the cursor on the screen within the current window. - Sample commands: + Sample commands: :version show version info <- v ^ -> arrow keys move the cursor h j k l same as arrow keys @@ -180,7 +202,7 @@ COMMAND SUMMARY /text search for text ^U ^D scroll up or down - Counts before bvi commands: + Counts before bvi commands: Numbers may be typed as a prefix to some commands. They are interpreted in one of these ways. @@ -189,11 +211,11 @@ COMMAND SUMMARY scroll amount ^D ^U repeat effect most of the rest - Interrupting, canceling + Interrupting, canceling ESC end insert or incomplete command DEL (delete or rubout) interrupts - File manipulation: + File manipulation: ZZ if file modified, write and exit; otherwise, exit :w write changed buffer to file @@ -202,7 +224,7 @@ COMMAND SUMMARY :q quit when no changes have been made :q! quit and discard all changes :e file edit file - :e! reedit current file, discard all changes + :e! re-read current file, discard all changes :e # edit the alternate file :e! # edit the alternate file, discard changes :w file write current buffer to file @@ -218,13 +240,13 @@ COMMAND SUMMARY current position within buffer ^G same as :f - Additional edit commands - You can insert/append/change bytes in + Additional edit commands + You can insert/append/change bytes in ASCII/binary/decimal/ hexadecimal or octal representation. You can enter several (screen) lines of input. A line with only a period (.) in it will terminate the command. You must not type in values greater than a byte value. This - causes an abandom of the command. Pressing the CR key + causes an abandonment of the command. Pressing the CR key does not insert a newline - character into the file. If you use ASCII mode you can use the special characters \n, \r, \t and \0. @@ -233,7 +255,7 @@ COMMAND SUMMARY :a bCR append bytes (Binary) at end of file :c hCR change bytes (hexadecimal) at cursor position - Bit-level operations + Bit-level operations :and n bitwise 'and' operation with value n :or n bitwise 'or' operation with value n :xor n bitwise 'xor' operation with value n @@ -244,7 +266,7 @@ COMMAND SUMMARY :rl i rotate each byte i bits to the left :rr i rotate each byte i bits to the right - Command mode addresses + Command mode addresses :w foo write current buffer to a file named "foo" :5,10w foo copy byte 5 through 100 into as @@ -256,7 +278,7 @@ COMMAND SUMMARY :/pat/,$ foo search pattern pat and and copy through end of file - Positioning within file: + Positioning within file: ^B backward screen ^F forward screen ^D scroll down half screen @@ -271,7 +293,7 @@ COMMAND SUMMARY N repeat last search command, but in opposite direction - Adjusting the screen: + Adjusting the screen: ^L clear and redraw screen zCR redraw screen with current line at top of screen z- redraw screen with current line at bottom of @@ -283,16 +305,15 @@ COMMAND SUMMARY ^E scroll screen down 1 line ^Y scroll screen up 1 line - Marking and returning: + Marking and returning: mx mark current position with lower-case letter x Note: this command works for all lower-case - letters + letters 'x move cursor to mark x in ASCII section `x move cursor to mark x in HEX section '' move cursor to previous context in ASCII section `` move cursor to previous context in HEX section - - Line positioning: + Line positioning: H jump to first line on screen ("top") L jump to last line on screen ("low") M jump to middle line on screen ("middle") @@ -302,7 +323,7 @@ COMMAND SUMMARY DOWN or j next line, same column UP or k previous line, same column - Character positioning: + Character positioning: ^ first byte in HEX window $ end of screen line l or RIGHT jump onto next byte (within current @@ -316,7 +337,7 @@ COMMAND SUMMARY n| jump onto nth byte/character within current line - Strings: + Strings: (works similar to the strings(1) command) Note: "Words" are defined as strings of "nonprinting characters". @@ -327,35 +348,34 @@ COMMAND SUMMARY \0 or \n B back to previous string delimited with a nonprinting char - - Corrections during insert: + Corrections during insert: ^H erase last character (backspace) erase your erase character, same as ^H (backspace) ESC ends insertion, back to command mode - Append and replace: + Append and replace: A append at end of file rx replace current bte with char 'x' R enter replace mode; for all subsequent input, the current byte is overwritten with the next input character; leave replace mode with ESC. - Miscellaneous Operations: + Miscellaneous Operations: TAB toggle between ASCII and HEX section - Yank and Put: + Yank and Put: 3ySPACE yank 3 characters p insert contents of yank buffer o replace text with content of yank buffer P put back at end of file - Undo, Redo: + Undo, Redo: u undo last change Note: Only the last change can be undone. Therefore this commands toggles between the last and second-t-last state of the buffer. - Setting Options: + Setting Options: With the :set command you can set options in bvi Option Default Description @@ -380,13 +400,14 @@ COMMAND SUMMARY 32 is displayed in the statusline as shown in ascii(7) if unset rather in DOS-style (^A) + AUTHOR bvi was developed by Gerhard Buergmann, Vienna, Austria - Gerhard.Buergmann@altavista.net + Gerhard.Buergmann@puon.at WWW Bvi Homepage: http://bvi.sourceforge.net/ - Vi Pages: http://www.math.fu-berlin.de/~guckes/vi/ + Vi Pages: http://www.guckes.net/vi/clones.php3 (all about Vi and its clones) FILES @@ -400,5 +421,4 @@ BUGS SEE ALSO vi(1), strings(1), ascii(5) - -3/Jan/2002 BVI Version 1.3.1 8 +3/Jan/2004 BVI Version 1.3.2 diff --git a/comm.c b/comm.c index e3d5b8e..3c8ad62 100644 --- a/comm.c +++ b/comm.c @@ -9,11 +9,12 @@ * 2000-03-03 V 1.3.0 beta * 2000-07-15 V 1.3.0 final * 2001-10-10 V 1.3.1 + * 2003-07-04 V 1.3.2 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2001 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1996-2003 by Gerhard Buergmann + * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -39,7 +40,7 @@ # include #endif -#ifdef __MSDOS__ +#if defined(__MSDOS__) && !defined(DJGPP) # include # include # define WRITE (O_WRONLY|O_CREAT|O_TRUNC|O_BINARY) diff --git a/config.guess b/config.guess old mode 100644 new mode 100755 index 6012b39..9b1384b --- a/config.guess +++ b/config.guess @@ -1,9 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002 Free Software Foundation, Inc. -timestamp='2001-07-12' +timestamp='2002-11-30' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -24,8 +24,9 @@ timestamp='2001-07-12' # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Written by Per Bothner . -# Please send patches to . +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and @@ -87,30 +88,40 @@ if test $# != 0; then exit 1 fi +trap 'exit 1' 1 2 15 -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. -# CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. -set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int dummy(){}" > $dummy.c ; - for c in cc gcc c89 ; do - ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; - if test $? = 0 ; then +# This shell variable is my proudest work .. or something. --bje + +set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; +(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) + || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; +dummy=$tmpdir/dummy ; +files="$dummy.c $dummy.o $dummy.rel $dummy" ; +trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; - rm -f $dummy.c $dummy.o $dummy.rel ; + rm -f $files ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac' +esac ; +unset files' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -127,29 +138,30 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) - # Netbsd (nbsd) targets should (where applicable) match one or + # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. - # Determine the machine/vendor (is the vendor relevant). - case "${UNAME_MACHINE}" in - amiga) machine=m68k-unknown ;; - arm32) machine=arm-unknown ;; - atari*) machine=m68k-atari ;; - sun3*) machine=m68k-sun ;; - mac68k) machine=m68k-apple ;; - macppc) machine=powerpc-apple ;; - hp3[0-9][05]) machine=m68k-hp ;; - ibmrt|romp-ibm) machine=romp-ibm ;; - *) machine=${UNAME_MACHINE}-unknown ;; + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. - case "${UNAME_MACHINE}" in - i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null @@ -166,12 +178,62 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ;; esac # The OS release - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -180,6 +242,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. + eval $set_cc_for_build cat <$dummy.s .data \$Lformat: @@ -205,10 +268,9 @@ main: jsr \$26,exit .end main EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null if test "$?" = 0 ; then - case `./$dummy` in + case `$dummy` in 0-0) UNAME_MACHINE="alpha" ;; @@ -227,9 +289,15 @@ EOF 2-307) UNAME_MACHINE="alphaev67" ;; + 2-1307) + UNAME_MACHINE="alphaev68" + ;; + 3-1307) + UNAME_MACHINE="alphaev7" + ;; esac fi - rm -f $dummy.s $dummy + rm -f $dummy.s $dummy && rmdir $tmpdir echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) @@ -244,29 +312,11 @@ EOF Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -288,6 +338,10 @@ EOF NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; @@ -316,7 +370,7 @@ EOF echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) @@ -330,9 +384,6 @@ EOF aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -359,18 +410,6 @@ EOF *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; @@ -387,6 +426,7 @@ EOF echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ @@ -408,16 +448,21 @@ EOF exit (-1); } EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.c -o $dummy \ - && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; @@ -478,6 +523,7 @@ EOF exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include @@ -489,9 +535,8 @@ EOF exit(0); } EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 @@ -500,7 +545,7 @@ EOF fi exit 0 ;; *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else @@ -540,10 +585,8 @@ EOF 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - case "${HPUX_REV}" in - 11.[0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 @@ -552,12 +595,13 @@ EOF case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac - fi ;; - esac - if [ "${HP_ARCH}" = "" ]; then - sed 's/^ //' << EOF >$dummy.c + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include @@ -590,11 +634,10 @@ EOF exit (0); } EOF - eval $set_cc_for_build - (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi - rm -f $dummy.c $dummy - fi ;; + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy && rmdir $tmpdir + fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; @@ -603,6 +646,7 @@ EOF echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int @@ -628,9 +672,8 @@ EOF exit (0); } EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) @@ -658,9 +701,6 @@ EOF parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; - hppa*:OpenBSD:*:*) - echo hppa-unknown-openbsd - exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; @@ -679,9 +719,6 @@ EOF C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; @@ -703,18 +740,12 @@ EOF CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; @@ -725,10 +756,19 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + rm -f $dummy.c && rmdir $tmpdir + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -739,11 +779,17 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; + x86:Interix*:3*) + echo i586-pc-interix3 + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? - echo i386-pc-interix + echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin @@ -764,20 +810,57 @@ EOF echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux + echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) - case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in - big) echo mips-unknown-linux-gnu && exit 0 ;; - little) echo mipsel-unknown-linux-gnu && exit 0 ;; - esac + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + rm -f $dummy.c && rmdir $tmpdir + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + rm -f $dummy.c && rmdir $tmpdir + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -786,7 +869,7 @@ EOF PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi @@ -819,7 +902,8 @@ EOF # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. - ld_supported_targets=`cd /; ld --help 2>&1 \ + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// @@ -831,7 +915,7 @@ EOF ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; @@ -842,33 +926,30 @@ EOF exit 0 ;; esac # Determine whether the default compiler is a.out or elf - cat >$dummy.c < -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-pc-linux-gnu\n", argv[1]); -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-pc-linux-gnuaout\n", argv[1]); -#endif - return 0; -} -EOF eval $set_cc_for_build - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + rm -f $dummy.c && rmdir $tmpdir + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) @@ -885,6 +966,23 @@ EOF # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -906,22 +1004,19 @@ EOF UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -945,9 +1040,15 @@ EOF # "miniframe" echo m68010-convergent-sysv exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -964,9 +1065,6 @@ EOF mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; @@ -993,8 +1091,8 @@ EOF echo ns32k-sni-sysv fi exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) @@ -1006,6 +1104,10 @@ EOF # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; @@ -1034,6 +1136,9 @@ EOF SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; @@ -1044,15 +1149,17 @@ EOF echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo `uname -p`-${UNAME_MACHINE}-nto-qnx + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; - NSR-[KW]:NONSTOP_KERNEL:*:*) + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) @@ -1075,11 +1182,6 @@ EOF fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; @@ -1103,6 +1205,7 @@ esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 +eval $set_cc_for_build cat >$dummy.c < @@ -1217,9 +1320,8 @@ main () } EOF -eval $set_cc_for_build -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 -rm -f $dummy.c $dummy +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 +rm -f $dummy.c $dummy && rmdir $tmpdir # Apollos put the system type in the environment. diff --git a/config.h.in b/config.h.in index a0cd505..214e077 100644 --- a/config.h.in +++ b/config.h.in @@ -1,47 +1,87 @@ /* config.h.in. Generated automatically from configure.in by autoheader. */ +/***** begin user configuration section *****/ -/* Define to `int' if doesn't define. */ -/* #undef mode_t */ - -/* Define to `long' if doesn't define. */ -/* #undef off_t */ - -/* Define to `int' if doesn't define. */ -/* #undef pid_t */ - -/* Define to `unsigned' if doesn't define. */ -/* #undef size_t */ - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define if you have the memmove function. */ -#undef HAVE_MEMMOVE - -/* Define if you have the strdup function. */ -#undef HAVE_STRDUP - -/* Define if you have the strtol function. */ -#undef HAVE_STRTOL - -/* Define if you have the strerror function. */ -#undef HAVE_STRERROR - -/* Define if you have the header file. */ -#undef HAVE_CURSES_H - -/* Define if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define if you have the header file. */ #undef HAVE_NCURSES_H -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H +#undef HAVE_CURSES_H -/* Define if you have the ncurses library (-lncurses). */ -#undef HAVE_LIBNCURSES +#undef NO_SYSERRL -/* Define if your tputs need putc(char) */ #undef NEED_PUTC_CHAR +#undef HAVE_NCURSES_TERM_H + +/* Define if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define if you have the `memmove' function. */ +#undef HAVE_MEMMOVE + +/* Define if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define if you have the header file. */ +#undef HAVE_NCURSES_TERM_H + +/* Define if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define if you have the header file. */ +#undef HAVE_STRING_H + +/* Define if you have the `strtol' function. */ +#undef HAVE_STRTOL + +/* Define if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define if you have the header file. */ +#undef HAVE_TERMCAP_H + +/* Define if you have the header file. */ +#undef HAVE_TERMIOS_H + +/* Define if you have the header file. */ +#undef HAVE_TERMIO_H + +/* Define if you have the header file. */ +#undef HAVE_TERM_H + +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H + +/* The size of a `int', as computed by sizeof. */ +#undef SIZEOF_INT + +/* The size of a `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* The size of a `void *', as computed by sizeof. */ +#undef SIZEOF_VOID_P + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to `int' if does not define. */ +#undef off_t + +/* Define to `unsigned int' if does not define. */ +#undef size_t diff --git a/config.sub b/config.sub old mode 100644 new mode 100755 index 578b302..f0675aa --- a/config.sub +++ b/config.sub @@ -1,9 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002 Free Software Foundation, Inc. -timestamp='2001-06-08' +timestamp='2002-11-30' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -29,7 +29,8 @@ timestamp='2001-06-08' # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Please send patches to . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -117,7 +118,7 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) + nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -223,26 +224,46 @@ esac case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ - | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ - | pyramid | mn10200 | mn10300 | tron | a29k \ - | 580 | i960 | h8300 \ - | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ - | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ - | hppa64 \ - | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ - | alphaev6[78] \ - | we32k | ns16k | clipper | i370 | sh | sh[34] \ - | powerpc | powerpcle \ - | 1750a | dsp16xx | pdp10 | pdp11 \ - | mips16 | mips64 | mipsel | mips64el \ - | mips64orion | mips64orionel | mipstx39 | mipstx39el \ - | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ - | mips64vr5000 | mips64vr5000el | mcore | s390 | s390x \ - | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \ - | v850 | c4x \ - | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ - | pj | pjl | h8500 | z8k) + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xstormy16 | xtensa \ + | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) @@ -265,31 +286,56 @@ case $basic_machine in exit 1 ;; # Recognize the basic CPU types with company name. - # FIXME: clean up the formatting here. - vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ - | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ - | xmp-* | ymp-* \ - | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ - | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ - | hppa2.0n-* | hppa64-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ - | alphaev6[78]-* \ - | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ - | clipper-* | orion-* \ - | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \ - | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \ - | mips16-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ - | mipstx39-* | mipstx39el-* | mcore-* \ - | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ - | [cjt]90-* \ - | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ - | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ - | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ + | m32r-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39 | mipstx39el \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ + | ymp-* \ + | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -352,6 +398,10 @@ case $basic_machine in basic_machine=ns32k-sequent os=-dynix ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -372,16 +422,8 @@ case $basic_machine in basic_machine=c38-convex os=-bsd ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [cjt]90) - basic_machine=${basic_machine}-cray + cray | j90) + basic_machine=j90-cray os=-unicos ;; crds | unos) @@ -396,6 +438,14 @@ case $basic_machine in decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola @@ -576,14 +626,6 @@ case $basic_machine in basic_machine=m68k-atari os=-mint ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; @@ -598,6 +640,10 @@ case $basic_machine in basic_machine=m68k-rom68k os=-coff ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; msdos) basic_machine=i386-pc os=-msdos @@ -677,6 +723,10 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose @@ -699,19 +749,19 @@ case $basic_machine in pbb) basic_machine=m68k-tti ;; - pc532 | pc532-*) + pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium | p5 | k5 | k6 | nexgen) + pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; - pentiumpro | p6 | 6x86 | athlon) + pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-*) + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) @@ -726,15 +776,25 @@ case $basic_machine in power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown - ;; + ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown - ;; + ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ps2) basic_machine=i386-ibm ;; @@ -752,10 +812,22 @@ case $basic_machine in rtpc | rtpc-*) basic_machine=romp-ibm ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; sa29200) basic_machine=a29k-amd os=-udi ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; sequent) basic_machine=i386-sequent ;; @@ -763,7 +835,7 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; - sparclite-wrs) + sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -829,10 +901,22 @@ case $basic_machine in basic_machine=i386-sequent os=-dynix ;; - t3e) - basic_machine=t3e-cray + t3d) + basic_machine=alpha-cray os=-unicos ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic4x | c4x*) + basic_machine=tic4x-unknown + os=-coff + ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff @@ -843,6 +927,10 @@ case $basic_machine in tx39el) basic_machine=mipstx39el-unknown ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; tower | tower-32) basic_machine=m68k-ncr ;; @@ -867,8 +955,8 @@ case $basic_machine in os=-vms ;; vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -889,17 +977,13 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; - windows32) - basic_machine=i386-pc - os=-windows32-msvcrt - ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) + xps | xps100) basic_machine=xps100-honeywell ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim @@ -920,13 +1004,6 @@ case $basic_machine in op60c) basic_machine=hppa1.1-oki ;; - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; romp) basic_machine=romp-ibm ;; @@ -946,13 +1023,16 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh3 | sh4) + sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) basic_machine=sh-unknown ;; + sh64) + basic_machine=sh64-unknown + ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; - cydra) + cydra) basic_machine=cydra-cydrome ;; orion) @@ -967,10 +1047,6 @@ case $basic_machine in pmac | pmac-mpw) basic_machine=powerpc-apple ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; @@ -1033,9 +1109,12 @@ case $os in | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1047,8 +1126,10 @@ case $os in ;; esac ;; + -nto-qnx*) + ;; -nto*) - os=-nto-qnx + os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ @@ -1087,14 +1168,20 @@ case $os in -acis*) os=-aos ;; + -atheos*) + os=-atheos + ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; + -nova*) + os=-rtmk-nova + ;; -ns2 ) - os=-nextstep2 + os=-nextstep2 ;; -nsk*) os=-nsk @@ -1133,8 +1220,8 @@ case $os in -xenix) os=-xenix ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint ;; -none) ;; @@ -1167,10 +1254,11 @@ case $basic_machine in arm*-semi) os=-aout ;; + # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; - pdp11-*) + pdp11-*) os=-none ;; *-dec | vax-*) @@ -1197,6 +1285,9 @@ case $basic_machine in mips*-*) os=-elf ;; + or32-*) + os=-coff + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; @@ -1260,19 +1351,19 @@ case $basic_machine in *-next) os=-nextstep3 ;; - *-gould) + *-gould) os=-sysv ;; - *-highlevel) + *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; - *-sgi) + *-sgi) os=-irix ;; - *-siemens) + *-siemens) os=-sysv4 ;; *-masscomp) @@ -1344,7 +1435,7 @@ case $basic_machine in -ptx*) vendor=sequent ;; - -vxsim* | -vxworks*) + -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) @@ -1359,6 +1450,9 @@ case $basic_machine in -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; + -vos*) + vendor=stratus + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; diff --git a/configure b/configure index d5e08af..b3ad612 100755 --- a/configure +++ b/configure @@ -3171,7 +3171,7 @@ EOF fi -for ac_header in fcntl.h termcap.h termio.h termios.h unistd.h +for ac_header in fcntl.h termcap.h termio.h termios.h unistd.h term.h ncurses/term.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:3177: checking for $ac_header" >&5 diff --git a/configure.in b/configure.in index bc5152f..68076d8 100644 --- a/configure.in +++ b/configure.in @@ -44,7 +44,7 @@ AC_CHECK_TYPE(off_t, int) dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h termcap.h termio.h termios.h unistd.h) +AC_CHECK_HEADERS(fcntl.h termcap.h termio.h termios.h unistd.h term.h ncurses/term.h) dnl Check if ncurses requested _cppflags="${CPPFLAGS}" diff --git a/dosconf.h b/dosconf.h index d5ba078..ad3fd8c 100644 --- a/dosconf.h +++ b/dosconf.h @@ -8,8 +8,8 @@ * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-1969 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1996-2002 by Gerhard Buergmann + * Gerhard.Buergmann@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/doscur.h b/doscur.h index a410d66..d248ff9 100644 --- a/doscur.h +++ b/doscur.h @@ -1,7 +1,7 @@ /* DOSCUR.H - CURSES.H for TURBO C * - * Copyright 1996 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1996-2002 by Gerhard Buergmann + * Gerhard.Buergmann@puon.at * * 1996-02-28 V 1.0.0 * 1998-04-12 V 1.0.1 @@ -146,4 +146,3 @@ void attrset(int); #define ERR (-1) - \ No newline at end of file diff --git a/dosio.c b/dosio.c index 4511bfc..90cd281 100644 --- a/dosio.c +++ b/dosio.c @@ -10,8 +10,8 @@ * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2000 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1996-2002 by Gerhard Buergmann + * Gerhard.Buergmann@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/edit.c b/edit.c index ed8e8ba..328a0cd 100644 --- a/edit.c +++ b/edit.c @@ -8,9 +8,10 @@ * 2000-05-14 V 1.3.0 alpha * 2000-07-15 V 1.3.0 final * 2001-12-07 V 1.3.1 + * 2003-07-04 V 1.3.2 * - * Copyright 1996-2001 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1996-2003 by Gerhard Buergmann + * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -861,7 +862,7 @@ do_ins_chg(start, arg, mode) break; } mfree: -#ifdef __MSDOS__ +#if defined(__MSDOS__) && !defined(DJGPP) farfree(tempbuf); #else free(tempbuf); diff --git a/html/bmore.html b/html/bmore.html index 4081da7..86d9962 100644 --- a/html/bmore.html +++ b/html/bmore.html @@ -62,15 +62,17 @@ continuity. If bmore is reading from a file rather than a pipe, the percentage of characters displayed so far is also shown.

          bmore scrolls up to display one more screen line in -response to a RETURN character; it displays another -screenful in response to a SPACE character. Other commands are listed below. +response to a RETURN character; it displays another +screenful in response to a SPACE character. Other commands are listed below.

          The screen is divided in three sections or panes: The byte offset (extreme left), the hex pane (middle), and an ascii pane (right) which shows as printable characters those bytes in the hex pane. On an 80 column terminal there will be sixteen hex values and their ASCII values on each -screen line. Note that (as one would expect) the first +screen line (can be changed with the -n option). +

          +Note that (as one would expect) the first byte has the offset 0 (zero).

          @@ -145,12 +147,13 @@ byte has the offset 0 (zero). Equal lines will only displayed once, a star (*) is the placeholder for one or more lines equal to the line above.

          -

          +

          Back to the topBack to the top - +


          -Last update: Fri Oct 13 22:30:06 CEST 2000 by Gerhard Bürgmann +Last update: October 13th 2000 by Gerhard Bürgmann, +Purkersdorf/Austria
          diff --git a/html/bmore_opt.html b/html/bmore_opt.html index 75f887e..435fda5 100644 --- a/html/bmore_opt.html +++ b/html/bmore_opt.html @@ -57,11 +57,19 @@ height="62" border="0">

          + + + + @@ -122,12 +130,13 @@ With the -a option the display looks like this:
          -aASCII mode
          -cClear before displaying. Redrawing the screen +instead of scrolling. Can be useful, if you change the number of +displayed lines.
          -dDisplay error messages rather than ringing the terminal bell if an unrecognized command is used. This is helpful for inexperienced users.
          -iIgnore case for searching.
          -n linesDisplays the indicated number of lines in each screenful, +rather than the default (the number of lines in the terminal screen less two).
          -w cols +Display number of cols (bytes of data) in each line.
          +linenumber Start up at linenumber
          +/ASCII-pattern

           

          -

          +

          Back to the topBack to the top - +


          -Last update: Fri Oct 13 21:38:17 CEST 2000 by Gerhard Bürgmann +Last update: January 4th 2004 by Gerhard Bürgmann, +Purkersdorf/Austria
          diff --git a/html/colon.html b/html/colon.html index 432217e..b3b3ddf 100644 --- a/html/colon.html +++ b/html/colon.html @@ -202,7 +202,8 @@ Usually not available in vi but in ex (without the m - modifier). ALT="Back to the top">Back to the top
          -Last update: October 30th 1999 by Gerhard Bürgmann +Last update: October 30th 1999 by Gerhard Bürgmann, +Purkersdorf/Austria diff --git a/html/cursor.html b/html/cursor.html index 089bf9e..7bb90a6 100644 --- a/html/cursor.html +++ b/html/cursor.html @@ -110,7 +110,8 @@ ALT="Back to the top">Back to the top
          -Last update: October 30th 1999 by Gerhard Bürgmann +Last update: October 30th 1999 by Gerhard Bürgmann, +Purkersdorf/Austria diff --git a/html/download.html b/html/download.html index 99340a8..6cb6795 100644 --- a/html/download.html +++ b/html/download.html @@ -18,6 +18,7 @@

          Download
          +New in 1.3.2
          New in 1.3.1
          New in 1.3.0
          New in 1.2.0
          @@ -57,31 +58,41 @@ height="62" border="0"> NOTE: All packages are compressed with the GNU gzip program. You can download it from ftp://ftp.gnu.org/gnu/gzip/.

          -Current stable release of bvi is 1.3.1 -(Check out what's new): +Current stable release of bvi is 1.3.2 +(Check out what's new):

          Sources

          +

          Packages

          +
          diff --git a/html/edit.html b/html/edit.html index b4cb62c..be34378 100644 --- a/html/edit.html +++ b/html/edit.html @@ -188,7 +188,8 @@ of the command! ALT="Back to the top">Back to the top
          -Last update: September 30th 1999 by Gerhard Bürgmann +Last update: September 30th 1999 by Gerhard Bürgmann, +Purkersdorf/Austria diff --git a/html/german.html b/html/german.html index 8b39ef3..68a69dc 100644 --- a/html/german.html +++ b/html/german.html @@ -198,10 +198,10 @@ Schreibweise angegeben werden. Auch bei Eingabe von genau acht 0 und 1 Werten wird der Byte - Wert binär interpretiert.
          Beispiel:
          -:100,500and 01A RETURN
          -:03FA,01000or 00001000 RETURN
          -:.rr 3 RETURN
          -:'a,$sl 1 RETURN
          +:100,500and 01A RETURN
          +:03FA,01000or 00001000 RETURN
          +:.rr 3 RETURN
          +:'a,$sl 1 RETURN

          @@ -209,6 +209,7 @@ Beispiel:
          alt="Back to the top">Back to the top


          -Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann +Last update: June 1st 2000 by Gerhard Bürgmann, +Purkersdorf/Austria
          diff --git a/html/index.html b/html/index.html index 3bc5def..788e530 100644 --- a/html/index.html +++ b/html/index.html @@ -1,10 +1,6 @@ BVI - Binary VIsual editor - - + + +
          @@ -49,13 +49,17 @@ Deutsche
          Beschreibung Sitemap

          +

          +Project Page +

          +
          -

          +

          VI and Clones

          -

          +

          Hex-Editors

          @@ -66,7 +70,7 @@ Hex-Editors SourceForge Logo

          -
          @@ -84,16 +88,17 @@ If you never heard about vi, maybe bvi is not choice for you.

          -

          Original site: http://bvi.sourceforge.net

          +

          Current: Version 1.3.2

          + You can download source and compiled versions from the download page.
          -Check out whats new in 1.3.1! +Check out whats new in 1.3.2!

          Newsgroup: comp.editors

          -Mailing List: +Mailing List (very low traffic):

          To join this list, simply send a blank email to bvi-subscribe@yahoogroups.com. @@ -102,23 +107,23 @@ Simply reply this message and your subscription will be complete.
          Bvi was developed by Gerhard Bürgmann and is published -under the GNU Public License. Current stable version is 1.3.1. +under the GNU Public License. Current stable version is 1.3.2. Bvi is running on most UNIX - like operating systems and on MSDOS.

          If you want to contact me:
          Gerhard Bürgmann, Vienna ( Purkersdorf ) / Austria / Europe
          -E-mail: -Gerhard.Buergmann@altavista.net +E-mail: gerhard@puon.at
          +Have a look at Meta Chrom Kennzeichenhalter

          - + Back to the topBack to the top - +


          -Last update: February 12th 2002 by Gerhard Bürgmann +Last update: January 8th 2004 by Gerhard Bürgmann

          diff --git a/html/install.html b/html/install.html index e7e89e5..82870e8 100644 --- a/html/install.html +++ b/html/install.html @@ -59,9 +59,9 @@ for cursor movement.
        • Download the source package from the Download Page
        • Unzip the package with the command:
        • -    # gunzip -c bvi-1.3.1.src.tar.gz | tar xvf
          +    # gunzip -c bvi-1.3.2.src.tar.gz | tar xvf
           
          -
        • Change to the directory bvi-1.3.1 and type +
        • Change to the directory bvi-1.3.2 and type
               # ./configure
               # make
          @@ -91,12 +91,19 @@ You will find now four new commands:
           files from your file system.
          You can remove the program binaries and object files from the source code directory by typing `make clean'. -To also remove the files that `configure' created +To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'.
        • MSDOS

          +Beginning with version 1.3.2 you may use the DJGPP environment to +compile bvi for working under both Win32 and DOS. +

          +The MSDOS version (Borland C) exists for historical reasons and is not +supported anymore: +

          +

          You have to convert the sourcefiles from the UNIX textformat to the MSDOS textformat first. This can be done e.g. by loading and saving them with the MSDOS standard editor `edit'. @@ -112,21 +119,21 @@ be able to convert it to a .COM file.

        • Download the source package from the Download Page
        • Unzip the package with the command:
          -    gunzip -c bvi-1.3.1.src.tar.gz | tar xvf
          +    gunzip -c bvi-1.3.2.src.tar.gz | tar xvf
           
        • Load the tcconfig file (located in the bc subdirectory for Borland - C).
        • Press F9-Make
        • -The MSDOS version exists for historical reasons and is not really -supported anymore. -

          +

          +

          Back to the topBack to the top - +


          -Last update: February 12th 2002 by Gerhard Bürgmann +Last update: February 12th 2004 by Gerhard Bürgmann, +Purkersdorf/Austria
          diff --git a/html/man_bmore.html b/html/man_bmore.html index c4e0af9..921c0c1 100644 --- a/html/man_bmore.html +++ b/html/man_bmore.html @@ -1,14 +1,16 @@ + BMORE(1) BMORE(1) - - + + NAME bmore - browse through a binary file - + SYNOPSIS - bmore [ -adi ] [ +linenumber ] [ +/ASCII-pattern ] [ - +\Hex-pattern ] [ filename ... ] - + bmore [ -acdi ] [ -n lines ] [ -w cols ] [ +linenumber ] [ + +/ASCII-pattern ] [ +\Hex-pattern ] [ filename ... ] + + DESCRIPTION more is a filter that displays the contents of a binary file on the terminal, one screenful at a time. It nor- @@ -17,12 +19,12 @@ DESCRIPTION lap between screens for continuity. If bmore is reading from a file rather than a pipe, the percentage of charac- ters displayed so far is also shown. - + bmore scrolls up to display one more screen line in response to a RETURN character; it displays another screenful in response to a SPACE character. Other com- mands are listed below. - + The screen is divided in three sections or panes: The byte offset (extreme left), the hex pane (middle), and an ascii pane (right) which shows as printable characters those @@ -30,142 +32,150 @@ DESCRIPTION will be sixteen hex values and their ASCII values on each screen line. Note that (as one would expect) the first byte has the offset 0 (zero). - + bmore sets the terminal to noecho mode, so that the output can be continuous. Commands that you type do not normally show up on your terminal, except for the / , \ and ! com- mands. - + If the standard output is not a terminal, more acts just like cat(1V), except that a header is printed before each file in a series. - + OPTIONS -a ASCII mode: no hex representation of the contents. Non printable characters are displayed as a dot (.) - + + -c Clear before displaying. Redrawing the screen + instead of scrolling. + -d Display error messages rather than ringing the ter- - minal bell if an unrecognized command is used. + minal bell if an unrecognized command is used. This is helpful for inexperienced users. - + -i Ignore case for searching. - + + -n lines + Displays the indicated number of lines in each + screenful, rather than the default (the number of + lines in the terminal screen less two). + + -w cols + Display number of cols in each line. + +linenumber Start up at linenumber. - + +/ASCII-pattern - Start up at the line containing the regular - expression pattern. Note: unlike editors, this - construct should not end with a `/'. If it does, - then the trailing slash is taken as a character in - the search pattern. - - + Start up at the line containing the regular expres- + sion pattern. Note: unlike editors, this construct + should not end with a `/'. If it does, then the + trailing slash is taken as a character in the + search pattern. + + USAGE - + Commands The commands take effect immediately; it is not necessary - to type a carriage return. Up to the time when the com- + to type a carriage return. Up to the time when the com- mand character itself is given, the user may type the line - kill character to cancel the numerical argument being - formed. In addition, the user may type the erase charac- - ter to redisplay the `--More--(xx%)' message. + kill character to cancel the numerical argument being + formed. In addition, the user may type the erase charac- + ter to redisplay the `--More--(xx%)' message. In the following commands, i is a numerical argument (1 by default). - - iSPACE Display another screenful, or i more lines if i + + iSPACE Display another screenful, or i more lines if i is specified. - + iRETURN Display another line, or i more lines, if speci- fied. - + i^D (CTRL-D) Display (scroll down) 11 more lines. i is given, the scroll size is set to i. - + id Same as ^D. - + iz Same as SPACE, except that i, if present, - becomes the new default number of lines per + becomes the new default number of lines per screenful. - - is Skip i lines and then print a screenful. - + + is Skip i lines and then print a screenful. + if Skip i screenfuls and then print a screenful. - + i^B (CTRL-B) Skip back i screenfuls and then print a screenful. - + b Same as ^B (CTRL-D). - + q Q Exit from more. - - = Display the current line number. - - v Drop into the bvi(1) editor at the current off- - set of the current file. - - w Drop into the bvi(1) editor at the current off- - set of the current file. Only the portion of the - file displayed on the screen will be loaded. - h Help. Give a description of all the more com- + = Display the current line number. + + v Drop into the bvi(1) editor at the current off- + set of the current file. + w Drop into the bvi(1) editor at the current off- + set of the current file. Only the portion of the + file displayed on the screen will be loaded. + + h Help. Give a description of all the more com- mands. - - i/pattern Search for the ith occurrence of the regular - expression pattern. Display the screenful - starting at the file position that contains the - ith match for the regular expression ASCII-pat- - tern, or the end of a pipe, whichever comes - first. If bmore is displaying a file and there - is no such match, its position in the file - remains unchanged. Regular expressions can be + + i/pattern Search for the ith occurrence of the regular + expression pattern. Display the screenful + starting at the file position that contains the + ith match for the regular expression ASCII-pat- + tern, or the end of a pipe, whichever comes + first. If bmore is displaying a file and there + is no such match, its position in the file + remains unchanged. Regular expressions can be edited using erase and kill characters. Erasing - back past the first column cancels the search + back past the first column cancels the search command. - - ' Single quote. Go to the point from which the + + ' Single quote. Go to the point from which the last search started. If no search has been per- - formed in the current file, go to the beginning - of the file. - !command Invoke a shell to execute command. The charac- - ters % and !, when used within command are - replaced with the current filename and the pre- - vious shell command, respectively. If there is - no current filename, % is not expanded. Prepend + formed in the current file, go to the beginning + of the file. + + !command Invoke a shell to execute command. The charac- + ters % and !, when used within command are + replaced with the current filename and the pre- + vious shell command, respectively. If there is + no current filename, % is not expanded. Prepend a backslash to these characters to escape expan- sion. - - i:n Skip to the ith next filename given in the com- - mand line, or to the last filename in the list + + i:n Skip to the ith next filename given in the com- + mand line, or to the last filename in the list if i is out of range. - - i:p Skip to the ith previous filename given in the - command line, or to the first filename if i is + + i:p Skip to the ith previous filename given in the + command line, or to the first filename if i is out of range. If given while more is positioned - within a file, go to the beginning of the file. - If more is reading from a pipe, more simply - rings the terminal bell. - :f Display the current filename and offset number. - + within a file, go to the beginning of the file. + If more is reading from a pipe, more simply + rings the terminal bell. + + :f Display the current filename and offset number. + :q :Q Exit from bmore (same as q or Q ). - + . Dot. Repeat the previous command. - - -AUTHOR - bmore was developed by Gerhard Buergmann, Vienna, Austria - Gerhard.Buergmann@altavista.net - -FILES - /etc/termcap terminal data base - /usr/local/share/bmore.help help file - + + + FILES + /etc/termcap terminal data base + /usr/local/share/bmore.help + help file + SEE ALSO bvi(1), termcap(5) - - -13/Oct/2000 BMORE Version 1.3.0 - + + 3 Jan 2004 + diff --git a/html/man_bvi.html b/html/man_bvi.html index 4815af6..e6763c6 100644 --- a/html/man_bvi.html +++ b/html/man_bvi.html @@ -3,14 +3,14 @@ BVI(1) User Commands BVI(1) NAME - bvi, bview - visual display editor for binary files + bvi, bview - visual editor for binary files VERSION - bvi-1.3.0 + bvi-1.3.2 SYNOPSIS - bvi [-R] [-c cmd] [-b begin] [-e end] [-s size] [-f script] file... - bview [-R] [-c cmd] [-b begin] [-e end] [-s size] [-f script] file... + bvi [-R] [-c cmd] [-f script] [-b begin] [-e end] [-s size] file... + bview [-R] [-c cmd] [-f script] [-b begin] [-e end] [-s size] file... OPTIONS file... @@ -24,23 +24,27 @@ OPTIONS files, preventing accidental overwriting with a write command. + -b begin causes bvi to load a file not from the start but from - offset {begin}. + offset begin. + -e end - causes bvi to load a file not till end but till address - {end}. + causes bvi to load a file not till end but till + address end. + -s size - causes bvi not to load the complete file but only - {size} bytes. + causes bvi not to load the complete file but only size + bytes. + -c cmd - {cmd} will be executed after the first file has - been read. If the {cmd} contains spaces it must - be enclosed in double quotes (this depends on the - shell that is used). + cmd will be executed after the first file has + been read. If the cmd contains spaces it must be + enclosed in double quotes (this depends on the shell + that is used). -f script This command provides a means for collecting a series @@ -55,7 +59,7 @@ DESCRIPTION on that of the vi(1) text editor. As a binary editor does not have the concept of "lines" there are differences from Vi commands wherever the latter are line orientate. - + COMPARISON The main differences between Vi and Bvi are: @@ -65,11 +69,11 @@ COMPARISON bytes in the hex pane. On an 80 column terminal there will be sixteen hex values and their ASCII values on each screen line. Note that (as one would expect) the first - byte has the offset '0' (zero). + byte has the offset '0' (zero). You can toggle between the hex and ascii windows with the - tabulator key (TAB). Toggling between these two windows - does not change the current position within the file. + tab key (TAB). Toggling between these two windows does + not change the current position (offset) within the file. No "lines" concept: Files are treated as one long stream of bytes. The characters "newline" and "carriage return" @@ -82,7 +86,7 @@ COMPARISON of "range" before the ":write" command to a byte offset, ie the command ":100,200w foo" writes all *bytes* (not lines) from offset 100 to offset 200 to the file "foo". - + No "text objects": There are also no text-specific arrangements like words, paragraphs, sentences, sections and so on. @@ -118,23 +122,23 @@ COMPARISON between hex value are optional, so searching for "6775636B6573" will find "guckes". - Changing data (insertion, deletion) moves the data to - other addresses; this is bad for many cases (eg. - databases, program files) and is thus disabled by default. - You can enable this commands by typing + Changing the length of data (insertion, deletion) moves + the data to other addresses; this is bad for many cases + (eg. databases, program files) and is thus disabled by + default. You can enable this commands by typing :set memmove - BVI Modes: + BVI Modes: - Command Mode (Normal Mode): + Command Mode (Normal Mode): Input is treated as command. Note that command mode is the default mode after startup and after escaping from input mode. Use ESC (escape) to cancel a partial (uncompleted) command. - - Input Mode: + + Input Mode: Input is treated as replacement of current characters or (after the end of the file) is appended to the current @@ -145,15 +149,15 @@ COMPARISON switch between these two windows. Type ESC to finish the current input and return to command mode. Type CTRL-C to cancel current command abnormally. - - Command line mode (Last Line Mode or : mode): + + Command line mode (Last Line Mode or : mode): Similar to vi, this mode is entered by typing one of the characters : / ? \ # ! The command is terminated and executed by typing a carriage return; to cancel a partially typed command, type ESC to cancel the current command and return to command mode. - + ENVIRONMENT The editor recognizes the environment variable BVIINIT as a command (or list of commands) to run when it starts @@ -185,11 +189,11 @@ COMMAND SUMMARY abbreviations used within the following description of commands. - Abstract: - Arrow keys move the cursor on the screen within the + Abstract: + Arrow keys move the cursor on the screen within the current window. - Sample commands: + Sample commands: :version show version info <- v ^ -> arrow keys move the cursor h j k l same as arrow keys @@ -199,7 +203,7 @@ COMMAND SUMMARY /text search for text ^U ^D scroll up or down - Counts before bvi commands: + Counts before bvi commands: Numbers may be typed as a prefix to some commands. They are interpreted in one of these ways. @@ -208,11 +212,11 @@ COMMAND SUMMARY scroll amount ^D ^U repeat effect most of the rest - Interrupting, canceling + Interrupting, canceling ESC end insert or incomplete command DEL (delete or rubout) interrupts - File manipulation: + File manipulation: ZZ if file modified, write and exit; otherwise, exit :w write changed buffer to file @@ -221,7 +225,7 @@ COMMAND SUMMARY :q quit when no changes have been made :q! quit and discard all changes :e file edit file - :e! reedit current file, discard all changes + :e! re-read current file, discard all changes :e # edit the alternate file :e! # edit the alternate file, discard changes :w file write current buffer to file @@ -237,13 +241,13 @@ COMMAND SUMMARY current position within buffer ^G same as :f - Additional edit commands - You can insert/append/change bytes in + Additional edit commands + You can insert/append/change bytes in ASCII/binary/decimal/ hexadecimal or octal representation. You can enter several (screen) lines of input. A line with only a period (.) in it will terminate the command. You must not type in values greater than a byte value. This - causes an abandom of the command. Pressing the CR key + causes an abandonment of the command. Pressing the CR key does not insert a newline - character into the file. If you use ASCII mode you can use the special characters \n, \r, \t and \0. @@ -252,7 +256,7 @@ COMMAND SUMMARY :a bCR append bytes (Binary) at end of file :c hCR change bytes (hexadecimal) at cursor position - Bit-level operations + Bit-level operations :and n bitwise 'and' operation with value n :or n bitwise 'or' operation with value n :xor n bitwise 'xor' operation with value n @@ -263,7 +267,7 @@ COMMAND SUMMARY :rl i rotate each byte i bits to the left :rr i rotate each byte i bits to the right - Command mode addresses + Command mode addresses :w foo write current buffer to a file named "foo" :5,10w foo copy byte 5 through 100 into as @@ -275,7 +279,7 @@ COMMAND SUMMARY :/pat/,$ foo search pattern pat and and copy through end of file - Positioning within file: + Positioning within file: ^B backward screen ^F forward screen ^D scroll down half screen @@ -290,7 +294,7 @@ COMMAND SUMMARY N repeat last search command, but in opposite direction - Adjusting the screen: + Adjusting the screen: ^L clear and redraw screen zCR redraw screen with current line at top of screen z- redraw screen with current line at bottom of @@ -302,16 +306,15 @@ COMMAND SUMMARY ^E scroll screen down 1 line ^Y scroll screen up 1 line - Marking and returning: + Marking and returning: mx mark current position with lower-case letter x Note: this command works for all lower-case - letters + letters 'x move cursor to mark x in ASCII section `x move cursor to mark x in HEX section '' move cursor to previous context in ASCII section `` move cursor to previous context in HEX section - - Line positioning: + Line positioning: H jump to first line on screen ("top") L jump to last line on screen ("low") M jump to middle line on screen ("middle") @@ -321,7 +324,7 @@ COMMAND SUMMARY DOWN or j next line, same column UP or k previous line, same column - Character positioning: + Character positioning: ^ first byte in HEX window $ end of screen line l or RIGHT jump onto next byte (within current @@ -335,7 +338,7 @@ COMMAND SUMMARY n| jump onto nth byte/character within current line - Strings: + Strings: (works similar to the strings(1) command) Note: "Words" are defined as strings of "nonprinting characters". @@ -346,35 +349,34 @@ COMMAND SUMMARY \0 or \n B back to previous string delimited with a nonprinting char - - Corrections during insert: + Corrections during insert: ^H erase last character (backspace) erase your erase character, same as ^H (backspace) ESC ends insertion, back to command mode - Append and replace: + Append and replace: A append at end of file rx replace current bte with char 'x' R enter replace mode; for all subsequent input, the current byte is overwritten with the next input character; leave replace mode with ESC. - Miscellaneous Operations: + Miscellaneous Operations: TAB toggle between ASCII and HEX section - Yank and Put: + Yank and Put: 3ySPACE yank 3 characters p insert contents of yank buffer o replace text with content of yank buffer P put back at end of file - Undo, Redo: + Undo, Redo: u undo last change Note: Only the last change can be undone. Therefore this commands toggles between the last and second-t-last state of the buffer. - Setting Options: + Setting Options: With the :set command you can set options in bvi Option Default Description @@ -399,13 +401,14 @@ COMMAND SUMMARY 32 is displayed in the statusline as shown in ascii(7) if unset rather in DOS-style (^A) + AUTHOR bvi was developed by Gerhard Buergmann, Vienna, Austria - Gerhard.Buergmann@altavista.net + Gerhard.Buergmann@puon.at WWW - Bvi Homepage: http://bvi.linuxave.net/ - Vi Pages: http://www.math.fu-berlin.de/~guckes/vi/ + Bvi Homepage: http://bvi.sourceforge.net/ + Vi Pages: http://www.guckes.net/vi/clones.php3 (all about Vi and its clones) FILES @@ -419,6 +422,5 @@ BUGS SEE ALSO vi(1), strings(1), ascii(5) - -13/Oct/2000 BVI Version 1.3.0 8 +3/Jan/2004 BVI Version 1.3.2 diff --git a/html/new120.html b/html/new120.html index 0b755e8..a26527c 100644 --- a/html/new120.html +++ b/html/new120.html @@ -18,6 +18,7 @@

          Download
          +New in 1.3.2
          New in 1.3.1
          New in 1.3.0
          New in 1.2.0
          @@ -144,12 +145,13 @@ height="62" border="0">

        • Local settings according to the environment variable LANG will be evaluated (see setlocal(3)). -

          +

          Back to the topBack to the top - +


          -Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann +Last update: June, 1st 2000 by Gerhard Bürgmann, +Purkersdorf/Austria
        • diff --git a/html/new130.html b/html/new130.html index 79a0cf0..304272e 100644 --- a/html/new130.html +++ b/html/new130.html @@ -18,6 +18,7 @@

          Download
          +New in 1.3.2
          New in 1.3.1
          New in 1.3.0
          New in 1.2.0
          @@ -91,12 +92,13 @@ which is displayed on the screen.

        • Debian bug #68436 (Buffer overflow in io.c) fixed -

          +

          Back to the topBack to the top - +


          -Last update: Thu Oct 12 20:51:06 CEST 2000 by Gerhard Bürgmann +Last update: October 12th 2000 by Gerhard Bürgmann, +Purkersdorf/Austria
        • diff --git a/html/new131.html b/html/new131.html index e11a840..020f791 100644 --- a/html/new131.html +++ b/html/new131.html @@ -18,6 +18,7 @@

          Download
          +New in 1.3.2
          New in 1.3.1
          New in 1.3.0
          New in 1.2.0
          @@ -85,12 +86,13 @@ This is a bugfix release.

        • subshell support fixes
        • -

          +

          Back to the topBack to the top - +


          -Last update: February 12th 2002 by Gerhard Bürgmann +Last update: February 12th 2002 by Gerhard Bürgmann, +Purkersdorf/Austria
          diff --git a/html/new132.html b/html/new132.html new file mode 100644 index 0000000..e195a76 --- /dev/null +++ b/html/new132.html @@ -0,0 +1,93 @@ + + +BVI: CHANGES in bvi 1.3.2 + + + + + + + +
          + + +
          +

          +Home
          +

          +

          +Quick Tutorial
          +

          +

          +Download
          +New in 1.3.2
          +New in 1.3.1
          +New in 1.3.0
          +New in 1.2.0
          +

          +

          +Installation
          +

          +

          +Command Overview
          +

          +

          +bmore
          +

          +

          +Deutsche Beschreibung
          +

          +
          + +
          + + + + +
          +CHANGES in bvi 1.3.2 + + +BVI +
          +
          +
          + +

          +This is a bugfix release. +

          +BVI: +

            +
          • ported to compile under DJGPP v2.0 w/ PDCURSES (by simoN)
          • +

            +

          • some minor fixes
          • +

            +

          +


          +BMORE: +
            +
          • configure: checking term.h and ncurses/term.h
          • +

            +

          • cast in bmore.c in putline();
          • +

            +

          • fixed multiple file handling for "bmore" (by simoN)
          • +

            +

          • renamed several local screen processing routines to avoid compiler conflicts
          • +

            +

          • several minor fixes to "bmore" code (by simoN)
          • +

            +

          • reset tty after CTRL-C in bmore
          • +
          +


          + +

          + +Back to the top + +


          +Last update: January 8th 2004 by Gerhard Bürgmann, +Purkersdorf/Austria +
          + diff --git a/html/overview.html b/html/overview.html index 7fd05f8..c03bf6c 100644 --- a/html/overview.html +++ b/html/overview.html @@ -62,19 +62,19 @@ the standard ascii vi.

          - - - +
          Commands shown in blue frames are commands which +
          Commands shown in blue frames are commands which are available in both bvi and vi, but with a slightly different behavior.
          Green frames are used for commands which are +
          Green frames are used for commands which are equal in both bvi and vi.
          Red frames are used for missing commands
          Red frames are used for missing commands

          Special keys are displayed in a gray font, e.g. -RETURN, -ARROW_UP or -CTRL. +RETURN, +ARROW_UP or +CTRL.

          Topics:

          @@ -91,6 +91,7 @@ Special keys are displayed in a gray font, e.g. alt="Back to the top">Back to the top


          -Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann +Last update: June 1st 2000 by Gerhard Bürgmann, +Purkersdorf/Austria
          diff --git a/html/qt_bit.html b/html/qt_bit.html index 356eda5..3cc9cd4 100644 --- a/html/qt_bit.html +++ b/html/qt_bit.html @@ -96,6 +96,7 @@ Examples: alt="Back to the top">Back to the top
          -Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann +Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann, +Purkersdorf/Austria
          diff --git a/html/qt_edit.html b/html/qt_edit.html index 60e2615..a389c8c 100644 --- a/html/qt_edit.html +++ b/html/qt_edit.html @@ -125,6 +125,7 @@ the whole remaining file has to be moved one position backwards. alt="Back to the top">Back to the top
          -Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann +Last update: June 1st 2000 by Gerhard Bürgmann, +Purkersdorf/Austria
diff --git a/html/qt_edit.tmp.html b/html/qt_edit.tmp.html deleted file mode 100644 index dbd8fb8..0000000 --- a/html/qt_edit.tmp.html +++ /dev/null @@ -1,113 +0,0 @@ - -BVI Editing Files - - - - - - - -
- -
-

-Home -

-

-Quick Tutorial -Editing Files
-Search Commands -Bit-wise Operations -Find and Replace -Yank and Put -Settings -

-

-Download -

-
- -
- - - -
-Quick Tutorial
-Editing Files -
-BVI -
-
-
- -

-Inserting or deleting bytes can be dangerous on some kind of files, -because binary files are mostly executables, database files or maybe -graphic files. So you must not shift the remaining bytes to another -address. -Therefor commands for inserting or deleting bytes are disabled by -default. -You can use the r command to change a single byte, or -the R command to replace multiple characters. You can use a -numeric prefix for both commands. -

-You can add characters at the end of the file using the A command. -If you start with an empty file, you can create a binary file from -scratch. If the cursor is in the ASCII section of the screen and you -type 100AxESC, you create a file -which contents 100 x'es. -

-The D command can be used to truncate a file at a certain position. -Since there are no lines in a binary file, the D command deletes -to end of file. -

-If you have to edit a binary file where it does not matter to move bytes -to a different address, you can enable the insert and delete commands by -typing :set memmove. -Now you are able to use the i command for inserting bytes, the -x or X command to delete the byte over or before the cursor -and those types of d commands, which does not rely on text lines -(e.g. dSPACE, dfC, d/xyz, -d$, d'a, dnG). - -

-All edits can be undone by pressing the u key. -

Using ex (colon) commands

-The edit commands of the ex editor are usually not available in -standard vi implementations (:i[nsert], :a[ppend] -and :c[hange]). In bvi -they are available with extended options. There are five -modifiers a[scii], b[inary], d[ecimal], h[exadecimal] and -o[ctal] (ascii is default). Therefor you can insert, append -or change data in all five representations. -

-Example:
-you would like to append a file with data available in decimal -representation: -

-:a d
-0 12 3 128 255 17 0 0 255 255
-23 24 25 128 6 6 6
-.
-
-A line with only a period (.) in it will terminate the command. -
-You must not type values greater than a byte value (255 decimal, FF hex). -This causes an abandon of the command.
-Pressing the RETURN key does not insert -a newline - character into the file. If you use :i a (insert -ascii) you can use the special characters \n, \r, \t and \0. -

-An additional advantage is, that all typed bytes are inserted into the -file at once. If you insert characters in vi - mode, for every byte typed, -the whole remaining file has to be moved one position backwards. -

- -Back to the top - -


-Last update: 17 - 06 - 2000 by Gerhard Bürgmann -
- - diff --git a/html/qt_find.html b/html/qt_find.html index 69ea036..bda685a 100644 --- a/html/qt_find.html +++ b/html/qt_find.html @@ -93,6 +93,7 @@ is currently not implemented. alt="Back to the top">Back to the top
-Last update: Fri Jun 30 22:33:20 CEST 2000 by Gerhard Bürgmann +Last update: Fri Jun 30 22:33:20 CEST 2000 by Gerhard Bürgmann, +Purkersdorf/Austria
diff --git a/html/qt_partial.html b/html/qt_partial.html index 482b642..23acb7e 100644 --- a/html/qt_partial.html +++ b/html/qt_partial.html @@ -139,6 +139,7 @@ written back into the original file. alt="Back to the top">Back to the top
-Last update: Sun Jul 09 21:57:38 CEST 2000 by Gerhard Bürgmann +Last update: Sun Jul 09 21:57:38 CEST 2000 by Gerhard Bürgmann, +Purkersdorf/Austria
diff --git a/html/qt_search.html b/html/qt_search.html index 8325485..51ee5cc 100644 --- a/html/qt_search.html +++ b/html/qt_search.html @@ -110,6 +110,7 @@ are line oriented, therefor not useful for binary files and alt="Back to the top">Back to the top
-Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann +Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann, +Purkersdorf/Austria
diff --git a/html/qt_set.html b/html/qt_set.html index 962221b..ea28785 100644 --- a/html/qt_set.html +++ b/html/qt_set.html @@ -121,6 +121,7 @@ Abbreviation: :set wl=4RETURN alt="Back to the top">Back to the top
-Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann +Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann, +Purkersdorf/Austria
diff --git a/html/qt_yank.html b/html/qt_yank.html index 5227dd9..bfccb47 100644 --- a/html/qt_yank.html +++ b/html/qt_yank.html @@ -127,6 +127,7 @@ NOTE: There are currently no namend buffers available. alt="Back to the top">Back to the top


-Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann +Last update: June 1st 2000 by Gerhard Bürgmann, +Purkersdorf/Austria
diff --git a/html/quick.html b/html/quick.html index b80629a..0f68551 100644 --- a/html/quick.html +++ b/html/quick.html @@ -194,6 +194,7 @@ You should use at most two of the three address options to avoid ambiguity! alt="Back to the top">Back to the top
-Last update: Thu Oct 19 20:58:31 CEST 2000 by Gerhard Bürgmann +Last update: October 19th 2000 by Gerhard Bürgmann, +Purkersdorf/Austria diff --git a/html/set.html b/html/set.html index 6b0d168..1b521c7 100644 --- a/html/set.html +++ b/html/set.html @@ -110,7 +110,8 @@ ALT="Back to the top">Back to the top
-Last update: October 30th 1999 by Gerhard Bürgmann +Last update: October 30th 1999 by Gerhard Bürgmann, +Purkersdorf/Austria diff --git a/html/sitemap.html b/html/sitemap.html index 427300a..5518843 100644 --- a/html/sitemap.html +++ b/html/sitemap.html @@ -88,6 +88,9 @@ height="62" border="0">

-

+

Back to the topBack to the top - +


-Last update: February 12th 2002 by Gerhard Bürgmann +Last update: January 8th 2004 by Gerhard Bürgmann, +Purkersdorf/Austria diff --git a/html/yank.html b/html/yank.html index d1bf13a..18a31cf 100644 --- a/html/yank.html +++ b/html/yank.html @@ -135,7 +135,8 @@ of the command! ALT="Back to the top">Back to the top
-Last update: October 30th 1999 by Gerhard Bürgmann +Last update: October 30th 1999 by Gerhard Bürgmann, +Purkersdorf/Austria diff --git a/install-sh b/install-sh index 398a88e..36f96f3 100755 --- a/install-sh +++ b/install-sh @@ -56,7 +56,7 @@ dir_arg="" while [ x"$1" != x ]; do case $1 in - -c) instcmd="$cpprog" + -c) instcmd=$cpprog shift continue;; @@ -79,7 +79,7 @@ while [ x"$1" != x ]; do shift continue;; - -s) stripcmd="$stripprog" + -s) stripcmd=$stripprog shift continue;; @@ -106,7 +106,7 @@ done if [ x"$src" = x ] then - echo "install: no input file specified" + echo "$0: no input file specified" >&2 exit 1 else : @@ -115,8 +115,8 @@ fi if [ x"$dir_arg" != x ]; then dst=$src src="" - - if [ -d $dst ]; then + + if [ -d "$dst" ]; then instcmd=: chmodcmd="" else @@ -125,20 +125,20 @@ if [ x"$dir_arg" != x ]; then else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad +# might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. - if [ -f $src -o -d $src ] + if [ -f "$src" ] || [ -d "$src" ] then : else - echo "install: $src does not exist" + echo "$0: $src does not exist" >&2 exit 1 fi - + if [ x"$dst" = x ] then - echo "install: no destination specified" + echo "$0: no destination specified" >&2 exit 1 else : @@ -147,16 +147,16 @@ else # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic - if [ -d $dst ] + if [ -d "$dst" ] then - dst="$dst"/`basename $src` + dst=$dst/`basename "$src"` else : fi fi ## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` +dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script @@ -165,69 +165,73 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` if [ ! -d "$dstdir" ]; then defaultIFS=' ' -IFS="${IFS-${defaultIFS}}" +IFS="${IFS-$defaultIFS}" -oIFS="${IFS}" +oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" +set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS=$oIFS pathcomp='' while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" + pathcomp=$pathcomp$1 shift - if [ ! -d "${pathcomp}" ] ; + if [ ! -d "$pathcomp" ] ; then - $mkdirprog "${pathcomp}" + $mkdirprog "$pathcomp" else : fi - pathcomp="${pathcomp}/" + pathcomp=$pathcomp/ done fi if [ x"$dir_arg" != x ] then - $doit $instcmd $dst && + $doit $instcmd "$dst" && - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi + if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi else # If we're going to rename the final executable, determine the name now. - if [ x"$transformarg" = x ] + if [ x"$transformarg" = x ] then - dstfile=`basename $dst` + dstfile=`basename "$dst"` else - dstfile=`basename $dst $transformbasename | + dstfile=`basename "$dst" $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename - if [ x"$dstfile" = x ] + if [ x"$dstfile" = x ] then - dstfile=`basename $dst` + dstfile=`basename "$dst"` else : fi -# Make a temp file name in the proper directory. +# Make a couple of temp file names in the proper directory. dsttmp=$dstdir/#inst.$$# + rmtmp=$dstdir/#rm.$$# + +# Trap to clean up temp files at exit. + + trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 + trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && + $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits @@ -235,17 +239,38 @@ else # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && + if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && + +# Now remove or move aside any old file at destination location. We try this +# two ways since rm can't unlink itself on some systems and the destination +# file might be busy for other reasons. In this case, the final cleanup +# might fail but the new file should still install successfully. + +{ + if [ -f "$dstdir/$dstfile" ] + then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || + $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || + { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit + } + else + : + fi +} && # Now rename the file to the real destination. - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi && +# The final little trick to "correctly" pass the exit status to the exit trap. -exit 0 +{ + (exit 0); exit +} diff --git a/io.c b/io.c index 5146a79..b868dfa 100644 --- a/io.c +++ b/io.c @@ -1,4 +1,4 @@ -/* IO.C - file in/out and alloc subroutines for BVI +/* io.c - file in/out and alloc subroutines for BVI * * 1996-02-28 V 1.0.0 * 1999-01-20 V 1.1.0 @@ -7,11 +7,12 @@ * 1999-10-15 V 1.2.0 final * 2000-03-23 V 1.3.0 beta * 2000-08-17 V 1.3.0 final + * 2004-01-04 V 1.3.2 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2000 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1996-2004 by Gerhard Buergmann + * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -275,6 +276,15 @@ bvi_init(dir) return; } +#ifdef DJGPP + strcpy(rcpath, "c:"); + strcpy(rcpath, dir); + poi = strrchr(rcpath, '\\'); + *poi = '\0'; + strcat(rcpath, "\\BVI.RC"); + read_rc(rcpath); + read_rc("BVI.RC"); +#else strncpy(rcpath, getenv("HOME"), MAXCMD - 8); rcpath[MAXCMD - 8] = '\0'; strcat(rcpath, "/.bvirc"); @@ -286,6 +296,7 @@ bvi_init(dir) if (stat(rcpath, &buf) == 0) { if (buf.st_uid == getuid()) read_rc(rcpath); } +#endif } @@ -327,7 +338,11 @@ do_shell() { addch('\n'); savetty(); +#ifdef DJGPP + system(""); +#else system(shell); +#endif resetty(); } diff --git a/mkinstalldirs b/mkinstalldirs index 1f25cd9..d2d5f21 100755 --- a/mkinstalldirs +++ b/mkinstalldirs @@ -4,8 +4,6 @@ # Created: 1993-05-16 # Public domain -# $Id: mkinstalldirs,v 1.1 2001/05/22 14:43:50 akim Exp $ - errstatus=0 dirmode="" @@ -14,61 +12,100 @@ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do - case "${1}" in - -h | --help | --h* ) # -h for help - echo "${usage}" 1>&2; exit 0 ;; - -m ) # -m PERM arg - shift - test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } - dirmode="${1}" - shift ;; - -- ) shift; break ;; # stop option processing - -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option - * ) break ;; # first non-opt arg - esac + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" 1>&2 + exit 0 + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac done for file do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift + if test -d "$file"; then + shift + else + break + fi +done - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac +case $# in + 0) exit 0 ;; +esac - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" +case $dirmode in + '') + if mkdir -p -- . 2>/dev/null; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + fi + ;; + *) + if mkdir -m "$dirmode" -p -- . 2>/dev/null; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + fi + ;; +esac - mkdir "$pathcomp" || lasterr=$? +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift - if test ! -d "$pathcomp"; then - errstatus=$lasterr - else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac - lasterr="" - chmod $dirmode "$pathcomp" || lasterr=$? + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi - fi - fi + mkdir "$pathcomp" || lasterr=$? - pathcomp="$pathcomp/" - done + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp="$pathcomp/" + done done exit $errstatus # Local Variables: -# mode:shell-script -# sh-indentation:3 +# mode: shell-script +# sh-indentation: 2 # End: +# mkinstalldirs ends here diff --git a/patchlevel.h b/patchlevel.h index e2dcba9..da1249b 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -1 +1 @@ -#define VERSION "1.3.1" +#define VERSION "1.3.2" diff --git a/re.c b/re.c index eb51a15..5fba7cc 100644 --- a/re.c +++ b/re.c @@ -9,8 +9,8 @@ * 2000-04-25 V 1.3.0 beta * 2000-09-29 V 1.3.0 final * - * Copyright 1996-2000 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1996-2003 by Gerhard Buergmann + * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -268,7 +268,8 @@ do_substitution(delim, line, startpos, endpos) } else { if ((n = hexchar()) < 0) { emsg("Badly formed replacement pattern"); - return 0; } + return 0; + } repl_pat[pat_len] = n; pat_len++; } @@ -291,9 +292,9 @@ do_substitution(delim, line, startpos, endpos) if (strchr(cmd, 'c')) conf = 1; } if ((strchr("\\#", ch) && loc == ASCII) - || (strchr("/?", ch) && loc == HEX)) + || (strchr("/?", ch) && loc == HEX)) { toggle(); - + } startpos--; move(maxy, 0); refresh(); @@ -377,15 +378,16 @@ searching(ch, line, startpos, endpos, flag) if (line[0] == '\0' && again == 0) { emsg(noprev); - return 0L; } + return 0L; + } ignore_case = (P(P_IC)); magic = P(P_MA); start_addr--; if ((strchr("\\#", ch) && loc == ASCII) - || (strchr("/?", ch) && loc == HEX)) + || (strchr("/?", ch) && loc == HEX)) { toggle(); - + } if (!strchr("Nn", ch)) { m[0] = ch; m[1] = '\0'; @@ -425,7 +427,7 @@ searching(ch, line, startpos, endpos, flag) if (flag & 1) { msg("Search wrapped BOTTOM|Search wrapped around BOTTOM of buffer"); found = fsearch(mem, startpos, search_pat); - } + } } else { found = rsearch(startpos - 1, mem, search_pat); if (flag & S_GLOBAL) return(found); @@ -433,17 +435,18 @@ searching(ch, line, startpos, endpos, flag) if (flag & 1) { msg("Search wrapped TOP|Search wrapped around TOP of buffer"); found = rsearch(endpos, startpos, search_pat); - } + } } if (!found) { if (flag & 1) { emsg(notfound); } else { - if (P(P_TE)) + if (P(P_TE)) { sprintf(string, "No match to %s", sdir == FORWARD ? "BOTTOM" : "TOP"); - else + } else { sprintf(string, "Address search hit %s without matching pattern", sdir == FORWARD ? "BOTTOM" : "TOP"); + } emsg(string); } } else { diff --git a/recomp.c b/recomp.c index ddd93d5..f5e4b0c 100644 --- a/recomp.c +++ b/recomp.c @@ -6,8 +6,8 @@ * 2000-04-25 V 1.3.0 beta * 2000-07-12 V 1.3.0 final * - * Copyright 1996-2000 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1996-2002 by Gerhard Buergmann + * Gerhard.Buergmann@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/script b/script new file mode 100644 index 0000000..87e0be4 --- /dev/null +++ b/script @@ -0,0 +1,4 @@ +set mm +0,20d +w! %.new +q diff --git a/set.c b/set.c index fefd2cc..7a2e0d2 100644 --- a/set.c +++ b/set.c @@ -9,10 +9,11 @@ * 1999-07-02 V 1.2.0 beta * 1999-08-14 V 1.2.0 final * 2000-07-15 V 1.3.0 final - * 2001-10-10 V 1.3.1 cast for alloc_buf + * 2001-10-10 V 1.3.1 + * 2003-07-03 V 1.3.2 * - * Copyright 1996-2001 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1996-2003 by Gerhard Buergmann + * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -52,7 +53,7 @@ struct param params[] = { { "window", "window", 25, "", P_NUM }, { "wordlength", "wl", 4, "", P_NUM }, { "wrapscan", "ws", TRUE, "", P_BOOL }, -#ifdef __MSDOS__ +#if defined(__MSDOS__) && !defined(DJGPP) { "color", "co", 7, "", P_NUM }, #endif { "", "", 0, "", 0, } /* end marker */ @@ -122,7 +123,7 @@ doset(arg) params[i].nvalue = strtol(s, &s, 10); } params[i].flags |= P_CHANGED; -#ifdef __MSDOS__ +#if defined(__MSDOS__) && !defined(DJGPP) if (i == P_CO) { textcolor(P(P_CO) & 0x07); textbackground((P(P_CO) & 0xf0) >> 4); diff --git a/set.h b/set.h index 43534b4..116f32e 100644 --- a/set.h +++ b/set.h @@ -2,8 +2,8 @@ * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2000 by Gerhard Buergmann - * Gerhard.Buergmann@altavista.net + * Copyright 1996-2002 by Gerhard Buergmann + * Gerhard.Buergmann@puon.at * * 1998-03-14 V 1.0.0 * 1999-01-14 V 1.1.0 From be3c9f064d483d47e9d04a0db90e36499eca9eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20B=C3=BCrgmann?= Date: Wed, 8 Oct 2014 00:00:00 +0000 Subject: [PATCH 3/6] bvi-1.4.0.src.tar.gz --- CHANGES | 49 + CREDITS | 17 +- Makefile.in | 45 +- README | 4 +- bc/bmore/BMORE.PRJ | Bin 6013 -> 0 bytes bc/bmore/BMORE.TCP | Bin 1196 -> 0 bytes bc/bmore/TCCONFIG.TC | Bin 11902 -> 0 bytes bc/bmore/TCDEF.DSK | Bin 332 -> 0 bytes bc/bvi/BVI.DSK | Bin 409 -> 0 bytes bc/bvi/BVI.PRJ | Bin 7148 -> 0 bytes bc/bvi/TCCONFIG.TC | Bin 11902 -> 0 bytes bc/bvi/TCPICK.TCP | Bin 1196 -> 0 bytes bm_dos.c | 0 bm_unix.c | 9 +- bmore.c | 53 +- bmore.c.old | 871 ---- bmore.h | 5 +- bmore.man | 178 - bvi.1 | 26 +- bvi.c | 179 +- bvi.h | 28 +- bvi.man | 424 -- comm.c | 72 +- config.guess | 1358 +++--- config.sub | 566 ++- configure | 8132 +++++++++++++++++++++------------- configure.in => configure.ac | 33 +- configure.scan | 27 - edit.c | 162 +- html/bmore.html | 159 - html/bmore_cmd.html | 116 - html/bmore_opt.html | 142 - html/bvi.css | 11 - html/colon.html | 209 - html/cursor.html | 117 - html/download.html | 98 - html/edit.html | 195 - html/german.html | 215 - html/gif/.xvpics/bg2.gif | 5 - html/gif/bg2.gif | Bin 91 -> 0 bytes html/gif/bvi_m.gif | Bin 6928 -> 0 bytes html/gif/bvi_s.gif | Bin 2725 -> 0 bytes html/gif/dcbacks.gif | Bin 869 -> 0 bytes html/gif/dot.gif | Bin 42 -> 0 bytes html/gif/up.gif | Bin 50 -> 0 bytes html/index.html | 130 - html/install.html | 139 - html/man_bmore.html | 181 - html/man_bvi.html | 426 -- html/new120.html | 157 - html/new130.html | 104 - html/new131.html | 98 - html/new132.html | 93 - html/overview.html | 97 - html/qt_bit.html | 102 - html/qt_edit.html | 131 - html/qt_find.html | 99 - html/qt_partial.html | 145 - html/qt_search.html | 116 - html/qt_set.html | 127 - html/qt_yank.html | 133 - html/quick.html | 200 - html/rpm.html | 6 - html/set.html | 117 - html/sitemap.html | 160 - html/yank.html | 142 - io.c | 107 +- patchlevel.h | 2 +- re.c | 60 +- script | 4 + set.c | 49 +- set.h | 9 +- tags | 635 +++ 73 files changed, 7541 insertions(+), 9733 deletions(-) delete mode 100644 bc/bmore/BMORE.PRJ delete mode 100644 bc/bmore/BMORE.TCP delete mode 100644 bc/bmore/TCCONFIG.TC delete mode 100644 bc/bmore/TCDEF.DSK delete mode 100644 bc/bvi/BVI.DSK delete mode 100644 bc/bvi/BVI.PRJ delete mode 100644 bc/bvi/TCCONFIG.TC delete mode 100644 bc/bvi/TCPICK.TCP mode change 100755 => 100644 bm_dos.c delete mode 100644 bmore.c.old delete mode 100644 bmore.man delete mode 100644 bvi.man mode change 100755 => 100644 config.guess mode change 100755 => 100644 config.sub rename configure.in => configure.ac (65%) delete mode 100644 configure.scan delete mode 100644 html/bmore.html delete mode 100644 html/bmore_cmd.html delete mode 100644 html/bmore_opt.html delete mode 100644 html/bvi.css delete mode 100644 html/colon.html delete mode 100644 html/cursor.html delete mode 100644 html/download.html delete mode 100644 html/edit.html delete mode 100644 html/german.html delete mode 100644 html/gif/.xvpics/bg2.gif delete mode 100644 html/gif/bg2.gif delete mode 100644 html/gif/bvi_m.gif delete mode 100644 html/gif/bvi_s.gif delete mode 100644 html/gif/dcbacks.gif delete mode 100644 html/gif/dot.gif delete mode 100644 html/gif/up.gif delete mode 100644 html/index.html delete mode 100644 html/install.html delete mode 100644 html/man_bmore.html delete mode 100644 html/man_bvi.html delete mode 100644 html/new120.html delete mode 100644 html/new130.html delete mode 100644 html/new131.html delete mode 100644 html/new132.html delete mode 100644 html/overview.html delete mode 100644 html/qt_bit.html delete mode 100644 html/qt_edit.html delete mode 100644 html/qt_find.html delete mode 100644 html/qt_partial.html delete mode 100644 html/qt_search.html delete mode 100644 html/qt_set.html delete mode 100644 html/qt_yank.html delete mode 100644 html/quick.html delete mode 100644 html/rpm.html delete mode 100644 html/set.html delete mode 100644 html/sitemap.html delete mode 100644 html/yank.html create mode 100644 tags diff --git a/CHANGES b/CHANGES index 29a07f7..b7a1c1a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,52 @@ +New in release 1.4.0 (stable) +============================= + +* Minor fixes + + +New in release 1.4.0rc2 +======================= + +* Ubuntu bug #252604 fixed +* set scroll fixed +* adding ASCII_DEL 0x7f for backspace + + +New in release 1.4.0rc +====================== + +* b B w W commands behave equally now (SF bug #5) +* .bvirc empty line bug fixed (SF bug #6) +* g-command bug fixed (SF bug #7) +* several minor fixes + + +New in release 1.4.0beta +======================== + +* ~ - bug fixed (by elo3456) +* debian bug #469704 fixed (bmore) +* debian bug #715687 fixed (bmore) +* red hat bug #925119 fixed + + +New in release 1.4.0alpha +========================== + +* highlight search result (by David Kelley) +* Large File Support added (by Joe Hinteregger) +* binary representation of byte in status line +* command line options renamed for compability with hexdump +* Offset handling fixed (Bug item #3036881) +* noshowmode: fix length of statusline +* bmore: 'b' bug fixed (by Tatsuyoshi) +* ';' bug fixed (by Nathan Hougthon and Christian Weisgerber) +* ZZ write bug fixed (by Joe Hinteregger) +* Buffer overflow if terminal > 255 columns (by Richard Yao) +* configure fixed (by Richard Yao) +* ncurses with tinfo fixed (by Richard Yao) + + New in release 1.3.2 ==================== diff --git a/CREDITS b/CREDITS index 306802c..1a90751 100644 --- a/CREDITS +++ b/CREDITS @@ -10,6 +10,19 @@ Nico Schmidt r-bug fix Steve Waltner Mac OS X support Andre Wobst AIX fixes SimoN bmore: subshell support fixes, DJGPP support +Alastair Thomas Parker binary representation in status +Tatsuyoshi bmore: 'b' bug fix +Nathan Hougthon ';' - bug +Christian "naddy" Weisgerber ';' - bug +David Kelley Highlight patch, backspace patch +Markus Ewert Apple backspace +Michael Tautschnig Conflicting declaration of 'precoint' fixed +Sebastian Kayser <> Offset handling fixed (Bug item #3036881) +Josef Hinteregger ZZ write bug, lfs +Richard Yao Buffer overflow at terminals > 255, ncurses with tinfo, configure fixed + ~ operator dumps core +Dave Keaton ASCII_DEL patch + Packages: Christian "naddy" Weisgerber Source RPM @@ -17,7 +30,9 @@ Christian Kurz Debian package Stijn de Bekker Debian package Troy Engel i386 RPM package Thomas Steudten RH alpha and x86 RPM package +John M. Huddleston Cygwin binaries +Sam Hocevar Debian Packages Doc: -Sven Guckes +Sven Guckes Ben diff --git a/Makefile.in b/Makefile.in index 55e9b25..a8b1679 100644 --- a/Makefile.in +++ b/Makefile.in @@ -6,7 +6,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# Copyright (c) 1996-2003 by Gerhard Buergmann +# Copyright (c) 1996-2014 by Gerhard Buergmann # gerhard@puon.at # # 1996-01-18 V 1.0.0 @@ -16,28 +16,31 @@ # 2000-05-31 V 1.3.0 beta # 2000-10-01 V 1.3.0 final # 2003-07-03 V 1.3.2 +# 2014-10-01 V 1.4.0 # ############################################### srcdir = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ +datarootdir = @datarootdir@ -bindir = $(DESTDIR)@bindir@ -mandir = $(DESTDIR)@mandir@ -libdir = $(DESTDIR)@libdir@ +bindir = $(DESTDIR)@bindir@ +mandir = $(DESTDIR)@mandir@ +libdir = $(DESTDIR)@libdir@ +helpdir = $(DESTDIR)@datadir@/bvi man1dir = $(mandir)/man1 -OBJS = bvi.o comm.o set.o re.o io.o edit.o recomp.o -HEADER = bvi.h set.h -BMOBJ = bmore.o bm_unix.o recomp.o -CC = @CC@ -CFLAGS = @CFLAGS@ @CPPFLAGS@ -DEFS = @DEFS@ -LDFLAGS= @LDFLAGS@ -LIBS = @LIBS@ -SHELL = /bin/sh +OBJS = bvi.o comm.o set.o re.o io.o edit.o recomp.o +INCLUDES = bvi.h set.h +BMOBJ = bmore.o bm_unix.o recomp.o +CC = @CC@ +CFLAGS = @CFLAGS@ @CPPFLAGS@ +DEFS = @DEFS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +SHELL = /bin/sh @@ -48,32 +51,32 @@ INSTALL_DATA = @INSTALL_DATA@ all: bvi bmore -bvi: $(OBJS) +bvi: $(OBJS) $(HEADER) $(CC) $(LDFLAGS) -o bvi $(OBJS) $(LIBS) bmore: $(BMOBJ) $(CC) $(LDFLAGS) -o bmore $(BMOBJ) $(LIBS) -.c.o: +%.o: %.c $(INCLUDES) $(CC) $(CFLAGS) $(DEFS) -c $< bmore.o: bmore.c - $(CC) $(CFLAGS) $(DEFS) -DHELPFILE=\"$(libdir)/bmore.help\" -c $< + $(CC) $(CFLAGS) $(DEFS) -DHELPFILE=\"$(helpdir)/bmore.help\" -c $< install: all installdirs @echo "Installing bvi" @$(INSTALL_DATA) bvi.1 bmore.1 $(man1dir) - @$(INSTALL_PROGRAM) -s bvi $(bindir) - @$(INSTALL_PROGRAM) -s bmore $(bindir) - @$(INSTALL_DATA) bmore.help $(libdir) + @$(INSTALL_PROGRAM) bvi $(bindir) + @$(INSTALL_PROGRAM) bmore $(bindir) + @$(INSTALL_DATA) bmore.help $(helpdir) @if [ -f $(bindir)/bview ]; then rm $(bindir)/bview; fi @if [ -f $(bindir)/bvedit ]; then rm $(bindir)/bvedit; fi @ln $(bindir)/bvi $(bindir)/bview @ln $(bindir)/bvi $(bindir)/bvedit installdirs: - $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(libdir) $(man1dir) + $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(helpdir) $(man1dir) uninstall: @echo "Uninstalling bvi" @@ -81,7 +84,7 @@ uninstall: @if [ -f $(bindir)/bvedit ]; then rm $(bindir)/bvedit; fi @if [ -f $(bindir)/bvi ]; then rm $(bindir)/bvi; fi @if [ -f $(bindir)/bmore ]; then rm $(bindir)/bmore; fi - @if [ -f $(libdir)/bmore.help ]; then rm $(libdir)/bmore.help; fi + @if [ -f $(helpdir)/bmore.help ]; then rm $(helpdir)/bmore.help; fi @if [ -f $(man1dir)/bvi.1 ]; then rm $(man1dir)/bvi.1; fi @if [ -f $(man1dir)/bmore.1 ]; then rm $(man1dir)/bmore.1; fi diff --git a/README b/README index b80a99b..982dc52 100644 --- a/README +++ b/README @@ -9,8 +9,8 @@ and is distributed under the GPL (GNU Public License). How to compile ============== - gunzip -c bvi-1.3.2.tar.gz | tar xvf - - cd bvi-1.3.2 + gunzip -c bvi-1.4.0.src.tar.gz | tar xvf - + cd bvi-1.4.0 ./configure make make install diff --git a/bc/bmore/BMORE.PRJ b/bc/bmore/BMORE.PRJ deleted file mode 100644 index 3abd944857d31af59adc5ee0aed4d049c5cc8c72..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6013 zcmeI0Yiv|S6vxlq+sD#UDDM_ZdxZtI5Vo`kg$lOYySK~2zH)bY$zns>rBo@c+ZIu< zt%yn_8XsSX@q?hCqEsGgqCt$`6et?y?FT>hizGhqEnLrkwrQHOWy^L0iE%dl^~}tf zbLO0xyE}J+ZIPNLMOFNfria3{tx8qH=CCrEq^z-%B>tCPLb~}&GLb~5m_(;dvpTJ)jr5s6Nntl`(E@X1^Mc|T{$7P6DSj?vHm?`u(#(glF@eicy4EY8m z10ad35<_AVr2wfw8rsqsxn@S)2!@iupiE#SkOhnaMg!Tv7>4vZdo%5W%l*I`4Czfs z2Y`dXTWEV5(h=Y&a11yOyaOC!$nQdW4>$~T0q+AJ0v`cm;c^_Dj|V28IuX(&DVoC^ zRB|Qcdosi+KpsPy3Mro<7oe)3It`c(Sb!P8Odf1>%wlPdF!Qj9#dQp6J@6n<1JnX_ zKp5Bv)B~Fs)Cg<=n$Y$Lq!vhRkhVg46w)?Gj{%PZ+kqVndI5L>)pno*=meewb^=c^ zXcwfXfoD*C7TAsIbHEkqV>%>3|uSD>=wn7Sh&eoXBAmo74$A zl|Ee!xxA`-r9&gNEaX?cRe{iImp9;3SM+rZ!_TdT7WJEh+f{j!|67esR^L3{p7TqH ziltO4S-@6HSSX%1k7&Nskt`>P+PPQCr`fk0ydbW|!nhixaWxjj)mR)?qb#n*eQ`CG z#MM|DSL6P;8s%{{DtP1G?P9Mv8Y_}1e{jPu7rictxXMe%4}P$GGq^TM)9;EwFkvP&fd}zZmiiHjtu5F zXb*S>>r14)$g@T%dcdU=`4mgCZ6`9HM8}*lD4M}`N4Tb~zJBlwQfpnJPGXO<@BzYW z_YCt85!?2iZ0+t#A-_y)!!1p1k=n4LHZ?X6o<&_v zV*c2aCD{g(JG~)W`-;B{U5(96kygdsP!rh@Y1pu3kijmGA4lD!6-%-WCT(W7XXtAK zztR7fVP#+e<>5|(j^dD$O;nLZv{WXt*+P{bpRPs8=OSHWBwlc(!f*9lCW-^q9+u4f zhZm-PzN#I*0Q(W(p2SKjAKTK!&>Z0_Ka~j2Pd>j*_xaK_m5)#COCT{vJjzTXD5KwK z-jkxBiGA^d%df_6hh29DY`)6nB+yU)cEn5?Nm;l&>RdqzDLaq%SYJ)!&^*0a<2F*h zINW2sHj#L}dgBwV4P8CfeY~teO@yo1VS$&MNGVVXY&K%{em?2wE?-xEqilV7H-8q= zS-F7Ku1cTF2jsnSr@Tq_$)$3>oGM>6oj08@?KAB*Z8J5P&PykygHoQfSE}I4C7G|o zzNd3!7!^D^hjIxMn@md%?Xsp(MeeDbbV0M=2*C`&Ou>^y?DFLmO`?yFsfDR@pi3=GZfw!0#`lYg^U1S~=E8v6zSSQXhTZMt5vLCLciuKin}pbeGo|qodlp(jCil zwYSRUj^(=Ap;d{kI551RLoAhn4JW>(V|YUj5Rx!}<%}w-RLb{5qd3`xWTja&lV*^G UrqeXKhrbaDD4#$53w~n%1@p-?hyVZp diff --git a/bc/bmore/BMORE.TCP b/bc/bmore/BMORE.TCP deleted file mode 100644 index 90da583528cb77df5c6dfe3167c18077b46dcfc6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1196 zcmWG3ElSE)a8?M&OwLyD$t*5WaLdd|Rghv}nMoKS0%Gj|nFj^a*?^1>%xH!xv%utW(Fy`c zh5!|@Fqi?!H;bNYFfjP~^GXXaur@COvM=WS)DU23+6)puu@*#17W@Q~f59q2>Qfka z7`PbI;TEL=JzivV?j2KCf(cEbFrU z>wA~a_kExD?w7-IQi5jJgnx&hX&E&OlHw~nN8&~TfHP_sU6a$yrz0( z5%xSC^>Us1hFqgwmG$advO(>Wwd$0Nsh`O@;~lxi_^GTluE?123t59>HICKlfUHr2 zvXrjLHsAndM7#muM)NZIGPeT;U!;d}6L5nSl)_zLGN`2Max+K)RrHbU2B}~*?Pe29 z1J(Ha7BC&uP@H=~8mOgj@{7O=Vl*QAKsuXdSw}C7W zrVK8m8N7)69H9U&rX2nP&EY7`V@0`a&;l-^Fh55xb1M*_lhj_?XP zh*-J#ExL(H^gil0fi234a@syY==84EG5ebM$P((r^k|QFsu`HS*j9e1N z0+2_dBi5NOI_h*}=*ZMjzeML6D}DNOhK^Y}0y=^^LOODE%toxr1$p4PfHyCFR&IVN zPN(}S^L+X=vam!%3QEM{645ML!~zk{FA;@cQHfYC%0WJHyStQ18;&L0!99V{Oc5t*-}Tt@{i zm4T&TrM|FWOnhDj#zcjV6*_8ktk%(}L(T;u5Cl2E02}m2OLY`u^(8O|JPTStD`*1> z%+fC;2hJR|O0>3r1cXGzjJ+6_r+LXsL#T7LQ(MA!vLuN@FfyW~{b z0J(P_Qg0`u-6`p#0}xynA+}CJe7*(oc@5(8I>hHk5TC~(K99>gMv=1!$J5b`d_DSY zNYK|ILH9y}?t=t91POW=67(D-=ov`RKSP3go$Hj(*{nRy+o}l?^aLd6QAp5Zkf6hm zpqFKx`WVvl7NqAVke+{n^i1WLa&evUH%Lzh$BpT{+sNcvBg8So&(-QLke;JfO{Y+c zuFEiv%aB^`OsW*;tH#geHlu~VZVdA)Ml0_!F7bM!i(8FuZZmp#gVD?FMw~m01a}(S zd85(Kn~WXYW$ffTY8T&Cukpuf5C2x}bv?i8{)EQ19{|)k#h%I?Ypx z&O$;y#cjX=$|wf$8iRO^LA(w@ybeLU4ne%u@Fw5}E2sssuLZKN1rl;TZw4u#3WBp6 zq=MCS6XNwI?#)ez*CB}4A>5-Oh}U5V!C?r&VTjieh}RK_*Ad7;19H%S95f&YTOkKq zAqQI_UK=1@8z5dAAYLy)yk3HMy#(>v1o7Gg@!ACO+695x4T0GMf!Paz8Hd13Kwxf% z!0d;>+yQ~P6XNv-#On=+*Bj`$3_X{j=Q8v>4DmV)@j49gdJf|C9K`E6h}R1cuNSP} zTRB~Y?7Rxuc@;fZpyvwoT!B6-(Pt(4tVC~@Azm-zS9%%Z^$f)88Hm?25U&>@UN2g| z%SOU|1z8|WyHNLQsCy6U-ix~5M%{-{_hHn16m`Fgx=%v9o`!fm4e@#w;`J=V>lkVo zLoH*t7x!^5?&DtEhj_gL@p=V+F0MelPIC5wG!P@<>;vhbjz%%tQOtJK7O%E=eFFZa zv0Jn!U{AoFfIR_w0`>D^^`Cty#&o`5|8dje131X=^54!0RH6Mb{W59Xtl&$lJu zTNMmudkYK0&yz102>Sj0nSOuvQkQGMGqB3z`5azy5fv8Z6_%_jDR~A^ zh^vKOFHtzGS9mX0{pQpyM15v(3t8XtU#CA|=LyS!0W$R#U&S}!Fwk$}InbZ*`U5iy z7UnGsEll_ef(60Aw16*|9WE{~N{Yk9hRbETJRZ-#A6zCbZv`f~@bdV>wB9)W5}NA@%Ud-XmwdJ)c=O{cG@r1VH~*LB SAMb26|9JU-Hn0D4_TK?Rmg&v_ diff --git a/bc/bmore/TCDEF.DSK b/bc/bmore/TCDEF.DSK deleted file mode 100644 index 9f56a3dd880873f1d83f47bb2999ab9ffc4c37b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 332 zcmWG3ElSE)a8_{6&nro-C{b|B%t=*{VqoMI5@(cRVBkt+5Mf|qU}4~5U|?Wl(9&}b z2mp}`RSe=_ab6^GR~OF^pwt(}%M4)*43Z3tKskoVY6(gZx8=7ek;vVW0*^22n5xV!AlV0H&K2YCm176u01Pi!E&lo)&&e1P;e0j6vxj?^3pdyq8}Uw7f>r0&;Pz8l#r5XS_YCr-1qA5>1=FQRK?TTeowHeTd8T?5L70Sl#!hy@kdH2c~d_p9Z7VUNpwWWM+J|G zn&U$LI1N`134S8@DN~{^#nrC_zh>&`6tjv>i<&cnXPKlw2huOxhJFQp1Ab>n7a(0E z1JPEZKcM^x`~~!(m2$wq)SVYSoJ!;B)4&-qjAOje~kTM}<0b_wz*qd$_T*gn zuNttsR7brP9fBiSilbw2*sH0Uz>zNVczKqU5|v0YmCk4Hr7V=pn@3b8Z5ipo#QM8k zno6@{E3eY$C$uO}Xi<^SqB5byf`k?e6Iv`vXt6k<#gc>;OA}fwOK4HW3%5Ji)qPbe zMp&`j{N-ttQhD!GlvnW7Z7f%oEa06)RD+={4EUX%K)ugP^&@*%5qVH~7n@a&hib)F zMJUAknT-5hyQ67x(P%oEO1-sSn@8AQA1$51j_X?t?&{o)a}<-)<}55Jtt?VZF1K%m z#iN)!UboZZS4=7^PG4;yMpw#0(Wds+W@WayNg14*8*Y6hB=!2mLC(_E6>MwV5bPYt zr{Cgp4s<4Ly7(GY17?6n3PdscmWb>>tf9KiGS9gWar>SG5IL!XIlxDR_OuZxFcTQ6c;KZaTl@NFiFxzEro< z$=!#2g|#6#llh34BD_r%zV>DjZRV%;ll*6O`|NIZrp+s&CGRYiMiGaM%XBK@d71Nw zwq+3Q6 z3uP9~=6Su$xw5jB&%V4i&XI@RHP}na=Gg*KUDyvE<7om-6ffYkw*A+<&1%QQumXjz zus(Pv;TAcR%PWu<-PWYL7<9vOYBd&dE5)$JSZ%B@PBW$$f0j?lhvYr-vvRk*TCS1{ zhpp1w?%uD_uBR`-%rq`OGlB|rU0p^%?@%%uYQ zY4;C>vY?Tw@($;w2&M{-5*#ghg+tOv+$n5Cc@aV6MA$Hsr2ah~XayXT7YE`#O%NoMLCThJ%Y(#UrYS0Mx8;`}W zE_c`(;&j5nspGGj=sJt$-nYsZ@cAtWUFmv4o>R;s%VaKhDPg3Dm<^h}6 z>*}|bqxC+&mCspmI`a9wc2{kj3u|5Vj(DEex@zoN#$#Nswc2Xp1&>{8!NUr{>Fe6r zAOe_>XpW?5hqMZE@n#@$l7sG`IP$gAR LIsXh)aH9Vg#?uJF diff --git a/bc/bvi/TCCONFIG.TC b/bc/bvi/TCCONFIG.TC deleted file mode 100644 index 2a88a6132661790c8beece650c600d92012ae288..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11902 zcmeI2aZHrw9mjvqJ-_qLfu3@}38#05vswY=@Z3EwO$7@IbD$MC5F&ygphQ+)DL2oV z!dz{%Nwdsuwc1YS#@wu%t8r#gt5ITfA<=BMb*_mT?bx~{Tg>zivV?j2KCf(cEbFrU z>wA~a_kExD?w{ky*6Q zI^U0U(OXCdeMc}Y#x{qrnp^fg^R$)`cThzGLN? z6#d5ctV||}CR0vEj`OdqYa~iu7)U1Xf;&ktMvQ77;`Cv1F)gLV;u)IhSVSX^H1bov z6jU!IRZFH~>7-IQi5jJgnx&hX&E&OlHw~nN8&~TfHP_sU6a$yrz0( z5%xSC^>Us1hFqgwmG$advO(>Wwd$0Nsh`O@;~lxi_^GTluE?123t59>HICKlfUHr2 zvXrjLHsAndM7#muM)NZIGPeT;U!;d}6L5nSl)_zLGN`2Max+K)RrHbU2B}~*?Pe29 z1J(Ha7BC&uP@H=~8mOgj@{7O=Vl*QAKsuXdSw}C7W zrVK8m8N7)69H9U&rX2nP&EY7`V@0`a&;l-^Fh55xb1M*_lhj_?XP zh*-J#ExL(H^gil0fi234a@syY==84EG5ebM$P((r^k|QFsu`HS*j9e1N z0+2_dBi5NOI_h*}=*ZMjzeML6D}DNOhK^Y}0y=^^LOODE%toxr1$p4PfHyCFR&IVN zPN(}S^L+X=vam!%3QEM{645ML!~zk{FA;@cQHfYC%0WJHyStQ18;&L0!99V{Oc5t*-}Tt@{i zm4T&TrM|FWOnhDj#zcjV6*_8ktk%(}L(T;u5Cl2E02}m2OLY`u^(8O|JPTStD`*1> z%+fC;2hJR|O0>3r1cXGzjJ+6_r+LXsL#T7LQ(MA!vLuN@FfyW~{b z0J(P_Qg0`u-6`p#0}xynA+}CJe7*(oc@5(8I>hHk5TC~(K99>gMv=1!$J5b`d_DSY zNYK|ILH9y}?t=t91POW=67(D-=ov`RKSP3go$Hj(*{nRy+o}l?^aLd6QAp5Zkf6hm zpqFKx`WVvl7NqAVke+{n^i1WLa&evUH%Lzh$BpT{+sNcvBg8So&(-QLke;JfO{Y+c zuFEiv%aB^`OsW*;tH#geHlu~VZVdA)Ml0_!F7bM!i(8FuZZmp#gVD?FMw~m01a}(S zd85(Kn~WXYW$ffTY8T&Cukpuf5C2x}bv?i8{)EQ19{|)k#h%I?Ypx z&O$;y#cjX=$|wf$8iRO^LA(w@ybeLU4ne%u@Fw5}E2sssuLZKN1rl;TZw4u#3WBp6 zq=MCS6XNwI?#)ez*CB}4A>5-Oh}U5V!C?r&VTjieh}RK_*Ad7;19H%S95f&YTOkKq zAqQI_UK=1@8z5dAAYLy)yk3HMy#(>v1o7Gg@!ACO+695x4T0GMf!Paz8Hd13Kwxf% z!0d;>+yQ~P6XNv-#On=+*Bj`$3_X{j=Q8v>4DmV)@j49gdJf|C9K`E6h}R1cuNSP} zTRB~Y?7Rxuc@;fZpyvwoT!B6-(Pt(4tVC~@Azm-zS9%%Z^$f)88Hm?25U&>@UN2g| z%SOU|1z8|WyHNLQsCy6U-ix~5M%{-{_hHn16m`Fgx=%v9o`!fm4e@#w;`J=V>lkVo zLoH*t7x!^5?&DtEhj_gL@p=V+F0MelPIC5wG!P@<>;vhbjz%%tQOtJK7O%E=eFFZa zv0Jn!U{AoFfIR_w0`>D^^`Cty#&o`5|8dje131X=^54!0RH6Mb{W59Xtl&$lJu zTNMmudkYK0&yz102>Sj0nSOuvQkQGMGqB3z`5azy5fv8Z6_%_jDR~A^ zh^vKOFHtzGS9mX0{pQpyM15v(3t8XtU#CA|=LyS!0W$R#U&S}!Fwk$}InbZ*`U5iy z7UnGsEll_ef(60Aw16*|9WE{~N{Yk9hRbETJRZ-#A6zCbZv`f~@bdV>wB9)W5}NA@%Ud-XmwdJ)c=O{cG@r1VH~*LB SAMb26|9JU-Hn0D4_TK^LrRmH7 diff --git a/bc/bvi/TCPICK.TCP b/bc/bvi/TCPICK.TCP deleted file mode 100644 index 4a1dd3632c9f08e74bccce80150e20b9bb6a08cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1196 zcmWG3ElSE)a8?M&OwLyD$t*5WaLdd|Rghv}DLD!;5MnDD?oN znf#b$c*lh>(a69HnjXn_Ap-*wgAfBNkYr$BW?*MvV_;-pVc-C=XJQFQX>K&ZHF9VI z;i_l?vg|BqBIsO2KQt9ncob39+~JZy5ny331M*Mq6x3v3c(dra1_MLb+Fw9Yvfw9> zWNlsqB>w{eOctW%anmA=6b2p!E+n&3f!<|EV^CmVPAbb}$gE0bNK8SJMljQXY6yW0 Rh5$lJNS6QqpNT<=0RV*OWG4Us diff --git a/bm_dos.c b/bm_dos.c old mode 100755 new mode 100644 diff --git a/bm_unix.c b/bm_unix.c index 7da803c..2c4df3b 100644 --- a/bm_unix.c +++ b/bm_unix.c @@ -4,10 +4,12 @@ * 2000-10-12 V 1.3.0 final * 2002-02-10 V 1.3.1 * 2003-07-04 V 1.3.2 + * 2010-06-02 V 1.3.4 + * 2013-08-22 V 1.4.0 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2003 by Gerhard Buergmann + * Copyright 1996-2013 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -156,6 +158,7 @@ void doshell(cmd) char *cmd; { + int ret; #ifndef DJGPP char *getenv(); char *shell; @@ -178,11 +181,11 @@ doshell(cmd) #endif reset_tty(); - system(cmd); + ret = system(cmd); set_tty(); printf("\r"); home(); - fseek(curr_file, screen_home, SEEK_SET); + fseeko(curr_file, screen_home, SEEK_SET); bytepos = screen_home; } diff --git a/bmore.c b/bmore.c index d7c9485..9b005cd 100644 --- a/bmore.c +++ b/bmore.c @@ -6,10 +6,11 @@ * 2000-10-18 V 1.3.0 final * 2002-01-16 V 1.3.1 * 2004-01-09 V 1.3.2 + * 2013-08-23 V 1.4.0 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1990-2004 by Gerhard Buergmann + * Copyright 1990-2013 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -47,7 +48,7 @@ #include "bmore.h" -char *copyright = "Copyright (C) 1990-2004 by Gerhard Buergmann"; +char *copyright = "Copyright (C) 1990-2013 by Gerhard Buergmann"; int maxx, maxy; int mymaxx = 0, mymaxy = 0; @@ -68,6 +69,7 @@ char numarr[64]; /* string for collecting number */ char addr_form[15]; int ascii_flag = 0; +int dup_print_flag = 0; int c_flag = 0, d_flag = 0; int exval = 0; int init_search = 0; @@ -87,7 +89,8 @@ static int cnt = 0; static int icnt = 0; static int smode; -char search_pat[BUFFER]; /* / or ? command */ +/* char search_pat[BUFFER]; */ /* / or ? command */ +char bmore_search_pat[BUFFER]; /* / or ? command */ char *emptyclass = "Empty byte class '[]' or '[^]'"; @@ -182,11 +185,7 @@ main(argc, argv) init_search = argv[n][1]; strcpy(sstring, &argv[n][2]); } else { - if (argv[n][1] == '0') { - init_byte = (off_t)strtol(argv[n] + 1, NULL, 16); - } else { - init_byte = (off_t)strtol(argv[n] + 1, NULL, 10); - } + init_byte = strtoll(argv[n] + 1, NULL, 0); } n++; break; @@ -221,7 +220,7 @@ main(argc, argv) } if (exval) { } else { - fseek(curr_file, init_byte, SEEK_SET); + fseeko(curr_file, init_byte, SEEK_SET); bytepos += init_byte; } } @@ -249,7 +248,7 @@ main(argc, argv) do_next(1); open_file(name); } - fclose(curr_file); + if (curr_file) fclose(curr_file); reset_tty(); exit(exval); } @@ -263,6 +262,7 @@ main(argc, argv) /* main loop */ do { to_print = 0; + dup_print_flag = 0; if (prompt) { if (prompt == 2) { while (open_file(name)) { @@ -311,15 +311,18 @@ main(argc, argv) switch (ch) { case ' ': /* Display next k lines of text [current screen size] */ + dup_print_flag = 1; if (precount > 0) to_print = precount; else to_print = maxy; break; case 'z': /* Display next k lines of bytes [current screen size]* */ + dup_print_flag = 1; if (precount > 0) z_line = precount; to_print = z_line; break; case '\r': case '\n': /* Display next k lines of text [current screen size]* */ + dup_print_flag = 1; if (precount > 0) r_line = precount; to_print = r_line; break; @@ -394,7 +397,7 @@ main(argc, argv) } else { clearscreen(); to_print = maxy + 1; - fseek(curr_file, screen_home, SEEK_SET); + fseeko(curr_file, screen_home, SEEK_SET); bytepos = screen_home; } break; @@ -412,7 +415,7 @@ main(argc, argv) } screen_home -= (maxy + 1) * out_len; if (screen_home < 0) screen_home = 0; - fseek(curr_file, screen_home, SEEK_SET); + fseeko(curr_file, screen_home, SEEK_SET); bytepos = screen_home; to_print = maxy + 1; } @@ -434,7 +437,7 @@ main(argc, argv) PRINTF("\r\n\r\n"); } screen_home += (count + maxy) * out_len; - fseek(curr_file, screen_home, SEEK_SET); + fseeko(curr_file, screen_home, SEEK_SET); bytepos = screen_home; to_print = maxy; break; @@ -460,7 +463,7 @@ main(argc, argv) bmbeep(); } else { bytepos = last_search; - fseek(curr_file, bytepos, SEEK_SET); + fseeko(curr_file, bytepos, SEEK_SET); screen_home = bytepos; to_print = maxy; PRINTF("\r"); @@ -581,7 +584,7 @@ do_next(n) { if (numfiles) { if (n == 1 && file_nr == numfiles) { - fclose(curr_file); + if (curr_file) fclose(curr_file); reset_tty(); exit(exval); } @@ -595,7 +598,7 @@ do_next(n) free(name); name = strdup(*(files + file_nr - 1)); } else { - fclose(curr_file); + if (curr_file) fclose(curr_file); reset_tty(); exit(exval); } @@ -611,7 +614,7 @@ open_file(name) if (stat(name, &buf) > -1) { filesize = buf.st_size; } - if (curr_file != NULL) fclose(curr_file); + if (curr_file) fclose(curr_file); if (numfiles > 1) do_header = 1; if ((curr_file = fopen(name, "rb")) == NULL) { perror(name); @@ -686,7 +689,7 @@ printout(lns) buffer1[num] = c; } if (!num) return 1; - if (memcmp(buffer1, buffer2, num) || !bytepos ) { + if (memcmp(buffer1, buffer2, num) || !bytepos || !dup_print_flag) { memcpy(buffer2, buffer1, num); putline(buffer2, num); if (!no_tty) flag = TRUE; @@ -707,6 +710,7 @@ printout(lns) if (screen_home < 0) screen_home = 0; return 0; } + dup_print_flag = 1; } while(num); return 1; } @@ -885,16 +889,19 @@ bmsearch(ch) return; } if (ch == '/') { - if (ascii_comp(search_pat, sstring)) return; + /* if (ascii_comp(search_pat, sstring)) return; */ + if (ascii_comp(bmore_search_pat, sstring)) return; } if (ch == '\\') { - if (hex_comp(search_pat, sstring)) return; + /* if (hex_comp(search_pat, sstring)) return; */ + if (hex_comp(bmore_search_pat, sstring)) return; } oldpos = bytepos; last_search = screen_home; if (precount < 1) precount = 1; while (precount--) { - while ((i = bmregexec(search_pat)) == 0); + /* while ((i = bmregexec(search_pat)) == 0); */ + while ((i = bmregexec(bmore_search_pat)) == 0); if (i == 1) { screen_home = bytepos; to_print = maxy; @@ -909,7 +916,7 @@ emsg(string); */ emsg("Pattern not found"); bytepos = oldpos; - fseek(curr_file, bytepos, SEEK_SET); + fseeko(curr_file, bytepos, SEEK_SET); break; } } @@ -931,7 +938,7 @@ emsg(s) putchar('\r'); cleartoeol(); highlight(); - PRINTF(s); + PRINTF("%s", s); normal(); fflush(stdout); prompt = 0; diff --git a/bmore.c.old b/bmore.c.old deleted file mode 100644 index ad016b9..0000000 --- a/bmore.c.old +++ /dev/null @@ -1,871 +0,0 @@ -/* BMORE - binary more - * - * 1990-01-31 V 1.0.0 - * 1990-09-04 V 1.1.0 - * 2000-05-31 V 1.3.0 beta - * 2000-10-18 V 1.3.0 final - * 2002-01-16 V 1.3.1 - * 2002-02-22 V 1.3.2 line 576 - * - * NOTE: Edit this file with tabstop=4 ! - * - * Copyright 1990-2003 by Gerhard Buergmann - * gerhard@puon.at - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * See file COPYING for information on distribution conditions. - */ - - -#include - -#ifdef HAVE_LOCALE_H -# include -#endif - -#ifdef __MSDOS__ -# define PRINTF cprintf -#else -# define PRINTF printf -#ifndef HELPFILE -# define HELPFILE "/usr/local/share/bmore.help" -#endif -#endif - -#include "bmore.h" - -char *copyright = "Copyright (C) 1990-2003 by Gerhard Buergmann"; - -int maxx, maxy; -char *name = NULL; -char sstring[MAXCMD] = ""; /* string for search */ -char estring[MAXCMD] = ""; /* string for shell escape */ -char string[MAXCMD]; -FILE *curr_file = NULL, *help_file; -int AnzAdd; -long precount = -1; /* number preceding command */ - -char **files; /* list of input files */ -int numfiles; /* number of input files */ -int file_nr = 0; /* number of current input file */ - -int arrnum = 0; -char numarr[64]; /* string for collecting number */ -char addr_form[15]; - -int ascii_flag = 0; -int d_flag = 0; -int init_search = 0; -char buffer1[MAXCMD], buffer2[MAXCMD]; -int out_len; -int corr = 0, to_print; -off_t init_byte = 0; -off_t last_search = 0; -off_t screen_home, filesize; -off_t bytepos, oldpos; -int prompt = 1; -char helppath[MAXCMD]; - -static char *progname; -static char cmdbuf[MAXCMD]; -static int cnt = 0; -static int icnt = 0; -static int smode; - -char search_pat[BUFFER]; /* / or ? command */ -char *emptyclass = "Empty byte class '[]' or '[^]'"; - - -/* -a ASCII mode - * -d beginners mode - * -i ignore case - */ -void -usage() -{ - fprintf(stderr, "Usage: %s [-adi] [+linenum | +/pattern] name1 name2 ...\n", progname); - exit(1); -} - - -int -main(argc, argv) - int argc; - char *argv[]; -{ - int ch, ch1; - int colon = 0, last_ch = 0; - long last_pre = 0; - int lflag, repeat; - long count; - int i, n = 1; - int d_line, r_line, z_line; - - -#ifdef __MSDOS__ - char *poi; - - strcpy(helppath, argv[0]); - poi = strrchr(helppath, '\\'); - *poi = '\0'; - strcat(helppath, "\\MORE.HLP"); -#else - strncpy(helppath, HELPFILE, MAXCMD - 1); -#endif - -#ifdef HAVE_LOCALE_H - setlocale(LC_ALL, ""); -#endif - - progname = argv[0]; - - while (n < argc) { - switch (argv[n][0]) { - case '-': - i = 1; - while (argv[n][i] != '\0') { - switch (argv[n][i]) { - case 'a': ascii_flag++; - break; - case 'd': d_flag++; - break; - case 'i': ignore_case++; - break; - default: usage(); - } - i++; - } - n++; - break; - case '+': /* +cmd */ - if (argv[n][1] == '/' || argv[n][1] == '\\') { - init_search = argv[n][1]; - strcpy(sstring, &argv[n][2]); - } else { - if (argv[n][1] == '0') { - init_byte = (off_t)strtol(argv[n] + 1, NULL, 16); - } else { - init_byte = (off_t)strtol(argv[n] + 1, NULL, 10); - } - } - n++; - break; - default: /* must be a file name */ - name = strdup(argv[n]); - files = &(argv[n]); - numfiles = argc - n; - n = argc; - break; - } - } - if (numfiles == 0) { - curr_file = stdin; - if (isatty(fileno(stdin)) != 0) usage(); - } else { - open_file(name); - file_nr = 1; - fseek(curr_file, init_byte, SEEK_SET); - bytepos += init_byte; - } - screen_home = bytepos; - - initterm(); - set_tty(); - maxy -= 2; - z_line = maxy; - d_line = maxy / 2; - r_line = 1; - - AnzAdd = 10; - strcpy(addr_form, "%08lX "); - - if (ascii_flag) - out_len = ((maxx - AnzAdd - 1) / 4) * 4; - else - out_len = ((maxx - AnzAdd - 1) / 16) * 4; - - if (init_search) - bmsearch(init_search); - - if (no_tty) { - while(!printout(1)); - fclose(curr_file); - reset_tty(); - exit(0); - } - if (printout(maxy)) { - do_next(1); - } - /* main loop */ - do { - to_print = 0; - if (prompt) { - highvideo(); - PRINTF("--More--"); - if (prompt == 2) { - PRINTF("(Next file: %s)", name); - } else if (!no_intty && filesize) { - PRINTF("(%d%%)", (int)((bytepos * 100) / filesize)); - } - - if (d_flag) PRINTF("[Press space to continue, 'q' to quit]"); - normvideo(); - fflush(stdout); - } - ch = vgetc(); - if (prompt == 2) { - open_file(name); - } - prompt = 1; - PRINTF("\r"); - while (ch >= '0' && ch <= '9') { - numarr[arrnum++] = ch; - ch = vgetc(); - } - numarr[arrnum] = '\0'; - if (arrnum != 0) precount = strtol(numarr, (char **)NULL, 10); - else precount = -1; - lflag = arrnum = 0; - - if (ch == '.') { - precount = last_pre; - ch = last_ch; - repeat = 1; - } else { - last_pre = precount; - last_ch = ch; - if (ch == ':') colon = vgetc(); - repeat = 0; - } - - switch (ch) { - case ' ': /* Display next k lines of text [current screen size] */ - if (precount > 0) to_print = precount; - else to_print = maxy; - break; - case 'z': /* Display next k lines of bytes [current screen size]* */ - if (precount > 0) z_line = precount; - to_print = z_line; - break; - case '\r': - case '\n': /* Display next k lines of text [current screen size]* */ - if (precount > 0) r_line = precount; - to_print = r_line; - break; - case 'q': - case 'Q': - clreol(); - fclose(curr_file); - reset_tty(); - exit(0); - case ':' : - switch (colon) { - case 'f': - prompt = 0; - if (!no_intty) - PRINTF("\"%s\" line %lu", name, - (unsigned long)(bytepos - out_len)); - else - PRINTF("[Not a file] line %lu", - (unsigned long)(bytepos - out_len)); - fflush(stdout); - break; - case 'n': - if (precount < 1) precount = 1; - do_next(precount); - PRINTF("\r"); - clreol(); - PRINTF("\n...Skipping to file %s\r\n\r\n", name); - prompt = 2; - break; - case 'p': - if (precount < 1) precount = 1; - do_next(-precount); - PRINTF("\r"); - clreol(); - PRINTF("\n...Skipping back to file %s\r\n\r\n", name); - prompt = 2; - break; - case 'q': - clreol(); - fclose(curr_file); - reset_tty(); - exit(0); - break; - case '!': - if (!no_intty) { - clreol(); - if (rdline(colon, estring)) break; - doshell(estring); - PRINTF("------------------------\r\n"); - break; - } - default: - bmbeep(); - } - break; - case '!': - if (!no_intty) { - clreol(); - if (rdline(ch, estring)) break; - doshell(estring); - PRINTF("------------------------\r\n"); - break; - } - case 'd': /* Scroll k lines [current scroll size, initially 11]* */ - case BVICTRL('D'): - if (precount > 0) d_line = precount; - to_print = d_line; - break; - case BVICTRL('L'): /*** REDRAW SCREEN ***/ - if (no_intty) { - bmbeep(); - } else { - clrscr(); - to_print = maxy + 1; - fseek(curr_file, screen_home, SEEK_SET); - bytepos = screen_home; - } - break; - case 'b': /* Skip backwards k screenfuls of text [1] */ - case BVICTRL('B'): - if (no_intty) { - bmbeep(); - } else { - if (precount < 1) precount = 1; - PRINTF("...back %ld page", precount); - if (precount > 1) { - PRINTF("s\r\n"); - } else { - PRINTF("\r\n"); - } - screen_home -= (maxy + 1) * out_len; - if (screen_home < 0) screen_home = 0; - fseek(curr_file, screen_home, SEEK_SET); - bytepos = screen_home; - to_print = maxy + 1; - } - break; - case 'f': /* Skip forward k screenfuls of bytes [1] */ - case 's': /* Skip forward k lines of bytes [1] */ - if (precount < 1) precount = 1; - if (ch == 'f') { - count = maxy * precount; - } else { - count = precount; - } - putchar('\r'); - clreol(); - PRINTF("\n...skipping %ld line", count); - if (count > 1) { - PRINTF("s\r\n\r\n"); - } else { - PRINTF("\r\n\r\n"); - } - screen_home += (count + maxy) * out_len; - fseek(curr_file, screen_home, SEEK_SET); - bytepos = screen_home; - to_print = maxy; - break; - case '\\': - if (ascii_flag) { - bmbeep(); - break; - } - case '/': /**** Search String ****/ - if (!repeat) { - clreol(); - if (rdline(ch, sstring)) break; - } - case 'n': /**** Search Next ****/ - case 'N': - bmsearch(ch); - /* - to_print--; - */ - break; - case '\'': - if (no_intty) { - bmbeep(); - } else { - bytepos = last_search; - fseek(curr_file, bytepos, SEEK_SET); - screen_home = bytepos; - to_print = maxy; - PRINTF("\r"); - clreol(); - PRINTF("\n\r\n***Back***\r\n\r\n"); - } - break; - case '=': - prompt = 0; - clreol(); - PRINTF("%lX hex %lu dec", (unsigned long)bytepos, - (unsigned long)bytepos); - fflush(stdout); - break; - case '?': - case 'h': - if ((help_file = fopen(helppath, "r")) == NULL) { - emsg("Can't open help file"); - break; - } - while ((ch1 = getc(help_file)) != EOF) - putchar(ch1); - fclose(help_file); - to_print = 0; - break; - case 'w': - case 'v': - if (!no_intty) { - clreol(); - if (ch == 'v') { - sprintf(string, "bvi +%lu %s", - (unsigned long)(screen_home + - (maxy + 1) / 2 * out_len), name); - } else { - if (precount < 1) precount = bytepos - screen_home; - sprintf(string, "bvi -b %lu -s %lu %s", - (unsigned long)screen_home, - (unsigned long)precount, name); - } - doshell(string); - to_print = maxy + 1; - break; - } - default : - if (d_flag) { - emsg("[Press 'h' for instructions.]"); - } else { - bmbeep(); - } - break; - } - if (to_print) { - if (printout(to_print)) { - do_next(1); - } - } - } while (1); -} - - -int -rdline(ch, sstring) - int ch; - char *sstring; -{ - int i = 0; - int ch1 = 0; - char bstring[MAXCMD]; - - if (ch == '!') { - strcpy(bstring, sstring); - sstring[0] = '\0'; - } - putchar(ch); - fflush(stdout); - - while (i < MAXCMD) { - ch1 = vgetc(); - if (ch1 == '\n' || ch1 == '\r' || ch1 == ESC) { - break; - } else if (ch1 == 8) { - if (i) { - sstring[--i] = '\0'; - PRINTF("\r%c%s", ch, sstring); - clreol(); - } else { - ch1 = ESC; - break; - } - } else if (ch1 == '!' && i == 0) { - if (bstring[0] == '\0') { - emsg("No previous command"); - return 1; - } - putchar(ch1); - PRINTF("\r%c%s", ch, bstring); - strcat(sstring, bstring); - i = strlen(sstring); - } else { - putchar(ch1); - sstring[i++] = ch1; - } - fflush(stdout); - } - if (ch1 == ESC) { - putchar('\r'); - clreol(); - return 1; - } - if (i) sstring[i] = '\0'; - return 0; -} - - -void -do_next(n) - int n; -{ - if (numfiles) { - if (n == 1 && file_nr == numfiles) { - fclose(curr_file); - reset_tty(); - exit(0); - } - if ((file_nr + n) > numfiles) - file_nr = numfiles; - else if ((file_nr + n) < 1) - file_nr = 1; - else - file_nr += n; - prompt = 2; - free(name); - name = strdup(*(files + file_nr - 1)); - } else { - fclose(curr_file); - reset_tty(); - exit(0); - } -} - - -void -open_file(name) - char *name; -{ - struct stat buf; - - if (stat(name, &buf) > -1) { - filesize = buf.st_size; - } - if (numfiles > 1) { - PRINTF("\r"); - clreol(); - PRINTF("\n::::::::::::::\r\n%s\r\n::::::::::::::\r\n", name); - corr = 2; - } - if (curr_file != NULL) fclose(curr_file); - if ((curr_file = fopen(name, "rb")) == NULL) { - /* reset_tty(); */ - perror(name); - exit(1); - } - bytepos = screen_home = 0; -} - - -void -putline(buf, num) - char *buf; - int num; -{ - int print_pos; - unsigned char ch; - - PRINTF(addr_form, (unsigned long)bytepos); - for (print_pos = 0; print_pos < num; print_pos++) { - ch = buf[print_pos]; - if (!ascii_flag) { - PRINTF("%02X ", ch); - } - ++bytepos; - if ((ch > 31) && (ch < 127)) - *(string + print_pos) = ch; - else - *(string + print_pos) = '.'; - } - for (; print_pos < out_len; print_pos++) { - if (!ascii_flag) { - PRINTF(" "); - } - ++bytepos; - *(string + print_pos) = ' '; - } - *(string + num) = '\0'; - PRINTF("%s\r\n", string); -} - - -int -printout(lns) - int lns; -{ - int c, num; - int doub = 0; - static int flag; - - if (corr && (lns > maxy - 2)) lns -= corr; - corr = 0; - do { - for (num = 0; num < out_len; num++) { - if ((c = nextchar()) == -1) break; - buffer1[num] = c; - } - if (!num) return 1; - if (memcmp(buffer1, buffer2, num) || !bytepos ) { - memcpy(buffer2, buffer1, num); - putline(buffer2, num); - if (!no_tty) flag = TRUE; - lns--; - } else { - if (flag) { - clreol(); - PRINTF("*\r\n"); - lns--; - } else { - doub++; - } - flag = FALSE; - bytepos += num; - } - if (lns == 0) { - screen_home = bytepos - ((maxy + 1 + doub) * out_len); - if (screen_home < 0) screen_home = 0; - return 0; - } - } while(num); - return 1; -} - - -int -nextchar() -{ - if (cnt == 0) return fgetc(curr_file); - cnt--; - return cmdbuf[icnt++] & 0xff; -} - - -void -pushback(n, where) - int n; - char *where; -{ - if (cnt) memmove(cmdbuf + n, cmdbuf, n); - memcpy(cmdbuf, where, n); - icnt = 0; - cnt += n; -} - - - - -/* Return: - * -1 EOF - * 0 not found at current position - * 1 found - */ -int -bmregexec(scan) - char *scan; -{ - char *act; - int count, test; - int l; - char act_pat[MAXCMD]; /* found pattern */ - - act = act_pat; - l = 0; - while (*scan != 0) { - if ((test = nextchar()) == -1) return -1; - *act++ = test; - if (++l == MAXCMD) { - pushback(l, act_pat); - return 0; - } - if (ignore_case && smode == ASCII) test = toupper(test); - switch (*scan++) { - case ONE: /* exactly one character */ - count = *scan++; - if (count == 1) { - if (test != *scan) { - bytepos++; - if (l > 1) pushback(--l, act_pat + 1); - return 0; - } - scan++; - } else if (count > 1) { - if (sbracket(test, scan, count)) { - bytepos++; - if (l > 1) pushback(--l, act_pat + 1); - return 0; - } - scan += count; - } - break; - case STAR: /* zero or more characters */ - count = *scan++; - if (count == 1) { /* only one character, 0 - n times */ - while (test == *scan) { - if ((test = nextchar()) == -1) return -2; - *act++ = test; - if (++l == MAXCMD) { - pushback(l, act_pat); - return 0; - } - if (ignore_case && smode == ASCII) - test = toupper(test); - } - pushback(1, --act); - l--; - scan++; - } else if (count > 1) { /* characters in bracket */ - if (*scan == '^') { - do { -/* If we found something matching the next part of the expression, we - * abandon the search for not-matching characters. */ - if (bmregexec(scan + count)) { - *act++ = test; /* May be wrong case !! */ - l++; - scan += count; - bytepos--; - break; - } - if (sbracket(test, scan, count)) { - bytepos++; - if (l > 1) pushback(--l, act_pat + 1); - return 0; - } else { - if ((test = nextchar()) == -1) return -3; - *act++ = test; - if (++l == MAXCMD) { - pushback(l, act_pat); - return 0; - } - if (ignore_case && smode == ASCII) - test = toupper(test); - } - } while(1); - } else { - while(!sbracket(test, scan, count)) { - if ((test = nextchar()) == -1) return -4; - *act++ = test; - if (++l == MAXCMD) { - pushback(l, act_pat); - return 0; - } - if (ignore_case && smode == ASCII) - test = toupper(test); - } - scan += count; - pushback(1, --act); - l--; - } - } else { /* ".*" */ - do { - if ((test = nextchar()) == -1) return -5; - *act++ = test; - if (++l == MAXCMD) { - pushback(l, act_pat); - return 0; - } - pushback(1, act - 1); - bytepos--; - } while (bmregexec(scan) == 0); - bytepos++; - act--; - l--; - } - break; - } - } - pushback(l, act_pat); - return 1; /* found */ -} - - -int -sbracket(start, scan, count) - int start; - char *scan; - int count; -{ - if (*scan++ == '^') { - if (!memchr(scan, start, --count)) return 0; - } else { - if (memchr(scan, start, --count)) return 0; - } - return 1; -} - - -void -bmsearch(ch) - int ch; -{ - int i; - - if (sstring[0] == '\0') { - emsg("No previous regular expression"); - return; - } - if (ch == '/') { - if (ascii_comp(search_pat, sstring)) return; - } - if (ch == '\\') { - if (hex_comp(search_pat, sstring)) return; - } - oldpos = bytepos; - last_search = screen_home; - if (precount < 1) precount = 1; - while (precount--) { - while ((i = bmregexec(search_pat)) == 0); - if (i == 1) { - screen_home = bytepos; - to_print = maxy; - } else { /* i == -1 -> EOF */ - if (no_intty) { - PRINTF("\r\nPattern not found\r\n"); - do_next(1); - } else { -/* -sprintf(string, "Pattern not found %d - %ul", i, (unsigned long)bytepos); -emsg(string); -*/ - emsg("Pattern not found"); - bytepos = oldpos; - fseek(curr_file, bytepos, SEEK_SET); - break; - } - } - if (precount) { - nextchar(); - bytepos++; - } - } - if (prompt) { - PRINTF("\r\n...skipping\r\n"); - } -} - - -void -emsg(s) - char *s; -{ - putchar('\r'); - clreol(); - highvideo(); - PRINTF(s); - normvideo(); - fflush(stdout); - prompt = 0; -} - - -void -bmbeep() { - putchar(7); -} diff --git a/bmore.h b/bmore.h index 18d5aab..87ca556 100644 --- a/bmore.h +++ b/bmore.h @@ -9,10 +9,11 @@ * 2000-10-04 V 1.3.0 final * 2002-01-16 V 1.3.1 * 2003-02-20 V 1.3.2 + * 2010-03-28 V 1.3.4 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2003 by Gerhard Buergmann + * Copyright 1996-2010 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -57,6 +58,8 @@ # else # if HAVE_NCURSES_TERM_H # include +# else +# include # endif # endif #endif diff --git a/bmore.man b/bmore.man deleted file mode 100644 index da13196..0000000 --- a/bmore.man +++ /dev/null @@ -1,178 +0,0 @@ -BMORE(1) BMORE(1) - - -NAME - bmore - browse through a binary file - -SYNOPSIS - bmore [ -acdi ] [ -n lines ] [ -w cols ] [ +linenumber ] [ - +/ASCII-pattern ] [ +\Hex-pattern ] [ filename ... ] - - -DESCRIPTION - more is a filter that displays the contents of a binary - file on the terminal, one screenful at a time. It nor- - mally pauses after each screenful, and prints --More-- at - the bottom of the screen. bmore provides a two-line over- - lap between screens for continuity. If bmore is reading - from a file rather than a pipe, the percentage of charac- - ters displayed so far is also shown. - - bmore scrolls up to display one more screen line in - response to a RETURN character; it displays another - screenful in response to a SPACE character. Other com- - mands are listed below. - - The screen is divided in three sections or panes: The byte - offset (extreme left), the hex pane (middle), and an ascii - pane (right) which shows as printable characters those - bytes in the hex pane. On an 80 column terminal there - will be sixteen hex values and their ASCII values on each - screen line. Note that (as one would expect) the first - byte has the offset 0 (zero). - - bmore sets the terminal to noecho mode, so that the output - can be continuous. Commands that you type do not normally - show up on your terminal, except for the / , \ and ! com- - mands. - - If the standard output is not a terminal, more acts just - like cat(1V), except that a header is printed before each - file in a series. - -OPTIONS - -a ASCII mode: no hex representation of the contents. - Non printable characters are displayed as a dot (.) - - -c Clear before displaying. Redrawing the screen - instead of scrolling. - - -d Display error messages rather than ringing the ter- - minal bell if an unrecognized command is used. - This is helpful for inexperienced users. - - -i Ignore case for searching. - - -n lines - Displays the indicated number of lines in each - screenful, rather than the default (the number of - lines in the terminal screen less two). - - -w cols - Display number of cols in each line. - - +linenumber - Start up at linenumber. - - +/ASCII-pattern - Start up at the line containing the regular expres- - sion pattern. Note: unlike editors, this construct - should not end with a `/'. If it does, then the - trailing slash is taken as a character in the - search pattern. - - -USAGE - - Commands - The commands take effect immediately; it is not necessary - to type a carriage return. Up to the time when the com- - mand character itself is given, the user may type the line - kill character to cancel the numerical argument being - formed. In addition, the user may type the erase charac- - ter to redisplay the `--More--(xx%)' message. - - In the following commands, i is a numerical argument (1 by - default). - - iSPACE Display another screenful, or i more lines if i - is specified. - - iRETURN Display another line, or i more lines, if speci- - fied. - - i^D (CTRL-D) Display (scroll down) 11 more lines. i - is given, the scroll size is set to i. - - id Same as ^D. - - iz Same as SPACE, except that i, if present, - becomes the new default number of lines per - screenful. - - is Skip i lines and then print a screenful. - - if Skip i screenfuls and then print a screenful. - - i^B (CTRL-B) Skip back i screenfuls and then print a - screenful. - - b Same as ^B (CTRL-D). - - q - Q Exit from more. - - = Display the current line number. - - v Drop into the bvi(1) editor at the current off- - set of the current file. - w Drop into the bvi(1) editor at the current off- - set of the current file. Only the portion of the - file displayed on the screen will be loaded. - - h Help. Give a description of all the more com- - mands. - - i/pattern Search for the ith occurrence of the regular - expression pattern. Display the screenful - starting at the file position that contains the - ith match for the regular expression ASCII-pat- - tern, or the end of a pipe, whichever comes - first. If bmore is displaying a file and there - is no such match, its position in the file - remains unchanged. Regular expressions can be - edited using erase and kill characters. Erasing - back past the first column cancels the search - command. - - ' Single quote. Go to the point from which the - last search started. If no search has been per- - formed in the current file, go to the beginning - of the file. - - !command Invoke a shell to execute command. The charac- - ters % and !, when used within command are - replaced with the current filename and the pre- - vious shell command, respectively. If there is - no current filename, % is not expanded. Prepend - a backslash to these characters to escape expan- - sion. - - i:n Skip to the ith next filename given in the com- - mand line, or to the last filename in the list - if i is out of range. - - i:p Skip to the ith previous filename given in the - command line, or to the first filename if i is - out of range. If given while more is positioned - within a file, go to the beginning of the file. - If more is reading from a pipe, more simply - rings the terminal bell. - - :f Display the current filename and offset number. - - :q - :Q Exit from bmore (same as q or Q ). - - . Dot. Repeat the previous command. - - - FILES - /etc/termcap terminal data base - /usr/local/share/bmore.help - help file - -SEE ALSO - bvi(1), termcap(5) - - 3 Jan 2004 diff --git a/bvi.1 b/bvi.1 index 44d3cc1..f518e41 100644 --- a/bvi.1 +++ b/bvi.1 @@ -93,7 +93,7 @@ .nr % 0 .rr F .\} -.TH BVI 1 "BVI Version 1.3.2" "3/Jan/2004" "User Commands" +.TH BVI 1 "BVI Version 1.4.0" "25/Aug/2013" "User Commands" .IX Title "BVI 1" .UC .IX Name "bvi, bview - visual display editor for binary files" @@ -194,11 +194,11 @@ bvi, bview \- visual editor for binary files .SH "VERSION" .IX Header "VERSION" -bvi-1.3.2 +bvi-1.4.0 .SH "SYNOPSIS" .IX Header "SYNOPSIS" -\fBbvi\fR\ \ \ [\fB\-R\fR]\ [\fB\-c\fR\ \fIcmd\fR]\ [\fB\-f\fR\ \fIscript\fR]\ [\fB\-b\fR\ \fIbegin\fR]\ [\fB\-e\fR\ \fIend\fR]\ [\fB\-s\fR\ \fIsize\fR]\ \fIfile\fR... -\fBbview\fR\ [\fB\-R\fR]\ [\fB\-c\fR\ \fIcmd\fR]\ [\fB\-f\fR\ \fIscript\fR]\ [\fB\-b\fR\ \fIbegin\fR]\ [\fB\-e\fR\ \fIend\fR]\ [\fB\-s\fR\ \fIsize\fR]\ \fIfile\fR... +\fBbvi\fR\ \ \ [\fB\-R\fR]\ [\fB\-c\fR\ \fIcmd\fR]\ [\fB\-f\fR\ \fIscript\fR]\ [\fB\-s\fR\ \fIskip\fR]\ [\fB\-e\fR\ \fIend\fR]\ [\fB\-n\fR\ \fIlength\fR]\ \fIfile\fR... +\fBbview\fR\ [\fB\-R\fR]\ [\fB\-c\fR\ \fIcmd\fR]\ [\fB\-f\fR\ \fIscript\fR]\ [\fB\-s\fR\ \fIskip\fR]\ [\fB\-e\fR\ \fIend\fR]\ [\fB\-n\fR\ \fIlength\fR]\ \fIfile\fR... .SH "OPTIONS" .IX Header "OPTIONS" .Ip "\fIfile\fR..." 4 @@ -212,18 +212,24 @@ the buffer. You can get to the other files with the ":next" command. \*(L"Readonly": The readonly flag is set for all the files, preventing accidental overwriting with a write command. -.Ip "\fB\-b\fR \fIbegin\fR" 4 -.IX Item "\fB\-b\fR \fIbegin\fR" +.Ip "\fB\-s\fR \fIskip\fR" 4 +.IX Item "\fB\-s\fR \fIskip\fR" causes bvi to load a file not from the start but from -offset \fIbegin\fR. +offset \fIskip\fR. +Skip offset bytes from the beginning of the input. By default, offset +is interpreted as a decimal number. With a leading 0x or 0X, offset is +interpreted as a hexadecimal number, otherwise, with a leading 0, offset +is interpreted as an octal number. Appending the character b, k, or m +to offset causes it to be interpreted as a multiple of 512, 1024, or +1048576, respectively. .Ip "\fB\-e\fR \fIend\fR" 4 .IX Item "\fB\-e\fR \fIend\fR" causes bvi to load a file not till end but till address \fIend\fR. -.Ip "\fB\-s\fR \fIsize\fR" 4 -.IX Item "\fB\-s\fR \fIsize\fR" -causes bvi not to load the complete file but only \fIsize\fR bytes. +.Ip "\fB\-n\fR \fIlength\fR" 4 +.IX Item "\fB\-n\fR \fIlength\fR" +causes bvi not to load the complete file but only \fIlength\fR bytes. .Ip "\fB\-c\fR \fIcmd\fR" 4 .IX Item "\fB\-c\fR \fIcmd\fR" diff --git a/bvi.c b/bvi.c index 7fc4b9e..f614cc7 100644 --- a/bvi.c +++ b/bvi.c @@ -9,10 +9,13 @@ * 2000-10-24 V 1.3.0 final * 2002-01-03 V 1.3.1 * 2004-01-04 V 1.3.2 + * 2006-04-04 V 1.3.3 + * 2013-08-23 V 1.4.0alpha + * 2014-10-07 V 1.4.0 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2004 by Gerhard Buergmann + * Copyright 1996-2014 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -38,13 +41,13 @@ #endif -char *copyright = "Copyright (C) 1996-2004 by Gerhard Buergmann"; +char *copyright = "Copyright (C) 1996-2014 by Gerhard Buergmann"; jmp_buf env; /* context for `longjmp' function */ int loc; int maxx, maxy, x, xx, y; -int screen, status; +int screen, status, statsize; off_t size; PTR mem = NULL; PTR curpos; @@ -53,15 +56,19 @@ PTR pagepos; PTR spos; char *name = NULL; char *shell; -char string[MAXCMD]; -char cmdstr[MAXCMD + 1] = ""; +char string[MAXCMD+1]; +char cmdstr[MAXCMD+1] = ""; FILE *Ausgabe_Datei; int edits = 0; int AnzAdd, Anzahl, Anzahl3; off_t filesize, memsize, undosize; -long precount = -1; /* number preceding command */ + + +long precount = -1; int block_flag = 0; + + off_t block_begin, block_end, block_size; @@ -70,7 +77,7 @@ int numfiles; /* number of input files */ int curfile; /* number of the current file */ int arrnum = 0; -char numarr[64]; /* string for collecting number */ +char numarr[MAXCMD+1]; /* string for collecting number */ char rep_buf[BUFFER]; PTR current; @@ -88,17 +95,19 @@ char addr_form[15]; char *nobytes = "No bytes@in the buffer"; static char progname[8]; -static char line[MAXCMD]; +static char line[MAXCMD+1]; static int mark; -static int scrolly; static int wrstat = 1; void usage() { + fprintf(stderr, "Usage: %s [-R] [-c cmd | +cmd] [-f script]\n\ - [-b begin] [-e end] [-s size] file ...\n", progname); + [-s skip] [-e end] [-n length] file ...\n\ + file offset/size: 10k, 20m, 1g, 0x1000 hex, 0200 octal\n", progname); + exit(1); } @@ -116,6 +125,8 @@ main(argc, argv) off_t inaddr; char *poi; + + #ifdef HAVE_LOCALE_H setlocale(LC_ALL, ""); #endif @@ -150,26 +161,27 @@ main(argc, argv) } else { script = ++n; } - } else if (argv[n][1] == 'b') { + + } else if (argv[n][1] == 's') { if (argv[n + 1] == NULL || argv[n + 1][0] == '-') { usage(); } else { block_begin = calc_size(argv[++n]); - block_flag |= 1; + block_flag |= BLOCK_BEGIN; } } else if (argv[n][1] == 'e') { if (argv[n + 1] == NULL || argv[n + 1][0] == '-') { usage(); } else { block_end = calc_size(argv[++n]); - block_flag |= 2; + block_flag |= BLOCK_END; } - } else if (argv[n][1] == 's') { + } else if (argv[n][1] == 'n') { if (argv[n + 1] == NULL || argv[n + 1][0] == '-') { usage(); } else { block_size = calc_size(argv[++n]); - block_flag |= 4; + block_flag |= BLOCK_LEN; } } else if (argv[n][1] == 'w') { if (argv[n][2] == '\0') { @@ -197,28 +209,39 @@ main(argc, argv) break; } } + /* TODO default block_size - end of file up to max 64 KB with warning */ switch (block_flag) { - case 2: + case BLOCK_BEGIN: + /* Acc. to SF-Error 3036881 we should use the whole rest of the file */ + /* + block_size = 1024; + block_end = block_begin + block_size - 1; + */ + break; + case BLOCK_END: block_begin = 0; - case 1|2: block_size = block_end - block_begin + 1; break; - case 4: + case BLOCK_BEGIN|BLOCK_END: + block_size = block_end - block_begin + 1; + break; + case BLOCK_LEN: block_begin = 0; - case 1|4: block_end = block_begin + block_size - 1; break; - case 2|4: + case BLOCK_BEGIN|BLOCK_LEN: + block_end = block_begin + block_size - 1; + break; + case BLOCK_END|BLOCK_LEN: block_begin = block_end + 1 - block_size; break; - case 1|2|4: + case BLOCK_BEGIN|BLOCK_END|BLOCK_LEN: if (block_end - block_begin != block_size + 1) { fprintf(stderr, "Ambigous block data\n"); exit(1); } break; } - if (block_flag && !numfiles) { fprintf(stderr, "Cannot read a range of a nonexisting file\n"); exit(1); @@ -232,8 +255,7 @@ main(argc, argv) maxy = LINES; if (params[P_LI].flags & P_CHANGED) maxy = P(P_LI); - scrolly = maxy / 2; - P(P_SS) = scrolly; + P(P_SS) = maxy / 2; P(P_LI) = maxy; maxy--; keypad(stdscr, TRUE); @@ -242,18 +264,27 @@ main(argc, argv) cbreak(); noecho(); - /* - AnzAdd = 8; - strcpy(addr_form, "%06lX "); - */ - AnzAdd = 10; - strcpy(addr_form, "%08lX "); + { + /* address column width */ + /* default is 8 + 2 blanks */ + /* if block_begin has 8 hex digits or more */ + /* reserve 1 hex digit more than required */ + char tmp[sizeof(block_begin) * 2 + 3]; + AnzAdd = sprintf(tmp, "%llX", (long long unsigned)block_begin) + 1; + if (AnzAdd < 8) + AnzAdd = 8; + if (AnzAdd > sizeof(block_begin) * 2) + AnzAdd = sizeof(block_begin) * 2; + sprintf(addr_form, "%%0%dllX ", AnzAdd); + AnzAdd = sprintf(tmp, addr_form, block_begin); + } Anzahl = ((COLS - AnzAdd - 1) / 16) * 4; P(P_CM) = Anzahl; maxx = Anzahl * 4 + AnzAdd + 1; Anzahl3 = Anzahl * 3; - status = Anzahl3 + Anzahl - 17; + statsize = 35; + status = Anzahl3 + Anzahl - statsize; screen = Anzahl * (maxy - 1); signal(SIGINT, SIG_IGN); @@ -279,11 +310,11 @@ main(argc, argv) setcur(); ch = vgetc(); while (ch >= '0' && ch <= '9') { - numarr[arrnum++] = ch; + if (arrnum < MAXCMD) numarr[arrnum++] = ch; ch = vgetc(); } numarr[arrnum] = '\0'; - if (arrnum != 0) precount = strtol(numarr, (char **)NULL, 10); + if (arrnum != 0) precount = strtoll(numarr, (char **)NULL, 10); else precount = -1; lflag = arrnum = 0; @@ -303,7 +334,7 @@ main(argc, argv) break; case '~': if (precount < 1) precount = 1; sprintf(rep_buf, "%ld~", precount); - do_tilde(precount); + do_tilde((off_t)precount); lflag++; break; case KEY_HOME: @@ -332,6 +363,7 @@ main(argc, argv) else x = AnzAdd + Anzahl3; break; case BVICTRL('H'): + case ASCII_DEL: case KEY_BACKSPACE: case KEY_LEFT: case 'h': do { @@ -398,12 +430,12 @@ main(argc, argv) repaint(); break; case BVICTRL('D'): - if (precount > 1) scrolly = precount; - scrolldown(scrolly); + if (precount > 1) P(P_SS) = precount; + scrolldown(P(P_SS)); break; case BVICTRL('U'): - if (precount > 1) scrolly = precount; - scrollup(scrolly); + if (precount > 1) P(P_SS) = precount; + scrollup(P(P_SS)); break; case BVICTRL('E'): if (y > 0) y--; @@ -429,7 +461,7 @@ main(argc, argv) new_screen(); break; case BVICTRL('Y'): - if (y < maxy) y++; + if (y < maxy - 1) y++; scrollup(1); break; case 'A': smsg("APPEND MODE"); @@ -467,17 +499,19 @@ main(argc, argv) } break; case 'g': last_motion = current; - msg("Goto Hex Address: "); + clearstr(); + outmsg("Goto Hex Address:"); refresh(); - getcmdstr(cmdstr, 19); + getcmdstr(cmdstr, 18); + clearstr(); if (cmdstr[0] == '^') { inaddr = P(P_OF); } else if (cmdstr[0] == '$') { inaddr = filesize + P(P_OF) - 1L; } else { - long ltmp; - sscanf(cmdstr, "%lx", <mp); - inaddr = (off_t)ltmp; + off_t ltmp; + sscanf(cmdstr, "%llx", (long long unsigned *)<mp); + inaddr = ltmp; } if (inaddr < P(P_OF)) break; inaddr -= P(P_OF); @@ -485,8 +519,7 @@ main(argc, argv) setpage(mem + inaddr); } else { if (filesize == 0L) break; - sprintf(string, "Max. address of current file : %06lX", - (long)(filesize - 1L + P(P_OF))); + sprintf(string, "Max. address of current file : %06llX", (long long unsigned)(filesize - 1L + P(P_OF))); emsg(string); } break; @@ -498,11 +531,23 @@ main(argc, argv) refresh(); if (getcmdstr(line, 1)) break; last_motion = current; + hl_spat = P(P_HL); searching(ch, line, current, maxpos - 1, P(P_WS)); + if (hl_spat) { + repaint(); + } + break; + case ESC: /* un-highlight */ + hl_spat = FALSE; + repaint(); break; case 'n': /**** Search Next ****/ case 'N': last_motion = current; + hl_spat = P(P_HL); searching(ch, "", current, maxpos - 1, P(P_WS)); + if (hl_spat) { + repaint(); + } break; case 'm': do_mark(vgetc(), current); break; @@ -537,7 +582,7 @@ main(argc, argv) if ((undo_count = alloc_buf(yanked, &undo_buf)) == 0L) break; sprintf(rep_buf, "%ldP", precount); - if (do_append(yanked, yank_buf)) break; + if (do_append((off_t)yanked, yank_buf)) break; /* we save it not for undo but for the dot command memcpy(undo_buf, yank_buf, yanked); */ @@ -553,20 +598,25 @@ main(argc, argv) case 'u': do_undo(); break; case 'W': - case 'w': loc = ASCII; + case 'w': // loc = ASCII; setpage(wordsearch(current, ch)); break; case 'y': count = range(ch); if (count > 0) { - if ((yanked = alloc_buf(count, &yank_buf)) == 0L) { +/* + sprintf(string, "$%ld$", (long)yanked); + msg(string); + vgetc(); +*/ + if ((yanked = alloc_buf((off_t)count, &yank_buf)) == 0L) { break; } memcpy(yank_buf, current, yanked); } else if (count < 0) { - if ((yanked = alloc_buf(-count, &yank_buf)) == 0L) { + if ((yanked = alloc_buf(-(off_t)count, &yank_buf)) == 0L) { break; } - memcpy(yank_buf, current + count, yanked); + memcpy(yank_buf, current, yanked); } else { break; } @@ -630,11 +680,6 @@ main(argc, argv) precount = 1; undo_count = edit('i'); lflag++; -/* - } else if (count) { - sprintf(string, "%ld bytes deleted", labs(count)); - msg(string); -*/ } break; case 'x': @@ -683,13 +728,20 @@ off_t calc_size(arg) char *arg; { - long val; + off_t val; + extern int errno; char *poi; - if (*arg == '0') { - val = strtol(arg, &poi, 16); - } else { - val = strtol(arg, &poi, 10); + errno = 0; + val = strtoll(arg, &poi, 0); + if (val < 0) { + fprintf(stderr, "negative begin/size/end not allowed\n"); + usage(); + } + if (poi == arg || errno != 0) { + /* cygwin gdb displays errno incorrectly as 0 */ + fprintf(stderr, "invalid begin/size/end (hex nr 0x#, octal 0#)\n"); + usage(); } switch (*poi) { case 'k': @@ -698,6 +750,9 @@ calc_size(arg) case 'm': case 'M': val *= 1048576; break; + case 'g': + case 'G': val *= 1024*1024*1024LL; + break; case '\0': break; default: usage(); } @@ -723,7 +778,7 @@ trunc_cur() int do_append(count, buf) - int count; + off_t count; char *buf; { if (filesize + count > memsize) { diff --git a/bvi.h b/bvi.h index b019465..61285dd 100644 --- a/bvi.h +++ b/bvi.h @@ -9,10 +9,12 @@ * 2000-10-24 V 1.3.0 final * 2001-10-29 V 1.3.1 * 2003-07-04 V 1.3.2 + * 2010-08-04 V 1.3.4 + * 2014-10-01 V 1.4.0 * - * NOTE: Edit this file with tabstop=4 ! + * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2003 by Gerhard Buergmann + * Copyright 1996-2014 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -37,6 +39,8 @@ #include #include +#define JOEHTG + #if defined(__MSDOS__) && !defined(DJGPP) # include "patchlev.h" # include "dosconf.h" @@ -97,7 +101,8 @@ #define BS 8 #define ESC 27 #define SEARCH 0 -#define BVICTRL(n) (n&0x1f) +#define BVICTRL(n) (n&0x1f) +#define ASCII_DEL 0x7f #define CMDLNG(a,b) (len <= a && len >= b) @@ -129,6 +134,12 @@ #define SKIP_WHITE while(*cmd!='\0'&&isspace(*cmd))cmd++; +typedef enum _block_datum { + BLOCK_BEGIN = 1, + BLOCK_END = 2, + BLOCK_LEN = 4 +} block_datum; + #ifdef DEBUG extern FILE *debug_fp; #endif @@ -139,6 +150,8 @@ extern char *version; extern char addr_form[]; +extern char search_pat[]; +extern long hl_spat; extern char pattern[]; extern char rep_buf[]; extern int maxx, maxy, x, y; @@ -148,7 +161,7 @@ extern int AnzAdd; extern int Anzahl, Anzahl3; extern int addr_flag; extern int ignore_case, magic; -extern int screen, status; +extern int screen, status, statsize; extern PTR mem; extern PTR maxpos; extern PTR pagepos; @@ -204,7 +217,7 @@ extern off_t block_begin, block_end, block_size; int bregexec(PTR, char *); int chk_comm(int); int doecmd(char *, int); - int do_append(int, char *), do_logic(int, char *); + int do_append(off_t, char *), do_logic(int, char *); int do_delete(off_t, PTR); int doset(char *); int do_substitution(int, char *, PTR, PTR); @@ -214,6 +227,7 @@ extern off_t block_begin, block_end, block_size; PTR wordsearch(PTR, char); PTR backsearch(PTR, char); PTR fsearch(PTR, PTR, char *); + PTR fsearch_end(PTR, PTR, char *, PTR *); PTR rsearch(PTR, PTR, char *); PTR end_word(PTR); PTR calc_addr(char **, PTR); @@ -256,8 +270,10 @@ extern off_t block_begin, block_end, block_size; PTR searching(); PTR wordsearch(); PTR backsearch(); - int bregexec(); + /* int bregexec(); */ + PTR bregexec(); PTR fsearch(); + PTR fsearch_end(); PTR rsearch(); PTR end_word(); PTR calc_addr(); diff --git a/bvi.man b/bvi.man deleted file mode 100644 index b0e0b11..0000000 --- a/bvi.man +++ /dev/null @@ -1,424 +0,0 @@ -BVI(1) User Commands BVI(1) - - -NAME - bvi, bview - visual editor for binary files - -VERSION - bvi-1.3.2 - -SYNOPSIS - bvi [-R] [-c cmd] [-f script] [-b begin] [-e end] [-s size] file... - bview [-R] [-c cmd] [-f script] [-b begin] [-e end] [-s size] file... - -OPTIONS - file... - A list of filenames. The first one will be the - current file and will be read into the buffer. The - cursor will be positioned on the first line of the - buffer. You can get to the other files with the - ":next" command. - - -R "Readonly": The readonly flag is set for all the - files, preventing accidental overwriting with a write - command. - - - -b begin - causes bvi to load a file not from the start but from - offset begin. - - - -e end - causes bvi to load a file not till end but till - address end. - - - -s size - causes bvi not to load the complete file but only size - bytes. - - - -c cmd - cmd will be executed after the first file has - been read. If the cmd contains spaces it must be - enclosed in double quotes (this depends on the shell - that is used). - - -f script - This command provides a means for collecting a series - of "ex" (colon) commands into a script file, then - using this file to edit other files. Since there is no - binary stream editor "bsed", you can use this option - to make several global changes in a binary file. - -DESCRIPTION - Bvi stands for "Binary VIsual editor". Bvi is a screen - oriented editor for binary files; its command set is based - on that of the vi(1) text editor. As a binary editor does - not have the concept of "lines" there are differences from - Vi commands wherever the latter are line orientate. - -COMPARISON - The main differences between Vi and Bvi are: - - The screen is divided in three sections or panes: The byte - offset (extreme left), the hex pane (middle), and an ascii - pane (right) which shows as printable characters those - bytes in the hex pane. On an 80 column terminal there - will be sixteen hex values and their ASCII values on each - screen line. Note that (as one would expect) the first - byte has the offset '0' (zero). - - You can toggle between the hex and ascii windows with the - tab key (TAB). Toggling between these two windows does - not change the current position (offset) within the file. - - No "lines" concept: Files are treated as one long stream - of bytes. The characters "newline" and "carriage return" - are not special, id est they never mark the end of lines. - Therefore the lines on the screen do not represent lines - in the usual way. Data is broken across screen lines - arbitarily. As a consequence there are no commands in bvi - from ex or vi that are based on line numbers, eg "dd", - "yy", 'C', 'S', 'o', 'O'. This also changes the meaning - of "range" before the ":write" command to a byte offset, - ie the command ":100,200w foo" writes all *bytes* (not - lines) from offset 100 to offset 200 to the file "foo". - - No "text objects": There are also no text-specific - arrangements like words, paragraphs, sentences, sections - and so on. - - Extended "ruler": The bottom line of the screen shows the - current address (byte offset) and the current character in - these notations: - - octal, hexadecimal, decimal and ascii. - - Search patterns: All search commands understand these - special characters: - - . any character - [] set of characters - * zero or more occurrences of previous char or set - - But as there is no concept of lines you cannot use the - standard symbols ("anchors") for "begin-of-line" ('^') and - "end-of-line" ('$'). Searching for the start/end of lines - must be done explicitly by adding these special characters - to your search pattern using these meta sequences: - - \n newline - \r return - \t tab - \0 binary zero - - Additional search commands: Similar to the text search - commands there are additional hex-search functions '\' and - '#' which allow to search for any byte value. Example: - "\62 76 69" will search for the string "bvi". Spaces - between hex value are optional, so searching for - "6775636B6573" will find "guckes". - - Changing the length of data (insertion, deletion) moves - the data to other addresses; this is bad for many cases - (eg. databases, program files) and is thus disabled by - default. You can enable this commands by typing - - :set memmove - - BVI Modes: - - Command Mode (Normal Mode): - - Input is treated as command. Note that command mode is - the default mode after startup and after escaping from - input mode. Use ESC (escape) to cancel a partial - (uncompleted) command. - - Input Mode: - - Input is treated as replacement of current characters or - (after the end of the file) is appended to the current - file. This mode is entered from command mode by typing - one of 'i', 'I', 'A', 'r', or 'R'. You can enter the - characters from the keyboard (in the ASCII window) or - hexadecimal values (in the HEX window). Type TAB to - switch between these two windows. Type ESC to finish the - current input and return to command mode. Type CTRL-C to - cancel current command abnormally. - - Command line mode (Last Line Mode or : mode): - - Similar to vi, this mode is entered by typing one of the - characters : / ? \ # ! The command is terminated and - executed by typing a carriage return; to cancel a - partially typed command, type ESC to cancel the current - command and return to command mode. - -ENVIRONMENT - The editor recognizes the environment variable BVIINIT as - a command (or list of commands) to run when it starts - up. If this variable is undefined, the editor checks for - startup commands in the file ~/.bvirc file, which you - must own. However, if there is a .bvirc owned by you in - the current directory, the editor takes its startup - commands from this file - overriding both the file in your - home directory and the environment variable. - -TERMINOLOGY - Characters names are abbreviated as follows: - Abbr. ASCII name aka - CR 010 carriage return - ^A 001 control-a - ^H 008 control-h - ^I 009 control-i aka TAB - ^U 021 control-u - ^Z 026 control-z - ESC 027 escape aka ESC - DEL 127 delete - LEFT --- left arrow - RIGHT --- right arrow - DOWN --- down arrow - UP --- up arrow - -COMMAND SUMMARY - See the TERMINOLOGY for a summary on key name - abbreviations used within the following description of - commands. - - Abstract: - Arrow keys move the cursor on the screen within the - current window. - - Sample commands: - :version show version info - <- v ^ -> arrow keys move the cursor - h j k l same as arrow keys - u undo previous change - ZZ exit bvi, saving changes - :q! quit, discarding changes - /text search for text - ^U ^D scroll up or down - - Counts before bvi commands: - Numbers may be typed as a prefix to some commands. - They are interpreted in one of these ways. - - screen column | - byte of file G - scroll amount ^D ^U - repeat effect most of the rest - - Interrupting, canceling - ESC end insert or incomplete command - DEL (delete or rubout) interrupts - - File manipulation: - ZZ if file modified, write and exit; - otherwise, exit - :w write changed buffer to file - :w! write changed buffer to file, overriding - read-only ("forced" write) - :q quit when no changes have been made - :q! quit and discard all changes - :e file edit file - :e! re-read current file, discard all changes - :e # edit the alternate file - :e! # edit the alternate file, discard changes - :w file write current buffer to file - :w! file write current buffer to file overriding - read-only (this "overwrites" the file) - :sh run the command as set with option "shell", - then return - :!cmd run the command cmd from "shell", then - return - :n edit next file in the argument list - :f show current filename, modified flag, - current byte offset, and percentage of - current position within buffer - ^G same as :f - - Additional edit commands - You can insert/append/change bytes in - ASCII/binary/decimal/ hexadecimal or octal representation. - You can enter several (screen) lines of input. A line with - only a period (.) in it will terminate the command. You - must not type in values greater than a byte value. This - causes an abandonment of the command. Pressing the CR key - does not insert a newline - character into the file. If - you use ASCII mode you can use the special characters \n, - \r, \t and \0. - - :i aCR insert bytes (ASCII) at cursor position - :a bCR append bytes (Binary) at end of file - :c hCR change bytes (hexadecimal) at cursor position - - Bit-level operations - :and n bitwise 'and' operation with value n - :or n bitwise 'or' operation with value n - :xor n bitwise 'xor' operation with value n - :neg two's complement - :not logical negation - :sl i shift each byte i bits to the left - :sr i shift each byte i bits to the right - :rl i rotate each byte i bits to the left - :rr i rotate each byte i bits to the right - - Command mode addresses - :w foo write current buffer to a file - named "foo" - :5,10w foo copy byte 5 through 100 into as - file named foo - :.,.+20w foo copy the current byte and the next - 20 bytes to foo - :^,'aw foo write all bytes from the beginning - through marker 'a' - :/pat/,$ foo search pattern pat and and copy - through end of file - - Positioning within file: - ^B backward screen - ^F forward screen - ^D scroll down half screen - ^U scroll up half screen - nG go to the specified character - (end default), where n is a decimal address - /pat next line matching pat - ?pat previous line matching pat - \hex jump to next occurrence of hex string hex - #hex jump to previous occurrence of hex string hex - n repeat last search command - N repeat last search command, but in opposite - direction - - Adjusting the screen: - ^L clear and redraw screen - zCR redraw screen with current line at top of screen - z- redraw screen with current line at bottom of - screen - z. redraw screen with current line at center of - screen - /pat/z- search for pattern pat and then move currents - line to bottom - ^E scroll screen down 1 line - ^Y scroll screen up 1 line - - Marking and returning: - mx mark current position with lower-case letter x - Note: this command works for all lower-case - letters - 'x move cursor to mark x in ASCII section - `x move cursor to mark x in HEX section - '' move cursor to previous context in ASCII section - `` move cursor to previous context in HEX section - Line positioning: - H jump to first line on screen ("top") - L jump to last line on screen ("low") - M jump to middle line on screen ("middle") - - jump onto previous line on screen - + jump onto next line on screen - CR same as + - DOWN or j next line, same column - UP or k previous line, same column - - Character positioning: - ^ first byte in HEX window - $ end of screen line - l or RIGHT jump onto next byte (within current - screen line) - h or LEFT jump onto previous byte (within current - screen line) - ^H same as LEFT - space same as RIGHT - fx find next occurrence of character x - Fx find previous occurrence of character x - n| jump onto nth byte/character within current - line - - Strings: - (works similar to the strings(1) command) - Note: "Words" are defined as strings of "nonprinting - characters". - e jump to next end of word - w jump to next begin of word - b jump to previous begin of word - W forward to next string delimited with a - \0 or \n - B back to previous string delimited with a - nonprinting char - Corrections during insert: - ^H erase last character (backspace) - erase your erase character, same as ^H (backspace) - ESC ends insertion, back to command mode - - Append and replace: - A append at end of file - rx replace current bte with char 'x' - R enter replace mode; for all subsequent input, - the current byte is overwritten with the next - input character; leave replace mode with ESC. - - Miscellaneous Operations: - TAB toggle between ASCII and HEX section - - Yank and Put: - 3ySPACE yank 3 characters - p insert contents of yank buffer - o replace text with content of yank buffer - P put back at end of file - - Undo, Redo: - u undo last change - Note: Only the last change can be undone. - Therefore this commands toggles between the - last and second-t-last state of the buffer. - - Setting Options: - With the :set command you can set options in bvi - - Option Default Description - - autowrite noaw Save current file, if modified, if you - give a :n, :r or ! command - columns cm=16 on an 80 character wide terminal - ignorecase noic Ignores letter case in searching - magic nomagic Makes . [ * special in patterns - memmove nomm enables insert and delete commands - offset of=0 adds an offset to the diplayed addresses - readonly noro If set, write fails unless you use ! after command - scroll sc=1/2 window - Number of lines scrolled by ^U and ^D - showmode mo Displays statusline on bottom of the screen - terse noterse Let you obtain shorter error messages - window window=screensize - Lines in window, can be reduced at slow terminals - wordlength wl=4 Length of an ASCII-string found by w, W, b or B - wrapscan ws Searches wrap around past the end of the file - unixstyle nous The representation of ascii characters below - 32 is displayed in the statusline as shown - in ascii(7) if unset rather in DOS-style (^A) - - -AUTHOR - bvi was developed by Gerhard Buergmann, Vienna, Austria - Gerhard.Buergmann@puon.at - -WWW - Bvi Homepage: http://bvi.sourceforge.net/ - Vi Pages: http://www.guckes.net/vi/clones.php3 - (all about Vi and its clones) - -FILES - $HOME/.bvirc editor startup file - ./.bvirc editor startup file - -BUGS - Bvi does not update the screen when the terminal changes - its size. - -SEE ALSO - vi(1), strings(1), ascii(5) - -3/Jan/2004 BVI Version 1.3.2 diff --git a/comm.c b/comm.c index 3c8ad62..a83de34 100644 --- a/comm.c +++ b/comm.c @@ -10,10 +10,13 @@ * 2000-07-15 V 1.3.0 final * 2001-10-10 V 1.3.1 * 2003-07-04 V 1.3.2 + * 2005-08-17 V 1.3.3 + * 2010-06-02 V 1.3.4 + * 2014-01-28 V 1.4.0 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2003 by Gerhard Buergmann + * Copyright 1996-2014 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -102,11 +105,11 @@ docmdline(cmdline) char *cmd; char *p; size_t len; - int n, ok; + int n, ok, ret; int force = 0; int saveflag; - if (cmdline == NULL) return; + if (*cmdline == '\0') return; if (*cmdline == '"') return; /** comment **/ if (strlen(cmdline) > CMDSZ - 2) { emsg("Command too long"); @@ -115,9 +118,9 @@ docmdline(cmdline) strcpy(buff, cmdline); cmd = buff; - /* With no address given, we start at the beginning of the file and - * go to the end of the file (not line like in vi). - */ +/* With no address given, we start at the beginning of the file and + * go to the end of the file (not line like in vi). + */ addr_flag = 0; start_addr = mem; end_addr = maxpos - 1; @@ -154,7 +157,7 @@ docmdline(cmdline) return; } if (start_addr < mem) { - sprintf(string, "Negative address@- first byte is %ld", P(P_OF)); + sprintf(string, "Negative address@- first byte is %lld", (long long)P(P_OF)); emsg(string); return; } @@ -191,7 +194,7 @@ docmdline(cmdline) if (edits) msg("[No write]|[No write since last change]"); savetty(); endwin(); - system(cmdbuf + 1); + ret = system(cmdbuf + 1); fprintf(stderr, "[Hit return to continue]"); getchar(); doupdate(); @@ -304,11 +307,7 @@ docmdline(cmdline) else ok = save(c_argv[0], start_addr, end_addr, saveflag); } else { if (c_argc == 0) { - if (P(P_RO)) { - sprintf(string, "\"%s\" File is read only", name); - emsg(string); - return; - } else ok = save(name, start_addr, end_addr, saveflag); + save_chk(name, start_addr, end_addr, saveflag); } else { if (!stat(c_argv[0], &buf)) { if (saveflag == WRITE) { @@ -392,10 +391,10 @@ docmdline(cmdline) } if (chdir(c_argv[0])) sysemsg(c_argv[0]); } else if (!strncmp("edit", cmdname, len) && CMDLNG(4, 1)) { - /* - * The command ":e#" gets expanded to something like ":efile", so - * detect that case here. - */ +/* + * The command ":e#" gets expanded to something like ":efile", so + * detect that case here. + */ if (*cmd == 'e' && c_argc == 0) { if (cmd[1] == '!') (void) doecmd(&cmd[2], TRUE); @@ -626,11 +625,27 @@ yd_addr() } +/*********** Save file if not read only ********************/ +int +save_chk(fname, start, end, flags) + char *fname; + char *start; + char *end; + int flags; +{ + if (P(P_RO)) { + sprintf(string, "\"%s\" File is read only", name); + emsg(string); + return FALSE; + } + return save(fname, start, end, flags); +} + void do_exit() { if (edits) { - if (!save(name, mem, maxpos - 1L, WRITE)) return; + if (!save_chk(name, mem, maxpos - 1L, WRITE)) return; } if ((curfile + 1) < numfiles) { sprintf(string, "%d %s", numfiles - curfile - 1, morefiles); @@ -709,13 +724,20 @@ emsg(s) char *s; { int cnt; + int stchar; if (P(P_EB)) beep(); + if (P(P_MO)) { + stchar = statsize; + } else { + stchar = 0; + } + clearstr(); attrset(A_REVERSE); cnt = outmsg(s); attrset(A_NORMAL); - if (cnt >= (maxx - 25)) { /* 25 = status */ + if (cnt >= (maxx - stchar)) { addch('\n'); wait_return(TRUE); } } @@ -755,10 +777,18 @@ void msg(s) char *s; { + int stchar; + + if (P(P_MO)) { + stchar = statsize; + } else { + stchar = 0; + } clearstr(); - if (outmsg(s) >= (maxx - 25)) { /* 25 = status */ + if (outmsg(s) >= (maxx - stchar)) { addch('\n'); - wait_return(TRUE); } + wait_return(TRUE); + } } diff --git a/config.guess b/config.guess old mode 100755 new mode 100644 index 9b1384b..1f5c50c --- a/config.guess +++ b/config.guess @@ -1,13 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2002-11-30' +timestamp='2014-03-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -16,24 +15,22 @@ timestamp='2002-11-30' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` @@ -53,8 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. +Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -66,11 +62,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -98,14 +94,18 @@ trap 'exit 1' 1 2 15 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. -# This shell variable is my proudest work .. or something. --bje +# Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; -(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) - || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; -dummy=$tmpdir/dummy ; -files="$dummy.c $dummy.o $dummy.rel $dummy" ; -trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do @@ -113,15 +113,13 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in CC_FOR_BUILD="$c"; break ; fi ; done ; - rm -f $files ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; -unset files' +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -134,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -156,6 +175,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -164,7 +184,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -174,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -194,139 +214,119 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then + case $UNAME_RELEASE in + *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - eval $set_cc_for_build - cat <$dummy.s - .data -\$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - - .text - .globl main - .align 4 - .ent main -main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null - if test "$?" = 0 ; then - case `$dummy` in - 0-0) - UNAME_MACHINE="alpha" - ;; - 1-0) - UNAME_MACHINE="alphaev5" - ;; - 1-1) - UNAME_MACHINE="alphaev56" - ;; - 1-101) - UNAME_MACHINE="alphapca56" - ;; - 2-303) - UNAME_MACHINE="alphaev6" - ;; - 2-307) - UNAME_MACHINE="alphaev67" - ;; - 2-1307) - UNAME_MACHINE="alphaev68" - ;; - 3-1307) - UNAME_MACHINE="alphaev7" - ;; - esac - fi - rm -f $dummy.s $dummy && rmdir $tmpdir - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit 0 ;; + exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit 0 ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit 0;; + exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; + exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; + exit ;; *:OS/390:*:*) echo i370-ibm-openedition - exit 0 ;; + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit 0;; + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -334,29 +334,51 @@ EOF else echo pyramid-pyramid-bsd fi - exit 0 ;; + exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit 0 ;; - DRS?6000:UNIX_SV:4.2*:7*) + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; + sparc) echo sparc-icl-nx7; exit ;; esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -365,10 +387,10 @@ EOF esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; + exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 @@ -380,10 +402,10 @@ EOF echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit 0 ;; + exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -393,38 +415,41 @@ EOF # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit 0 ;; + exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -448,36 +473,36 @@ EOF exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 - rm -f $dummy.c $dummy && rmdir $tmpdir + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; + exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit 0 ;; + exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit 0 ;; + exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit 0 ;; + exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit 0 ;; + exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -490,29 +515,29 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit 0 ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit 0 ;; + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit 0 ;; + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit 0 ;; + exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; + exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit 0 ;; + exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -520,7 +545,7 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -535,16 +560,19 @@ EOF exit(0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 - rm -f $dummy.c $dummy && rmdir $tmpdir - echo rs6000-ibm-aix3.2.5 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit 0 ;; - *:AIX:*:[45]) + exit ;; + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -557,28 +585,28 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:*:*) echo rs6000-ibm-aix - exit 0 ;; + exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit 0 ;; + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit 0 ;; + exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit 0 ;; + exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit 0 ;; + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit 0 ;; + exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -587,64 +615,84 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include - #include + #define _HPUX_SOURCE + #include + #include - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi - rm -f $dummy.c $dummy && rmdir $tmpdir + test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -672,195 +720,176 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 - rm -f $dummy.c $dummy && rmdir $tmpdir + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 - exit 0 ;; + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit 0 ;; + exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit 0 ;; + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit 0 ;; + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit 0 ;; + exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit 0 ;; + exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit 0 ;; + exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit 0 ;; + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*T3D:*:*:*) - echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:FreeBSD:*:*) - # Determine whether the default compiler uses glibc. - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #if __GLIBC__ >= 2 - LIBC=gnu - #else - LIBC= - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - rm -f $dummy.c && rmdir $tmpdir - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} - exit 0 ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; + exit ;; + *:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:3*) - echo i586-pc-interix3 - exit 0 ;; + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit 0 ;; + exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit 0 ;; + exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - rm -f $dummy.c && rmdir $tmpdir - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - rm -f $dummy.c && rmdir $tmpdir - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 - ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit 0 ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit 0 ;; + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -870,119 +899,166 @@ EOF EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; esac - exit 0 ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit 0 ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit 0 ;; + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; - esac - # Determine whether the default compiler is a.out or elf + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el #else - #ifdef __INTEL_COMPILER - LIBC=gnu + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} #else - LIBC=gnuaout + CPU= #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - rm -f $dummy.c && rmdir $tmpdir - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 - exit 0 ;; + exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; + exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; + exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; + exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -990,15 +1066,16 @@ EOF else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit 0 ;; - i*86:*:5:[78]*) + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit 0 ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit 0 ;; + exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit 0 ;; + exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit 0 ;; + exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; + exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1090,64 +1180,109 @@ EOF else echo ns32k-sni-sysv fi - exit 0 ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit 0 ;; + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit 0 ;; + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos - exit 0 ;; + exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; + exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit 0 ;; + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit 0 ;; + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit 0 ;; + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit 0 ;; + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Darwin:*:*) - echo `uname -p`-apple-darwin${UNAME_RELEASE} - exit 0 ;; + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1155,22 +1290,28 @@ EOF UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; + exit ;; *:QNX:*:4*) echo i386-pc-qnx - exit 0 ;; - NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit 0 ;; + exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit 0 ;; + exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1181,178 +1322,55 @@ EOF UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; + exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit 0 ;; + exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit 0 ;; + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit 0 ;; + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit 0 ;; + exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit 0 ;; + exit ;; *:ITS:*:*) echo pdp10-unknown-its - exit 0 ;; + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 -rm -f $dummy.c $dummy && rmdir $tmpdir - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - cat >&2 <. +# # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. + +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -70,8 +68,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. +Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -83,11 +80,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -99,7 +96,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. echo $1 - exit 0;; + exit ;; * ) break ;; @@ -118,10 +115,18 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -144,10 +149,13 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -162,13 +170,17 @@ case $os in os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -185,6 +197,10 @@ case $os in # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -202,6 +218,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -226,53 +248,112 @@ case $basic_machine in # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | clipper \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | epiphany \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ - | ip2k \ - | m32r | m68000 | m68k | m88k | mcore \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64vr | mips64vrel \ + | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | openrisc | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ - | strongarm \ - | tahoe | thumb | tic80 | tron \ - | v850 | v850e \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ - | x86 | xscale | xstormy16 | xtensa \ - | z8k) + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -288,54 +369,86 @@ case $basic_machine in # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ - | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ - | clipper-* | cydra-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* \ - | m32r-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ + | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39 | mipstx39el \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ - | v850-* | v850e-* | vax-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ - | xtensa-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ | ymp-* \ - | z8k-*) + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -353,6 +466,9 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; + abacus) + basic_machine=abacus-unknown + ;; adobe68k) basic_machine=m68010-adobe os=-scout @@ -367,6 +483,12 @@ case $basic_machine in basic_machine=a29k-none os=-bsd ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; amdahl) basic_machine=580-amdahl os=-sysv @@ -390,6 +512,10 @@ case $basic_machine in basic_machine=m68k-apollo os=-bsd ;; + aros) + basic_machine=i386-pc + os=-aros + ;; aux) basic_machine=m68k-apple os=-aux @@ -398,10 +524,35 @@ case $basic_machine in basic_machine=ns32k-sequent os=-dynix ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -426,12 +577,27 @@ case $basic_machine in basic_machine=j90-cray os=-unicos ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; crds | unos) basic_machine=m68k-crds ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -454,6 +620,14 @@ case $basic_machine in basic_machine=m88k-motorola os=-sysv3 ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx @@ -565,7 +739,6 @@ case $basic_machine in i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -604,6 +777,17 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; m88k-omron*) basic_machine=m88k-omron ;; @@ -615,10 +799,21 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -632,10 +827,6 @@ case $basic_machine in mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; - mmix*) - basic_machine=mmix-knuth - os=-mmixware - ;; monitor) basic_machine=m68k-rom68k os=-coff @@ -644,14 +835,29 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -716,6 +922,12 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -723,9 +935,12 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; - or32 | or32-*) + openrisc | openrisc-*) basic_machine=or32-unknown - os=-coff + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson @@ -743,6 +958,14 @@ case $basic_machine in basic_machine=i860-intel os=-osf ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; pbd) basic_machine=sparc-tti ;; @@ -752,32 +975,45 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; - pentiumii | pentium2) + pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; + pentium4) + basic_machine=i786-pc + ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumii-* | pentium2-*) + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown @@ -802,6 +1038,14 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -828,6 +1072,14 @@ case $basic_machine in sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; sequent) basic_machine=i386-sequent ;; @@ -835,6 +1087,12 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks @@ -853,6 +1111,9 @@ case $basic_machine in basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -901,10 +1162,6 @@ case $basic_machine in basic_machine=i386-sequent os=-dynix ;; - t3d) - basic_machine=alpha-cray - os=-unicos - ;; t3e) basic_machine=alphaev5-cray os=-unicos @@ -913,13 +1170,9 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - tic4x | c4x*) - basic_machine=tic4x-unknown - os=-coff - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown @@ -934,6 +1187,10 @@ case $basic_machine in tower | tower-32) basic_machine=m68k-ncr ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; udi29k) basic_machine=a29k-amd os=-udi @@ -977,9 +1234,16 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -988,6 +1252,10 @@ case $basic_machine in basic_machine=z8k-unknown os=-sim ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -1007,6 +1275,9 @@ case $basic_machine in romp) basic_machine=romp-ibm ;; + mmix) + basic_machine=mmix-knuth + ;; rs6000) basic_machine=rs6000-ibm ;; @@ -1023,13 +1294,10 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparc | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1073,9 +1341,12 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1096,25 +1367,31 @@ case $os in # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ + | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1132,12 +1409,15 @@ case $os in os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; @@ -1150,6 +1430,9 @@ case $os in -opened*) os=-openedition ;; + -os400*) + os=-os400 + ;; -wince*) os=-wince ;; @@ -1171,6 +1454,9 @@ case $os in -atheos*) os=-atheos ;; + -syllable*) + os=-syllable + ;; -386bsd) os=-bsd ;; @@ -1193,6 +1479,9 @@ case $os in -sinix*) os=-sysv4 ;; + -tpf*) + os=-tpf + ;; -triton*) os=-sysv3 ;; @@ -1223,6 +1512,17 @@ case $os in -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; + -aros*) + os=-aros + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; -none) ;; *) @@ -1245,6 +1545,12 @@ else # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; @@ -1254,6 +1560,24 @@ case $basic_machine in arm*-semi) os=-aout ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1272,13 +1596,13 @@ case $basic_machine in ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; @@ -1297,9 +1621,15 @@ case $basic_machine in *-be) os=-beos ;; + *-haiku) + os=-haiku + ;; *-ibm) os=-aix ;; + *-knuth) + os=-mmixware + ;; *-wec) os=-proelf ;; @@ -1402,7 +1732,7 @@ case $basic_machine in -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) @@ -1432,9 +1762,15 @@ case $basic_machine in -mvs* | -opened*) vendor=ibm ;; + -os400*) + vendor=ibm + ;; -ptx*) vendor=sequent ;; + -tpf*) + vendor=ibm + ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; @@ -1459,7 +1795,7 @@ case $basic_machine in esac echo $basic_machine$os -exit 0 +exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/configure b/configure index b3ad612..af7d930 100755 --- a/configure +++ b/configure @@ -1,11 +1,414 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by Autoconf 2.52. +# Generated by GNU Autoconf 2.65. +# +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' @@ -14,137 +417,263 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} -# Name of the executable. -as_me=`echo "$0" |sed 's,.*[\\/],,'` - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null -as_executable_p="test -f" - -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' else - as_unset=false + test -d ./-p && rmdir ./-p + as_mkdir_p=false fi -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" -# CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} +MFLAGS= +MAKEFLAGS= -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= +PACKAGE_URL= ac_unique_file="bvi.c" # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" +ac_subst_vars='LTLIBOBJS +LIBOBJS +EGREP +GREP +CPP +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_largefile +with_ncurses +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -167,41 +696,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -223,33 +759,59 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "enable_$ac_feature='$ac_optarg'" ;; + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -276,6 +838,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -300,13 +868,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -319,7 +890,7 @@ do with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -371,6 +942,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -421,26 +1002,36 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "with_$ac_package='$ac_optarg'" ;; + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -460,26 +1051,25 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -488,44 +1078,50 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error "missing argument to $ac_option" fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac -done +fi -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var + # Remove trailing slashes. case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. +# FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias -# FIXME: should be removed in autoconf 3.0. +# FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -537,62 +1133,73 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error "pwd does not report name of working directory" + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -600,7 +1207,7 @@ ac_cv_env_CPP_value=$CPP if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. - cat < if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -EOF +Report bugs to the package provider. +_ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` - for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue - cd $ac_subdir - # A "../" for each directory in /$ac_subdir. - ac_dots=`echo $ac_subdir | - sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. - case $srcdir in - .) # No --srcdir option. We are building in place. - ac_sub_srcdir=$srcdir ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_sub_srcdir=$srcdir/$ac_subdir ;; - *) # Relative path. - ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;; - esac +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_sub_srcdir/configure.gnu; then - echo - $SHELL $ac_sub_srcdir/configure.gnu --help=recursive - elif test -f $ac_sub_srcdir/configure; then - echo - $SHELL $ac_sub_srcdir/configure --help=recursive - elif test -f $ac_sub_srcdir/configure.ac || - test -f $ac_sub_srcdir/configure.in; then - echo - $ac_configure --help +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 - fi - cd $ac_popdir + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then - cat <<\EOF + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.65 -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -EOF - exit 0 +_ACEOF + exit fi -exec 5>config.log -cat >&5 <&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_compile + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_type + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_func +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.52. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ -EOF +_ACEOF +exec 5>>config.log { cat <<_ASUNAME -## ---------- ## -## Platform. ## -## ---------- ## +## --------- ## +## Platform. ## +## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` @@ -760,181 +1984,320 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` -PATH = $PATH - _ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + } >&5 -cat >&5 <&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF -EOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= -ac_sep= -for ac_arg +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 do - case $ac_arg in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - ac_sep=" " ;; - *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" - ac_sep=" " ;; - esac - # Get rid of the leading space. + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. - echo >&5 - echo "## ----------------- ##" >&5 - echo "## Cache variables. ##" >&5 - echo "## ----------------- ##" >&5 - echo >&5 - # The following way of writing the cache mishandles newlines in values, -{ + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} >&5 - sed "/^$/d" confdefs.h >conftest.log - if test -s conftest.log; then - echo >&5 - echo "## ------------ ##" >&5 - echo "## confdefs.h. ##" >&5 - echo "## ------------ ##" >&5 - echo >&5 - cat conftest.log >&5 - fi - (echo; echo) >&5 - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" >&5 - echo "$as_me: exit $exit_status" >&5 - rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - { echo "$as_me:864: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - cat "$ac_site_file" >&5 +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:875: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else - { echo "$as_me:883: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:899: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:903: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:909: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:911: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:913: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac - # Pass precious variables to config.status. It doesn't matter if - # we pass some twice (in addition to the command line arguments). + # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" - ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { echo "$as_me:932: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:934: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -942,115 +2305,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac -echo "#! $SHELL" >conftest.sh -echo "exit 0" >>conftest.sh -chmod +x conftest.sh -if { (echo "$as_me:954: PATH=\".;.\"; conftest.sh") >&5 - (PATH=".;."; conftest.sh) 2>&5 - ac_status=$? - echo "$as_me:957: \$? = $ac_status" >&5 - (exit $ac_status); }; then - ac_path_separator=';' -else - ac_path_separator=: -fi -PATH_SEPARATOR="$ac_path_separator" -rm -f conftest.sh + ac_config_headers="$ac_config_headers config.h" -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f $ac_dir/shtool; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:985: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} - { (exit 1); exit 1; }; } -fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. - -# Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:995: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} - { (exit 1); exit 1; }; } - -echo "$as_me:999: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:1008: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:1012: error: $ac_config_sub $ac_cv_build_alias failed." >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:1017: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 -build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - -echo "$as_me:1024: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:1033: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:1038: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 -host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - -case "$host_os" in -sunos4*) - echo "$as_me:1047: result: \"using /usr/5bin/cc\"" >&5 -echo "${ECHO_T}\"using /usr/5bin/cc\"" >&6 - CC="/usr/5bin/cc" - ac_objext="o" - ;; -*) - ac_ext=c +ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -1058,177 +2317,166 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:1061: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}gcc" -echo "$as_me:1076: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1084: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:1087: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:1096: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="gcc" -echo "$as_me:1111: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1119: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:1122: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:1135: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}cc" -echo "$as_me:1150: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1158: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:1161: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:1170: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="cc" -echo "$as_me:1185: found $ac_dir/$ac_word" >&5 -break -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:1193: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:1196: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1209: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue -fi -ac_cv_prog_CC="cc" -echo "$as_me:1229: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1239,133 +2487,158 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" ${1+"$@"} - shift - ac_cv_prog_CC="$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1251: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:1254: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:1265: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -echo "$as_me:1280: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1288: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:1291: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1304: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="$ac_prog" -echo "$as_me:1319: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done + done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1327: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:1330: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi -test -z "$CC" && { { echo "$as_me:1342: error: no acceptable cc found in \$PATH" >&5 -echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} - { (exit 1); exit 1; }; } + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. -echo "$as_me:1347:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:1350: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - echo "$as_me:1353: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:1355: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:1358: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:1360: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:1363: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -#line 1367 "configure" -#include "confdefs.h" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int main () @@ -1376,127 +2649,201 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:1383: checking for C compiler default output" >&5 -echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:1386: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 - ac_status=$? - echo "$as_me:1389: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. -for ac_file in `ls a.exe conftest.exe 2>/dev/null; - ls a.out conftest 2>/dev/null; - ls a.* conftest.* 2>/dev/null`; do +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; - a.out ) # We found the default executable, but exeext='' is most - # certainly right. - break;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool --akim. - export ac_cv_exeext - break;; + break;; * ) break;; esac done else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -{ { echo "$as_me:1412: error: C compiler cannot create executables" >&5 -echo "$as_me: error: C compiler cannot create executables" >&2;} - { (exit 77); exit 77; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } -ac_exeext=$ac_cv_exeext -echo "$as_me:1418: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; -# Check the compiler produces executables we can run. If not, either + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1423: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (eval echo "$as_me:1429: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:1432: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:1439: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'." >&2;} - { (exit 1); exit 1; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." "$LINENO" 5; } fi fi fi -echo "$as_me:1447: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:1454: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1456: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:1459: checking for executable suffix" >&5 -echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1461: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:1464: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do - case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - break;; - * ) break;; - esac -done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then : + $as_echo_n "(cached) " >&6 else - { { echo "$as_me:1480: error: cannot compute EXEEXT: cannot compile and link" >&5 -echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -echo "$as_me:1486: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -echo "$as_me:1492: checking for object suffix" >&5 -echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 1498 "configure" -#include "confdefs.h" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int main () @@ -1507,40 +2854,47 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1510: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:1513: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -{ { echo "$as_me:1525: error: cannot compute OBJEXT: cannot compile" >&5 -echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} - { (exit 1); exit 1; }; } -fi + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } +fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:1532: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:1536: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 1542 "configure" -#include "confdefs.h" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int main () @@ -1553,42 +2907,35 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:1557: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:1560: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1563: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:1566: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1578: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:1584: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 1590 "configure" -#include "confdefs.h" + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int main () @@ -1598,28 +2945,49 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:1602: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:1605: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1608: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:1611: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1621: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -1635,111 +3003,941 @@ else CFLAGS= fi fi -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:1648: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:1651: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1654: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:1657: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - ''\ - '#include ' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do - cat >conftest.$ac_ext <<_ACEOF -#line 1669 "configure" -#include "confdefs.h" -#include -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:1682: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:1685: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1688: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:1691: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -continue + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg fi -rm -f conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -#line 1701 "configure" -#include "confdefs.h" -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:1713: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:1716: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1719: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:1722: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; fi -rm -f conftest.$ac_objext conftest.$ac_ext + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi +fi + + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done +done +if test -z "$ac_aux_dir"; then + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES" + +case "$host_os" in +sunos4*) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"using /usr/5bin/cc\"" >&5 +$as_echo "\"using /usr/5bin/cc\"" >&6; } + CC="/usr/5bin/cc" + ac_objext="o" + ;; +*) + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -1749,18 +3947,18 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ;; esac + case "$host_os" in solaris*) CPPFLAGS="${CPPFLAGS} -D_MSE_INT_H" - cat >>confdefs.h <<\EOF -#define NEED_PUTC_CHAR 1 -EOF + $as_echo "#define NEED_PUTC_CHAR 1" >>confdefs.h ;; hpux9*) DEFS=${DEFS-"-DMINICURSES"} ;; esac + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -1772,58 +3970,79 @@ esac # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:1776: checking for a BSD compatible install" >&5 -echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_path_install+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_save_IFS=$IFS; IFS=$ac_path_separator - for ac_dir in $PATH; do - IFS=$ac_save_IFS + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. - case $ac_dir/ in - / | ./ | .// | /cC/* \ - | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \ - | /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if $as_executable_p "$ac_dir/$ac_prog"; then +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && - grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && - grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done - ;; - esac + done + ;; +esac + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is - # removed, or if the path is relative. + # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi -echo "$as_me:1825: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -1833,20 +4052,21 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:1841: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -1856,69 +4076,37 @@ for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -#line 1862 "configure" -#include "confdefs.h" -#include - Syntax error + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error _ACEOF -if { (eval echo "$as_me:1867: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:1873: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi +if ac_fn_c_try_cpp "$LINENO"; then : + else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -#line 1896 "configure" -#include "confdefs.h" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:1900: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:1906: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break @@ -1928,7 +4116,7 @@ rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +if $ac_preproc_ok; then : break fi @@ -1940,76 +4128,44 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:1943: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -#line 1953 "configure" -#include "confdefs.h" -#include - Syntax error + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error _ACEOF -if { (eval echo "$as_me:1958: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:1964: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi +if ac_fn_c_try_cpp "$LINENO"; then : + else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -#line 1987 "configure" -#include "confdefs.h" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:1991: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:1997: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break @@ -2019,12 +4175,13 @@ rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +if $ac_preproc_ok; then : + else - { { echo "$as_me:2025: error: C preprocessor \"$CPP\" fails sanity check" >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} - { (exit 1); exit 1; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -2033,56 +4190,174 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:2036: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 2042 "configure" -#include "confdefs.h" + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include #include #include #include +int +main () +{ + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:2050: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:2056: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -#line 2078 "configure" -#include "confdefs.h" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -2092,15 +4367,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -#line 2096 "configure" -#include "confdefs.h" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -2110,20 +4384,21 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -#line 2117 "configure" -#include "confdefs.h" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else -# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif @@ -2134,955 +4409,245 @@ main () int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + || toupper (i) != TOUPPER (i)) + return 2; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:2143: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:2146: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:2148: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2151: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : +if ac_fn_c_try_run "$LINENO"; then : + else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + fi fi -fi -echo "$as_me:2164: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:2180: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 2186 "configure" -#include "confdefs.h" -$ac_includes_default -#include <$ac_header> + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2192: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2195: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2198: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2201: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -eval "$as_ac_Header=no" -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:2211: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -echo $ECHO_N "checking for int... $ECHO_C" >&6 -if test "${ac_cv_type_int+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 2227 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -if ((int *) 0) - return 0; -if (sizeof (int)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2242: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2245: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2248: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2251: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_int=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_type_int=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:2261: result: $ac_cv_type_int" >&5 -echo "${ECHO_T}$ac_cv_type_int" >&6 -echo "$as_me:2264: checking size of int" >&5 -echo $ECHO_N "checking size of int... $ECHO_C" >&6 -if test "${ac_cv_sizeof_int+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if test "${ac_cv_sizeof_int+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : + else if test "$ac_cv_type_int" = yes; then - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -#line 2273 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -int _array_ [1 - 2 * !((sizeof (int)) >= 0)] - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2285: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2288: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2291: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2294: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -#line 2299 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)] - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2311: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2314: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2317: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2320: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (int) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_int=0 + fi fi -rm -f conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -#line 2336 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)] - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2348: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2351: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2354: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2357: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` + fi -rm -f conftest.$ac_objext conftest.$ac_ext - done -fi -rm -f conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -#line 2373 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)] - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2385: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2388: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2391: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2394: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` -fi -rm -f conftest.$ac_objext conftest.$ac_ext -done -ac_cv_sizeof_int=$ac_lo -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:2407: error: cannot run test program while cross compiling" >&5 -echo "$as_me: error: cannot run test program while cross compiling" >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF -#line 2412 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -FILE *f = fopen ("conftest.val", "w"); -if (!f) - exit (1); -fprintf (f, "%d", (sizeof (int))); -fclose (f); - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:2428: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:2431: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:2433: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2436: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_int=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val -else - ac_cv_sizeof_int=0 -fi -fi -echo "$as_me:2452: result: $ac_cv_sizeof_int" >&5 -echo "${ECHO_T}$ac_cv_sizeof_int" >&6 -cat >>confdefs.h <&5 +$as_echo "$ac_cv_sizeof_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int -EOF - -echo "$as_me:2458: checking for long" >&5 -echo $ECHO_N "checking for long... $ECHO_C" >&6 -if test "${ac_cv_type_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 2464 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -if ((long *) 0) - return 0; -if (sizeof (long)) - return 0; - ; - return 0; -} _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2479: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2482: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2485: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2488: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_long=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_type_long=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:2498: result: $ac_cv_type_long" >&5 -echo "${ECHO_T}$ac_cv_type_long" >&6 -echo "$as_me:2501: checking size of long" >&5 -echo $ECHO_N "checking size of long... $ECHO_C" >&6 -if test "${ac_cv_sizeof_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if test "${ac_cv_sizeof_long+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + else if test "$ac_cv_type_long" = yes; then - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -#line 2510 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -int _array_ [1 - 2 * !((sizeof (long)) >= 0)] - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2522: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2525: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2528: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2531: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -#line 2536 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)] - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2548: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2551: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2554: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2557: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (long) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_long=0 + fi fi -rm -f conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -#line 2573 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -int _array_ [1 - 2 * !((sizeof (long)) >= $ac_mid)] - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2585: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2588: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2591: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2594: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` + fi -rm -f conftest.$ac_objext conftest.$ac_ext - done -fi -rm -f conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -#line 2610 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)] - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2622: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2625: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2628: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2631: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` -fi -rm -f conftest.$ac_objext conftest.$ac_ext -done -ac_cv_sizeof_long=$ac_lo -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:2644: error: cannot run test program while cross compiling" >&5 -echo "$as_me: error: cannot run test program while cross compiling" >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF -#line 2649 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -FILE *f = fopen ("conftest.val", "w"); -if (!f) - exit (1); -fprintf (f, "%d", (sizeof (long))); -fclose (f); - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:2665: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:2668: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:2670: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2673: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val -else - ac_cv_sizeof_long=0 -fi -fi -echo "$as_me:2689: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6 -cat >>confdefs.h <&5 +$as_echo "$ac_cv_sizeof_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long -EOF - -echo "$as_me:2695: checking for void *" >&5 -echo $ECHO_N "checking for void *... $ECHO_C" >&6 -if test "${ac_cv_type_void_p+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 2701 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -if ((void * *) 0) - return 0; -if (sizeof (void *)) - return 0; - ; - return 0; -} _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2716: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2719: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2722: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2725: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_void_p=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_type_void_p=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:2735: result: $ac_cv_type_void_p" >&5 -echo "${ECHO_T}$ac_cv_type_void_p" >&6 -echo "$as_me:2738: checking size of void *" >&5 -echo $ECHO_N "checking size of void *... $ECHO_C" >&6 -if test "${ac_cv_sizeof_void_p+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if test "${ac_cv_sizeof_long_long+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (long long) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_long_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if test "${ac_cv_sizeof_void_p+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : + else if test "$ac_cv_type_void_p" = yes; then - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -#line 2747 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -int _array_ [1 - 2 * !((sizeof (void *)) >= 0)] - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2759: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2762: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2765: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2768: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -#line 2773 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -int _array_ [1 - 2 * !((sizeof (void *)) <= $ac_mid)] - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2785: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2788: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2791: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2794: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (void *) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_void_p=0 + fi fi -rm -f conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -#line 2810 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -int _array_ [1 - 2 * !((sizeof (void *)) >= $ac_mid)] - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2822: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2825: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2828: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2831: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` + fi -rm -f conftest.$ac_objext conftest.$ac_ext - done -fi -rm -f conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -#line 2847 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -int _array_ [1 - 2 * !((sizeof (void *)) <= $ac_mid)] - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2859: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2862: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2865: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2868: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` -fi -rm -f conftest.$ac_objext conftest.$ac_ext -done -ac_cv_sizeof_void_p=$ac_lo -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:2881: error: cannot run test program while cross compiling" >&5 -echo "$as_me: error: cannot run test program while cross compiling" >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF -#line 2886 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -FILE *f = fopen ("conftest.val", "w"); -if (!f) - exit (1); -fprintf (f, "%d", (sizeof (void *))); -fclose (f); - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:2902: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:2905: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:2907: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2910: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_void_p=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val -else - ac_cv_sizeof_void_p=0 -fi -fi -echo "$as_me:2926: result: $ac_cv_sizeof_void_p" >&5 -echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 -cat >>confdefs.h <&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } + + + +cat >>confdefs.h <<_ACEOF #define SIZEOF_VOID_P $ac_cv_sizeof_void_p -EOF - -echo "$as_me:2932: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 -if test "${ac_cv_type_size_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 2938 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -if ((size_t *) 0) - return 0; -if (sizeof (size_t)) - return 0; - ; - return 0; -} _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:2953: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:2956: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2959: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:2962: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_size_t=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_type_size_t=no -fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:2972: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 -if test $ac_cv_type_size_t = yes; then - : + + + +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = x""yes; then : + else -cat >>confdefs.h <>confdefs.h <<_ACEOF #define size_t unsigned int -EOF - -fi - -echo "$as_me:2984: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6 -if test "${ac_cv_type_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 2990 "configure" -#include "confdefs.h" -$ac_includes_default -int -main () -{ -if ((off_t *) 0) - return 0; -if (sizeof (off_t)) - return 0; - ; - return 0; -} _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:3005: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:3008: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3011: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:3014: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_off_t=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_type_off_t=no + fi -rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:3024: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6 -if test $ac_cv_type_off_t = yes; then - : + +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = x""yes; then : + else -cat >>confdefs.h <>confdefs.h <<_ACEOF #define off_t int -EOF +_ACEOF fi -echo "$as_me:3036: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 3042 "configure" -#include "confdefs.h" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include #include #include #include +int +main () +{ + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:3050: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:3056: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -#line 3078 "configure" -#include "confdefs.h" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -3092,15 +4657,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -#line 3096 "configure" -#include "confdefs.h" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -3110,20 +4674,21 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -#line 3117 "configure" -#include "confdefs.h" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else -# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif @@ -3134,507 +4699,590 @@ main () int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + || toupper (i) != TOUPPER (i)) + return 2; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:3143: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:3146: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:3148: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:3151: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : +if ac_fn_c_try_run "$LINENO"; then : + else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + fi fi -fi -echo "$as_me:3164: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in fcntl.h termcap.h termio.h termios.h unistd.h term.h ncurses/term.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:3177: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 3183 "configure" -#include "confdefs.h" -#include <$ac_header> +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -if { (eval echo "$as_me:3187: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:3193: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_ext -fi -echo "$as_me:3212: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -echo $ECHO_N "checking for ncurses.h... $ECHO_C" >&6 -if test "${ac_cv_header_ncurses_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +ac_fn_c_check_header_mongrel "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default" +if test "x$ac_cv_header_ncurses_h" = x""yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 +$as_echo_n "checking for library containing initscr... " >&6; } +if test "${ac_cv_search_initscr+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 3242 "configure" -#include "confdefs.h" -#include + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char initscr (); +int +main () +{ +return initscr (); + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:3246: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:3252: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag +for ac_lib in '' ncurses; do + if test -z "$ac_lib"; then + ac_res="none required" else - ac_cpp_err= + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi -else - ac_cpp_err=yes + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_initscr=$ac_res fi -if test -z "$ac_cpp_err"; then - ac_cv_header_ncurses_h=yes -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_header_ncurses_h=no +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_initscr+set}" = set; then : + break fi -rm -f conftest.err conftest.$ac_ext -fi -echo "$as_me:3271: result: $ac_cv_header_ncurses_h" >&5 -echo "${ECHO_T}$ac_cv_header_ncurses_h" >&6 -if test $ac_cv_header_ncurses_h = yes; then - echo "$as_me:3274: checking for initscr in -lncurses" >&5 -echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6 -if test "${ac_cv_lib_ncurses_initscr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lncurses $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line 3282 "configure" -#include "confdefs.h" +done +if test "${ac_cv_search_initscr+set}" = set; then : -/* Override any gcc2 internal prototype to avoid an error. */ +else + ac_cv_search_initscr=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_initscr" >&5 +$as_echo "$ac_cv_search_initscr" >&6; } +ac_res=$ac_cv_search_initscr +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + $as_echo "#define HAVE_NCURSES_H 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 +$as_echo_n "checking for library containing tputs... " >&6; } +if test "${ac_cv_search_tputs+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char initscr (); +char tputs (); int main () { -initscr (); +return tputs (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3301: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:3304: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3307: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:3310: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_ncurses_initscr=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_ncurses_initscr=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:3321: result: $ac_cv_lib_ncurses_initscr" >&5 -echo "${ECHO_T}$ac_cv_lib_ncurses_initscr" >&6 -if test $ac_cv_lib_ncurses_initscr = yes; then - cat >>confdefs.h <<\EOF -#define HAVE_NCURSES_H 1 -EOF - LIBS="${LIBS} -lncurses" -else - echo "$as_me:3329: checking for initscr in -lcurses" >&5 -echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6 -if test "${ac_cv_lib_curses_initscr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcurses $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line 3337 "configure" -#include "confdefs.h" - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char initscr (); -int -main () -{ -initscr (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3356: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:3359: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3362: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:3365: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_curses_initscr=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_curses_initscr=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:3376: result: $ac_cv_lib_curses_initscr" >&5 -echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6 -if test $ac_cv_lib_curses_initscr = yes; then - cat >>confdefs.h <<\EOF -#define HAVE_CURSES_H 1 -EOF - LIBS="${LIBS} -lcurses" -else - { { echo "$as_me:3384: error: bvi requires the curses library" >&5 -echo "$as_me: error: bvi requires the curses library" >&2;} - { (exit 1); exit 1; }; } -fi - -fi - -else - echo "$as_me:3392: checking for curses.h" >&5 -echo $ECHO_N "checking for curses.h... $ECHO_C" >&6 -if test "${ac_cv_header_curses_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line 3398 "configure" -#include "confdefs.h" -#include -_ACEOF -if { (eval echo "$as_me:3402: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:3408: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag +for ac_lib in '' tinfo; do + if test -z "$ac_lib"; then + ac_res="none required" else - ac_cpp_err= + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi -else - ac_cpp_err=yes + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_tputs=$ac_res fi -if test -z "$ac_cpp_err"; then - ac_cv_header_curses_h=yes -else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_header_curses_h=no +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_tputs+set}" = set; then : + break fi -rm -f conftest.err conftest.$ac_ext -fi -echo "$as_me:3427: result: $ac_cv_header_curses_h" >&5 -echo "${ECHO_T}$ac_cv_header_curses_h" >&6 -if test $ac_cv_header_curses_h = yes; then - echo "$as_me:3430: checking for initscr in -lcurses" >&5 -echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6 -if test "${ac_cv_lib_curses_initscr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcurses $LIBS" -cat >conftest.$ac_ext <<_ACEOF -#line 3438 "configure" -#include "confdefs.h" +done +if test "${ac_cv_search_tputs+set}" = set; then : -/* Override any gcc2 internal prototype to avoid an error. */ +else + ac_cv_search_tputs=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 +$as_echo "$ac_cv_search_tputs" >&6; } +ac_res=$ac_cv_search_tputs +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 +$as_echo_n "checking for library containing initscr... " >&6; } +if test "${ac_cv_search_initscr+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char initscr (); int main () { -initscr (); +return initscr (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3457: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:3460: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3463: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:3466: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_curses_initscr=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_lib_curses_initscr=no +for ac_lib in '' curses; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_initscr=$ac_res fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:3477: result: $ac_cv_lib_curses_initscr" >&5 -echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6 -if test $ac_cv_lib_curses_initscr = yes; then - cat >>confdefs.h <<\EOF -#define HAVE_CURSES_H 1 -EOF - LIBS="${LIBS} -lcurses" -else - { { echo "$as_me:3485: error: bvi requires the curses library" >&5 -echo "$as_me: error: bvi requires the curses library" >&2;} - { (exit 1); exit 1; }; } +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_initscr+set}" = set; then : + break fi +done +if test "${ac_cv_search_initscr+set}" = set; then : else - { { echo "$as_me:3491: error: bvi requires the curses library" >&5 -echo "$as_me: error: bvi requires the curses library" >&2;} - { (exit 1); exit 1; }; } + ac_cv_search_initscr=no fi - +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_initscr" >&5 +$as_echo "$ac_cv_search_initscr" >&6; } +ac_res=$ac_cv_search_initscr +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -for ac_func in strdup strtol strerror memmove -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:3501: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo "#define HAVE_CURSES_H 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 +$as_echo_n "checking for library containing tputs... " >&6; } +if test "${ac_cv_search_tputs+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 3507 "configure" -#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -char (*f) (); - +char tputs (); int main () { -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -f = $ac_func; -#endif - +return tputs (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3538: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:3541: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3544: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:3547: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" +for ac_lib in '' tinfo; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_tputs=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_tputs+set}" = set; then : + break +fi +done +if test "${ac_cv_search_tputs+set}" = set; then : + else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -eval "$as_ac_var=no" + ac_cv_search_tputs=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:3557: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <&5 +$as_echo "$ac_cv_search_tputs" >&6; } +ac_res=$ac_cv_search_tputs +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + + as_fn_error "bvi requires the curses library" "$LINENO" 5 +fi + +fi + +else + + ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default" +if test "x$ac_cv_header_curses_h" = x""yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 +$as_echo_n "checking for library containing initscr... " >&6; } +if test "${ac_cv_search_initscr+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char initscr (); +int +main () +{ +return initscr (); + ; + return 0; +} +_ACEOF +for ac_lib in '' curses; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_initscr=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_initscr+set}" = set; then : + break +fi +done +if test "${ac_cv_search_initscr+set}" = set; then : + +else + ac_cv_search_initscr=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_initscr" >&5 +$as_echo "$ac_cv_search_initscr" >&6; } +ac_res=$ac_cv_search_initscr +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + $as_echo "#define HAVE_CURSES_H 1" >>confdefs.h + +else + + as_fn_error "bvi requires the curses library" "$LINENO" 5 +fi + +else + + as_fn_error "bvi requires the curses library" "$LINENO" 5 +fi + + +fi + + + + +for ac_func in strdup strtol strtoll strerror memmove +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi done -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:3579: checking for a BSD compatible install" >&5 -echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 +$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } +if test "${ac_cv_sys_largefile_source+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_save_IFS=$IFS; IFS=$ac_path_separator - for ac_dir in $PATH; do - IFS=$ac_save_IFS - # Account for people who put trailing slashes in PATH elements. - case $ac_dir/ in - / | ./ | .// | /cC/* \ - | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \ - | /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if $as_executable_p "$ac_dir/$ac_prog"; then - if test $ac_prog = install && - grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include /* for off_t */ + #include +int +main () +{ +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=no; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGEFILE_SOURCE 1 +#include /* for off_t */ + #include +int +main () +{ +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=1; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_cv_sys_largefile_source=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 +$as_echo "$ac_cv_sys_largefile_source" >&6; } +case $ac_cv_sys_largefile_source in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source +_ACEOF +;; +esac +rm -rf conftest* + +# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug +# in glibc 2.1.3, but that breaks too many other things. +# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. +if test $ac_cv_sys_largefile_source != unknown; then + +$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL=$ac_install_sh - fi + +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF + fi -echo "$as_me:3628: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +$as_echo_n "checking for GNU libc compatible malloc... " >&6; } +if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_malloc_0_nonnull=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *malloc (); +#endif + +int +main () +{ +return ! malloc (0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_malloc_0_nonnull=yes +else + ac_cv_func_malloc_0_nonnull=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes; then : + +$as_echo "#define HAVE_MALLOC 1" >>confdefs.h + +else + $as_echo "#define HAVE_MALLOC 0" >>confdefs.h + + case " $LIBOBJS " in + *" malloc.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS malloc.$ac_objext" + ;; +esac + + +$as_echo "#define malloc rpl_malloc" >>confdefs.h + +fi + + +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF + +fi + +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 +$as_echo_n "checking for GNU libc compatible realloc... " >&6; } +if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_realloc_0_nonnull=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *realloc (); +#endif + +int +main () +{ +return ! realloc (0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_realloc_0_nonnull=yes +else + ac_cv_func_realloc_0_nonnull=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } +if test $ac_cv_func_realloc_0_nonnull = yes; then : + +$as_echo "#define HAVE_REALLOC 1" >>confdefs.h + +else + $as_echo "#define HAVE_REALLOC 0" >>confdefs.h + + case " $LIBOBJS " in + *" realloc.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS realloc.$ac_objext" + ;; +esac + + +$as_echo "#define realloc rpl_realloc" >>confdefs.h + +fi + + -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ac_config_files="$ac_config_files Makefile" @@ -3648,7 +5296,7 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overriden when +# `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. @@ -3656,39 +5304,59 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if cmp -s $cache_file confcache; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -3697,141 +5365,480 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - DEFS=-DHAVE_CONFIG_H +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:3720: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL -# Generated automatically by configure. +# Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false +ac_cs_recheck=false +ac_cs_silent=false + SHELL=\${CONFIG_SHELL-$SHELL} -ac_cs_invocation="\$0 \$@" +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi -# Name of the executable. -as_me=`echo "$0" |sed 's,.*[\\/],,'` -if expr a : '\(a\)' >/dev/null 2>&1; then +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null -as_executable_p="test -f" -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' else - as_unset=false + test -d ./-p && rmdir ./-p + as_mkdir_p=false fi -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by $as_me, which was +generated by GNU Autoconf 2.65. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" _ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_headers="$ac_config_headers" -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] + --file=FILE[:TEMPLATE] instantiate the configuration file FILE - --header=FILE[:TEMPLATE] + --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: @@ -3840,118 +5847,136 @@ $config_files Configuration headers: $config_headers -Report bugs to ." -EOF +Report bugs to the package provider." -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.52, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.65, + with options \\"\$ac_cs_config\\" -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" -EOF -cat >>$CONFIG_STATUS <<\EOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - shift - set dummy "$ac_option" "$ac_optarg" ${1+"$@"} - shift + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift ;; - -*);; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_need_defaults=false;; esac - case $1 in + case $ac_option in # Handling of the options. -EOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:3893: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) - shift - CONFIG_FILES="$CONFIG_FILES $1" + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) - shift - CONFIG_HEADERS="$CONFIG_HEADERS $1" + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:3912: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; + -*) as_fn_error "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; esac shift done -exec 5>>config.log -cat >&5 << _ACEOF +ac_configure_extra_args= -## ----------------------- ## -## Running config.status. ## -## ----------------------- ## - -This file was extended by $as_me 2.52, executed with - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - > $ac_cs_invocation -on `(hostname || uname -n) 2>/dev/null | sed 1q` +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi _ACEOF -EOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - *) { { echo "$as_me:3949: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -3961,487 +5986,541 @@ if $ac_need_defaults; then test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi -# Create a temporary directory, and hook for its removal unless debugging. +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. -: ${TMPDIR=/tmp} + { - tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=$TMPDIR/cs$$-$RANDOM - (umask 077 && mkdir $tmp) -} || + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + { - echo "$me: cannot create a temporary directory in $TMPDIR" >&2 - { (exit 1); exit 1; } + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line } -EOF +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error "could not setup config files machinery" "$LINENO" 5 +_ACEOF -cat >>$CONFIG_STATUS <\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@DEFS@,$DEFS,;t t -s,@LIBS@,$LIBS,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@CPP@,$CPP,;t t -CEOF - -EOF - - cat >>$CONFIG_STATUS <<\EOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" -EOF -cat >>$CONFIG_STATUS <<\EOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - { case "$ac_dir" in - [\\/]* | ?:[\\/]* ) as_incr_dir=;; - *) as_incr_dir=.;; -esac -as_dummy="$ac_dir" -for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do - case $as_mkdir_dir in - # Skip DOS drivespec - ?:) as_incr_dir=$as_mkdir_dir ;; - *) - as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || mkdir "$as_incr_dir" +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + esac ;; esac -done; } - ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` - else - ac_dir_suffix= ac_dots= - fi + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. - case $srcdir in - .) ac_srcdir=. - if test -z "$ac_dots"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_dots$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_dots$srcdir ;; - esac +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_dots$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:4163: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated automatically by config.status. */ - configure_input="Generated automatically from `echo $ac_file_in | - sed 's,.*/,,'` by configure." +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:4181: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo $f;; - *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:4194: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } -EOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 -done -EOF -cat >>$CONFIG_STATUS <<\EOF +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} -# -# CONFIG_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + rm -f "$tmp/stdin" case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:4255: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:4266: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo $f;; - *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:4279: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -EOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\EOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -EOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\EOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -EOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines -echo ' fi # egrep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - -cat >>$CONFIG_STATUS <<\EOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated automatically by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated automatically by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # if test x"$ac_file" != x-; then - if cmp -s $ac_file $tmp/config.h 2>/dev/null; then - { echo "$as_me:4396: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - { case "$ac_dir" in - [\\/]* | ?:[\\/]* ) as_incr_dir=;; - *) as_incr_dir=.;; -esac -as_dummy="$ac_dir" -for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do - case $as_mkdir_dir in - # Skip DOS drivespec - ?:) as_incr_dir=$as_mkdir_dir ;; - *) - as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || mkdir "$as_incr_dir" - ;; - esac -done; } - - fi - rm -f $ac_file - mv $tmp/config.h $ac_file + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else - cat $tmp/config.h - rm -f $tmp/config.h + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error "could not create -" "$LINENO" 5 fi -done -EOF + ;; -cat >>$CONFIG_STATUS <<\EOF -{ (exit 0); exit 0; } -EOF -chmod +x $CONFIG_STATUS + esac + +done # for ac_tag + + +as_fn_exit 0 +_ACEOF ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open @@ -4452,11 +6531,18 @@ ac_clean_files=$ac_clean_files_save # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null - $SHELL $CONFIG_STATUS || ac_cs_success=false + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit $? +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff --git a/configure.in b/configure.ac similarity index 65% rename from configure.in rename to configure.ac index 68076d8..dd12369 100644 --- a/configure.in +++ b/configure.ac @@ -1,9 +1,12 @@ dnl Process this file with autoconf to produce a configure script. + AC_INIT AC_CONFIG_SRCDIR([bvi.c]) AC_CONFIG_HEADER(config.h) +AC_SYS_LARGEFILE AC_CANONICAL_HOST +CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES" dnl On SunOS4 systems you have to use the /usr/5bin/cc compiler dnl to get the SYSV curses library: @@ -37,6 +40,7 @@ AC_PROG_INSTALL dnl Check for typedefs AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) +AC_CHECK_SIZEOF(long long) AC_CHECK_SIZEOF(void *) AC_CHECK_TYPE(size_t, unsigned int) @@ -58,24 +62,29 @@ AC_ARG_WITH(ncurses, fi ]) -AC_CHECK_HEADER(ncurses.h, - AC_CHECK_LIB(ncurses, initscr, - AC_DEFINE(HAVE_NCURSES_H) LIBS="${LIBS} -lncurses", - AC_CHECK_LIB(curses, initscr, - AC_DEFINE(HAVE_CURSES_H) LIBS="${LIBS} -lcurses", - AC_MSG_ERROR([bvi requires the curses library]))), - AC_CHECK_HEADER(curses.h, - AC_CHECK_LIB(curses, initscr, - AC_DEFINE(HAVE_CURSES_H) LIBS="${LIBS} -lcurses", - AC_MSG_ERROR([bvi requires the curses library])), - AC_MSG_ERROR([bvi requires the curses library]))) +AC_CHECK_HEADER([ncurses.h],[ + AC_SEARCH_LIBS([initscr], [ncurses],[ + AC_DEFINE(HAVE_NCURSES_H) + AC_SEARCH_LIBS([tputs], [tinfo])], [ + AC_SEARCH_LIBS([initscr], [curses],[ + AC_DEFINE(HAVE_CURSES_H) + AC_SEARCH_LIBS([tputs], [tinfo])],[ + AC_MSG_ERROR([bvi requires the curses library])])])],[ + AC_CHECK_HEADER([curses.h],[ + AC_SEARCH_LIBS([initscr], [curses], [ + AC_DEFINE(HAVE_CURSES_H)],[ + AC_MSG_ERROR([bvi requires the curses library])])],[ + AC_MSG_ERROR([bvi requires the curses library])])]) dnl Checks for typedefs, structures, and compiler characteristics. dnl AC_TYPE_SIZE_T dnl Checks for library functions. dnl AC_TYPE_SIGNAL -AC_CHECK_FUNCS(strdup strtol strerror memmove) +AC_CHECK_FUNCS(strdup strtol strtoll strerror memmove) +AC_FUNC_FSEEKO +AC_FUNC_MALLOC +AC_FUNC_REALLOC AC_PROG_INSTALL diff --git a/configure.scan b/configure.scan deleted file mode 100644 index b5c11ff..0000000 --- a/configure.scan +++ /dev/null @@ -1,27 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(bvi.c) - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MAKE_SET - -dnl Checks for libraries. -dnl Replace `main' with a function in -lcurses: -AC_CHECK_LIB(curses, main) -dnl Replace `main' with a function in -lncurses: -AC_CHECK_LIB(ncurses, main) - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h unistd.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_TYPE_SIZE_T - -dnl Checks for library functions. -AC_TYPE_SIGNAL -AC_CHECK_FUNCS(strdup strtol) - -AC_OUTPUT(Makefile) diff --git a/edit.c b/edit.c index 328a0cd..9db8372 100644 --- a/edit.c +++ b/edit.c @@ -9,8 +9,10 @@ * 2000-07-15 V 1.3.0 final * 2001-12-07 V 1.3.1 * 2003-07-04 V 1.3.2 + * 2006-04-05 V 1.3.3 alpha - binary representation + * 2014-09-30 V 1.4.0 * - * Copyright 1996-2003 by Gerhard Buergmann + * Copyright 1996-2014 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -29,7 +31,7 @@ #include "bvi.h" #include "set.h" -extern int precount; +extern long precount; char contrd[][4] = {"NUL", " ^A", " ^B", " ^C", " ^D", " ^E", " ^F", "BEL", " BS", "TAB", " NL", "HOM", "CLR", " CR", " ^N", " ^O", @@ -42,7 +44,8 @@ char contru[][4] = {"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", "CAN", " EM", "SUB", "ESC", " FS", " GS", " RS", " US", "DEL" }; char tmpbuf[10]; -char linbuf[256]; +char linbuf[16384]; +long hl_spat = 0; static char getcbuff[BUFFER]; static char *getcnext = NULL; @@ -113,7 +116,9 @@ edit(mode) setcur(); continue; } - if (ch == KEY_BACKSPACE || ch == BVICTRL('H')) { + if (ch == KEY_BACKSPACE + || ch == ASCII_DEL + || ch == BVICTRL('H')) { if (count > 0) { len--; count--; @@ -275,7 +280,7 @@ escape: } -/* Do the f, F, t ot T command +/* Do the f, F, t or T command * If flag == 1 save the character in rep_buf * else setpage() */ @@ -290,14 +295,30 @@ do_ft(ch, flag) PTR ptr; switch (ch) { + /* case 1: beep(); - return NULL; /* no previous command */ + return NULL; no previous command case -1: if (chp == 'f' || chp == 't') dir = BACKWARD; else dir = FORWARD; - break; /* same again */ + break; case 0: if (chp == 'f' || chp == 't') dir = FORWARD; else dir = BACKWARD; - break; /* same again */ + break; + */ + case -1: if (chp == 1) { + beep(); + return NULL; + } + if (chp == 'f' || chp == 't') dir = BACKWARD; + else dir = FORWARD; + break; + case 0: if (chp == 1) { + beep(); + return NULL; + } + if (chp == 'f' || chp == 't') dir = FORWARD; + else dir = BACKWARD; + break; default: chp = ch; if (chp == 'f' || chp == 't') dir = FORWARD; else dir = BACKWARD; @@ -324,7 +345,10 @@ do_ft(ch, flag) if (ptr < mem) break; } } while (--precount > 0); + /* if (*ptr == chi) { + */ + if (ptr >= mem && ptr <= maxpos) { if (loc == HEX) toggle(); if (chp == 't') ptr--; if (chp == 'T') ptr++; @@ -434,15 +458,20 @@ setcur() void statpos() { + char bin_val [9]; unsigned char Char1; + int i; off_t bytepos; - char string[30], str[6]; + char string[MAXCMD+1], str[6]; if (!P(P_MO)) return; bytepos = current - mem; if (bytepos >= filesize) { - mvaddstr(maxy, status, " "); - return; } + // mvaddstr(maxy, status, " "); + move(maxy, status); + for (i = status; i < maxx; i++) addch(' '); + return; + } Char1 = *(mem + bytepos); if (isprint(Char1)) { @@ -453,11 +482,22 @@ statpos() } else if (Char1 == 127) { if (P(P_US)) strcpy(str, contru[32]); else strcpy(str, contrd[32]); - } else strcpy(str, " "); - - sprintf(string, "%08lX \\%03o 0x%02X %3d %3s", - (long)(bytepos + P(P_OF)), Char1, Char1, Char1, str); + } else { + strcpy(str, " "); + } + for (i = 0; i < 8; ++i) { + if(Char1 & (1< maxpos) { strcpy(linbuf, "~ "); } else { - sprintf(linbuf, addr_form, (long)(mempos - mem + P(P_OF))); + + sprintf(linbuf, addr_form, (long long)(mempos - mem + P(P_OF))); *string = '\0'; } + mvaddstr(scpos, mv_pos, linbuf); + mv_pos = AnzAdd; + *linbuf = '\0'; + if (hl_spat) { + f_start = (mempos - Anzahl) < mem ? mem : (mempos - Anzahl); + f_end = mempos + (2 * Anzahl); + hl_start = fsearch_end(f_start, f_end, search_pat, &hl_end); + } + for (print_pos = 0; print_pos < Anzahl; print_pos++) { + if (hl_spat) { + while (hl_start != NULL) { + if (hl_start < mempos) { + if (hl_end < mempos) { + f_start = hl_start + 1; + hl_start = fsearch_end(f_start, f_end, search_pat, &hl_end); + } else { + attrset(A_STANDOUT); /* start out highlighted */ + break; + } + } else if (hl_start >= mempos) { + break; + } + } + if (hl_start != NULL) { + if ((hl_start - mempos) == print_pos) { + mvaddstr(scpos, mv_pos, linbuf); + mv_pos = AnzAdd + (3 * print_pos); + *linbuf = '\0'; + attrset(A_STANDOUT); + } + if ((hl_end - mempos) == print_pos) { + mvaddstr(scpos, mv_pos, linbuf); + *linbuf = '\0'; + mv_pos = AnzAdd + (3 * print_pos); + f_start = hl_end; + hl_start = fsearch_end(f_start, f_end, search_pat, &hl_end); + if (f_start != hl_start) { + attrset(A_NORMAL); + } + } + } + } if (mempos + print_pos >= maxpos) { sprintf(tmpbuf, " "); - Zeichen = ' '; + cur_ch = ' '; } else { - Zeichen = *(mempos + print_pos); - sprintf(tmpbuf, "%02X ", Zeichen); + cur_ch = *(mempos + print_pos); + sprintf(tmpbuf, "%02X ", cur_ch); } strcat(linbuf, tmpbuf); - if (isprint(Zeichen)) - *(string + print_pos) = Zeichen; + if (isprint(cur_ch)) + *(string + print_pos) = cur_ch; else *(string + print_pos) = '.'; } + mvaddstr(scpos, mv_pos, linbuf); + mv_pos = AnzAdd + (3 * print_pos); + attrset(A_NORMAL); *(string + Anzahl) = '\0'; - strcat(linbuf, string); - mvaddstr(scpos, 0, linbuf); + mvaddstr(scpos, mv_pos, string); } @@ -639,11 +729,22 @@ fileinfo(fname) char *fname; { off_t bytepos; - char fstatus[64]; + char fstatus[MAXCMD]; + char *string; if (fname) { + string = malloc((size_t)strlen(fname) + MAXCMD); + if (string == NULL) { + emsg("Out of memory"); + return; + } sprintf(string, "\"%s\" ", fname); } else { + string = malloc(MAXCMD); + if (string == NULL) { + emsg("Out of memory"); + return; + } strcpy(string, "No file "); } if (filemode != NEW && filemode != REGULAR) @@ -652,13 +753,16 @@ fileinfo(fname) if (edits) strcat(string, "[Modified] "); if (filesize) { bytepos = (pagepos + y * Anzahl + xpos()) - mem + 1L; - sprintf(fstatus, "byte %lu of %lu --%lu%%--", (long)bytepos, - (long)filesize, (long)(bytepos * 100L / filesize)); + sprintf(fstatus, "byte %llu of %llu --%llu%%--", + (unsigned long long)bytepos, + (unsigned long long)filesize, + (unsigned long long)(bytepos * 100L / filesize)); strcat(string, fstatus); } else { strcat(string, " 0 bytes"); } msg(string); + free(string); } @@ -856,7 +960,7 @@ do_ins_chg(start, arg, mode) repaint(); goto mfree; } - do_append(count, tempbuf); + do_append((off_t)count, tempbuf); memcpy(undo_buf, tempbuf, count); repaint(); break; diff --git a/html/bmore.html b/html/bmore.html deleted file mode 100644 index 86d9962..0000000 --- a/html/bmore.html +++ /dev/null @@ -1,159 +0,0 @@ - - -BVI: bmore - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-

-

-Download
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-Commands
-Options
-man - Page
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-bmore - - -BVI -
-
-
- -

-bmore is a filter that displays the contents of a binary -file on the terminal, one screenful at a time. It normally pauses after each -screenful, and prints --More-- at the bottom of the screen. -bmore provides a two-line over­ lap between screens for -continuity. If bmore is reading from a file rather than a pipe, -the percentage of characters displayed so far is also shown. -

-bmore scrolls up to display one more screen line in -response to a RETURN character; it displays another -screenful in response to a SPACE character. Other commands are listed below. -

-The screen is divided in three sections or panes: The byte -offset (extreme left), the hex pane (middle), and an ascii -pane (right) which shows as printable characters those -bytes in the hex pane. On an 80 column terminal there -will be sixteen hex values and their ASCII values on each -screen line (can be changed with the -n option). -

-Note that (as one would expect) the first -byte has the offset 0 (zero). -

-

- - - -
-000000
-00000C
-000018
-000024
-000030
-00003C
-000048
-000054
-000060
-*
-00016C
-000178
-000184
-000190
-00009C
- 7F 45 4C 46 01 01
- 00 00 00 00 01 00
- 00 00 00 00 00 00
- 00 00 00 00 34 00
- 0C 00 09 00 00 00
- 00 00 00 00 55 89
- 53 C7 45 A4 00 00
- 00 00 00 83 7D 08
- 8C 02 00 00 E9 6F
-
- 00 00 00 00 6A 03
- 45 08 50 E8 FC FF
- 0C 85 D2 75 17 6A
- E9 43 02 00 00 8D
- 0C 85 D2 75 0D C7
- 01 00 00 00 00 00
- 03 00 01 00 00 00
- 00 00 0C 07 00 00
- 00 00 00 00 28 00
- 00 00 00 00 00 00
- E5 83 EC 68 57 56
- 00 00 C7 45 A0 01
- 00 75 13 6A 00 E8
- 02 00 00 8D B4 26
-
- 68 90 00 00 00 8B
- FF FF 89 C2 83 C4
- 01 E8 60 02 00 00
- 74 26 00 8D BC 27
- 45 A0 00 00 00 00
- .ELF........
- ............
- ............
- ....4.....(.
- ............
- ....U....hWV
- S.E......E..
- ....}..u.j..
- .....o.....&
-
- ....j.h.....
- E.P.........
- ...u.j..`...
- .C....t&...'
- ...u..E.....
---More--(5%) -
-
-

-Equal lines will only displayed once, a star (*) is the placeholder -for one or more lines equal to the line above. -

-

- -Back to the top - -


-Last update: October 13th 2000 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/bmore_cmd.html b/html/bmore_cmd.html deleted file mode 100644 index 1b40a7d..0000000 --- a/html/bmore_cmd.html +++ /dev/null @@ -1,116 +0,0 @@ - - -BVI: Commands - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-

-

-Download
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-Commands
-Options
-man - Page
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-bmore -
Commands -
- -BVI -
-
-
- -

- - -Most commands optionally preceded by integer argument k. Defaults in brackets. -Star (*) indicates argument becomes new default. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SPACEDisplay next k lines of bytes current screen size
zDisplay next k lines of bytes current screen size*
RETURNDisplay next k lines of bytes 1*
d or CTRL D - Scroll k lines current scroll size, initially 11*
q or Q or InterruptExit from bmore
sSkip forward k lines of bytes 1
fSkip forward k screenfuls of bytes 1
b or CTRL B - Skip backwards k screenfuls of bytes 1
'Go to place where previous search started
=Display current byte number
/regular exprSearch for kth occurrence of ascii regular expr 1
\regular exprSearch for kth occurrence of binary regular expr 1
nSearch for kth occurrence of last r.e 1
!cmd or :!cmd - Execute cmd in a subshell
vStart up bvi at current position
wStart up bvi reading only a screenful of bytesscreen
CTRL LRedraw screen
:nGo to kth next file1
:pGo to kth previous file1
:fDisplay current file name and byte position
.Repeat previous command
-

-

- -Back to the top - -


-Last update: Fri Jun 30 22:05:32 CEST 2000 by Gerhard Bürgmann -
- diff --git a/html/bmore_opt.html b/html/bmore_opt.html deleted file mode 100644 index 435fda5..0000000 --- a/html/bmore_opt.html +++ /dev/null @@ -1,142 +0,0 @@ - - -BVI: Command Line Options - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-

-

-Download
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-Commands
-Options
-man - Page
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-bmore -
Command Line Options -
- -BVI -
-
-
- -

- - - - - - - - - - - - - - -
-aASCII mode
-cClear before displaying. Redrawing the screen -instead of scrolling. Can be useful, if you change the number of -displayed lines.
-dDisplay error messages rather than ringing the -terminal bell if an unrecognized command is used. -This is helpful for inexperienced users. -
-iIgnore case for searching.
-n linesDisplays the indicated number of lines in each screenful, -rather than the default (the number of lines in the terminal screen less two).
-w cols -Display number of cols (bytes of data) in each line.
+linenumberStart up at linenumber
+/ASCII-patternStart up at the line containing the regular expression -ASCII-pattern
+\HEX-patternStart up at the line containing the regular expression -HEX-pattern
-

-This is the default display:

-
- -
-
-00000000  7F 45 4C 46 01 01 01 00 00 00 00 00 00 00 00 00 .ELF............
-00000010  01 00 03 00 01 00 00 00 00 00 00 00 00 00 00 00 ................
-00000020  F4 60 00 00 00 00 00 00 34 00 00 00 00 00 28 00 .`......4.....(.
-00000030  0F 00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-00000040  55 89 E5 68 04 00 00 00 68 4C 00 00 00 68 00 00 U..h....hL...h..
-00000050  00 00 E8 FC FF FF FF 6A 01 E8 FC FF FF FF 89 F6 .......j........
-00000060  55 89 E5 83 EC 14 57 56 53 8B 7D 0C C7 45 FC 00 U.....WVS.}..E..
-00000070  00 00 00 C7 45 F8 00 00 00 00 C7 45 F4 00 00 00 ....E......E....
-00000080  00 BE 01 00 00 00 6A 2F 8B 07 50 E8 FC FF FF FF ......j/..P.....
-00000090  83 C4 08 85 C0 74 09 40 EB 08 8D B6 00 00 00 00 .....t.@........
-000000A0  8B 07 50 68 04 00 00 00 E8 FC FF FF FF 83 C4 08 ..Ph............
-000000B0  68 85 00 00 00 68 04 00 00 00 E8 FC FF FF FF 83 h....h..........
-000000C0  C4 08 39 75 08 0F 8E 35 01 00 00 8B 04 B7 89 45 ..9u...5.......E
-000000D0  EC 8A 10 80 FA 2B 0F 84 94 00 00 00 80 FA 2D 0F .....+........-.
-000000E0  85 EB 00 00 00 BB 01 00 00 00 80 78 01 00 0F 84 ...........x....
-000000F0  D1 00 00 00 8B 4D EC 8A 04 0B 3C 64 74 32 7F 10 .....M....^dt2..
---More--(5%) -
-

-With the -a option the display looks like this: -

-
- -
-
-00000000  .ELF....................@...4... .......4. ...(.........4...4...
-00000040  4...............................................................
-00000080  .....1...1...............1..............,................4......
-000000C0  .................................... ... .........../lib/ld-linu
-00000100  x.so.2..............GNU.................%...8.......4... .......
-00000140  ........,.......6.......................3...!...........%...1...
-00000180  ....7..............."...........2...&...+...)...................
-000001C0  ................................................................
-00000200  ................................................................
-00000240  ............................#...........(...................'...
-00000280  *...$.......-.../.......0.......5...................U...........
-000002C0  .... .......................g.......(...........................
-00000300  ............t...-...........5...............o...............$...
-00000340  ........................$...............4...............D...H...
-00000380  ....y...T...............d...............t...........1...d.......
-000003C0  ................................-...................j...........
---More--(18%) -
-
-

 

-

- -Back to the top - -


-Last update: January 4th 2004 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/bvi.css b/html/bvi.css deleted file mode 100644 index cd92b89..0000000 --- a/html/bvi.css +++ /dev/null @@ -1,11 +0,0 @@ -TD {font-family: Helvetica, Arial, sans-serif;} -TH {font-family: Helvetica, Arial, sans-serif;} -STRONG {color:red;} -.thl {font-family: Helvetica, Arial Narrow, sans-serif; font-size: 12pt; font-weight: bold; text-decoration:none;} -.ths {font-family: Helvetica, Arial Narrow, sans-serif; font-size: 10pt; text-decoration:none;} -.btop {text-decoration:none; color:black;} -.examp {font-family: Courier, monospace;} -.inv {font-family: Courier, monospace; color: rgb(255,255,255); background-color: rgb(0,0,0);} -.head {font-family: Helvetica, Arial, sans-serif; font-size: 22pt; font-weight: bold; text-decoration:none;} -.sub {font-family: Helvetica, Arial, sans-serif; font-size: 16pt; font-weight: bold;} -.new {font-family: Times, serif; font-weight: bold; font-size: 28pt; color: red;} diff --git a/html/colon.html b/html/colon.html deleted file mode 100644 index b3b3ddf..0000000 --- a/html/colon.html +++ /dev/null @@ -1,209 +0,0 @@ - -BVI: Colon (ex) Commands - - - - - - -
-Command Overview -
Colon (ex) Commands -
- -BVI -
-
-
-

- -

-[ Cursor Movements -| Edit Cmds -| Yank and Put Cmds -| Set Options -| Colon (ex) Cmds -] -
-

-

-When forming a colon command, the first character, the colon, can be -followed by zero, one or two addresses. These addresses are byte -addresses, in contrast to vi, which uses line addresses.
-The byte addresses can be given in decimal notation or, with a -leading zero, in hexadecimal notation. If you have specified an -address offset (e.g. :set offset=256), this offset has to be -added to the byte addresses.
-Without an address, the whole file is affected or the current cursor -position is used (depending of the command). -

-

- - - - - - - - - - - - -
AddressCorresponding bytes
.The current byte
7The seventh byte of file (if offset=0)
.-nn bytes before the current byte
.+nn bytes after the current byte
'xThe byte marked with x
^The first byte in file
$The last byte
''The previous current byte
/pat/The first byte that matches pat
#12 A4 6F#The first byte that matches hex pattern
-
-
- - - - - - - - - - - - - - - - - - -
CommandBVIVI
File
Commands
- - - -
:w
- :w %.new
- :w filename
- :w>> existingfile
- :w! file
- :e newfile
- :e!
- :f
- :f newname
-
Write to the current file
- Write to current.new
- Write to filename
- Append to existing file
- Overwrite existing file
- Terminate session and edit newfile
- Reload the current file
- Prints current filename and some additional info
- Changes the current filename to newname -
-
Substitute
Commands
- - - -
:s/pattern/replace/
- :s/pattern/replace/g
- :s/pattern/replace/gc
Search for pattern and replace it once
- Search for pattern and replace it global
- Search for pattern and replace it global conditional (ask) -
-
- - - -
:s\80 af\ff ff\Binary search and replace -
-
Not available
Edit
Commands
- - - -
:a m
- :c m  
- :i m
append
- change
- insert - bytes, where m is a(scii), b(inary), d(ecimal), h(exadecimal) - or o(ctal). You can type in several (screen) lines of bytes, a line - with only a '.' in it terminates the command. -
-
-Usually not available in vi but in ex (without the m - modifier). -
Logical
Operations
- - - -
:and n
- :or n
- :xor n
- :neg
- :not
- :sl
i
- :sr i
- :rr i
- :rl i
and n
- or n
- exclusive or n
- negate
- invert
- shift left i bits
- shift right i bits
- rotate left i bits
- rotate right i bits -
-
- Not available. -
Miscellaneous - - -
- :g/pat/p
- :n
- :q
- :rew
- :sh
- :so
file
- :ve
- :x
- :!
command
-
- Global search for pattern pat
- Next file to edit
- Exit session without saving the file
- Rewind to first file
- spawn a new shell
- Read and execute a file with colon commands
- Version of the editor
- Exit session, save the file if changed
- execute a system command
-
-
- - -
Currently not available
-
- - -
-:map
-:unm(ap)
-:ab(breviate)
-:una(bbreviate)
-
-
-

-

-[ Cursor Movements -| Edit Cmds -| Yank and Put Cmds -| Set Options -| Colon (ex) Cmds -] -
-

- -Back to the top - -


-Last update: October 30th 1999 by Gerhard Bürgmann, -Purkersdorf/Austria - - - diff --git a/html/cursor.html b/html/cursor.html deleted file mode 100644 index 7bb90a6..0000000 --- a/html/cursor.html +++ /dev/null @@ -1,117 +0,0 @@ - -BVI: Cursor Movements - - - - - - -
-Command Overview -
Cursor Movements -
- -BVI -
-
-
-

-

-[ Cursor Movements -| Edit Cmds -| Yank and Put Cmds -| Set Options -| Colon (ex) Cmds -] -
-

- - - - - - - - - - -
CommandBVIVI
Cursor
movements
- - - - - - - - - - -
h, ARROW_LEFTmove cursor one character to the left
j, +, ^N, ^J, ARROW_DOWN, - RETURN -move cursor down one line
k, -, ARROW_UPmove cursor up one line
l, ARROW_RIGHT, - SPACE -move cursor one character to the right
Hmove cursor to home position, upper left corner of screen
Mmove cursor to the begin of the middle line of the screen
Lmove cursor to the begin of the last line of the screen
-
Move to
begin
and end of
(screen) line
- - - - -
^move cursor to the first byte of Hex section
$move cursor to the last byte of Ascii section
TABtoggle cursor between the same byte in Hex and Ascii section
-
- - - - - -
  ^  move cursor to the first nonblank character of line
$move cursor to end of line
0move cursor to the real begin of line
-
Move
by
words
- - - - - - - - - - - - - -
  w  forward to next string delimited with a nonprinting char
bback to previous string delimited with a nonprinting char
eend of current word
Wforward to next string delimited with a \0 or \n
Bback to previous string delimited with a nonprinting char
Eend of a blank-delimited word
-
- - - - - - - - - - - - - -
  w  move cursor forward to begin of next word
emove cursor to end of current word
bmove cursor back to begin of current or previous word
Wmove cursor forward to begin of next word, ignoring punctuation
Bmove cursor back to begin of last word, ignoring punctuation
-
-

-

-[ Cursor Movements -| Edit Cmds -| Yank and Put Cmds -| Set Options -| Colon (ex) Cmds -] -
-

- -Back to the top - -


-Last update: October 30th 1999 by Gerhard Bürgmann, -Purkersdorf/Austria - - - diff --git a/html/download.html b/html/download.html deleted file mode 100644 index 6cb6795..0000000 --- a/html/download.html +++ /dev/null @@ -1,98 +0,0 @@ - - -BVI: Download Page - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-

-

-Download
-New in 1.3.2
-New in 1.3.1
-New in 1.3.0
-New in 1.2.0
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-Download Page - - -BVI -
-
-
- -

-NOTE: All packages are compressed with the GNU gzip program. You -can download it from ftp://ftp.gnu.org/gnu/gzip/. -

-Current stable release of bvi is 1.3.2 -(Check out what's new): -

-

Sources

- -

Packages

-
- diff --git a/html/edit.html b/html/edit.html deleted file mode 100644 index be34378..0000000 --- a/html/edit.html +++ /dev/null @@ -1,195 +0,0 @@ - -BVI: Edit Commands - - - - - - -
-Command Overview -
Edit Movements -
- -BVI -
-
-
-

- -

-[ Cursor Movements -| Edit Cmds -| Yank and Put Cmds -| Set Options -| Colon (ex) Cmds -] -
-

-If you would like to use the insert and delete commands, you have to -enable them with the :set memmove option. These commands are -locked per default, because you must not move bytes to a different -address for many types of binary files (e.g. executables, database files, -etc.). If you usually edit files where bytes can be moved, you can add -the :set memmove directive to your .bvirc file. -

- - - - - - - - - - - - - - - - - - - - - -
CommandBVIVI
Replace
bytes
- - - - - - - - -
  r  replace a single byte, no ESC needed
Rreplace multiple bytes until you type ESC
~toggle between uppercase and lowercase of a byte
- -
Append
bytes
- - - -
  A  append bytes at end of file
Ddelete bytes to end of file
-
- - - -
  A  append characters at end of line
Ddelete characters to end of line
-
Insert
bytes
- - - - - -
  i  insert byte in front of cursor position
ainsert byte after cursor position
-
- - -
  I   insert byte at begin of file
-
- - -
  I  insert characters at begin of line
-
- - -
not available
-
- - - -
oinsert new line below current line
Oinsert new line above current line
-
Delete
bytes
- - - - - - - - - - - - - -
  x  delete byte at of cursor position
Xdelete byte in front of cursor position
dSPACEdelete byte at cursor position
dfCdelete from current position to next character C
d/xyzdelete from current position to first occurance of matching pattern - xyz -
d?xyzdelete from current position to first occurance of matching pattern - xyz in reverse direction -
d'adelete from current position to mark a
dnGdelete from current position to byte with (decimal) address n
-
- - -
not available, because there are no lines, sentences, - paragraphs or sections in a binary file
-
- - - - - -
dd  delete line
d)delete from cursor position through first - following end of sentence
d}delete from cursor position through first - following end of paragraph
d]delete from cursor position through first - following end of section
-
- - - - - -
d\6a 56 ff  delete from cursor position to first occurance of hex pattern - 6a 56 ff
d#6a 56 ff  delete from cursor position to first occurance of hex pattern - 6a 56 ff in reverse direction
-
- - -
not available
-
- - - -
Ddelete from current position to EOF
  d$  
-
- - - -
Ddelete from current position to end of line
  d$  
-
Undo
edits
- - - -
  u  Undo the most recent change
-
- - -
not available
-
- - -
  U  Undo all of the changes made to the current line
-
-

-Note that most of the commands can be used with a decimal repeat count in front -of the command! -

-

-[ Cursor Movements -| Edit Cmds -| Yank and Put Cmds -| Set Options -| Colon (ex) Cmds -] -
-

- -Back to the top - -


-Last update: September 30th 1999 by Gerhard Bürgmann, -Purkersdorf/Austria - - - diff --git a/html/german.html b/html/german.html deleted file mode 100644 index 68a69dc..0000000 --- a/html/german.html +++ /dev/null @@ -1,215 +0,0 @@ - - -BVI: Deutsche Beschreibung - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-

-

-Download
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-Deutsche Beschreibung - - -BVI -
-
-
- -

-Der BVI (Binary-VI) ist ein Editor für Binärfiles. Seine Kommandos sind -weitgehend an den Standard UNIX Editor VI(1) angelehnt. Der Bildschirm -ist in einen hexadezimalen und einen ASCII-Bereich geteilt. Einige zusätzliche -Kommandos wurden zugefügt, einige Kommandos adaptiert und einige Kommandos, -die bei Binärfiles keinen Sinn machen, wurden weggelassen. Für eine -Gesamtübersicht siehe Manual Page BVI(1). - -

Zusätzliche Kommandos

- -Eine wichtige Funktion für binäre Files ist das Suchen nach Hexcodes. -Dafür gibt es analog zum '/' und '?' - Kommando zusätzlich das '\' und -das '#' - Kommando.
- -Beispiel:
-\1e f4 56 - Sucht die angegebene Bytefolge in vorwärts-Richtung
-#34 5a a4 - Sucht Bytefolge rückwärts. -

-Die normalen Textsuchkommandos sind auch vorhanden, wobei zusätzlich ein -Return, Linefeed oder NULL im Suchstring aufscheinen darf (\n \r oder \0). -

-Die Kommandos w, W, b, B (nächstes oder vorhergehendes Wort) wurden insoweit -abgeändert, daß sie eher dem STRINGS(1) - Kommando entsprechen, also in -einem Binärfile Textstrings suchen. Dabei sucht W und B nach Strings, die -mit einem \0 oder \n enden, w und b sucht nach Strings, die mit einem -beliebigen, nicht druckbaren Zeichen enden. Die Stringlänge beträgt 4 Zeichen, -wobei mit ":set wordlength=x" die Stringlänge auf x Zeichen eingestellt werden -kann. -

-Der Bildschirm ist in einen HEX und einen ASCII-Bereich aufgeteilt, wobei -jederzeit mit der TAB - Taste von einem Bereich in den anderen gewechselt -werden kann (auch im Eingabemodus). Es kann also bei der Eingabe zwischen -normalen ASCII-Zeichen und Hex-Eingabe hin- und hergesprungen werden. -

- -Am unteren Bildrand befindet sich eine Statusanzeige, welche die Adresse des -Bytes, auf welchem der Cursor momentan steht, anzeigt. Außerdem wird das Byte -in oktaler, hexadezimaler, dezimaler und ASCII-Repräsentation anzeigt. Die -ASCII-Anzeige kann von DOS-Style (27 entspricht ^Z) auf UNIX-Style entsprechend -Manual Page ASCII(7) umgeschaltet werden (27 entspricht SUB). -Kommando ist ":set unixstyle". Die Statusanzeige kann mit ":set noshowmode" -ausgeschaltet werden. - -

Regular Expressions

- -Für die Suchkommandos sowohl für Text als auch Hex sind Regular Expressions -zulässig, wobei es die Zeichen ^ und $ für Zeilenanfang und Zeilenende nicht -gibt. Die Kombination .* ist unzulässig, da sie sich auf jeden Fall auf das -Ende des Files beziehen würde. - -

Zeilen

- -Da es in binären Files keine Zeilen gibt (die Darstellung der einzelnen -Zeilen am Bildschirm hat keinen Bezug zum File) gibt es keinerlei -zeilenorientierte Kommandos (dd, o, O, yy). Ein Kommando -wie :s/XXX/UUU/g ändert somit das gesamte File. Zu beachten ist auch, daß -:s/XX/UUUU/ nicht die beiden X durch vier U ersetzt, sondern die beiden den -X folgenden Zeichen auch durch U überschrieben werden. - -

Editierkommandos

- -Da binäre Files häufig ausführbare Programme oder Datenbankfiles sind, -bei denen Bytes nicht einfach an eine andere Adresse verschoben werden -dürfen, sind Einfüge- und Löschkommandos (z.B. a, i, x) -deaktiviert. Mit dem Kommando :set memmove können sie -aktiviert werden. -

-Die Kommandos :a (append), :c (change) und :i (insert) -können benutzt werden, um ein oder mehrere Bytes in ASCII, binärer, -dezimaler, hexadezimaler oder oktaler Schreibweise einzugeben -(a, b, d, h oder o). Es -können mehrere (Bildschirm) Zeilen eingegeben werden. Das Kommando -wird beendet, sobald eine Zeile, die nur aus einem Punkt besteht, -eingegeben wird. -

-Beispiel: -

-
-:i b
-1 1001 010101 1111
-11111 1010 1 0 1
-.
-
-
-Zu beachten ist, daß kein Einzelwert den maximalen Byte-Wert (255) -überschreiten darf, da sonst die Eingabe abgebrochen wird. Das -Drücken der RETURN - Taste führt zu keinem "RETURN" - Zeichen in -der Datei, im ASCII - Modus können allerdings die Sonderzeichen -\n, \r, \t und \0 benutzt werden. - -

Yank und Put

- -Auch hier gilt eine etwas geänderte Funktion. Das y (yank) - -Kommando ist allerdings ab Version 1.2.0 dem Vi angenähert:
- - - - - -
5ySPACEkopiert 5 Zeichen in den Yank-Buffer
oüberschreibt an Cursor - Position die folgenden Zeichen -mit dem Inhalt des Yank- oder Delete - Puffers
pfügt an der Cursor - Position den Inhalt des Yank- -oder Delete - Puffers ein.
Pfügt den Inhalt des Yank- oder Delete - Puffers am Dateiendes -an.
-

-Das Kommando ":r filename" fügt das angegebene File nicht an der Cursor- -Position sondern am Dateiende an. - -

Adressen

- -Das Kommando nG führt nicht zur n. Zeile, sondern zum n. Byte. -Die Eingabe der Nummer wird dezimal interpretiert. Um eine Adresse -hexdezimal angeben zu können, kann g eingegeben werden. Es erscheint ein -Prompt in der Statuszeile, bei dem eine hexadezimale Eingabe erfolgen kann. -Das erste Byte hat Adresse 0.
-Die Anzeige der Adressen kann mit einem Offset versehen werden -(:set offset=256), beispielsweise um für .COM Files in DOS einen Beginn -bei Adresse 100Hex anzuzeigen. Wird ein offset=1 angegeben, so ist -hat das erste Byte Adresse 1. Das G - Kommando berücksichtigt den Offset. -Im Gegensatz dazu zeigt das :f - Kommando immer die Ordnungszahl des -Bytes an, beginnend mit 1 ohne Berücksichtigung des Offsets. - -

Bitweise Kommandos

- -Um Manipulationen auf Bit-Ebene durchführen zu können, stehen -folgende Kommandos zur Verfügung: -
- - - - - - - - - -
:rl nRotiert Bits links - n ist eine Zahl zwischen 1 und 7
:rr nRotiert Bits rechts
:sl nSchiebt Bits links
:sr nSchiebt Bits rechts
:and iUnd Verknüpfung - i ist eine Zahl zwischen 0 und 255
:or iOder Verknüpfung
:xor iExklusiv-oder Verknüpfung
:not Negiert Bytewert
:neg Zweier-Komplement
-Wird kein Bereich angegeben, so bezieht sich die Operation auf die gesamte -Datei. Es können zwei Adressen in den üblichen Schreibweisen -angegeben werden. Normalerweise wird dezimale Eingabe erwartet, bei -führender 0 werden die Adressen Hexadezimal interpretiert. -
Der Wert i für die logische Verknüpfung kann -dezimal, hexadezimal, oder mit führendem B in binärer -Schreibweise angegeben werden. Auch bei Eingabe von genau acht 0 und 1 -Werten wird der Byte - Wert binär interpretiert.
-Beispiel:
-
-:100,500and 01A RETURN
-:03FA,01000or 00001000 RETURN
-:.rr 3 RETURN
-:'a,$sl 1 RETURN
-
-

- -Back to the top - -


-Last update: June 1st 2000 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/gif/.xvpics/bg2.gif b/html/gif/.xvpics/bg2.gif deleted file mode 100644 index 94f1144..0000000 --- a/html/gif/.xvpics/bg2.gif +++ /dev/null @@ -1,5 +0,0 @@ -P7 332 -#IMGINFO:1600x1 Indexed (91 bytes) -#END_OF_COMMENTS -80 1 255 -I$IIÛ¶¶¶IH%IÛ¶¶Ú%HI%Û¶Ú¶%HII·Ú¶¶%HIIÛ¶¶¶I$IIÛ¶¶Û$I$IÛ¶Ú·$IH%Û¶Ú·$IHI·Ú¶·H%HIÛ¶¶· \ No newline at end of file diff --git a/html/gif/bg2.gif b/html/gif/bg2.gif deleted file mode 100644 index 4a4166f725513c49bdfe1dd285a0c8157caebdc3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 91 zcmZ?wbhEHbbYNp-SjfQe9|+E$X8<#FfD{8roPo)tr+?+?xBQFem~b_0zPIN$f7>IE qY0o;By*jn+9ry81KG(nXKL2&@`#*jjuJ$8~K6dzMO<&2xU=0BH<0|g} diff --git a/html/gif/bvi_m.gif b/html/gif/bvi_m.gif deleted file mode 100644 index bb92a67b09a164663d33ed4b57888371258372b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6928 zcmcgs^;?tw_kLi+9H6615EzU`U?WBegTd(TP-?VFr$|bNl#Eh3217SgU}!rI1F|Jr+ZF=NG21=WE7bUoUR2kB9TlakclWV z5jbT5770W$fj}mp$OPb&6xfR*l2HUQ3PnZ%AV+YN3=qixfefI?0Js%o4T6EBL6#sb zum&y$u|a4M3mgVc1)b(#5Qsz+kqDgX1J{BXfj}gnhy>tNF318bq6kD3iiiS0^&ly* zmk1Du0E!5J@<2a8n&32O2dEz;0V)JpgJ2+OkR{j(@&Ffu*dR2B1)Mr}S_X44Py_;S zY9y!+TnlC>6afW*zJhW=7GRM8pa=lyBj_|}0LTk$2aN{Rf>wflfHc8r&<>CjC>T@- zvIfCG(%>XW3*-SV2C+eC;PgbN-C!Ba!2rOEfkuM*z_nn80!|;tsjvU;eOml?!c&|7 zUFEd*pV6nT|MTv2^q(E4NBF1k6zL!7)0_O`aSHqo8hj4ml|b`AP5)N?dx`(=9~p2r zaQa&SpcH@xdLG|?Z!{UoF6A=aUOk=$M;KM$J8CAgcu@XtraNk<@`Q9V&l`5u%@j&l zx46u7)*IiUp?gw-OlxTpyzQZfH~pDv zF(4l>qSdy8xaLU-825T+@Ywwnf=%p|tvR;AdqQTPW@bX9&*nQ+i;N@=;nGS3Orkau z#m(pi{9}VkTom2HqN-_VlISnGtuu5!61nE{+{yF4MBMcThq5NaMw`(Zm~-D%XR)!? z+RiU)z2QO+ms|Eey^k_rL64Y^( zh6*|`NV}kYam*Wz;o5dnx9h5`W6xV<#&(8DaEn|pLe_Kl88Xyf+r+(EfpPSv-{yRw z5ki;a^{k)41w&{YmkD>A$0ct?f3UPxbYPv1O_Kj*Cvu?|>+I#%vYM&nKxiKGP3YM1 z*0mc^MG{4dFk?hj27hO1K8Bj9avRK{BftPnvjpycSQQTJ(ni+Tx5g;k;iTBMw_}+d z%U*q`VQmwdl_~hex6Zd>K}2{Lixv0@P1AO|`G_4a+Ts{pUM%BAw)_)zcwl8DiM&%tn*IE<-RRcv9f2#N~*Q5gzs~$ zwPN;4#Q?lRakjSLzH>wG8-`5DP9DUchQ`X~d|N%n{rPP~Ub``}hm*a+bFe&U&@CSc zdm>-EQWx+8$_7!tUY6ldsL)xib-3Hc{QcAAi6KFSSs^LLmT{#d0DDcSa``vEL*_FL z3!%YxGP|s!o&NjJd6@oNoq``ScB~Mb3PTpwT)Rpd5`hq0UVD5?4@I}Nh^$N;8M<*V zDJ_3)QZQ;kio?>8+Xgp>G&ZSyX>tKCLwCpL>e`1l#Yx{6V@u}(<6{xswCDglMdg(` zVj8*1v&Di-`Gw<17>ARdeMO{?(7;c zZj7@;Hl(#`zWU;JmnMt6Y+pDunx_wt&$76Lv(SoshL!Jfq*$@vwmJ^de^^-bj5fWz zG3T6T!p;~$wS*f$UnRICbF8h049x8kgu{>wk)a0F^m2`FcY+QVV zs$v<`hYh_~UxeW<(AS3!P24rO6wchJb?ECIeJF4)f-&rc zkD?zOa@{n?t8?D@{`W~1Z&64!ZeVdcvE^wP`lW(?scM7+N;z{?Tuv5J!rh1)IXub2dBq+{zQ?=)v87 zKh4cc%Qa@{GEtZ0;Lr2FYIvRViR|H4-VWYE^U5O57#N8>lhk6)mPYXc>btuYQ)5Eh zWCNu~etWfyT$u#KEOeT* zAaxCD^-)sjR3UZI>ElHy8wnT;iDFBCpcYc1AwXIFc+%W}d~Hr71e~=@QRE|UPH9=| z<=_}!7X5Uzlh1ON)#;2#m>9feTC+Vzps=mT%-uKhoq6Faa8P|QMUges5m)^zg4>sG zNklMiUB4}wWxU`yOxk-^3camozLcva_vU4A-a>zai#uni`=rz_`7-hoB?)4VxTRir zK14fFx3$!CQgmU`m#)UHYtMx9z6H!q5ArYx?&3W(!moX$pYGA1AFjW|GM4r$pUAJb z3($V9urZ|E6C=IC`@&f#WtLiloH=A08OQrd3`W(=^4$Gs5jpx)Ey+D(uhD;ibCHZ zhgl-`8n7yw^p_uz(;PK!W+3oO+A zcP34DQ}>)d9N7c}ocI-xxmzfZ_N4*RQb5eBIc!tcYxHBqw*1NGd*RcM%lJg<)9aZp ztY)6EHa2-qEyF_2sjy|;jI917OSFtV7ltH=L#g7%Mh9~Ag=Qh!x@}&pP`oLr7q|E$ z4tFG-lX!!z+h^JyX#~;oT!LL_l6$ljTh*Y?%OjLG0()!abSc@{fi}3YBtaz<$v$yo zM%;LHQ|`Pk|07{!C5L=mSiA!lf)^h@Y8Bi+uOhwUL10UG-GMxtt^(gwKp(^NASMNy zJZs#D&amX{DJjv?oA7OAHa%xdQUc*ss&|6W&xKnKqN)CPJFh}xyL|k3G2CxkBTtkd zcI>308}Vu-W}!QoGTM#a@T8IVNSX^(d>k6#(qtJXp}it+*uKSKugWLYpsCA&v6M*B zEz;91kCRKdSSm!blT!Joj#2_`GSpTqvGi7VtGOTJ;Z6FP>&KUJ6TR>9+(Kx} z>h~+A^{W+^LKA(nkVoj!CbM4!cx^9M=hEzts@Z>3C12V{JBbF5H6?C6N!c#p-KtYB z=(1Fr5b#vYr}LA1BMilg8N62z^$}%t{cuT*{&wet{&iv1SY+Bvf5OJNK)Y(%m0JZ# z(4=L2BsGkZM$=>b77zbhSRmV+oeQ-K8TWsa7zZ&FAlZuzM0+e4gI6tMNVjp&Z+M$nHd98-$1u+1zbJd>SLBXb>xF6Ul-e)l#BKKY1-9Sovpi z$x%Xq63velb3ggCU4bQKI>=whLJP<8Q&jX8U&%GW+Iou30kRNY3pLedE|bIBx_pI$qh(Lq7iJ~d$Af`oiK(Jo$V{94?< z7WQBwoF&jsuO&;!OQ;OTSn;-i7iyH)($}1Ma(B>)*9%^lMp|6v+PfVF+sZ5F1Ba5wnLL&(#ZOrH4n>_2Q2K5)6;U~L_zd6#QMyH4%8f^%kjnoTtLOBmzvhpuLWT@WMf=-LlGlMEVLM34v!tz5D3*)mg4J-La}8`wHbAkW z;9%r$cMFEMfW$w}<2lBDFxJ=6wwkUDV;BVBLz<+xOFQ&Syxg}pqMrS3u-Wf$KhD!5 zb@1W^7JSBe7r25X6x2TV^>_HR>)Ns^;*QGnrS>K%z8MJ`c0uxn4HAL*CX4MJQ5dd- zzMEZ-jPx#Xp-0C_h4=u;BKI`jLF}_Smu%6AiDjX3*?OHna@i7rUKKRz=yEEz^D z<9+es(Za7;xXmE!QxUr~M61Zf|JLJ{^yUJWry5;PT{Y6kP5dixn-}s-bB}szqB;mZ z75=-^4Qdz~X#C*;YGq+Y;BW6ejjDW1LrLLHN_Qf|W_pSOD=9Ps7y0ZPec%WW} z&$P=nz+rzy_v_INFXvTAK}>0|kJ~r;ortHQuVIJH=G8yvga3AHC=)|SPp{OKM2#=> zruBR%@dp1w`QuzTX-0zdBj#6ym->_=1x!}#`@`%Rgs~6)6TXSAL>EhQbEZ7^_fc^% z9dTE!XOkp6UJLaN7vcOq`lJHg=o7QBKUQ3lT&wrsaO^H|PXAAf9>gKFT-dr$pF!krbY?nPU0Xg0i!=OZ(`CL+M8tnl zLi!I@2EDaH#d+6F0_#&Hm_#DiW8B+86+Hgs6l*3wIyq>*o}eoaek8Zsmqb6v%P zh_{F-hDps%-?$VwH9A64W^&!2yzYzV2z(poz*f#ReuOYhTqCxj<$P(@>~#+Mdz*@a z?0aY%@}G$(`#cU>v#Hj}sB^59Vm-83TG<_WAL;k8$n2ix#b!}U3m~kL1`3niJh8ti z8feDhcsr6^O)gXz-b5=Cu|=7g?m2^988y%d?-C^3^5CAw{}5Q~;CD}0+>%H!Y3A7e zS|X;W^`-|eYhfk8@1~N@jvhbS7RSed39tCVq4s%n@BEq_}oJwHQbICf! zX}RUtzwvc@aT!Bu-DW0dqxK13zm_?0e#;d(R)7yJzJIqH!qrk@eSjRF`n*+L5qJ`< z>Q>WHz0f3Tz~3sSyFu9lw7o~oHf$wnH|dC&iS_X=lg$FLOC5NoLP5r_`0lSeyzDKj zcKW*G=V?0(zc3|1{^J3xDYC-kSHI+KN} zOKVUUl>6d;qkUar$WI&wY3%5cx4iOO><3r~2PKV)=n956 zCYdF9IY@hJTTpB+eiO6w7c{pEK4O{Y@Sl%cu)IMPj*wgakE)~SCd$NIkNsIAQxJb~ zR!&d}C;a&MFrJaJaamydf`RR&j=9C*%BlV{^SoMY+d%av*ga`G+TGnT@4Vtv`ZkSj zs}D13FTYrm`4qG?=?HIi&+uT-?f)KF=eFU2eUDy;c@NRhl$k zc58g{u+lmL*lZokT^L}ZewD0hwVhchbNQoJ54*civPLq)W(e*acel0R#C!)1DDf$A^t>b%w-$HYv+~NM}uTPvZEi&{8 ze6`m;iqJz|If!&*b3RCR-cXDX3hLDHRzFX%c=COM1|JXydmKIeazyiUb&l(U?-QaC zq^b9R2NLToJm`GpTE$O{_7m8c+s{4hUH1HjXoxW0KeN>uwfS&;y$fFR_=VF`ZAiqU zralJT!)ahwVo!QJ?e75-=0go%@W8muh-q^jmZYG<`7K%D34k;W}yzMmjnr$sp^%9UMR{^92QDD|8j5}?`u3Ezmg0C(5&iLrp1mj zDbU#gyLJ!yJ&xJiZ3h;~A#-_H^ldWdbsH&6fhsI)B8#li{)Al`i_*-C;jkHoV?3T( znE&x2(fw2%LtE<`=KNe}cw=+lQpeQ9yid}8uFV*CfC`_0(66!9;z@tI$6epLoVE81 z)hxCK7S$A1 P4f)WwHt&~$5TO2l2#4Qx diff --git a/html/gif/bvi_s.gif b/html/gif/bvi_s.gif deleted file mode 100644 index 8a4cec022fc276b3239f1db218a550e97d34bc74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2725 zcmcgr`#;nBAAh?QqrRiooH`a8C0kLSbWu7Qu@)(8Q4!HcZWXz0bt-9@`)$f6L~@zh zP9sbD_9axNKBto+NlK*BRX4{uIX>t8@ke~$KkV^%JzlTZ^Y;48ZKLa|l|iv!9e51@ zK|Y)yFoHk{0wD-MRya=J7=fb%ju1E?n;1@D7=fV#h7cGaXHlF$F#<&i6d_PRt|B;r zU<85^2tptLA`t*507d|m00;qK0kI)8#DdFk8jw8X!*CqMaRkQ!Nee3s!!Z=c5F7)f z3fM$397S;y!BIepg0l#QBPfm_I0B$XxQYV|2Ph5@96(m68iGO5P$iTFdyp7nLuiNv zmjP*rtl>j348br!`h&EvLQxDwFcgq>p$gbUPz*sZ1VHyt6r9BXiU9-z&>qYK%7oi6 z4(K0>fDWN*2nIz%m2ed5fW#0RLPIP-CP%hm4IhG{fD97)gS4*oHNH z0A36R3H?D@SRsJ?ILKV5?oBqQPDsW)bro`UDrhqGsqDzrsW`|ZOgSWxrbLrBnbJW5 zPeH@a0bU7)2R%(uO?`>~_a6@A2IPMM=uZMI{hxWNvX*51SvEU0s&j2AR2ILOS6hB7 z-4qFbs;OnQ0--{e5@L0O0@&Je{ejxbyT>hbYQrU(bh_bkjjFD${B>G^t=`z|y}$|R zaFW-_R=?|1`#G5NN+|2wHh(3j2{=t ztFvMpuaA+xb9YINO+05@uw;hIA=ONe^!wlbESx#ApE4srTo@#t=P}3OK(q3!D zYWB!`jh?u4zS)0hc$L3dmFr|o(6heA`)*I3&#mU9JA5_SJL9*)0>+Z4Pu|LBXw%@e zucoThvVM;2*Py;5Ay#oz=J(7Slq23E3+bVBtU+7+-EkFdhVtiCUi+}c73~MKZ@ZeG zpeDYs*yvb`GT7ghpY?QCtC{I3JAFD7fg`vWOf z4>M2qpDJQR?fzcHwX+Fh<^;GjKFv~^9msRCEUfSL7sp0p`+N(^jyqQx(MveeM~fIo z7a1&>-)c1wpr#}9MHjY>`8pY4H(G3*86SMY9_ z@A+C+?i+d~-mPG!@;!SWJISmeIST1dc)Iz5`r>`bNK)D*dg{+VBr^|cVG8>(^za#h z@W5xwz1eu4w4D%l^1a=p3wpwo^3@E#>N&HW@~o~^TFtOoIsBD#Olza_t#eq$?v!AY zKbHwyBIxux-XeYGSxQY#h$;Xd433N_H2R(pomVp&M$?(6@Nqa{)^99zPYIM9sA}gw z*-=eD-7MRq?4M*M7RB#Ne%jqVp#S;N@Yy&8(`RoiyQqJF73^6c9da0YEy-S;?m=T} zP4apmOR{&5NYyI%{*vNx4b)Wy?sn`#i5X~BYNC` zD;oCs5Kwx`Cu#CZTSd=l(WhvSTYn8~DvcMNjIAm8tJtUiUVgg4KMt+mB1-@GVSL=z z_Hc;uXa*9U%Zi!M$32Iy%eI9~`)B>D%YDYhF_{td%&<4kXMMKUsz-)Dt@)I^>8)i# z^K@<*E#*h*C1#rg(p_OE#LOn{=#@MuNMF+TaPvgP?&iO{mWaAWju*`F;y&*;T+Qs- zd4y@*GE`ybFxl)JG}9n-u2ItmYeNH8r~1Lz+@&mk(~yQS%r&ZSWL|?E zecq@?rQ;vLQd-6M97l1r)XVh~GRrZLwZZ@xF)Ch%I2xw)up(tX_Ql2K=lSJHX@s{Bn} z<)ex6n?0rydDCSNz2p@0ib&KT>7Nnn1YN(E)}J4y4ehZ#{JkY)<)Q|zzIp44s>c;} zmwsx)Z-iPnPI7mxS*go*YO=~$RLofDExS80vXFYwbdcT2E7?%Mx40U6##|s&*>)*i zuC2}brN8cEqx-TI+A$T4YeoMH6h3gC2+~kuMDuOIs|DWCE)Jf19V4ulN66+`hhJNs z=eyl_S3~e@t|G@-_1G|y_HCX*x1~+%$>R9S)_QT_z8($c`KMS~x(7|aEcu2hb~>{| zGk9SIIvv`}JUM31?$Iipq@0>6;}i0by_+Od^*WtmNkCD|)i4!z_0hyAM)yr^8^lmFiN^7~F{;jOf9RHIdS|Wllradb^FR+eFRZ+&y(85-IiaHp$bRx4>#ZJE(t9CckaB z#aX1ZA^e0d^DbB3c7T@k< z)blTdcWhl}H7rMG?WoDI9=9ZB^QaTheROnI=tjD#hODSZiqZd)AgM)(vUDUQhCqJ%0 zMD(b{^!$lW$FEwkIyE$m#SY@MU_`smAcBTj7qPxN_8`` zA}YMXD%7){NPvoe8H%2JfPWF-o)fd-3Zrqw+CBGWT1Q%y@1k>MGZ zp;kfDBi++2T`h`Pi!@KOG@+5zRHQs*DOgbr7@|>$EP4=w4K!FRs||I{^9YMj`-7Is zJ>0_8c2PmoJj}v`dqgoC@{onFM;^#zn>g@~2ppmsFhrx0QFK5IHqc4+A1{-MgiF%qg zHBVfOAn^w+m8n0D&UM_oo8yEX^SDaSj-WgBkzKEjIQj^~VIvLEeUqW1fd@3716LwE zJPoSxB|iDjTe#K#1PO^Uc6bqIXSreKL2WMfA#e6YU`zaySq6(y53$~ r{;@DU`#IZr{rS)O?CjUS-FILA?oZEu-|j7KKHSaDkN@vZCi?IQ(d6N$ diff --git a/html/gif/dot.gif b/html/gif/dot.gif deleted file mode 100644 index 1d9a4f524c97fa9d148cc15d7e114acce53520a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 42 rcmZ?wbhEHbWMp7uX!y@?;J^U}1_s5SEQ~;kK?g*DWEdD3jTo!}%isql diff --git a/html/gif/up.gif b/html/gif/up.gif deleted file mode 100644 index 5dabaeeba58894a6a7ed1eef696e8cdba25f23a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50 zcmZ?wbh9u|6kuRy_`tyM9|#N>bQpjDB*MTX*dn{Ud*YrsE$&fS#;500g)%T$0|0Is B4<7&k diff --git a/html/index.html b/html/index.html deleted file mode 100644 index 788e530..0000000 --- a/html/index.html +++ /dev/null @@ -1,130 +0,0 @@ - - -BVI - Binary VIsual editor - - - - - - - - - - - - -
- -
- -

-Quick Tutorial -

- -

-Download -

- -

-Installation -

- -

-Command Overview -

- -

-bmore -

- -

-Deutsche
Beschreibung -

- -

-Sitemap -

- -

-Project Page -

- -
- -

-VI and Clones -

- -

-Hex-Editors -

- -
- -

- -SourceForge Logo -

- -
-
-

Welcome to the
-bvi
-Homepage

-Here you can find all the informations about bvi you need. -
-
-The bvi is a display-oriented editor for binary files, based on the vi texteditor. -If you are familiar with vi, just start the editor and begin -to edit! A bmore programm is also included in the package. -
-If you never heard about vi, maybe bvi is not the best -choice for you. - -

-

Current: Version 1.3.2

- -You can download source and compiled versions from the -download page.
-Check out whats new in 1.3.2! - -

-Newsgroup: comp.editors - -

-Mailing List (very low traffic): -

-To join this list, simply send a blank email to -bvi-subscribe@yahoogroups.com. -You will receive a subscription confirmation message. -Simply reply this message and your subscription will be complete. -
- -Bvi was developed by Gerhard Bürgmann and is published -under the GNU Public License. Current stable version is 1.3.2. -Bvi is running on most UNIX - like operating systems and -on MSDOS. -

-If you want to contact me:
-Gerhard Bürgmann, Vienna ( Purkersdorf ) / Austria / Europe
-E-mail: gerhard@puon.at
-Have a look at Meta Chrom Kennzeichenhalter - -

- - -Back to the top - -


-Last update: January 8th 2004 by Gerhard Bürgmann -

-
- - diff --git a/html/install.html b/html/install.html deleted file mode 100644 index 82870e8..0000000 --- a/html/install.html +++ /dev/null @@ -1,139 +0,0 @@ - - -BVI: Installation - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-

-

-Download
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-Installation - - -BVI -
-
-
- -

-The following steps are necessary to get bvi running: -

UNIX

-The Unix version of bvi needs the curses (ncurses) library -for cursor movement. -
    -
  1. Download the source package from the Download Page
  2. -
  3. Unzip the package with the command:
  4. -
    -    # gunzip -c bvi-1.3.2.src.tar.gz | tar xvf
    -
    -
  5. Change to the directory bvi-1.3.2 and type -
    -    # ./configure
    -    # make
    -
  6. - -
  7. Type `make install' for copying the executable files -and manual pages to the final directories. -
    -By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. -You can specify an -installation prefix other than `/usr/local' by giving -`configure' the option -`--prefix=PATH'. Use the -`--with-ncurses' option to configure to specify an -alternate search path for Ncurses outside the normal -include/lib search path. -

    -You will find now four new commands: -

    -    bvi     The binary editor
    -    bview   The readonly version of bvi
    -    bedit   The beginners version of bvi
    -    bmore   The binary more program
    -
  8. -
  9. Use `make uninstall' to remove the installed -files from your file system.
    -You can remove the program binaries and object files from the -source code directory by typing `make clean'. -To also remove the files that `configure' created -(so you can compile the package for -a different kind of computer), type `make distclean'.
  10. -
- -

MSDOS

-Beginning with version 1.3.2 you may use the DJGPP environment to -compile bvi for working under both Win32 and DOS. -

-The MSDOS version (Borland C) exists for historical reasons and is not -supported anymore: -

-

-You have to convert the sourcefiles from the UNIX textformat to -the MSDOS textformat first. This can be done e.g. by loading and -saving them with the MSDOS standard editor `edit'. -

-The MSDOS version is using the conio routines of the -Borland - C compilers for cursor movement. The doscur.h -header file substitutes the curses commands.
-Bvi is using the "HUGE" memory model, bmore -needs the "TINY" model to -be able to convert it to a .COM file. - -

    -
  1. Download the source package from the Download Page
  2. -
  3. Unzip the package with the command: -
    -    gunzip -c bvi-1.3.2.src.tar.gz | tar xvf
    -
  4. -
  5. Load the tcconfig file (located in the bc subdirectory -for Borland - C).
  6. - -
  7. Press F9-Make
  8. -
-
-

- -Back to the top - -


-Last update: February 12th 2004 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/man_bmore.html b/html/man_bmore.html deleted file mode 100644 index 921c0c1..0000000 --- a/html/man_bmore.html +++ /dev/null @@ -1,181 +0,0 @@ - - -BMORE(1) BMORE(1) - - -NAME - bmore - browse through a binary file - -SYNOPSIS - bmore [ -acdi ] [ -n lines ] [ -w cols ] [ +linenumber ] [ - +/ASCII-pattern ] [ +\Hex-pattern ] [ filename ... ] - - -DESCRIPTION - more is a filter that displays the contents of a binary - file on the terminal, one screenful at a time. It nor- - mally pauses after each screenful, and prints --More-- at - the bottom of the screen. bmore provides a two-line over- - lap between screens for continuity. If bmore is reading - from a file rather than a pipe, the percentage of charac- - ters displayed so far is also shown. - - bmore scrolls up to display one more screen line in - response to a RETURN character; it displays another - screenful in response to a SPACE character. Other com- - mands are listed below. - - The screen is divided in three sections or panes: The byte - offset (extreme left), the hex pane (middle), and an ascii - pane (right) which shows as printable characters those - bytes in the hex pane. On an 80 column terminal there - will be sixteen hex values and their ASCII values on each - screen line. Note that (as one would expect) the first - byte has the offset 0 (zero). - - bmore sets the terminal to noecho mode, so that the output - can be continuous. Commands that you type do not normally - show up on your terminal, except for the / , \ and ! com- - mands. - - If the standard output is not a terminal, more acts just - like cat(1V), except that a header is printed before each - file in a series. - -OPTIONS - -a ASCII mode: no hex representation of the contents. - Non printable characters are displayed as a dot (.) - - -c Clear before displaying. Redrawing the screen - instead of scrolling. - - -d Display error messages rather than ringing the ter- - minal bell if an unrecognized command is used. - This is helpful for inexperienced users. - - -i Ignore case for searching. - - -n lines - Displays the indicated number of lines in each - screenful, rather than the default (the number of - lines in the terminal screen less two). - - -w cols - Display number of cols in each line. - - +linenumber - Start up at linenumber. - - +/ASCII-pattern - Start up at the line containing the regular expres- - sion pattern. Note: unlike editors, this construct - should not end with a `/'. If it does, then the - trailing slash is taken as a character in the - search pattern. - - -USAGE - - Commands - The commands take effect immediately; it is not necessary - to type a carriage return. Up to the time when the com- - mand character itself is given, the user may type the line - kill character to cancel the numerical argument being - formed. In addition, the user may type the erase charac- - ter to redisplay the `--More--(xx%)' message. - - In the following commands, i is a numerical argument (1 by - default). - - iSPACE Display another screenful, or i more lines if i - is specified. - - iRETURN Display another line, or i more lines, if speci- - fied. - - i^D (CTRL-D) Display (scroll down) 11 more lines. i - is given, the scroll size is set to i. - - id Same as ^D. - - iz Same as SPACE, except that i, if present, - becomes the new default number of lines per - screenful. - - is Skip i lines and then print a screenful. - - if Skip i screenfuls and then print a screenful. - - i^B (CTRL-B) Skip back i screenfuls and then print a - screenful. - - b Same as ^B (CTRL-D). - - q - Q Exit from more. - - = Display the current line number. - - v Drop into the bvi(1) editor at the current off- - set of the current file. - w Drop into the bvi(1) editor at the current off- - set of the current file. Only the portion of the - file displayed on the screen will be loaded. - - h Help. Give a description of all the more com- - mands. - - i/pattern Search for the ith occurrence of the regular - expression pattern. Display the screenful - starting at the file position that contains the - ith match for the regular expression ASCII-pat- - tern, or the end of a pipe, whichever comes - first. If bmore is displaying a file and there - is no such match, its position in the file - remains unchanged. Regular expressions can be - edited using erase and kill characters. Erasing - back past the first column cancels the search - command. - - ' Single quote. Go to the point from which the - last search started. If no search has been per- - formed in the current file, go to the beginning - of the file. - - !command Invoke a shell to execute command. The charac- - ters % and !, when used within command are - replaced with the current filename and the pre- - vious shell command, respectively. If there is - no current filename, % is not expanded. Prepend - a backslash to these characters to escape expan- - sion. - - i:n Skip to the ith next filename given in the com- - mand line, or to the last filename in the list - if i is out of range. - - i:p Skip to the ith previous filename given in the - command line, or to the first filename if i is - out of range. If given while more is positioned - within a file, go to the beginning of the file. - If more is reading from a pipe, more simply - rings the terminal bell. - - :f Display the current filename and offset number. - - :q - :Q Exit from bmore (same as q or Q ). - - . Dot. Repeat the previous command. - - - FILES - /etc/termcap terminal data base - /usr/local/share/bmore.help - help file - -SEE ALSO - bvi(1), termcap(5) - - 3 Jan 2004 - diff --git a/html/man_bvi.html b/html/man_bvi.html deleted file mode 100644 index e6763c6..0000000 --- a/html/man_bvi.html +++ /dev/null @@ -1,426 +0,0 @@ - -BVI(1) User Commands BVI(1) - - -NAME - bvi, bview - visual editor for binary files - -VERSION - bvi-1.3.2 - -SYNOPSIS - bvi [-R] [-c cmd] [-f script] [-b begin] [-e end] [-s size] file... - bview [-R] [-c cmd] [-f script] [-b begin] [-e end] [-s size] file... - -OPTIONS - file... - A list of filenames. The first one will be the - current file and will be read into the buffer. The - cursor will be positioned on the first line of the - buffer. You can get to the other files with the - ":next" command. - - -R "Readonly": The readonly flag is set for all the - files, preventing accidental overwriting with a write - command. - - - -b begin - causes bvi to load a file not from the start but from - offset begin. - - - -e end - causes bvi to load a file not till end but till - address end. - - - -s size - causes bvi not to load the complete file but only size - bytes. - - - -c cmd - cmd will be executed after the first file has - been read. If the cmd contains spaces it must be - enclosed in double quotes (this depends on the shell - that is used). - - -f script - This command provides a means for collecting a series - of "ex" (colon) commands into a script file, then - using this file to edit other files. Since there is no - binary stream editor "bsed", you can use this option - to make several global changes in a binary file. - -DESCRIPTION - Bvi stands for "Binary VIsual editor". Bvi is a screen - oriented editor for binary files; its command set is based - on that of the vi(1) text editor. As a binary editor does - not have the concept of "lines" there are differences from - Vi commands wherever the latter are line orientate. - -COMPARISON - The main differences between Vi and Bvi are: - - The screen is divided in three sections or panes: The byte - offset (extreme left), the hex pane (middle), and an ascii - pane (right) which shows as printable characters those - bytes in the hex pane. On an 80 column terminal there - will be sixteen hex values and their ASCII values on each - screen line. Note that (as one would expect) the first - byte has the offset '0' (zero). - - You can toggle between the hex and ascii windows with the - tab key (TAB). Toggling between these two windows does - not change the current position (offset) within the file. - - No "lines" concept: Files are treated as one long stream - of bytes. The characters "newline" and "carriage return" - are not special, id est they never mark the end of lines. - Therefore the lines on the screen do not represent lines - in the usual way. Data is broken across screen lines - arbitarily. As a consequence there are no commands in bvi - from ex or vi that are based on line numbers, eg "dd", - "yy", 'C', 'S', 'o', 'O'. This also changes the meaning - of "range" before the ":write" command to a byte offset, - ie the command ":100,200w foo" writes all *bytes* (not - lines) from offset 100 to offset 200 to the file "foo". - - No "text objects": There are also no text-specific - arrangements like words, paragraphs, sentences, sections - and so on. - - Extended "ruler": The bottom line of the screen shows the - current address (byte offset) and the current character in - these notations: - - octal, hexadecimal, decimal and ascii. - - Search patterns: All search commands understand these - special characters: - - . any character - [] set of characters - * zero or more occurrences of previous char or set - - But as there is no concept of lines you cannot use the - standard symbols ("anchors") for "begin-of-line" ('^') and - "end-of-line" ('$'). Searching for the start/end of lines - must be done explicitly by adding these special characters - to your search pattern using these meta sequences: - - \n newline - \r return - \t tab - \0 binary zero - - Additional search commands: Similar to the text search - commands there are additional hex-search functions '\' and - '#' which allow to search for any byte value. Example: - "\62 76 69" will search for the string "bvi". Spaces - between hex value are optional, so searching for - "6775636B6573" will find "guckes". - - Changing the length of data (insertion, deletion) moves - the data to other addresses; this is bad for many cases - (eg. databases, program files) and is thus disabled by - default. You can enable this commands by typing - - :set memmove - - BVI Modes: - - Command Mode (Normal Mode): - - Input is treated as command. Note that command mode is - the default mode after startup and after escaping from - input mode. Use ESC (escape) to cancel a partial - (uncompleted) command. - - Input Mode: - - Input is treated as replacement of current characters or - (after the end of the file) is appended to the current - file. This mode is entered from command mode by typing - one of 'i', 'I', 'A', 'r', or 'R'. You can enter the - characters from the keyboard (in the ASCII window) or - hexadecimal values (in the HEX window). Type TAB to - switch between these two windows. Type ESC to finish the - current input and return to command mode. Type CTRL-C to - cancel current command abnormally. - - Command line mode (Last Line Mode or : mode): - - Similar to vi, this mode is entered by typing one of the - characters : / ? \ # ! The command is terminated and - executed by typing a carriage return; to cancel a - partially typed command, type ESC to cancel the current - command and return to command mode. - -ENVIRONMENT - The editor recognizes the environment variable BVIINIT as - a command (or list of commands) to run when it starts - up. If this variable is undefined, the editor checks for - startup commands in the file ~/.bvirc file, which you - must own. However, if there is a .bvirc owned by you in - the current directory, the editor takes its startup - commands from this file - overriding both the file in your - home directory and the environment variable. - -TERMINOLOGY - Characters names are abbreviated as follows: - Abbr. ASCII name aka - CR 010 carriage return - ^A 001 control-a - ^H 008 control-h - ^I 009 control-i aka TAB - ^U 021 control-u - ^Z 026 control-z - ESC 027 escape aka ESC - DEL 127 delete - LEFT --- left arrow - RIGHT --- right arrow - DOWN --- down arrow - UP --- up arrow - -COMMAND SUMMARY - See the TERMINOLOGY for a summary on key name - abbreviations used within the following description of - commands. - - Abstract: - Arrow keys move the cursor on the screen within the - current window. - - Sample commands: - :version show version info - <- v ^ -> arrow keys move the cursor - h j k l same as arrow keys - u undo previous change - ZZ exit bvi, saving changes - :q! quit, discarding changes - /text search for text - ^U ^D scroll up or down - - Counts before bvi commands: - Numbers may be typed as a prefix to some commands. - They are interpreted in one of these ways. - - screen column | - byte of file G - scroll amount ^D ^U - repeat effect most of the rest - - Interrupting, canceling - ESC end insert or incomplete command - DEL (delete or rubout) interrupts - - File manipulation: - ZZ if file modified, write and exit; - otherwise, exit - :w write changed buffer to file - :w! write changed buffer to file, overriding - read-only ("forced" write) - :q quit when no changes have been made - :q! quit and discard all changes - :e file edit file - :e! re-read current file, discard all changes - :e # edit the alternate file - :e! # edit the alternate file, discard changes - :w file write current buffer to file - :w! file write current buffer to file overriding - read-only (this "overwrites" the file) - :sh run the command as set with option "shell", - then return - :!cmd run the command cmd from "shell", then - return - :n edit next file in the argument list - :f show current filename, modified flag, - current byte offset, and percentage of - current position within buffer - ^G same as :f - - Additional edit commands - You can insert/append/change bytes in - ASCII/binary/decimal/ hexadecimal or octal representation. - You can enter several (screen) lines of input. A line with - only a period (.) in it will terminate the command. You - must not type in values greater than a byte value. This - causes an abandonment of the command. Pressing the CR key - does not insert a newline - character into the file. If - you use ASCII mode you can use the special characters \n, - \r, \t and \0. - - :i aCR insert bytes (ASCII) at cursor position - :a bCR append bytes (Binary) at end of file - :c hCR change bytes (hexadecimal) at cursor position - - Bit-level operations - :and n bitwise 'and' operation with value n - :or n bitwise 'or' operation with value n - :xor n bitwise 'xor' operation with value n - :neg two's complement - :not logical negation - :sl i shift each byte i bits to the left - :sr i shift each byte i bits to the right - :rl i rotate each byte i bits to the left - :rr i rotate each byte i bits to the right - - Command mode addresses - :w foo write current buffer to a file - named "foo" - :5,10w foo copy byte 5 through 100 into as - file named foo - :.,.+20w foo copy the current byte and the next - 20 bytes to foo - :^,'aw foo write all bytes from the beginning - through marker 'a' - :/pat/,$ foo search pattern pat and and copy - through end of file - - Positioning within file: - ^B backward screen - ^F forward screen - ^D scroll down half screen - ^U scroll up half screen - nG go to the specified character - (end default), where n is a decimal address - /pat next line matching pat - ?pat previous line matching pat - \hex jump to next occurrence of hex string hex - #hex jump to previous occurrence of hex string hex - n repeat last search command - N repeat last search command, but in opposite - direction - - Adjusting the screen: - ^L clear and redraw screen - zCR redraw screen with current line at top of screen - z- redraw screen with current line at bottom of - screen - z. redraw screen with current line at center of - screen - /pat/z- search for pattern pat and then move currents - line to bottom - ^E scroll screen down 1 line - ^Y scroll screen up 1 line - - Marking and returning: - mx mark current position with lower-case letter x - Note: this command works for all lower-case - letters - 'x move cursor to mark x in ASCII section - `x move cursor to mark x in HEX section - '' move cursor to previous context in ASCII section - `` move cursor to previous context in HEX section - Line positioning: - H jump to first line on screen ("top") - L jump to last line on screen ("low") - M jump to middle line on screen ("middle") - - jump onto previous line on screen - + jump onto next line on screen - CR same as + - DOWN or j next line, same column - UP or k previous line, same column - - Character positioning: - ^ first byte in HEX window - $ end of screen line - l or RIGHT jump onto next byte (within current - screen line) - h or LEFT jump onto previous byte (within current - screen line) - ^H same as LEFT - space same as RIGHT - fx find next occurrence of character x - Fx find previous occurrence of character x - n| jump onto nth byte/character within current - line - - Strings: - (works similar to the strings(1) command) - Note: "Words" are defined as strings of "nonprinting - characters". - e jump to next end of word - w jump to next begin of word - b jump to previous begin of word - W forward to next string delimited with a - \0 or \n - B back to previous string delimited with a - nonprinting char - Corrections during insert: - ^H erase last character (backspace) - erase your erase character, same as ^H (backspace) - ESC ends insertion, back to command mode - - Append and replace: - A append at end of file - rx replace current bte with char 'x' - R enter replace mode; for all subsequent input, - the current byte is overwritten with the next - input character; leave replace mode with ESC. - - Miscellaneous Operations: - TAB toggle between ASCII and HEX section - - Yank and Put: - 3ySPACE yank 3 characters - p insert contents of yank buffer - o replace text with content of yank buffer - P put back at end of file - - Undo, Redo: - u undo last change - Note: Only the last change can be undone. - Therefore this commands toggles between the - last and second-t-last state of the buffer. - - Setting Options: - With the :set command you can set options in bvi - - Option Default Description - - autowrite noaw Save current file, if modified, if you - give a :n, :r or ! command - columns cm=16 on an 80 character wide terminal - ignorecase noic Ignores letter case in searching - magic nomagic Makes . [ * special in patterns - memmove nomm enables insert and delete commands - offset of=0 adds an offset to the diplayed addresses - readonly noro If set, write fails unless you use ! after command - scroll sc=1/2 window - Number of lines scrolled by ^U and ^D - showmode mo Displays statusline on bottom of the screen - terse noterse Let you obtain shorter error messages - window window=screensize - Lines in window, can be reduced at slow terminals - wordlength wl=4 Length of an ASCII-string found by w, W, b or B - wrapscan ws Searches wrap around past the end of the file - unixstyle nous The representation of ascii characters below - 32 is displayed in the statusline as shown - in ascii(7) if unset rather in DOS-style (^A) - - -AUTHOR - bvi was developed by Gerhard Buergmann, Vienna, Austria - Gerhard.Buergmann@puon.at - -WWW - Bvi Homepage: http://bvi.sourceforge.net/ - Vi Pages: http://www.guckes.net/vi/clones.php3 - (all about Vi and its clones) - -FILES - $HOME/.bvirc editor startup file - ./.bvirc editor startup file - -BUGS - Bvi does not update the screen when the terminal changes - its size. - -SEE ALSO - vi(1), strings(1), ascii(5) - -3/Jan/2004 BVI Version 1.3.2 - diff --git a/html/new120.html b/html/new120.html deleted file mode 100644 index a26527c..0000000 --- a/html/new120.html +++ /dev/null @@ -1,157 +0,0 @@ - - -BVI: CHANGES in bvi 1.2.0 - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-

-

-Download
-New in 1.3.2
-New in 1.3.1
-New in 1.3.0
-New in 1.2.0
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-CHANGES in bvi 1.2.0 - - -BVI -
-
-
- -

-

    -
  • Configuration with GNU autoconfig -
  • New :set options: -
      -
    • :set columns=n
      - You can set the number of columns on the screen to an - arbitrary value. This might be useful if you edit a file - with a fixed record length.
      - Default: max number of columns, divisible by four.
      - Abbreviation: :set cm=n -
    • :set memmove - enables the new commands to insert or delete bytes.
      - Per default this commands are disabled, because e.g. in - executable files you must not move bytes.
      - Default: :set nomemmove
      - Abbreviation: :set mm - :set nomm -
    • The listing for :set all is now in - alphabetical order. -
    -
  • New insert and delete commands: -
      -
    • a inserts after cursor position -
    • i inserts on cursor position -
    • x deletes byte under cursor -
    • X deletes byte before cursor -
    • d delete command with modifiers: -
        -
      • dSPACE deletes byte under cursor -
      • dfC deletes from current position to - next character C -
      • d/xyz deletes from current position - to first matching pattern xyz -
      • d$ deletes from current position to EOF -
      • d'a deletes from current positions - to mark a -
      • dnG deletes from current position to - byte with (decimal) address n -
      -
    -
  • New syntax for p (put) command:
    - In previous versions of bvi the p command did an overwriting - "put". Now the bytes are inserted. -
  • New command o (overwrite):
    - This is an overwriting "put" command. It is the only command in bvi - that uses a command key in a complete different way than in vi - (o opens a new line in vi). -
  • New syntax for y (yank) command: -
      -
    • ySPACE yanks byte under cursor -
    • yfC yanks from current position to next - character C -
    • y/xyz yanks from current position to - first matching pattern xyz -
    • y$ yanks from current position to EOF -
    • y'a yanks from current position to - mark a -
    • ynG yanks from current position to - byte with (decimal) address n -
    -
  • New ex (colon) commands: -
      -
    • :a(ppend) a(scii)|b(binary)|d(ecimal)|h(exadecimal)|o(ctal) -
    • :c(hange) a(scii)|b(binary)|d(ecimal)|h(exadecimal)|o(ctal) -
    • :i(nsert) a(scii)|b(binary)|d(ecimal)|h(exadecimal)|o(ctal)
      - The three commands above are used to append or change or insert bytes - in the selected representation until you type a line containing only - a dot, e.g. insert bytes in binary mode: -
      -	:i b
      -	0 010 110 1110010 10 100
      -	1 1001 1001 0 0
      -	.
      -	
      - Pressing the RETURN key does not insert - a newline - character into the file. If you use :i a (insert - ascii) you can use the special characters \n, \r, \t and \0. -
    • :d(elete) -
    • :g(lobal) does a global search with printing found items -
    • :ma(rk) -
    • :pu(t) puts yanked bytes into the file -
    • :o(verwrite) is an overwriting ":put" -
    • :y(ank) -
    -
  • :f newname - bug fixed -
  • new command line option -f script -
  • CTRL - C aborts some commands, e.g. search commands -
  • CR moves cursor to 1st column of next screen line -
  • Local settings according to the environment variable LANG -will be evaluated (see setlocal(3)). -
-

- -Back to the top - -


-Last update: June, 1st 2000 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/new130.html b/html/new130.html deleted file mode 100644 index 304272e..0000000 --- a/html/new130.html +++ /dev/null @@ -1,104 +0,0 @@ - - -BVI: CHANGES in bvi 1.3.0 - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-

-

-Download
-New in 1.3.2
-New in 1.3.1
-New in 1.3.0
-New in 1.2.0
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-CHANGES in bvi 1.3.0 - - -BVI -
-
-
- -

-

    -
  • In the configure script you can use --with-ncurses -option to configure to specify an alternate -search path for Ncurses outside the normal include/lib search path. -

    -

  • A make uninstall option has been added -

    -

  • A bmore program has been added. It acts like the BSD - text - more, -but for binary files.

    -Additional command line options: -

    --a   ASCII mode -
    -Additional (changed) Commands: -
    -v   does not invoke vi but bvi
    -w   invokes bvi with only that portion of the file -which is displayed on the screen. -
    -
  • New in bvi: -
      -
    • You can edit now Block Special Files too. -
    • You can read - edit - write files partly. -
    • New Command line options: -
      - +cmd
      - -b begin \
      - -e end    > for partial file read
      - -s size  /

      -

      - begin, end or size can be an integer value (decimal or - hexadecimal) or an integer value with an appended k (for - multiply by 1024) or m (for multiply by 1.048.576). -
    • :e# bug fixed -
    • Debian bug #68436 (Buffer overflow in io.c) fixed -
    -
-

- -Back to the top - -


-Last update: October 12th 2000 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/new131.html b/html/new131.html deleted file mode 100644 index 020f791..0000000 --- a/html/new131.html +++ /dev/null @@ -1,98 +0,0 @@ - - -BVI: CHANGES in bvi 1.3.1 - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-

-

-Download
-New in 1.3.2
-New in 1.3.1
-New in 1.3.0
-New in 1.2.0
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-CHANGES in bvi 1.3.1 - - -BVI -
-
-
- -

-This is a bugfix release. -

-BVI: -

    -
  • autoconf 2.52 used -

    -

  • do_back() fixed (cast)
  • -

    -

  • replace sys_errlist[errno] with strerror(errno) (Debian #106762)
  • -

    -

  • fix: one can continue deleting bytes even when file is empty (Debian #121934)
  • -

    -

  • wish: no ":set mm" to delete bytes from end of file (Debian #122240)
  • -

    -

  • cast for alloc_buf() in set.c
  • -

    -

  • r-bug fix in edit.c and bvi.c
  • -

    -

  • renamed CTRL to BVICTRL (AIX problem)
  • -

    -

- -BMORE: -
    -
  • nicer last line
  • -

    -

  • bmbeep() instead of beep() (SOLARIS problem)
  • -

    -

  • subshell support fixes
  • -
- -

- -Back to the top - -


-Last update: February 12th 2002 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/new132.html b/html/new132.html deleted file mode 100644 index e195a76..0000000 --- a/html/new132.html +++ /dev/null @@ -1,93 +0,0 @@ - - -BVI: CHANGES in bvi 1.3.2 - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-

-

-Download
-New in 1.3.2
-New in 1.3.1
-New in 1.3.0
-New in 1.2.0
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-CHANGES in bvi 1.3.2 - - -BVI -
-
-
- -

-This is a bugfix release. -

-BVI: -

    -
  • ported to compile under DJGPP v2.0 w/ PDCURSES (by simoN)
  • -

    -

  • some minor fixes
  • -

    -

-


-BMORE: -
    -
  • configure: checking term.h and ncurses/term.h
  • -

    -

  • cast in bmore.c in putline();
  • -

    -

  • fixed multiple file handling for "bmore" (by simoN)
  • -

    -

  • renamed several local screen processing routines to avoid compiler conflicts
  • -

    -

  • several minor fixes to "bmore" code (by simoN)
  • -

    -

  • reset tty after CTRL-C in bmore
  • -
-


- -

- -Back to the top - -


-Last update: January 8th 2004 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/overview.html b/html/overview.html deleted file mode 100644 index c03bf6c..0000000 --- a/html/overview.html +++ /dev/null @@ -1,97 +0,0 @@ - - -BVI: Command Overview - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-

-

-Download
-

-

-Installation
-

-

-Command Overview
-Cursor Movement
-Edit Cmds
-Yank and Put Cmds
-Set Options
-Colon (ex) Cmds
-man - Page
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-Command Overview - - -BVI -
-
-
- -

-This overview compares bvi commands with the corresponding commands of -the standard ascii vi. -

-

- - - - -
Commands shown in blue frames are commands which -are available in both bvi and vi, but with a slightly different -behavior.
Green frames are used for commands which are -equal in both bvi and vi.
Red frames are used for missing commands
-
-

-Special keys are displayed in a gray font, e.g. -RETURN, -ARROW_UP or -CTRL. - -

Topics:

-

-

-

- -Back to the top - -


-Last update: June 1st 2000 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/qt_bit.html b/html/qt_bit.html deleted file mode 100644 index 3cc9cd4..0000000 --- a/html/qt_bit.html +++ /dev/null @@ -1,102 +0,0 @@ - - -BVI: Bit-wise Operations - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-Editing Files
-Search Commands
-Bit-wise Operations
-Find and Replace
-Yank and Put
-Settings
-Partial File Read
-

-

-Download
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-Quick Tutorial -
Bit-wise Operations -
- -BVI -
-
-
- -

-To perform logical operations, bvi has a set of bit-level commands. -The following commands are available: -

- - - - - - - - - -
:rl nrotate left - n is a number from 1 through 7
:rr nrotate right
:sr nshift right
:sl nshift left
:and iand operation - i is a number from 0 through 255
:or ior operation
:xor ior operation
:not negates operation
:neg negates operation
-

-The i value can be entered as a decimal number (0 - 255), -a hexadecimal number with a leading zero (0 - 0ff) or a binary number, -either with a leading B (B101) or exactly eight digits long (00000101). -

-On default the whole file is affected, but you can use the usual -colon command address forms. In contrast to vi the addresses designate -not line numbers but byte numbers. These addresses can be enterd in -decimal or hexadecimal notation.
-Examples: -

-:100,500and 01A RETURN
-:03FA,01000or 00001000 RETURN
-:.rr 3 RETURN
-:'a,$sl 1 RETURN
-
-

- -Back to the top - -


-Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/qt_edit.html b/html/qt_edit.html deleted file mode 100644 index a389c8c..0000000 --- a/html/qt_edit.html +++ /dev/null @@ -1,131 +0,0 @@ - - -BVI: Editing Files - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-Editing Files
-Search Commands
-Bit-wise Operations
-Find and Replace
-Yank and Put
-Settings
-Partial File Read
-

-

-Download
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-Quick tutorial -
Editing Files -
- -BVI -
-
-
- -

-Inserting or deleting bytes can be dangerous on some kind of files, -because binary files are mostly executables, database files or maybe -graphic files. So you must not shift the remaining bytes to another -address. -Therefor commands for inserting or deleting bytes are disabled by -default. -You can use the r command to change a single byte, or -the R command to replace multiple characters. You can use a -numeric prefix for both commands. -

-You can add characters at the end of the file using the A command. -If you start with an empty file, you can create a binary file from -scratch. If the cursor is in the ASCII section of the screen and you -type 100AxESC, you create a file -which contents 100 x'es. -

-The D command can be used to truncate a file at a certain position. -Since there are no lines in a binary file, the D command deletes -to end of file. -

-If you have to edit a binary file where it does not matter to move bytes -to a different address, you can enable the insert and delete commands by -typing :set memmove. -Now you are able to use the i command for inserting bytes, the -x or X command to delete the byte over or before the cursor -and those types of d commands, which does not rely on text lines -(e.g. dSPACE, dfC, d/xyz, -d$, d'a, dnG). - -

-All edits can be undone by pressing the u key. -

Using ex (colon) commands

-The edit commands of the ex editor are usually not available in -standard vi implementations (:i[nsert], :a[ppend] -and :c[hange]). In bvi -they are available with extended options. There are five -modifiers a[scii], b[inary], d[ecimal], h[exadecimal] and -o[ctal] (ascii is default). Therefor you can insert, append -or change data in all five representations. -

-Example:
-you would like to append a file with data available in decimal -representation: -

-:a d
-0 12 3 128 255 17 0 0 255 255
-23 24 25 128 6 6 6
-.
-
-A line with only a period (.) in it will terminate the command. -
-You must not type values greater than a byte value (255 decimal, FF hex). -This causes an abandon of the command.
-Pressing the RETURN key does not insert -a newline - character into the file. If you use :i a (insert -ascii) you can use the special characters \n, \r, \t and \0. -

-An additional advantage is, that all typed bytes are inserted into the -file at once. If you insert characters in vi - mode, for every byte typed, -the whole remaining file has to be moved one position backwards. -

- -Back to the top - -


-Last update: June 1st 2000 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/qt_find.html b/html/qt_find.html deleted file mode 100644 index bda685a..0000000 --- a/html/qt_find.html +++ /dev/null @@ -1,99 +0,0 @@ - - -BVI: Find and Replace - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-Editing Files
-Search Commands
-Bit-wise Operations
-Find and Replace
-Yank and Put
-Settings
-Partial File Read
-

-

-Download
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-Quick Tutorial -
Find and Replace -
- -BVI -
-
-
- -

-The :s (substitute) command behaves a little bit -different to that of vi. If you type a command like this in vi   -:s/XXXX/UU/ then the four XXXX's are -replaced by -two UU's. This means, the file size decreases and all characters after -the replacement are moved to another position in the file. Since bvi -does not move characters, only two XX's are replaced by two UU's and -the third and fourth X still remains in the file.
-Another example: -

-:0,500s/Taste\0/Key\0/RETURN
-
-

-This command replaces within the first 500 bytes of a file the 0 - -terminated ASCII string "Taste" -with the 0 - terminated -string "Key". After the substitution -you will find a -character sequence "Key\0e\0" in the file.
-CAUTION: If the replace -string is longer than the find string, additional bytes are overwritten! -
-This behaviour will not be changed by setting the -:set memmove option! -

-Of course you can do also binary substitutions, similar to the search -command. The ability of remembering patterns like \(pattern\) -is currently not implemented. -

- -Back to the top - -


-Last update: Fri Jun 30 22:33:20 CEST 2000 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/qt_partial.html b/html/qt_partial.html deleted file mode 100644 index 23acb7e..0000000 --- a/html/qt_partial.html +++ /dev/null @@ -1,145 +0,0 @@ - - -BVI: Partial File Read - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-Editing Files
-Search Commands
-Bit-wise Operations
-Find and Replace
-Yank and Put
-Settings
-Partial File Read
-

-

-Download
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-Quick Tutorial -
Partial File Read -
- -BVI -
-
-
- -

-A new feature of version 1.3.0 is the Partial File Read. -If you want to edit a file, you have not to read the file into -memory but only the part you want to edit. You can write back this part -into the file after editing. -
-Example: -
-You have to change only some bytes of the header of a graphic file -(e.g. a color). Graphic files can be very large. With the -s -option you can load only the first kilobyte of the file: -

-             bvi -s 1000 large.gif
-
-In this case of course you cannot insert or delete bytes of the file. -The editor is set to the no memmove mode. You can write back -only as much bytes as you read before. If you add or delete bytes -even though, the extra bytes will be ignored or garbage will be -written to the file. -

-It is also possible to start not at the begin of the file, but at a -certain address. To do this you have to use the option -b. -You can read the file from this starting point until the end of the file -or you can use the -s option to specify a size or the --e option to specify an end address. -

-If you read the file not from the start an offset will be set to -display the correct address at the left side of the screen. If you change this -offset with the :set offset=nnnn command, this has -no effect to the write back operation. The edited part of the -file will always be written back at the same position, where it was read. -

-In the Linux /proc directory there are files which are listed -with length 0 in a directory listing. But in reality they have a content. -You can read this files, if you use the -s option and guess a -size. This size should be a little bit larger than the size you expect. -

-The same guidlines can be used, if you load a block device, e.g. a -floppy disk. -

-             bvi -s 1450k /dev/fd0
-
-After reading the device, you get a message with the value of the -real read bytes at the bottom of the screen: -
-             "/dev/fd0" range 0-1474559
-
-Note that the size value will be used to allocate memory before -reading the file. Therefore do not choose a too large size.
-Note further, that 1450k in the example above is calculated as -1450 * 1024 bytes. This gives 1484800 bytes allocated size. -If bvi reads the exact number of bytes you have asked for -in the -s option, the file may be larger. -

-WARNING: -

-Do not use bvi at mounted disk devices!
-Do not edit disk devices, if you don't know exactly what you change!
-You may make your disk unreadable by editing it!! -
-

Interaction with bmore

-You may use bmore to browse through large files or -devices. You may use the ASCII - or Hex - search possibilities to -locate a certain section of the file.
-If you see the desired part of the file on your screen, press w to -read the contents of the file displayed currently on your screen into -bvi. You can use a decimal prefix at the w - -command to read more or less bytes than displayed into bvi. -
-The letter w is the next letter after v, which -is used in more and bmore to read the whole file into vi or bvi! -

-If you used the ZZ or :w command, this part of the file will be -written back into the original file. - -

- -Back to the top - -


-Last update: Sun Jul 09 21:57:38 CEST 2000 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/qt_search.html b/html/qt_search.html deleted file mode 100644 index 51ee5cc..0000000 --- a/html/qt_search.html +++ /dev/null @@ -1,116 +0,0 @@ - - -BVI: Search Commands - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-Editing Files
-Search Commands
-Bit-wise Operations
-Find and Replace
-Yank and Put
-Settings
-Partial File Read
-

-

-Download
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-Quick Tutorial -
Search Commands -
- -BVI -
-
-
- -

-Additional to the well known / and ? for searching ASCII -strings there are two new commands for searching binary strings. These -are the keys \ and #. -

-In the ASCII search commands / and ? you can use \n, \r, -\t and \0. You can also use regular expressions. Do not use -^ and $, because there are no lines in a binary file. -Type /foo\0RETURN to -search for the null terminated string foo in the file. -

-In the Hex section you can search for a sequence of bytes in hexadecimal -notation, e.g. \01 AF 12RETURN, - which is the same as \01AF12 -RETURN. -You can also use regular expressions and quoted ASCII strings. Inside of -the quotes no character is treated as a special character!
-Example:   -\01 [^AF DE] "foo" 00 RETURN -
-This means: Search for a string beginning with 01, the second character -must not be a hex AF or DE, followed by the ASCII -characters foo, terminated with a binary zero. - -

Global Search

-There is also a global search option available, but only with the -print option.
-Example: -
-:g/text_pattern/pRETURN -
or
-:g\hex_pattern\pRETURN -
-This commands are displaying all found patterns, one per screen line. -Of course you can limit the search to a certain part of the file by -specifying the starting and ending address.
-Other forms of the global search command -are line oriented, therefor not useful for binary files and -not implemented, e.g.
-
- - - - -
:g/pattern/dDelete all lines containing pattern
:g/pattern/yYank all lines containing pattern
:g!/pattern/pPrint all lines not containing pattern
-
-

- -Back to the top - -


-Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/qt_set.html b/html/qt_set.html deleted file mode 100644 index ea28785..0000000 --- a/html/qt_set.html +++ /dev/null @@ -1,127 +0,0 @@ - - -BVI: Settings - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-Editing Files
-Search Commands
-Bit-wise Operations
-Find and Replace
-Yank and Put
-Settings
-Partial File Read
-

-

-Download
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-Quick Tutorial -
Settings -
- -BVI -
-
-
- -

-To customize bvi some additional :set options are -available. You can add them to your .bvirc -file, if you need them all the time. - -

columns

-
-You can set the number of columns on the screen to an arbitrary value. -This might be useful if you edit a file with a fixed record length.
-Default value is the max. number of columns, divisible by four.
-Example: :set columns=13RETURN
-Abbreviation: :set cm=9RETURN -
- -

memmove

-
-This option enables the commands for inserting and deleting bytes. -
-Default: :set nomemmoveRETURN
-Abbreviation: :set mmRETURN -
- -

offset

-
-You can change the beginning of the displayed byte numbering to a -certain number. The default address of the first byte is 0. You can -change it to 1 or to any other number by typing:
:set offset=1RETURN
-You can also use a hexadecimal address, if you type a leading zero:
:set of=01FFRETURN
-The only commands which are not affected by these numbering is -:f or CTRL --G. These commands always -designates the first byte in file as 1. -
- -

unixstyle

-
-The rightmost character in the status line displays the ASCII value of -the current byte. For values below 32 you can use the notation used on -the ascii(7) man page (like NUL, SOH, STX etc.) if you do a
-:set unixstyleRETURN or a
-:set usRETURN. If you do a
-:set nousRETURN you get a -DOS style representation (^A, ^B, ^C etc.). -
- -

wordlength

-
-This setting is used to define the minimum length of a "word". -A "word" is a sequence of ASCII characters within a binary -file. The commands w, b, e, W, B and E are affected by -this setting. -

-Default: :set wordlength=4RETURN
-Abbreviation: :set wl=4RETURN -

-

- -Back to the top - -


-Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/qt_yank.html b/html/qt_yank.html deleted file mode 100644 index bfccb47..0000000 --- a/html/qt_yank.html +++ /dev/null @@ -1,133 +0,0 @@ - - -BVI: Yank and Put - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-Editing Files
-Search Commands
-Bit-wise Operations
-Find and Replace
-Yank and Put
-Settings
-Partial File Read
-

-

-Download
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-Quick Tutorial -
Yank and Put -
- -BVI -
-
-
- -

-Starting with version 1.2.0 there is a new syntax for the yank and put -commands! Yank is now more similare to vi. -

- - - - - - - - - - - - - - - - - - -
ySPACEyanks byte under cursor
nySPACE - yanks n bytes, beginning at cursor - position
yfCyanks from current position to next - character C
y/xyzyanks from current position to first matching - pattern xyz
y$yanks from current position to EOF
y'ayanks from current position to mark a
ynGyanks from current position to byte with (decimal) - address n
ooverwrites the bytes after the cursor with the contents of the yank - or delete buffer
pputs the contents of the yank or delete - buffer after the cursor
Pappends the contents of the buffer to end - of file
- -

Using ex (colon) Commands

-:y(ank) -
-yank can be used with one or two addresses specified. One address -with no count specified copies the specified byte into the buffer. -Two addresses with no count specified copies multiple bytes -starting and ending with the specified bytes. Two addresses and a count -value copies count bytes starting at the second specified address (the -first address is ignored). If no address is specified, the current address -ist used by yank.
-Examples: -
- :start_addr,end_addr y RETURN
- :start_addr y byte_countRETURN
- :y byte_countRETURN
-
-
-

-:pu(t) -

-Restores previously deleted or yanked bytes after the address specified -in the put command. -
-

-:o(verwrite) -

-Overwrites bytes after the specified address with previously deleted or yanked -bytes. -
-

-NOTE: There are currently no namend buffers available. -

- -Back to the top - -


-Last update: June 1st 2000 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/quick.html b/html/quick.html deleted file mode 100644 index 0f68551..0000000 --- a/html/quick.html +++ /dev/null @@ -1,200 +0,0 @@ - - -BVI: Quick Tutorial - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-Editing Files
-Search Commands
-Bit-wise Operations
-Find and Replace
-Yank and Put
-Settings
-Partial File Read
-

-

-Download
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-Quick Tutorial - - -BVI -
-
-
- -

-This tutorial will explain all commands which behaves different to -vi. Note that, if you are on a Linux system, you will probably -have an 'improved' version of vi. Bvi is more similar to the standard -version. - -

The Screen

-
- - - - -
-000000
-00000C
-000018
-000024
-000030
-00003C
-000048
-000054
-000060
-00006C
-000078
-000084
-000090
-00009C
- 7F 45 4C 46 01 01
- 00 00 00 00 01 00
- 00 00 00 00 00 00
- 00 00 00 00 34 00
- 0C 00 09 00 00 00
- 00 00 00 00 55 89
- 53 C7 45 A4 00 00
- 00 00 00 83 7D 08
- 8C 02 00 00 E9 6F
- 00 00 00 00 6A 03
- 45 08 50 E8 FC FF
- 0C 85 D2 75 17 6A
- E9 43 02 00 00 8D
- 0C 85 D2 75 0D C7
- 01 00 00 00 00 00
- 03 00 01 00 00 00
- 00 00 0C 07 00 00
- 00 00 00 00 28 00
- 00 00 00 00 00 00
- E5 83 EC 68 57 56
- 00 00 C7 45 A0 01
- 00 75 13 6A 00 E8
- 02 00 00 8D B4 26
- 68 90 00 00 00 8B
- FF FF 89 C2 83 C4
- 01 E8 60 02 00 00
- 74 26 00 8D BC 27
- 45 A0 00 00 00 00
- .ELF........
- ............
- ............
- ....4.....(.
- ............
- ....U....hWV
- S.E......E..
- ....}..u.j..
- .....o.....&
- ....j.h.....
- E.P.........
- ...u.j..`...
- .C....t&...'
- ...u..E.....
"set.o" 3500 bytes000001 \105 0x45 69 'E'
-
-

-The screen is divided into four areas, symbolized by four different -colors. The magenta area contents the addresses in hexadecimal -notation. The green area contents the values of the edited file in -hexadecimal notation. The red area contents the same bytes in ASCII -representation. The yellow status line displays on the left side the -current status messages and on the right site the current position -of the cursor and the value of the byte on this address in octal, -hexadecimal, decimal and ASCII notation. -
-You can toggle between the Hex and ASCII value of the same byte by -pressing the TAB key both in command -and input mode. - -

Command Line Options

-There are some additional command line options in bvi:
- -
--f script -
-This command provides a means for collecting a series of ex -(colon) commands into a script file, then using this file to edit -other files. Since there is no binary stream editor bsed, you -can use this option to make several global changes in a binary file. -You can do this of course with the source command (:so file) -from within bvi too. - -
--b begin -
-This option causes bvi to load a file not from start but from address -begin. - -
--e end -
-This option causes bvi to load a file not till end but till address -end. - -
--s size -
-This option causes bvi not to load the complete file but only size -bytes. This option can also be used to read a file reported with a -length 0 like some files in the Linux /proc -directory. -

-begin, end or size can be an integer value (decimal or -hexadecimal) or an integer value with an appended k (for -multiply by 1024) or m (for multiply by 1.048.576). -

-You should use at most two of the three address options to avoid ambiguity! - - -

Not Implemented Commands

-

-

    -
  • :map and :unmap (Macros) -
  • :abbreviate (:ab) and :una -
  • no named buffers. -
-

- -Back to the top - -


-Last update: October 19th 2000 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/rpm.html b/html/rpm.html deleted file mode 100644 index 530330f..0000000 --- a/html/rpm.html +++ /dev/null @@ -1,6 +0,0 @@ - -Source RPM - - -Switching to http://sites.inka.de/mips/unix/index.html . . . - diff --git a/html/set.html b/html/set.html deleted file mode 100644 index 1b521c7..0000000 --- a/html/set.html +++ /dev/null @@ -1,117 +0,0 @@ - -BVI: Set Commands - - - - - - -
-Command Overview -
Set Commands -
- -BVI -
-
-
-

- -

-[ Cursor Movements -| Edit Cmds -| Yank and Put Cmds -| Set Options -| Colon (ex) Cmds -] -
-

- - - - - - - - - - - -
CommandBVIVI
Search
settings
- - - - - - - -
:set wrapscan or :set ws
- :set nows
When this option is set, pattern searches resulting from a /, - ?, n, N (#, \) command automatically wrap around to the opposit end of the file - and continue whenever the beginning or end of a file is reached.
:set ignorecase or :set ic
- :set noic
Uppercase and lowercase characters in text are treated identically - in regular expression matching
:set magic
- :set nomagic
Enables metacharacters for use in regular expressions
-
Display
options
- - - - - -
:set showmode
- :set noshowmode
Displays a status message in the lowest line on the screen
:set terse
- :set noterse
The terse option lets you obtain shorter error diagnostics.
-
File
options
- - - - - -
:set readonly or :set ro
- :set noro
This option sets the read-only flag for the file being editeds, - thus preventing accidental overwriting at the end of the session.
:set autowrite or :set aw
- :set noaw
Causes the contents of the buffer to be written to the current file - if you have modified them and given a :next, :rewind or ! - command.
-
bvi
options
- - - - - - - - - - - -
:set columns=13
:set cm=5
You can set the number of bytes displayed in on screenline. - Default is max. number divisible by four.
:set memmove
:set nomm
If memmove is set, you can use commands to insert or delete bytes. - This can be dangerous for e.g. executable programs. - Default is nomemmove.
:set offset=1
:set of=5
An offset is added to all addresses and byte counts. Default - address of the first byte is 0.
:set wordlength=5
:set wl=8
Length of an ASCII-string found by w, W, b or B
:set unixstyle
:set nous
displays ASCII characters below 32 in the status line in - Unix-style instead of DOS-style
-
- Not available. -
- -

-

-[ Cursor Movements -| Edit Cmds -| Yank and Put Cmds -| Set Options -| Colon (ex) Cmds -] -
-

- -Back to the top - -


-Last update: October 30th 1999 by Gerhard Bürgmann, -Purkersdorf/Austria - - - diff --git a/html/sitemap.html b/html/sitemap.html deleted file mode 100644 index 5518843..0000000 --- a/html/sitemap.html +++ /dev/null @@ -1,160 +0,0 @@ - - -BVI: Sitemap - - - - - - - -
- - -
-

-Home
-

-

-Quick Tutorial
-

-

-Download
-

-

-Installation
-

-

-Command Overview
-

-

-bmore
-

-

-Deutsche Beschreibung
-

-
- -
- - - - -
-Sitemap - - -BVI -
-
-
- -

-

-

- -Back to the top - -


-Last update: January 8th 2004 by Gerhard Bürgmann, -Purkersdorf/Austria -
- diff --git a/html/yank.html b/html/yank.html deleted file mode 100644 index 18a31cf..0000000 --- a/html/yank.html +++ /dev/null @@ -1,142 +0,0 @@ - -BVI: Yank and Put Commands - - - - - - -
-Command Overview -
Yank and Put Commands -
- -BVI -
-
-
-

- -

-[ Cursor Movements -| Edit Cmds -| Yank and Put Cmds -| Set Options -| Colon (ex) Cmds -] -
-

-NOTE: the o command (overwriting put) is the only command in -bvi that uses a key for a complete different purpose than in vi. -

- - - - - - - - - - - - - - -
CommandBVIVI
Put
bytes
- - - -
  p  put the contents of the yank or delete buffer after cursor position
-
- - -
  P  append the contents of the yank or delete buffer at EOF
-
- - -
  P  put the contents of the yank or delete buffer - before cursor position
-
- - -
  o  overwrite the following bytes with the contents - of the yank or delete buffer
-
- - -
not available
-
Yank
bytes
- - - - - - - - - - -
ySPACEyank byte at cursor position
yfCyank from current position to next character C
y/xyzyank from current position to matching pattern xyz -
y?xyzyank from current position to matching pattern xyz in reverse direction -
y'ayank from current position to mark a
ynGyank from current position to byte with (decimal) address n
-
- - -
not available
-
- - - - - -
yy  yank line
y)yank from cursor position through first - following end of sentence
y}yank from cursor position through first - following end of paragraph
y]yank from cursor position through first - following end of section
-
- - - - - -
y\6a 56 ff  yank from cursor position to first occurance of hex pattern - 6a 56 ff
y#6a 56 ff  yank from cursor position to first occurance of hex pattern - 6a 56 ff in reverse direction
-
- - -
not available
-
- - -
  y$  yank from current position to EOF
-
- - -
  y$  yank from current position to end of line
-
-

-Note that most of the commands can be used with a decimal repeat count in front -of the command! - -

-

-[ Cursor Movements -| Edit Cmds -| Yank and Put Cmds -| Set Options -| Colon (ex) Cmds -] -
-

- -Back to the top - -


-Last update: October 30th 1999 by Gerhard Bürgmann, -Purkersdorf/Austria - - - diff --git a/io.c b/io.c index b868dfa..c8232ab 100644 --- a/io.c +++ b/io.c @@ -8,10 +8,12 @@ * 2000-03-23 V 1.3.0 beta * 2000-08-17 V 1.3.0 final * 2004-01-04 V 1.3.2 + * 2010-06-02 V 1.3.4 + * 2014-05-03 V 1.4.0 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2004 by Gerhard Buergmann + * Copyright 1996-2014 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -30,11 +32,20 @@ #include "bvi.h" #include "set.h" -#include -#ifndef SIZE_T_MAX -# define SIZE_T_MAX ULONG_MAX +#if 0 +/* nowadays (2009) we should make sure that bvi is compiled with LFS support: */ +/* defines _LARGEFILE_SOURCE _FILE_OFFSET_BITS=64 */ +/* if compiled without LFS support, stat() open() lseek() will fail with */ +/* EOVERFLOW(75) Value too large for defined data type */ +/* see README for configure arguments to enable lfs support in 32-bit executables */ +/* cygwin enables lfs by default */ #endif +#include +# ifndef OFF_T_MAX +# define OFF_T_MAX ULONG_LONG_MAX +# endif + #ifdef HAVE_UNISTD_H # include #endif @@ -58,7 +69,7 @@ save(fname, start, end, flags) int flags; { int fd; - char string[255]; + char *string; char *newstr; off_t filesize; @@ -66,16 +77,23 @@ save(fname, start, end, flags) emsg("No file|No current filename"); return 0; } + string = malloc((size_t)strlen(fname) + MAXCMD); + if (string == NULL) { + emsg("Out of memory"); + return 0; + } if (stat(fname, &buf) == -1) { newstr = "[New file] "; } else { if (S_ISDIR(buf.st_mode)) { sprintf(string, "\"%s\" Is a directory", fname); msg(string); + free(string); return 0; } else if (S_ISCHR(buf.st_mode)) { sprintf(string, "\"%s\" Character special file", fname); msg(string); + free(string); return 0; } else if (S_ISBLK(buf.st_mode)) { /* @@ -90,36 +108,42 @@ save(fname, start, end, flags) if (filemode == PARTIAL) flags = O_RDWR; if ((fd = open(fname, flags, 0666)) < 0) { sysemsg(fname); + free(string); return 0; } if (filemode == PARTIAL) { if (block_read) { filesize = block_read; - sprintf(string, "\"%s\" range %lu-%lu", fname, - (unsigned long)block_begin, - (unsigned long)(block_begin - 1 + filesize)); + sprintf(string, "\"%s\" range %llu-%llu", fname, + (unsigned long long)block_begin, + (unsigned long long)(block_begin - 1 + filesize)); if (lseek(fd, block_begin, SEEK_SET) < 0) { sysemsg(fname); + free(string); return 0; } } else { msg("Null range"); + free(string); return 0; } } else { filesize = end - start + 1L; - sprintf(string, "\"%s\" %s%lu bytes", fname, newstr, - (unsigned long)filesize); + + sprintf(string, "\"%s\" %s%llu bytes", fname, newstr, + (unsigned long long)filesize); } if (write(fd, start, filesize) != filesize) { sysemsg(fname); + free(string); close(fd); return 0; } close(fd); edits = 0; msg(string); + free(string); return 1; } @@ -130,17 +154,31 @@ load(fname) char *fname; { int fd = -1; - char string[MAXCMD]; + char *string; buf.st_size = 0L; if (fname != NULL) { + /* sprintf(string, "\"%s\"", fname); msg(string); refresh(); + */ if (stat(fname, &buf) == -1) { - filemode = NEW; + /* check for EOVERFLOW 75 */ + /* Value too large for defined data type */ + /* means bvi is compiled without lfs support */ + if (errno == ENOENT) { + filemode = NEW; + } else { + move(maxy, 0); + endwin(); + perror(fname); + exit(0); + } + /* } else if (S_ISDIR(buf.st_mode)) { filemode = DIRECTORY; + */ } else if (S_ISCHR(buf.st_mode)) { filemode = CHARACTER_SPECIAL; } else if (S_ISBLK(buf.st_mode)) { @@ -158,15 +196,23 @@ load(fname) sysemsg(fname); filemode = ERROR; } - } else if (S_ISREG(buf.st_mode)) { - if ((unsigned long)buf.st_size > (unsigned long)SIZE_T_MAX) { + } else if (S_ISREG(buf.st_mode) || S_ISDIR(buf.st_mode)) { +#if 0 + /* stat() call above will fail if file is too large */ + /* this size check will never fail */ + if ((unsigned long long)buf.st_size > (unsigned long long)OFF_T_MAX) { move(maxy, 0); endwin(); printf("File too large\n"); exit(0); } +#endif if ((fd = open(fname, O_RDONLY)) > 0) { - filemode = REGULAR; + if (S_ISREG(buf.st_mode)) { + filemode = REGULAR; + } else { + filemode = DIRECTORY; + } if (access(fname, W_OK)) { P(P_RO) = TRUE; params[P_RO].flags |= P_CHANGED; @@ -182,6 +228,9 @@ load(fname) if (mem != NULL) free(mem); memsize = 1024; if (block_flag) { + if (block_flag == BLOCK_BEGIN) { + block_size = buf.st_size - block_begin; + } memsize += block_size; } else if (filemode == REGULAR) { memsize += buf.st_size; @@ -194,6 +243,15 @@ load(fname) } clear_marks(); + if (fname != NULL) { + string = malloc((size_t)strlen(fname) + MAXCMD); + } else { + string = malloc(MAXCMD); + } + if (string == NULL) { + emsg("Out of memory"); + return 0; + } if (block_flag && ((filemode == REGULAR) || (filemode == BLOCK_SPECIAL))) { if (lseek(fd, block_begin, SEEK_SET) < 0) { @@ -204,9 +262,9 @@ load(fname) sprintf(string, "\"%s\" Empty file", fname); filemode = ERROR; } else { - sprintf(string, "\"%s\" range %lu-%lu", fname, - (unsigned long)block_begin, - (unsigned long)(block_begin + filesize - 1)); + sprintf(string, "\"%s\" range %llu-%llu", fname, + (unsigned long long)block_begin, + (unsigned long long)(block_begin + filesize - 1)); filemode = PARTIAL; block_read = filesize; P(P_OF) = block_begin; @@ -215,7 +273,7 @@ load(fname) msg(string); refresh(); } - } else if (filemode == REGULAR) { + } else if ((filemode == REGULAR) || (filemode == DIRECTORY)) { filesize = buf.st_size; if (read(fd, mem, filesize) != filesize) { sysemsg(fname); @@ -231,9 +289,9 @@ load(fname) sprintf(string, "\"%s\" [New File]", fname); break; case REGULAR: - sprintf(string, "\"%s\" %s%lu bytes", fname, + sprintf(string, "\"%s\" %s%llu bytes", fname, P(P_RO) ? "[Read only] " : "", - (unsigned long)filesize); + (unsigned long long)filesize); break; case DIRECTORY: sprintf(string, "\"%s\" Directory", fname); @@ -252,6 +310,7 @@ load(fname) loc = HEX; x = AnzAdd; y = 0; repaint(); + free(string); return(filesize); } @@ -336,12 +395,14 @@ enlarge(add) void do_shell() { + int ret; + addch('\n'); savetty(); #ifdef DJGPP - system(""); + ret = system(""); #else - system(shell); + ret = system(shell); #endif resetty(); } diff --git a/patchlevel.h b/patchlevel.h index da1249b..7851500 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -1 +1 @@ -#define VERSION "1.3.2" +#define VERSION "1.4.0" diff --git a/re.c b/re.c index 5fba7cc..414774d 100644 --- a/re.c +++ b/re.c @@ -8,8 +8,10 @@ * 1999-09-10 V 1.2.0 * 2000-04-25 V 1.3.0 beta * 2000-09-29 V 1.3.0 final + * 2010-06-02 V 1.3.4 + * 2013-08-24 V 1.4.0 * - * Copyright 1996-2003 by Gerhard Buergmann + * Copyright 1996-2013 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -43,7 +45,7 @@ char *emptyclass = "Bad character class|Empty byte class '[]' or '[^]' cannot ma -int +PTR bregexec(start, scan) PTR start; char *scan; @@ -59,10 +61,12 @@ bregexec(start, scan) if (P(P_IC) && smode == ASCII) test = toupper(*start); else test = *start; if (count == 1) { - if (test != *scan) return 0; + /* if (test != *scan) return 0; */ + if (test != *scan) return NULL; scan++; } else if (count > 1) { - if (sbracket(test, scan, count)) return 0; + /* if (sbracket(test, scan, count)) return 0; */ + if (sbracket(test, scan, count)) return NULL; scan += count; } *act++ = *start++; @@ -83,9 +87,11 @@ bregexec(start, scan) while (start < maxpos) { if (bregexec(start, scan + count)) { *act = '\0'; - return 1; + /* return 1; */ + return start; } - if (sbracket(test, scan, count)) return 0; + /* if (sbracket(test, scan, count)) return 0; */ + if (sbracket(test, scan, count)) return NULL; *act++ = *start++; if (P(P_IC) && smode == ASCII) test = toupper(*start); else test = *start; @@ -100,14 +106,19 @@ bregexec(start, scan) } } else { /* ".*" */ while (start < maxpos) { - if (bregexec(start, scan)) { *act = '\0'; return 1; } + /* if (bregexec(start, scan)) { *act = '\0'; return 1; } */ + if (bregexec(start, scan)) { + *act = '\0'; + return start; + } start++; } } } } *act = '\0'; - return 1; /* found */ + return start; /* found */ + /* return 1; */ } @@ -487,17 +498,23 @@ patcpy(s1, s2, delim) PTR +fsearch_end(start, end, smem, s_end) +/* fsearch(start, end, smem) +*/ PTR start; PTR end; char *smem; + PTR *s_end; { PTR spos; signal(SIGINT, jmpproc); for (spos = start; spos <= end; spos++) { - if (bregexec(spos, smem)) { + /* if (bregexec(spos, smem)) { */ + if (*s_end = bregexec(spos, smem)) { signal(SIGINT, SIG_IGN); + *s_end++; return(spos); } } @@ -506,6 +523,17 @@ fsearch(start, end, smem) } +PTR +fsearch(start, end, smem) + PTR start; + PTR end; + char *smem; +{ + PTR s_end; + return fsearch_end(start, end, smem, &s_end); +} + + PTR rsearch(start, end, smem) PTR start; @@ -542,7 +570,7 @@ calc_addr(pointer, def_addr) addr = def_addr; SKIP_WHITE if (*cmd >= '1' && *cmd <= '9') { - addr = mem + strtol(cmd, &cmd, 10) - P(P_OF); + addr = mem + strtoll(cmd, &cmd, 10) - P(P_OF); } else { ch = *cmd; switch (ch) { @@ -619,19 +647,11 @@ calc_addr(pointer, def_addr) if (*cmd == '+') { cmd++; SKIP_WHITE - if (*cmd >= '1' && *cmd <= '9') { - addr += strtol(cmd, &cmd, 10); - } else if (*cmd == '0') { - addr += strtol(cmd, &cmd, 16); - } + addr += strtoll(cmd, &cmd, 0); } else { cmd++; SKIP_WHITE - if (*cmd >= '1' && *cmd <= '9') { - addr -= strtol(cmd, &cmd, 10); - } else if (*cmd == '0') { - addr -= strtol(cmd, &cmd, 16); - } + addr -= strtoll(cmd, &cmd, 0); } SKIP_WHITE } diff --git a/script b/script index 87e0be4..328b638 100644 --- a/script +++ b/script @@ -1,4 +1,8 @@ +set columns=8 set mm + + + 0,20d w! %.new q diff --git a/set.c b/set.c index 7a2e0d2..fefc63b 100644 --- a/set.c +++ b/set.c @@ -11,8 +11,10 @@ * 2000-07-15 V 1.3.0 final * 2001-10-10 V 1.3.1 * 2003-07-03 V 1.3.2 + * 2010-06-02 V 1.2.4 + * 2014-09-30 V 1.4.0 * - * Copyright 1996-2003 by Gerhard Buergmann + * Copyright 1996-2014 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -33,8 +35,8 @@ static int from_file = 0; static FILE *ffp; -static char fbuf[256]; -static char buf[64]; +static char fbuf[MAXCMD+1]; +static char buf[MAXCMD+1]; struct param params[] = { { "autowrite", "aw", FALSE, "", P_BOOL }, @@ -53,6 +55,7 @@ struct param params[] = { { "window", "window", 25, "", P_NUM }, { "wordlength", "wl", 4, "", P_NUM }, { "wrapscan", "ws", TRUE, "", P_BOOL }, + { "highlight", "hl", TRUE, "", P_BOOL }, #if defined(__MSDOS__) && !defined(DJGPP) { "color", "co", 7, "", P_NUM }, #endif @@ -99,8 +102,9 @@ doset(arg) sprintf(buf, " %s=%s", params[i].fullname, params[i].svalue); else - sprintf(buf, " %s=%ld", params[i].fullname, - params[i].nvalue); + + sprintf(buf, " %s=%lld", params[i].fullname, + (long long)params[i].nvalue); msg(buf); return 0; } @@ -117,11 +121,7 @@ doset(arg) return 1; } else { s = arg + strlen(s) + 1; - if (*s == '0') { - params[i].nvalue = strtol(s, &s, 16); - } else { - params[i].nvalue = strtol(s, &s, 10); - } + params[i].nvalue = strtoll(s, &s, 0); params[i].flags |= P_CHANGED; #if defined(__MSDOS__) && !defined(DJGPP) if (i == P_CO) { @@ -152,6 +152,10 @@ doset(arg) } else { params[i].nvalue = state; params[i].flags |= P_CHANGED; + if (i == P_HL && state == FALSE) { + hl_spat = FALSE; + repaint(); + } } } } else { @@ -187,7 +191,7 @@ showparms(all) else if (p->flags & P_TEXT) sprintf(buf, " %s=%s\n", p->fullname, p->svalue); else - sprintf(buf, " %s=%ld\n", p->fullname, p->nvalue); + sprintf(buf, " %s=%lld\n", p->fullname, (long long)p->nvalue); msg(buf); n++; @@ -205,10 +209,13 @@ int read_rc(fn) char *fn; { - if((ffp = fopen(fn, "r")) == NULL) return -1; + int i; + + if ((ffp = fopen(fn, "r")) == NULL) return -1; from_file = 1; - while(fgets(fbuf, 255, ffp) != NULL) { - strtok(fbuf, "\n\r"); + while (fgets(fbuf, MAXCMD, ffp) != NULL) { + i = strlen(fbuf) - 1; + while ((i >= 0) && (fbuf[i] == NL || fbuf[i] == CR)) fbuf[i--] = '\0'; docmdline(fbuf); } fclose(ffp); @@ -245,7 +252,7 @@ do_logic(mode, str) } else if (str[0] == 'b' || str[0] == 'B') { value = strtol(str + 1, NULL, 2); } else if (str[0] == '0') { - value = strtol(str, NULL, 16); + value = strtol(str, NULL, 0); for (n = 0; n < strlen(str); n++) { if (!isxdigit(str[n])) { value = -1; @@ -311,12 +318,14 @@ getcmdstr(p, x) int x; { int c; - int n; + int i, n; char *buff, *q; if (from_file) { - if(fgets(p, 255, ffp) != NULL) { - strtok(p, "\n\r"); + if (fgets(p, 255, ffp) != NULL) { + // strtok(p, "\n\r"); + i = strlen(p) - 1; + while ((i >= 0) && (p[i] == NL || p[i] == CR)) p[i--] = '\0'; return 0; } else { return 1; @@ -329,6 +338,7 @@ getcmdstr(p, x) do { switch (c = vgetc()) { case BVICTRL('H'): + case ASCII_DEL: case KEY_BACKSPACE: case KEY_LEFT: if (p > buff) { @@ -359,6 +369,9 @@ getcmdstr(p, x) #if CR != KEY_ENTER case CR: #endif + case KEY_RIGHT: + case KEY_UP: + case KEY_DOWN: case KEY_ENTER: break; default: /* a normal character */ diff --git a/set.h b/set.h index 116f32e..55aac90 100644 --- a/set.h +++ b/set.h @@ -2,7 +2,7 @@ * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2002 by Gerhard Buergmann + * Copyright 1996-2014 by Gerhard Buergmann * Gerhard.Buergmann@puon.at * * 1998-03-14 V 1.0.0 @@ -11,6 +11,8 @@ * 1999-07-02 V 1.2.0 beta * 1999-08-14 V 1.2.0 final * 2000-08-21 V 1.3.0 final + * 2010-06-02 V 1.3.4 + * 2013-08-23 V 1.4.0 * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -29,7 +31,7 @@ struct param { char *fullname; /* full parameter name */ char *shortname; /* permissible abbreviation */ - long nvalue; + off_t nvalue; char *svalue; int flags; }; @@ -64,7 +66,8 @@ extern struct param params[]; #define P_LI 13 /* lines */ #define P_WL 14 /* Wordlength for w, W, b, B command */ #define P_WS 15 /* wrapscan */ -#define P_CO 16 /* color/attribute setting */ +#define P_HL 16 /* highlight search enabled */ +#define P_CO 17 /* color/attribute setting */ /* * Macro to get the value of a parameter diff --git a/tags b/tags new file mode 100644 index 0000000..33be205 --- /dev/null +++ b/tags @@ -0,0 +1,635 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION 5.8 // +AND bvi.h 88;" d +ANSI bmore.h 103;" d +ANSI bvi.h 117;" d +APPEND comm.c 50;" d file: +APPEND comm.c 53;" d file: +ASCII bmore.h 82;" d +ASCII bvi.h 95;" d +A_ATTRIBUTES doscur.h 56;" d +A_BLINK doscur.h 54;" d +A_BOLD doscur.h 52;" d +A_CHARTEXT doscur.h 55;" d +A_NORMAL doscur.h 50;" d +A_REVERSE doscur.h 53;" d +A_STANDOUT doscur.h 51;" d +AnzAdd bmore.c /^int AnzAdd;$/;" v +AnzAdd bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v +Anzahl bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v +Anzahl3 bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v +Ausgabe_Datei bvi.c /^FILE *Ausgabe_Datei;$/;" v +BACKWARD bmore.h 84;" d +BACKWARD bvi.h 97;" d +BLOCK_BEGIN bvi.h /^ BLOCK_BEGIN = 1,$/;" e enum:_block_datum +BLOCK_END bvi.h /^ BLOCK_END = 2,$/;" e enum:_block_datum +BLOCK_LEN bvi.h /^ BLOCK_LEN = 4$/;" e enum:_block_datum +BLOCK_SPECIAL bmore.h 74;" d +BLOCK_SPECIAL bvi.h 64;" d +BMOBJ Makefile /^BMOBJ = bmore.o bm_unix.o recomp.o$/;" m +BS bmore.h 87;" d +BS bvi.h 100;" d +BUFFER bmore.h 115;" d +BUFFER bvi.h 131;" d +BVICTRL bmore.h 91;" d +BVICTRL bvi.h 103;" d +CC Makefile /^CC = gcc$/;" m +CFLAGS Makefile /^CFLAGS = -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES$/;" m +CHARACTER_SPECIAL bmore.h 73;" d +CHARACTER_SPECIAL bvi.h 63;" d +CMDLNG bvi.h 105;" d +CMDSZ comm.c 56;" d file: +COLS dosio.c /^int COLS = 80;$/;" v +CR bmore.h 85;" d +CR bvi.h 98;" d +DEFS Makefile /^DEFS = -DHAVE_CONFIG_H$/;" m +DELIM bmore.h 106;" d +DELIM bmore.h 111;" d +DELIM bvi.h 120;" d +DELIM bvi.h 127;" d +DIRECTORY bmore.h 72;" d +DIRECTORY bvi.h 62;" d +ECHO dosio.c /^int ECHO = TRUE;$/;" v +END bmore.h 78;" d +END bvi.h 68;" d +ERR doscur.h 147;" d +ERROR bmore.h 69;" d +ERROR bvi.h 59;" d +ESC bmore.h 88;" d +ESC bvi.h 101;" d +ESC doscur.h 31;" d +FALSE bmore.h 99;" d +FALSE bvi.h 113;" d +FALSE doscur.h 29;" d +FORWARD bmore.h 83;" d +FORWARD bvi.h 96;" d +HAVE_CURSES_H acconfig.h 5;" d +HAVE_FCNTL_H config.h 16;" d +HAVE_FCNTL_H dosconf.h 40;" d +HAVE_INTTYPES_H config.h 19;" d +HAVE_LOCALE_H dosconf.h 44;" d +HAVE_MEMMOVE config.h 22;" d +HAVE_MEMMOVE dosconf.h 31;" d +HAVE_MEMORY_H config.h 25;" d +HAVE_NCURSES_H acconfig.h 3;" d +HAVE_NCURSES_H config.h 5;" d +HAVE_NCURSES_TERM_H acconfig.h 11;" d +HAVE_STDINT_H config.h 31;" d +HAVE_STDLIB_H config.h 34;" d +HAVE_STRDUP config.h 37;" d +HAVE_STRDUP dosconf.h 34;" d +HAVE_STRERROR config.h 40;" d +HAVE_STRINGS_H config.h 43;" d +HAVE_STRING_H config.h 46;" d +HAVE_STRTOL config.h 49;" d +HAVE_STRTOL dosconf.h 37;" d +HAVE_SYS_STAT_H config.h 52;" d +HAVE_SYS_TYPES_H config.h 55;" d +HAVE_TERMCAP_H config.h 58;" d +HAVE_TERMIOS_H config.h 61;" d +HAVE_TERMIO_H config.h 64;" d +HAVE_TERM_H config.h 67;" d +HAVE_UNISTD_H config.h 70;" d +HEADER Makefile /^HEADER = bvi.h set.h$/;" m +HELPFILE bmore.c 42;" d file: +HELPFILE bmore.c 44;" d file: +HEX bvi.h 94;" d +Home bm_unix.c /^char *Home; \/* go to home *\/$/;" v +INSTALL Makefile /^INSTALL = \/usr\/bin\/install -c$/;" m +INSTALL_DATA Makefile /^INSTALL_DATA = ${INSTALL} -m 644$/;" m +INSTALL_PROGRAM Makefile /^INSTALL_PROGRAM = ${INSTALL}$/;" m +JOEHTG bvi.h 41;" d +KEY_BACKSPACE bvi.h 150;" d +KEY_BACKSPACE doscur.h 42;" d +KEY_DC doscur.h 45;" d +KEY_DOWN doscur.h 34;" d +KEY_ENTER doscur.h 41;" d +KEY_F doscur.h 33;" d +KEY_F0 doscur.h 32;" d +KEY_HOME doscur.h 43;" d +KEY_IC doscur.h 46;" d +KEY_LEFT doscur.h 36;" d +KEY_LL doscur.h 44;" d +KEY_NPAGE doscur.h 38;" d +KEY_PPAGE doscur.h 39;" d +KEY_RETURN doscur.h 40;" d +KEY_RIGHT doscur.h 37;" d +KEY_UP doscur.h 35;" d +LDFLAGS Makefile /^LDFLAGS= $/;" m +LIBS Makefile /^LIBS = -lncurses $/;" m +LINES dosio.c /^int LINES = 25;$/;" v +LROTATE bvi.h 86;" d +LSHIFT bvi.h 84;" d +MAXCMD bmore.h 114;" d +MAXCMD bvi.h 130;" d +MAXNAME comm.c 57;" d file: +MAX_ONE_ARG comm.c 62;" d file: +MAX_ONE_FILE comm.c 64;" d file: +NEED_PUTC_CHAR acconfig.h 9;" d +NEED_PUTC_CHAR bm_unix.c 52;" d file: +NEG bvi.h 91;" d +NEW bmore.h 71;" d +NEW bvi.h 61;" d +NL bmore.h 86;" d +NL bvi.h 99;" d +NODEL dosio.c /^int NODEL = FALSE;$/;" v +NOT bvi.h 92;" d +NO_ADDR comm.c 59;" d file: +NO_ARG comm.c 60;" d file: +NO_SYSERRL acconfig.h 7;" d +NULL bmore.h 94;" d +NULL bvi.h 108;" d +OBJS Makefile /^OBJS = bvi.o comm.o set.o re.o io.o edit.o recomp.o$/;" m +OFF_T_MAX io.c 46;" d file: +ONE bmore.h 79;" d +ONE bvi.h 69;" d +ONE_ARG comm.c 61;" d file: +ONE_FILE comm.c 63;" d file: +OR bvi.h 89;" d +P set.h 75;" d +PARTIAL bmore.h 75;" d +PARTIAL bvi.h 65;" d +PRINTF bmore.c 37;" d file: +PRINTF bmore.c 39;" d file: +PTR bmore.h 104;" d +PTR bmore.h 110;" d +PTR bvi.h 118;" d +PTR bvi.h 126;" d +P_AW set.h 53;" d +P_BOOL set.h 41;" d +P_CHANGED set.h 44;" d +P_CM set.h 54;" d +P_CO set.h 70;" d +P_EB set.h 55;" d +P_HL set.h 69;" d +P_IC set.h 56;" d +P_LI set.h 66;" d +P_MA set.h 57;" d +P_MM set.h 58;" d +P_MO set.h 62;" d +P_NUM set.h 42;" d +P_OF set.h 59;" d +P_RO set.h 60;" d +P_SS set.h 61;" d +P_TE set.h 64;" d +P_TEXT set.h 43;" d +P_TT set.h 63;" d +P_US set.h 65;" d +P_WL set.h 67;" d +P_WS set.h 68;" d +REGULAR bmore.h 70;" d +REGULAR bvi.h 60;" d +REPLACE bmore.h 90;" d +RROTATE bvi.h 87;" d +RSHIFT bvi.h 85;" d +SEARCH bmore.h 89;" d +SEARCH bvi.h 102;" d +SHELL Makefile /^SHELL = \/bin\/sh$/;" m +SIZEOF_INT config.h 73;" d +SIZEOF_LONG config.h 76;" d +SIZEOF_VOID_P config.h 79;" d +SKIP_WHITE bvi.h 133;" d +STAR bmore.h 80;" d +STAR bvi.h 70;" d +STDC_HEADERS config.h 82;" d +STDC_HEADERS dosconf.h 28;" d +S_GLOBAL bvi.h 81;" d +S_ISBLK bvi.h 199;" d +S_ISCHR bvi.h 198;" d +S_ISDIR bvi.h 197;" d +S_ISFIFO bvi.h 201;" d +S_ISREG bvi.h 200;" d +TBUFSIZ bm_dos.c 32;" d file: +TBUFSIZ bm_unix.c 32;" d file: +TRUE bmore.h 98;" d +TRUE bvi.h 112;" d +TRUE doscur.h 28;" d +U_APPEND bvi.h 78;" d +U_BACK bvi.h 77;" d +U_DELETE bvi.h 76;" d +U_EDIT bvi.h 73;" d +U_INSERT bvi.h 75;" d +U_TILDE bvi.h 79;" d +U_TRUNC bvi.h 74;" d +VERSION patchlevel.h 1;" d +WINDOW doscur.h 60;" d +WRITE comm.c 49;" d file: +WRITE comm.c 52;" d file: +XOR bvi.h 90;" d +_block_datum bvi.h /^typedef enum _block_datum {$/;" g +ac_fn_c_check_func configure /^ac_fn_c_check_func ()$/;" f +ac_fn_c_check_header_compile configure /^ac_fn_c_check_header_compile ()$/;" f +ac_fn_c_check_header_mongrel configure /^ac_fn_c_check_header_mongrel ()$/;" f +ac_fn_c_check_type configure /^ac_fn_c_check_type ()$/;" f +ac_fn_c_compute_int configure /^ac_fn_c_compute_int ()$/;" f +ac_fn_c_try_compile configure /^ac_fn_c_try_compile ()$/;" f +ac_fn_c_try_cpp configure /^ac_fn_c_try_cpp ()$/;" f +ac_fn_c_try_link configure /^ac_fn_c_try_link ()$/;" f +ac_fn_c_try_run configure /^ac_fn_c_try_run ()$/;" f +act_pat re.c /^char act_pat[MAXCMD]; \/* found pattern *\/$/;" v +addch doscur.h 95;" d +addfile dosio.c /^addfile(char *fname)$/;" f +addfile io.c /^addfile(fname)$/;" f +addr_flag comm.c /^int addr_flag;$/;" v +addr_form bmore.c /^char addr_form[15];$/;" v +addr_form bvi.c /^char addr_form[15];$/;" v +addstr doscur.h 99;" d +again recomp.c /^int again = 0;$/;" v +alloc_buf dosio.c /^alloc_buf(off_t n, char **buffer)$/;" f +alloc_buf io.c /^alloc_buf(n, buffer)$/;" f +altfile comm.c /^static char *altfile = NULL; \/* alternate file *\/$/;" v file: +ambigous comm.c /^char *ambigous = "Ambigous|Too many file names";$/;" v +ambvalue comm.c /^char *ambvalue = "Ambigous|Too many values";$/;" v +arrnum bmore.c /^int arrnum = 0;$/;" v +arrnum bvi.c /^int arrnum = 0;$/;" v +as_fn_append config.status /^ as_fn_append ()$/;" f +as_fn_append configure /^ as_fn_append ()$/;" f +as_fn_arith config.status /^ as_fn_arith ()$/;" f +as_fn_arith configure /^ as_fn_arith ()$/;" f +as_fn_error config.status /^as_fn_error ()$/;" f +as_fn_error configure /^as_fn_error ()$/;" f +as_fn_exit config.status /^as_fn_exit ()$/;" f +as_fn_exit configure /^as_fn_exit ()$/;" f +as_fn_failure configure /^as_fn_failure () { as_fn_return 1; }$/;" f +as_fn_mkdir_p config.status /^as_fn_mkdir_p ()$/;" f +as_fn_mkdir_p configure /^as_fn_mkdir_p ()$/;" f +as_fn_ret_failure configure /^as_fn_ret_failure () { return 1; }$/;" f +as_fn_ret_success configure /^as_fn_ret_success () { return 0; }$/;" f +as_fn_set_status config.status /^as_fn_set_status ()$/;" f +as_fn_set_status configure /^as_fn_set_status ()$/;" f +as_fn_success configure /^as_fn_success () { as_fn_return 0; }$/;" f +as_fn_unset config.status /^as_fn_unset ()$/;" f +as_fn_unset configure /^as_fn_unset ()$/;" f +ascii_comp recomp.c /^ascii_comp(smem, pattern)$/;" f +ascii_flag bmore.c /^int ascii_flag = 0;$/;" v +attrset dosio.c /^attrset(int attr)$/;" f +backsearch re.c /^backsearch(start, mode)$/;" f +beep doscur.h 76;" d +bindir Makefile /^bindir = $(DESTDIR)${exec_prefix}\/bin$/;" m +block_begin bvi.c /^off_t block_begin, block_end, block_size;$/;" v +block_datum bvi.h /^} block_datum;$/;" t typeref:enum:_block_datum +block_end bvi.c /^off_t block_begin, block_end, block_size;$/;" v +block_flag bvi.c /^int block_flag = 0;$/;" v +block_read io.c /^static off_t block_read;$/;" v file: +block_size bvi.c /^off_t block_begin, block_end, block_size;$/;" v +bmbeep bmore.c /^bmbeep() {$/;" f +bmore_search_pat bmore.c /^char bmore_search_pat[BUFFER]; \/* \/ or ? command *\/$/;" v +bmregexec bmore.c /^bmregexec(scan)$/;" f +bmsearch bmore.c /^bmsearch(ch)$/;" f +bregexec re.c /^bregexec(start, scan)$/;" f +buf comm.c /^static struct stat buf;$/;" v typeref:struct:stat file: +buf dosio.c /^static struct stat buf;$/;" v typeref:struct:stat file: +buf io.c /^static struct stat buf;$/;" v typeref:struct:stat file: +buf set.c /^static char buf[64];$/;" v file: +buffer1 bmore.c /^char buffer1[MAXCMD], buffer2[MAXCMD];$/;" v +buffer2 bmore.c /^char buffer1[MAXCMD], buffer2[MAXCMD];$/;" v +bvi_init dosio.c /^bvi_init(char *dir)$/;" f +bvi_init io.c /^bvi_init(dir)$/;" f +bytepos bmore.c /^off_t bytepos, oldpos;$/;" v +c_argc comm.c /^static int c_argc = 0;$/;" v file: +c_argv comm.c /^static char *c_argv[9];$/;" v file: +c_flag bmore.c /^int c_flag = 0, d_flag = 0;$/;" v +calc_addr re.c /^calc_addr(pointer, def_addr)$/;" f +calc_size bvi.c /^calc_size(arg)$/;" f +cbreak doscur.h 136;" d +chk_comm comm.c /^chk_comm(flag)$/;" f +chtype doscur.h 58;" d +clear doscur.h 83;" d +clear_marks edit.c /^clear_marks()$/;" f +clear_sc bm_unix.c /^char *clear_sc; \/* clear screen *\/$/;" v +clearscreen bm_dos.c /^clearscreen()$/;" f +clearscreen bm_unix.c /^clearscreen()$/;" f +clearstr comm.c /^clearstr()$/;" f +cleartoeol bm_dos.c /^cleartoeol()$/;" f +cleartoeol bm_unix.c /^cleartoeol()$/;" f +clrtoeol doscur.h 79;" d +cmdbuf bmore.c /^static char cmdbuf[MAXCMD];$/;" v file: +cmdstr bvi.c /^char cmdstr[MAXCMD + 1] = "";$/;" v +cnt bmore.c /^static int cnt = 0;$/;" v file: +contrd edit.c /^char contrd[][4] = {"NUL", " ^A", " ^B", " ^C", " ^D", " ^E", " ^F", "BEL",$/;" v +contru edit.c /^char contru[][4] = {"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",$/;" v +copyright bmore.c /^char *copyright = "Copyright (C) 1990-2013 by Gerhard Buergmann";$/;" v +copyright bvi.c /^char *copyright = "Copyright (C) 1996-2013 by Gerhard Buergmann";$/;" v +corr bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v +cur_back edit.c /^cur_back()$/;" f +cur_forw edit.c /^cur_forw(check)$/;" f +curfile bvi.c /^int curfile; \/* number of the current file *\/$/;" v +curpos bvi.c /^PTR curpos;$/;" v +curr_file bmore.c /^FILE *curr_file = NULL, *help_file;$/;" v +current bvi.c /^PTR current;$/;" v +current_start bvi.c /^PTR current_start;$/;" v +d_flag bmore.c /^int c_flag = 0, d_flag = 0;$/;" v +d_memcpy dosio.c /^d_memcpy(PTR dest, PTR src, off_t n)$/;" f +d_memmove dosio.c /^d_memmove(PTR dest, PTR src, off_t n)$/;" f +datarootdir Makefile /^datarootdir = ${prefix}\/share$/;" m +dbug bm_dos.c /^FILE *dbug;$/;" v +delch dosio.c /^delch()$/;" f +deleteln doscur.h 110;" d +dlines bm_unix.c /^int dum_opt, dlines;$/;" v +do_append bvi.c /^do_append(count, buf)$/;" f +do_back edit.c /^do_back(n, start)$/;" f +do_delete edit.c /^do_delete(n, start)$/;" f +do_exit comm.c /^do_exit()$/;" f +do_ft edit.c /^do_ft(ch, flag)$/;" f +do_header bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v +do_ins_chg edit.c /^do_ins_chg(start, arg, mode)$/;" f +do_logic set.c /^do_logic(mode, str)$/;" f +do_mark edit.c /^do_mark(mark, addr)$/;" f +do_next bmore.c /^do_next(n)$/;" f +do_over bvi.c /^do_over(loc, n, buf)$/;" f +do_put bvi.c /^do_put(loc, n, buf)$/;" f +do_shell dosio.c /^do_shell()$/;" f +do_shell io.c /^do_shell()$/;" f +do_substitution re.c /^do_substitution(delim, line, startpos, endpos)$/;" f +do_tilde bvi.c /^do_tilde(count)$/;" f +do_undo bvi.c /^do_undo()$/;" f +do_z edit.c /^do_z(mode)$/;" f +docmdline comm.c /^docmdline(cmdline)$/;" f +doecmd comm.c /^doecmd(arg, force)$/;" f +doset set.c /^doset(arg)$/;" f +doshell bm_dos.c /^doshell(cmd)$/;" f +doshell bm_unix.c /^doshell(cmd)$/;" f +doupdate doscur.h 143;" d +dum_opt bm_unix.c /^int dum_opt, dlines;$/;" v +dup_print_flag bmore.c /^int dup_print_flag = 0;$/;" v +echo doscur.h 128;" d +edit edit.c /^edit(mode)$/;" f +edits bvi.c /^int edits = 0;$/;" v +emptyclass bmore.c /^char *emptyclass = "Empty byte class '[]' or '[^]'";$/;" v +emptyclass re.c /^char *emptyclass = "Bad character class|Empty byte class '[]' or '[^]' cannot match";$/;" v +emsg bmore.c /^emsg(s)$/;" f +emsg comm.c /^emsg(s)$/;" f +end_addr comm.c /^PTR end_addr;$/;" v +end_word re.c /^end_word(start)$/;" f +endwin doscur.h 137;" d +enlarge dosio.c /^enlarge(off_t add)$/;" f +enlarge io.c /^enlarge(add)$/;" f +env bvi.c /^jmp_buf env; \/* context for `longjmp' function *\/$/;" v +erase doscur.h 81;" d +erase_ln bm_unix.c /^char *erase_ln; \/* erase line *\/$/;" v +erasechar doscur.h 75;" d +estring bmore.c /^char estring[MAXCMD] = ""; \/* string for shell escape *\/$/;" v +exec_prefix Makefile /^exec_prefix = ${prefix}$/;" m +extra comm.c /^char *extra = "Extra chars|Extra characters at end of command";$/;" v +exval bmore.c /^int exval = 0;$/;" v +fbuf set.c /^static char fbuf[256];$/;" v file: +ffp set.c /^static FILE *ffp;$/;" v file: +file_nr bmore.c /^int file_nr = 0; \/* number of current input file *\/$/;" v +fileinfo edit.c /^fileinfo(fname)$/;" f +filemode dosio.c /^int filemode;$/;" v +filemode io.c /^int filemode;$/;" v +files bmore.c /^char **files; \/* list of input files *\/$/;" v +files bvi.c /^char **files; \/* list of input files *\/$/;" v +filesize bmore.c /^off_t screen_home, filesize;$/;" v +filesize bvi.c /^off_t filesize, memsize, undosize;$/;" v +flags set.h /^ int flags;$/;" m struct:param +flash doscur.h 77;" d +flushinp doscur.h 120;" d +fnum bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v +from_file set.c /^static int from_file = 0;$/;" v file: +fsearch re.c /^fsearch(start, end, smem)$/;" f +fsearch_end re.c /^fsearch_end(start, end, smem, s_end)$/;" f +fullname set.h /^ char *fullname; \/* full parameter name *\/$/;" m struct:param +getbegyx doscur.h 105;" d +getcbuff edit.c /^static char getcbuff[BUFFER];$/;" v file: +getch dosio.c /^getch()$/;" f +getcmdstr set.c /^getcmdstr(p, x)$/;" f +getcnext edit.c /^static char *getcnext = NULL;$/;" v file: +getmaxyx doscur.h 106;" d +getyx doscur.h 104;" d +got_int bm_dos.c /^int got_int;$/;" v +got_int bm_unix.c /^int got_int;$/;" v +help_file bmore.c /^FILE *curr_file = NULL, *help_file;$/;" v +helpdir Makefile /^helpdir = $(DESTDIR)${datarootdir}\/bvi$/;" m +helppath bmore.c /^char helppath[MAXCMD];$/;" v +hex_comp recomp.c /^hex_comp(smem, pattern)$/;" f +hexchar recomp.c /^hexchar()$/;" f +highlight bm_dos.c /^highlight()$/;" f +highlight bm_unix.c /^highlight()$/;" f +hl_spat edit.c /^long hl_spat = 0;$/;" v +home bm_dos.c /^home()$/;" f +home bm_unix.c /^home()$/;" f +icnt bmore.c /^static int icnt = 0;$/;" v file: +idlok doscur.h 141;" d +ignore_case recomp.c /^int ignore_case = 0;$/;" v +inch dosio.c /^inch()$/;" f +init_byte bmore.c /^off_t init_byte = 0;$/;" v +init_search bmore.c /^int init_search = 0;$/;" v +initscr doscur.h 73;" d +initterm bm_dos.c /^initterm()$/;" f +initterm bm_unix.c /^initterm()$/;" f +insch dosio.c /^insch(int c)$/;" f +insertln doscur.h 108;" d +jmpproc bvi.c /^jmpproc(sig)$/;" f +keypad doscur.h 133;" d +last_motion bvi.c /^PTR last_motion;$/;" v +last_search bmore.c /^off_t last_search = 0;$/;" v +libdir Makefile /^libdir = $(DESTDIR)${exec_prefix}\/lib$/;" m +linbuf edit.c /^char linbuf[16384];$/;" v +line bvi.c /^static char line[MAXCMD];$/;" v file: +lineout edit.c /^lineout()$/;" f +load dosio.c /^load(char *fname)$/;" f +load io.c /^load(fname)$/;" f +loc bvi.c /^int loc;$/;" v +magic recomp.c /^int magic = 1;$/;" v +main bmore.c /^main(argc, argv)$/;" f +main bvi.c /^main(argc, argv)$/;" f +man1dir Makefile /^man1dir = $(mandir)\/man1$/;" m +mandir Makefile /^mandir = $(DESTDIR)${datarootdir}\/man$/;" m +mark bvi.c /^static int mark;$/;" v file: +markbuf bvi.c /^PTR markbuf[26];$/;" v +maxpos bvi.c /^PTR maxpos;$/;" v +maxx bmore.c /^int maxx, maxy;$/;" v +maxx bvi.c /^int maxx, maxy, x, xx, y;$/;" v +maxy bmore.c /^int maxx, maxy;$/;" v +maxy bvi.c /^int maxx, maxy, x, xx, y;$/;" v +mem bvi.c /^PTR mem = NULL;$/;" v +memcpy bvi.h 123;" d +memmove bm_unix.c /^memmove(s1, s2, n)$/;" f +memmove bvi.h 124;" d +memmove io.c /^memmove(s1, s2, n)$/;" f +memsize bvi.c /^off_t filesize, memsize, undosize;$/;" v +morefiles comm.c /^char *morefiles = "more files@to edit";$/;" v +move doscur.h 91;" d +movebyte edit.c /^movebyte()$/;" f +msg comm.c /^msg(s)$/;" f +mvaddch doscur.h 93;" d +mvaddstr doscur.h 97;" d +mvgetch doscur.h 112;" d +mvgetstr doscur.h 115;" d +mvinch dosio.c /^mvinch(int y, int x)$/;" f +mvinsch doscur.h 125;" d +mvprintw doscur.h 101;" d +mvscanw doscur.h 122;" d +mvwaddch doscur.h 92;" d +mvwaddstr doscur.h 96;" d +mvwgetch doscur.h 111;" d +mvwgetstr doscur.h 114;" d +mvwprintw doscur.h 100;" d +mvwscanw doscur.h 121;" d +mymaxx bmore.c /^int mymaxx = 0, mymaxy = 0;$/;" v +mymaxy bmore.c /^int mymaxx = 0, mymaxy = 0;$/;" v +name bmore.c /^char *name = NULL;$/;" v +name bvi.c /^char *name = NULL;$/;" v +new_screen edit.c /^new_screen()$/;" f +newwin doscur.h 74;" d +nextchar bmore.c /^nextchar()$/;" f +nl doscur.h 131;" d +no_intty bm_dos.c /^int no_intty, no_tty;$/;" v +no_intty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v +no_tty bm_dos.c /^int no_intty, no_tty;$/;" v +no_tty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v +noaddr comm.c /^char *noaddr = "No address allowed@on this command";$/;" v +nobytes bvi.c /^char *nobytes = "No bytes@in the buffer";$/;" v +nodelay doscur.h 127;" d +noecho doscur.h 129;" d +nonl doscur.h 132;" d +noprev re.c /^char *noprev = "No previous expression";$/;" v +noraw doscur.h 139;" d +normal bm_dos.c /^normal()$/;" f +normal bm_unix.c /^normal()$/;" f +notfound re.c /^char *notfound = "Fail|Pattern not found";$/;" v +notimeout doscur.h 140;" d +noval comm.c /^char *noval = "No value@for binary operation";$/;" v +nowrtmsg comm.c /^char *nowrtmsg = "No write@since last change (:%s! overrides)";$/;" v +nstate bm_unix.c /^struct termios ostate, nstate;$/;" v typeref:struct: +numarr bmore.c /^char numarr[64]; \/* string for collecting number *\/$/;" v +numarr bvi.c /^char numarr[MAXCMD]; \/* string for collecting number *\/$/;" v +numfiles bmore.c /^int numfiles; \/* number of input files *\/$/;" v +numfiles bvi.c /^int numfiles; \/* number of input files *\/$/;" v +nvalue set.h /^ off_t nvalue;$/;" m struct:param +off_t bmore.h 105;" d +off_t bvi.h 119;" d +oldbuf comm.c /^static char oldbuf[CMDSZ]; \/** for :!! command **\/$/;" v file: +oldpos bmore.c /^off_t bytepos, oldpos;$/;" v +open_file bmore.c /^open_file(name)$/;" f +ostate bm_unix.c /^struct termios ostate, nstate;$/;" v typeref:struct:termios +out_len bmore.c /^int out_len;$/;" v +outmsg comm.c /^outmsg(s)$/;" f +pagepos bvi.c /^PTR pagepos;$/;" v +param set.h /^struct param {$/;" s +params set.c /^struct param params[] = {$/;" v typeref:struct:param +patcpy re.c /^patcpy(s1, s2, delim)$/;" f +pattern re.c /^char pattern[MAXCMD + 1];$/;" v +poi recomp.c /^char *poi;$/;" v +precount bmore.c /^long precount = -1; \/* number preceding command *\/$/;" v +precount bvi.c /^long precount = -1;$/;" v +prefix Makefile /^prefix = \/usr\/local$/;" m +printline edit.c /^printline(mempos, scpos)$/;" f +printout bmore.c /^printout(lns)$/;" f +printw doscur.h 103;" d +progname bmore.c /^static char progname[10];$/;" v file: +progname bvi.c /^static char progname[8];$/;" v file: +prompt bmore.c /^int prompt = 1;$/;" v +prototypes configure /^ function prototypes and stuff, but not '\\xHH' hex character constants.$/;" f +pushback bmore.c /^pushback(n, where)$/;" f +putchr bm_unix.c /^putchr(ch)$/;" f +putchr bm_unix.c /^putchr(char ch)$/;" f +putline bmore.c /^putline(buf, num)$/;" f +quit edit.c /^quit()$/;" f +range bvi.c /^range(ch)$/;" f +raw doscur.h 138;" d +rdline bmore.c /^rdline(ch, sstring)$/;" f +read_rc set.c /^read_rc(fn)$/;" f +refresh doscur.h 134;" d +rep_buf bvi.c /^char rep_buf[BUFFER];$/;" v +repaint edit.c /^repaint() \/***** redraw screen *********************\/$/;" f +repl_count comm.c /^int repl_count = -1;$/;" v +reset_tty bm_dos.c /^reset_tty ()$/;" f +reset_tty bm_unix.c /^reset_tty()$/;" f +resetty doscur.h 145;" d +rev_end bm_unix.c /^char *rev_start, *rev_end; \/* enter and exit standout mode *\/$/;" v +rev_start bm_unix.c /^char *rev_start, *rev_end; \/* enter and exit standout mode *\/$/;" v +rsearch re.c /^rsearch(start, end, smem)$/;" f +save dosio.c /^save(char *fname, PTR start, PTR end, int flags)$/;" f +save io.c /^save(fname, start, end, flags)$/;" f +save_chk comm.c /^save_chk(fname, start, end, flags)$/;" f +savetty doscur.h 144;" d +sbracket bmore.c /^sbracket(start, scan, count)$/;" f +sbracket re.c /^sbracket(start, scan, count)$/;" f file: +scanw doscur.h 124;" d +scr dosio.c /^struct WINDOW scr;$/;" v typeref:struct:WINDOW +screen bvi.c /^int screen, status;$/;" v +screen_home bmore.c /^off_t screen_home, filesize;$/;" v +scrolldown edit.c /^scrolldown(lns)$/;" f +scrollok doscur.h 142;" d +scrollup edit.c /^scrollup(lns)$/;" f +scrolly bvi.c /^static int scrolly;$/;" v file: +search_pat re.c /^char search_pat[BUFFER]; \/* \/ or ? command *\/$/;" v +searching re.c /^searching(ch, line, startpos, endpos, flag)$/;" f +set_tty bm_dos.c /^set_tty ()$/;" f +set_tty bm_unix.c /^set_tty()$/;" f +setcur edit.c /^setcur()$/;" f +setpage edit.c /^setpage(addr)$/;" f +shell bvi.c /^char *shell;$/;" v +shortname set.h /^ char *shortname; \/* permissible abbreviation *\/$/;" m struct:param +showparms set.c /^showparms(all)$/;" f +sig bm_dos.c /^sig()$/;" f +sig bm_unix.c /^sig(sig)$/;" f +size bvi.c /^off_t size;$/;" v +slow_tty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v +smode bmore.c /^static int smode;$/;" v file: +smode recomp.c /^int smode;$/;" v +smsg comm.c /^smsg(s)$/;" f +spos bvi.c /^PTR spos;$/;" v +srcdir Makefile /^srcdir = .$/;" m +sstring bmore.c /^char sstring[MAXCMD] = ""; \/* string for search *\/$/;" v +standend doscur.h 89;" d +standout doscur.h 88;" d +start_addr comm.c /^PTR start_addr;$/;" v +statpos edit.c /^statpos()$/;" f +status bvi.c /^int screen, status;$/;" v +stdscr dosio.c /^int stdscr = 0;$/;" v +strcasecmp bmore.h 108;" d +strcasecmp bvi.h 122;" d +strdup io.c /^strdup(s)$/;" f +string bmore.c /^char string[MAXCMD];$/;" v +string bvi.c /^char string[MAXCMD];$/;" v +strncasecmp bmore.h 107;" d +strncasecmp bvi.h 121;" d +stty bm_unix.c 34;" d file: +stuffin edit.c /^stuffin(s)$/;" f +svalue set.h /^ char *svalue;$/;" m struct:param +sysemsg comm.c /^sysemsg(s)$/;" f +terminal dosio.c /^char *terminal = "ansi";$/;" v +terminal io.c /^char *terminal;$/;" v +tmpbuf edit.c /^char tmpbuf[10];$/;" v +to_print bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v +toggle edit.c /^toggle()$/;" f +trunc_cur bvi.c /^trunc_cur()$/;" f +undo_buf bvi.c /^char *undo_buf = NULL;$/;" v +undo_count bvi.c /^off_t undo_count;$/;" v +undo_start bvi.c /^PTR undo_start;$/;" v +undosize bvi.c /^off_t filesize, memsize, undosize;$/;" v +usage bmore.c /^usage()$/;" f +usage bvi.c /^usage()$/;" f +vgetc bm_dos.c /^vgetc()$/;" f +vgetc bm_unix.c /^vgetc()$/;" f +vgetc edit.c /^vgetc()$/;" f +waddch doscur.h 94;" d +waddstr doscur.h 98;" d +wait_return comm.c /^wait_return(flag)$/;" f +wclear doscur.h 82;" d +wclrtoeol doscur.h 78;" d +wdeleteln doscur.h 109;" d +werase doscur.h 80;" d +wgetch doscur.h 113;" d +wgetstr doscur.h 116;" d +winsertln doscur.h 107;" d +wmove doscur.h 90;" d +wordsearch re.c /^wordsearch(start, mode)$/;" f +wprintw doscur.h 102;" d +wrefresh doscur.h 135;" d +wrstat bvi.c /^static int wrstat = 1;$/;" v file: +wscanw doscur.h 123;" d +x bvi.c /^int maxx, maxy, x, xx, y;$/;" v +xpos edit.c /^xpos()$/;" f +xx bvi.c /^int maxx, maxy, x, xx, y;$/;" v +y bvi.c /^int maxx, maxy, x, xx, y;$/;" v +yank_buf bvi.c /^char *yank_buf = NULL;$/;" v +yanked bvi.c /^off_t yanked = 0L;$/;" v +yd_addr comm.c /^yd_addr()$/;" f From 40e8e886bcfe2b47c77a542daa761408250308fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20B=C3=BCrgmann?= Date: Sat, 12 Oct 2019 00:00:00 +0000 Subject: [PATCH 4/6] bvi-1.4.1.src.tar.gz 3035255ca79e0464567d255baa5544f7794e2b7eb791dcc60cc339cf1aa01e28 bvi-1.4.1.src.tar.gz https://bvi.sourceforge.net/download.html --- CHANGES | 23 +- COPYING | 847 +++++++++------ Makefile.in | 3 +- README | 15 +- bm_unix.c | 3 +- bmore.1 | 18 +- bmore.c | 76 +- bmore.h | 5 +- bvi.1 | 18 +- bvi.c | 35 +- bvi.h | 7 +- comm.c | 15 +- config.guess | 975 +++++++++++------- config.sub | 2770 +++++++++++++++++++++++++------------------------- edit.c | 81 +- io.c | 35 +- patchlevel.h | 2 +- re.c | 5 +- recomp.c | 7 +- set.c | 9 +- set.h | 8 +- tags | 371 +++---- testfile | Bin 0 -> 256 bytes tmp | 15 + 24 files changed, 2962 insertions(+), 2381 deletions(-) create mode 100644 testfile create mode 100644 tmp diff --git a/CHANGES b/CHANGES index b7a1c1a..c81b958 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,24 @@ -New in release 1.4.0 (stable) -============================= +New in release 1.4.1 +==================== + +* Minor fixes + + +New in release 1.4.1rc +====================== + +* Compile warning: implicit declaration of function ‘save_chk’ fixed (SF bug #9) +* bmore seg fault on file not found fixed +* set columns prevents filename display on the commandline fixed (SF bug #8) +* bmore new option -r + bvi new setting: set reverse + Characters between 160 - 254 are displayed as "reverse video text" as used in + some legacy systems (Atari, Commodore, Apple II, etc). +* castings fixed in comm.c + + +New in release 1.4.0 +==================== * Minor fixes diff --git a/COPYING b/COPYING index a43ea21..6a34f51 100644 --- a/COPYING +++ b/COPYING @@ -1,339 +1,620 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". + TERMS AND CONDITIONS -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. + 0. Definitions. - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. + "This License" refers to version 3 of the GNU General Public License. -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. + A "covered work" means either the unmodified Program or a work based +on the Program. - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: + 1. Source Code. - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. + The Corresponding Source for a work in source code form is that +same work. - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of this License. - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. + 13. Use with the GNU Affero General Public License. -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. + 14. Revised Versions of this License. - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. - NO WARRANTY + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. + 15. Disclaimer of Warranty. - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Programs + 16. Limitation of Liability. - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. + 17. Interpretation of Sections 15 and 16. - - Copyright (C) 19yy + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/Makefile.in b/Makefile.in index a8b1679..ebf25a6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -6,7 +6,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# Copyright (c) 1996-2014 by Gerhard Buergmann +# Copyright (c) 1996-2019 by Gerhard Buergmann # gerhard@puon.at # # 1996-01-18 V 1.0.0 @@ -17,6 +17,7 @@ # 2000-10-01 V 1.3.0 final # 2003-07-03 V 1.3.2 # 2014-10-01 V 1.4.0 +# 2019-01-30 V 1.4.1 # ############################################### diff --git a/README b/README index 982dc52..03c60c1 100644 --- a/README +++ b/README @@ -9,8 +9,12 @@ and is distributed under the GPL (GNU Public License). How to compile ============== - gunzip -c bvi-1.4.0.src.tar.gz | tar xvf - - cd bvi-1.4.0 + You need the curses (ncurses) library for cursor movement on your system. + https://www.cyberciti.biz/faq/linux-install-ncurses-library-headers-on-debian-ubuntu-centos-fedora/ + + + gunzip -c bvi-1.4.1.src.tar.gz | tar xvf - + cd bvi-1.4.1 ./configure make make install @@ -23,9 +27,12 @@ You should install and use ncurses instead. You can download it from ftp.gnu.org; install it and then use ./configure --with-ncurses=/usr/local/ncurses-5.2 +The Control-y key sequence suspends bvi and send it to the background. +To avoid this behaviour use: + stty dsusp undef -HTML documentation in subdirectory html/ +--------------------------------------------------------------------------- Subscribe to the bvi mailing for support, updates and other news: Send a blank email to bvi-subscribe@yahoogroups.com. You will receive a @@ -33,7 +40,7 @@ Subscribe to the bvi mailing for support, updates and other news: subscription will be complete. ------------------------------------------------------------------------- +--------------------------------------------------------------------------- PLEASE send any bug reports (and fixes), code for new features, comments, questions, etc. (even flames) to: diff --git a/bm_unix.c b/bm_unix.c index 2c4df3b..dd5c92f 100644 --- a/bm_unix.c +++ b/bm_unix.c @@ -6,10 +6,11 @@ * 2003-07-04 V 1.3.2 * 2010-06-02 V 1.3.4 * 2013-08-22 V 1.4.0 + * 2019-10-09 V 1.4.1 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2013 by Gerhard Buergmann + * Copyright 1996-2019 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it diff --git a/bmore.1 b/bmore.1 index 4749154..94d0dc4 100644 --- a/bmore.1 +++ b/bmore.1 @@ -1,10 +1,10 @@ -.TH BMORE 1 "3 Jan 2004" +.TH BMORE 1 "30 Jan 2019" .SH NAME bmore \- browse through a binary file .SH SYNOPSIS .B bmore [ -.B \-acdi +.B \-acdir ] [ .B \-n \fIlines\fP ] [ @@ -96,6 +96,10 @@ Displays the indicated number of \fIlines\fP in each screenful, rather than the default (the number of lines in the terminal screen less two). .TP +.B \-r +Characters between 160 - 254 are displayed as "reverse video text" as used in +some legacy systems (Atari, Commodore, Apple II, etc). +.TP .B \-w \fIcols\fP Display number of \fIcols\fP in each line. .TP @@ -113,9 +117,6 @@ end with a .RB ` / '. If it does, then the trailing slash is taken as a character in the search pattern. -.TP -.br -.ne 8 .SH USAGE .SS Commands .LP @@ -299,7 +300,6 @@ or .TP .B \&. Dot. Repeat the previous command. -.TP .SH FILES .PD 0 .TP 20 @@ -311,4 +311,10 @@ help file .PD .SH "SEE ALSO" .BR bvi (1), +.BR more (1) .BR termcap (5) +.SH "AUTHOR" +.IX Header "AUTHOR" +bmore was developed by Gerhard Buergmann, Vienna, Austria +.BR \fIgerhard@puon.at\fR + diff --git a/bmore.c b/bmore.c index 9b005cd..0a577cc 100644 --- a/bmore.c +++ b/bmore.c @@ -7,15 +7,16 @@ * 2002-01-16 V 1.3.1 * 2004-01-09 V 1.3.2 * 2013-08-23 V 1.4.0 + * 2019-01-22 V 1.4.1 + * + * Copyright 1990-2019 by Gerhard Buergmann + * gerhard@puon.at * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1990-2013 by Gerhard Buergmann - * gerhard@puon.at - * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any + * Free Software Foundation; either version 3, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, but @@ -48,7 +49,7 @@ #include "bmore.h" -char *copyright = "Copyright (C) 1990-2013 by Gerhard Buergmann"; +char *copyright = "GPL (C) 1990-2019 by Gerhard Buergmann"; int maxx, maxy; int mymaxx = 0, mymaxy = 0; @@ -70,7 +71,7 @@ char addr_form[15]; int ascii_flag = 0; int dup_print_flag = 0; -int c_flag = 0, d_flag = 0; +int c_flag = 0, d_flag = 0, r_flag = 0; int exval = 0; int init_search = 0; char buffer1[MAXCMD], buffer2[MAXCMD]; @@ -99,12 +100,13 @@ char *emptyclass = "Empty byte class '[]' or '[^]'"; * -c clear before displaying * -i ignore case * -n number of lines/screen + * -r display reverse video (highest bit set) * -w width of screen */ void usage() { - fprintf(stderr, "Usage: %s [-acdi] [-lines] [+linenum | +/pattern] name1 name2 ...\n", progname); + fprintf(stderr, "Usage: %s [-acdir] [-lines] [+linenum | +/pattern] name1 name2 ...\n", progname); exit(1); } @@ -172,6 +174,8 @@ main(argc, argv) break; case 'i': ignore_case++; break; + case 'r': r_flag++; + break; default: usage(); } @@ -215,10 +219,13 @@ main(argc, argv) } } else { file_nr = 1; - while (open_file(name)) { + while (open_file(name)) { /* looking for the first existing file */ do_next(1); } if (exval) { + /* We dont't have one! */ + reset_tty(); + exit(exval); } else { fseeko(curr_file, init_byte, SEEK_SET); bytepos += init_byte; @@ -621,6 +628,7 @@ open_file(name) exval = 1; return 1; } + exval = 0; bytepos = screen_home = 0; return 0; } @@ -635,27 +643,47 @@ putline(buf, num) unsigned char ch; PRINTF(addr_form, (unsigned long)bytepos); - for (print_pos = 0; print_pos < num; print_pos++) { - ch = buf[print_pos]; - if (!ascii_flag) { + + // Hex section + if (!ascii_flag) { + for (print_pos = 0; print_pos < num; print_pos++) { + ch = buf[print_pos]; PRINTF("%02X ", ch); } - ++bytepos; - if ((ch > 31) && (ch < 127)) - *(string + print_pos) = ch; - else - *(string + print_pos) = '.'; - } - for (; print_pos < out_len; print_pos++) { - if (!ascii_flag) { + for (; print_pos < out_len; print_pos++) { PRINTF(" "); } - ++bytepos; - *(string + print_pos) = ' '; + PRINTF(" "); } - *(string + num) = '\0'; - if (no_tty) PRINTF("%s\n", string); - else PRINTF("%s\r\n", string); + + // ASCII section + for (print_pos = 0; print_pos < num; print_pos++) { + ++bytepos; + ch = buf[print_pos]; + if ((ch > 31) && (ch < 127)) { + PRINTF("%c", ch); + } else { + if (r_flag) { + if ((ch & 128) && ((ch > 159) && (ch < 255))) { + if (!no_tty) highlight(); + PRINTF("%c", ch & 127); + if (!no_tty) normal(); + } else { + PRINTF("."); + } + } else { + PRINTF("."); + } + } + } + + // Fill last line + for (; print_pos < out_len; print_pos++) { + ++bytepos; + PRINTF(" "); + } + if (no_tty) PRINTF("\n"); + else PRINTF("\r\n"); } diff --git a/bmore.h b/bmore.h index 87ca556..bb51745 100644 --- a/bmore.h +++ b/bmore.h @@ -10,15 +10,16 @@ * 2002-01-16 V 1.3.1 * 2003-02-20 V 1.3.2 * 2010-03-28 V 1.3.4 + * 2019-01-22 V 1.4.1 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2010 by Gerhard Buergmann + * Copyright 1996-2019 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any + * Free Software Foundation; either version 3, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, but diff --git a/bvi.1 b/bvi.1 index f518e41..b0e7f33 100644 --- a/bvi.1 +++ b/bvi.1 @@ -93,7 +93,7 @@ .nr % 0 .rr F .\} -.TH BVI 1 "BVI Version 1.4.0" "25/Aug/2013" "User Commands" +.TH BVI 1 "BVI Version 1.4.1" "30/Jan/2019" "User Commands" .IX Title "BVI 1" .UC .IX Name "bvi, bview - visual display editor for binary files" @@ -194,7 +194,7 @@ bvi, bview \- visual editor for binary files .SH "VERSION" .IX Header "VERSION" -bvi-1.4.0 +bvi-1.4.1 .SH "SYNOPSIS" .IX Header "SYNOPSIS" \fBbvi\fR\ \ \ [\fB\-R\fR]\ [\fB\-c\fR\ \fIcmd\fR]\ [\fB\-f\fR\ \fIscript\fR]\ [\fB\-s\fR\ \fIskip\fR]\ [\fB\-e\fR\ \fIend\fR]\ [\fB\-n\fR\ \fIlength\fR]\ \fIfile\fR... @@ -248,9 +248,10 @@ can use this option to make several global changes in a binary file. Bvi stands for \*(L"Binary VIsual editor\*(R". Bvi is a screen oriented editor for binary files; its command set is based on that of the \fIvi\fR\|(1) text editor. -As a binary editor does not have the concept of \*(L"lines\*(R" -there are differences from Vi commands wherever the latter are -line orientate. +As bvi is a binary editor, it does not have the concept +of \*(L"lines\*(R". All end-of-lines (EOLs) are simply bytes. +Therefore bvi's commands are different from vi's +commands for all line-oriented commands (see below). .SH "COMPARISON" .IX Header "COMPARISON" The main differences between Vi and Bvi are: @@ -585,6 +586,8 @@ the file. If you use ASCII mode you can use the special characters \& memmove nomm enables insert and delete commands \& offset of=0 adds an offset to the diplayed addresses \& readonly noro If set, write fails unless you use ! after command +\& reverse nore display otherwise-printable characters with their +\& high bit set as reverse video \& scroll sc=1/2 window \& Number of lines scrolled by ^U and ^D \& showmode mo Displays statusline on bottom of the screen @@ -600,7 +603,7 @@ the file. If you use ASCII mode you can use the special characters .SH "AUTHOR" .IX Header "AUTHOR" bvi was developed by Gerhard Buergmann, Vienna, Austria -\fIGerhard.Buergmann@puon.at\fR +\fIgerhard@puon.at\fR .SH "WWW" .IX Header "WWW" Bvi\ Homepage:\ \ http://bvi.sourceforge.net/ @@ -609,12 +612,13 @@ Vi\ Pages:\ \ \ \ \ \ http://www.guckes.net/vi/clones.php3 .SH "FILES" .IX Header "FILES" \fI\ $HOME/.bvirc\fR\ \ \ \ \ \ \ \ \ \ editor\ startup\ file +.BR \fI\ ./.bvirc\fR\ \ \ \ \ \ \ \ \ \ \ \ \ \ editor\ startup\ file .SH "BUGS" .IX Header "BUGS" Bvi does not update the screen when the terminal changes its size. .SH "SEE ALSO" .IX Header "SEE ALSO" -\fIvi\fR\|(1), \fIstrings\fR\|(1), \fIascii\fR\|(5) +\fIbmore\fR\|(1), \fIvi\fR\|(1), \fIstrings\fR\|(1), \fIascii\fR\|(5) .rn }` '' diff --git a/bvi.c b/bvi.c index f614cc7..dcc1f85 100644 --- a/bvi.c +++ b/bvi.c @@ -12,15 +12,16 @@ * 2006-04-04 V 1.3.3 * 2013-08-23 V 1.4.0alpha * 2014-10-07 V 1.4.0 + * 2019-10-12 V 1.4.1 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2014 by Gerhard Buergmann + * Copyright 1996-2019 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any + * Free Software Foundation; either version 3, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, but @@ -41,7 +42,7 @@ #endif -char *copyright = "Copyright (C) 1996-2014 by Gerhard Buergmann"; +char *copyright = "(C) GPL 1996-2019 by Gerhard Buergmann"; jmp_buf env; /* context for `longjmp' function */ @@ -88,6 +89,7 @@ off_t undo_count; off_t yanked = 0L; char *yank_buf = NULL; char *undo_buf = NULL; +char *fname_buf = NULL; PTR markbuf[26]; char addr_form[15]; @@ -264,20 +266,18 @@ main(argc, argv) cbreak(); noecho(); - { - /* address column width */ - /* default is 8 + 2 blanks */ - /* if block_begin has 8 hex digits or more */ - /* reserve 1 hex digit more than required */ - char tmp[sizeof(block_begin) * 2 + 3]; - AnzAdd = sprintf(tmp, "%llX", (long long unsigned)block_begin) + 1; - if (AnzAdd < 8) - AnzAdd = 8; - if (AnzAdd > sizeof(block_begin) * 2) - AnzAdd = sizeof(block_begin) * 2; - sprintf(addr_form, "%%0%dllX ", AnzAdd); - AnzAdd = sprintf(tmp, addr_form, block_begin); - } + /* address column width */ + /* default is 8 + 2 blanks */ + /* if block_begin has 8 hex digits or more */ + /* reserve 1 hex digit more than required */ + char tmp[sizeof(block_begin) * 2 + 3]; + AnzAdd = sprintf(tmp, "%llX", (long long unsigned)block_begin) + 1; + if (AnzAdd < 8) + AnzAdd = 8; + if (AnzAdd > sizeof(block_begin) * 2) + AnzAdd = sizeof(block_begin) * 2; + sprintf(addr_form, "%%0%dllX ", AnzAdd); + AnzAdd = sprintf(tmp, addr_form, block_begin); Anzahl = ((COLS - AnzAdd - 1) / 16) * 4; P(P_CM) = Anzahl; @@ -300,6 +300,7 @@ main(argc, argv) read_rc(argv[script]); if (*cmdstr != '\0') docmdline(cmdstr); + msg(fname_buf); /* main loop */ do { diff --git a/bvi.h b/bvi.h index 61285dd..0881ce7 100644 --- a/bvi.h +++ b/bvi.h @@ -11,15 +11,16 @@ * 2003-07-04 V 1.3.2 * 2010-08-04 V 1.3.4 * 2014-10-01 V 1.4.0 + * 2019-01-28 V 1.4.1 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2014 by Gerhard Buergmann + * Copyright 1996-2019 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any + * Free Software Foundation; either version 3, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, but @@ -223,6 +224,7 @@ extern off_t block_begin, block_end, block_size; int do_substitution(int, char *, PTR, PTR); int hexchar(void); int outmsg(char *); + int save_chk(char *, char *, char *, int); PTR searching(int, char *, PTR, PTR, int); PTR wordsearch(PTR, char); PTR backsearch(PTR, char); @@ -267,6 +269,7 @@ extern off_t block_begin, block_end, block_size; int do_substitution(); int hexchar(); int outmsg(); + int save_chk(); PTR searching(); PTR wordsearch(); PTR backsearch(); diff --git a/comm.c b/comm.c index a83de34..6e0d884 100644 --- a/comm.c +++ b/comm.c @@ -13,15 +13,16 @@ * 2005-08-17 V 1.3.3 * 2010-06-02 V 1.3.4 * 2014-01-28 V 1.4.0 + * 2019-01-27 V 1.4.1 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2014 by Gerhard Buergmann + * Copyright 1996-2019 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any + * Free Software Foundation; either version 3, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, but @@ -478,7 +479,7 @@ docmdline(cmdline) if ((yanked = yd_addr()) == 0L) return; if ((yanked = alloc_buf(yanked, &yank_buf)) == 0L) return; memcpy(yank_buf, start_addr, yanked); - sprintf(string, "%lu bytes", (long)yanked); + sprintf(string, "%lu bytes", (unsigned long)yanked); msg(string); } else if (!strncmp("overwrite", cmdname, len) && CMDLNG(9, 1)) { if (chk_comm(NO_ARG)) return; @@ -565,7 +566,7 @@ docmdline(cmdline) if (!strncmp("delete", cmdname, len) && CMDLNG(6, 1)) { if ((undo_count = yd_addr()) == 0L) return; do_delete(undo_count, start_addr); - sprintf(string, "%lu bytes", (long)undo_count); + sprintf(string, "%lu bytes", (unsigned long)undo_count); msg(string); } else if (!strncmp("insert", cmdname, len) && CMDLNG(6, 1)) { if (chk_comm(MAX_ONE_ARG)) return; @@ -674,7 +675,7 @@ doecmd(arg, force) } if (arg != NULL) { if (name != NULL && !strcmp(arg, name)) { - if (!edits || (edits && !force)) + if (!edits || !force) return TRUE; } if (name != NULL && !strcmp(arg, "#")) { @@ -806,7 +807,8 @@ outmsg(s) poi = s; while (*poi != '\0' && *poi != '@' && *poi != '|') { addch(*poi++); - cnt++; } + cnt++; + } } else { if (poi) poi++; else poi = s; @@ -820,6 +822,7 @@ outmsg(s) return cnt; } + /* If flag == TRUE we do a repaint * */ diff --git a/config.guess b/config.guess index 1f5c50c..7f9ebbe 100644 --- a/config.guess +++ b/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2014 Free Software Foundation, Inc. +# Copyright 1992-2019 Free Software Foundation, Inc. -timestamp='2014-03-23' +timestamp='2019-09-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ timestamp='2014-03-23' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -24,12 +24,12 @@ timestamp='2014-03-23' # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # -# Originally written by Per Bothner. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` @@ -39,7 +39,7 @@ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2014 Free Software Foundation, Inc. +Copyright 1992-2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -84,8 +84,6 @@ if test $# != 0; then exit 1 fi -trap 'exit 1' 1 2 15 - # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -96,34 +94,38 @@ trap 'exit 1' 1 2 15 # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi @@ -132,14 +134,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "${UNAME_SYSTEM}" in +case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu - eval $set_cc_for_build - cat <<-EOF > $dummy.c + set_cc_for_build + cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc @@ -149,13 +151,20 @@ Linux|GNU|GNU/*) LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -168,21 +177,31 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -197,43 +216,72 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in os=netbsd ;; esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; + *:OS108:*:*) + echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Twizzler:*:*) + echo "$UNAME_MACHINE"-unknown-twizzler + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in @@ -251,63 +299,54 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos + echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos + echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -319,7 +358,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} + echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos @@ -346,38 +385,38 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} + echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" + set_cc_for_build + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in @@ -386,25 +425,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" exit ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) - echo sparc-sun-sunos${UNAME_RELEASE} + echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} + echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not @@ -415,44 +454,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} + echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} + echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} + echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} + echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} + echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} + echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} + echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} + echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { @@ -461,23 +500,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} + echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax @@ -503,17 +542,17 @@ EOF AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] then - echo m88k-dg-dgux${UNAME_RELEASE} + echo m88k-dg-dgux"$UNAME_RELEASE" else - echo m88k-dg-dguxbcs${UNAME_RELEASE} + echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else - echo i586-dg-dgux${UNAME_RELEASE} + echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) @@ -530,7 +569,7 @@ EOF echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id @@ -542,14 +581,14 @@ EOF if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #include main() @@ -560,7 +599,7 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else @@ -574,26 +613,27 @@ EOF exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx @@ -608,28 +648,28 @@ EOF echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + if [ "$HP_ARCH" = "" ]; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include @@ -662,13 +702,13 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ "$HP_ARCH" = hppa2.0w ] then - eval $set_cc_for_build + set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -679,23 +719,23 @@ EOF # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #include int main () @@ -720,11 +760,11 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) @@ -733,7 +773,7 @@ EOF *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) @@ -741,9 +781,9 @@ EOF exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk + echo "$UNAME_MACHINE"-unknown-osf1mk else - echo ${UNAME_MACHINE}-unknown-osf1 + echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) @@ -768,127 +808,120 @@ EOF echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} + echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + fi exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in + case "$UNAME_PROCESSOR" in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin + echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 + echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 + echo "$UNAME_MACHINE"-pc-mingw32 exit ;; *:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 + echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case "$UNAME_MACHINE" in x86) - echo i586-pc-interix${UNAME_RELEASE} + echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} + echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) - echo ia64-unknown-interix${UNAME_RELEASE} + echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin + echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin + echo x86_64-pc-cygwin exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -901,129 +934,169 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval $set_cc_for_build + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 + sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el + MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} + MIPS_ENDIAN= #else - CPU= + MIPS_ENDIAN= #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-${LIBC} + echo or1k-unknown-linux-"$LIBC" exit ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-${LIBC} + echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-${LIBC} + echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} + echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} + echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-${LIBC} + echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1037,34 +1110,34 @@ EOF # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx + echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop + echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos + echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable + echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} + echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp + echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) @@ -1074,12 +1147,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1089,9 +1162,9 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv32 + echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) @@ -1099,7 +1172,7 @@ EOF # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1111,9 +1184,9 @@ EOF exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) @@ -1133,9 +1206,9 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; @@ -1144,28 +1217,28 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} + echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} + echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} + echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} + echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} + echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 @@ -1176,7 +1249,7 @@ EOF *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 + echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi @@ -1196,23 +1269,23 @@ EOF exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos + echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} + echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv"$UNAME_RELEASE" else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. @@ -1231,77 +1304,94 @@ EOF echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} + echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} + echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} + echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} + echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} + echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} + echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval $set_cc_for_build - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build fi - if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} + echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux @@ -1310,18 +1400,19 @@ EOF echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + # shellcheck disable=SC2154 + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi - echo ${UNAME_MACHINE}-unknown-plan9 + echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 @@ -1342,14 +1433,14 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in + case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; @@ -1358,34 +1449,188 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos + echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros + echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; + *:Unleashed:*:*) + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" exit ;; esac +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 < in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp @@ -1404,16 +1649,16 @@ hostinfo = `(hostinfo) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" EOF exit 1 # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/config.sub b/config.sub index d4c8338..0f2234c 100644 --- a/config.sub +++ b/config.sub @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2014 Free Software Foundation, Inc. +# Copyright 1992-2019 Free Software Foundation, Inc. -timestamp='2014-09-26' +timestamp='2019-06-30' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ timestamp='2014-09-26' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -25,7 +25,7 @@ timestamp='2014-09-26' # of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -33,7 +33,7 @@ timestamp='2014-09-26' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -53,12 +53,11 @@ timestamp='2014-09-26' me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -68,7 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2014 Free Software Foundation, Inc. +Copyright 1992-2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -90,12 +89,12 @@ while test $# -gt 0 ; do - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" + echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. - echo $1 + echo "$1" exit ;; * ) @@ -111,1226 +110,1164 @@ case $# in exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac +# Split fields of configuration type +# shellcheck disable=SC2162 +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 + *-*-*-*) + basic_machine=$field1-$field2 + os=$field3-$field4 ;; - -bluegene*) - os=-cnk + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ + | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + os=linux-android + ;; + *) + basic_machine=$field1-$field2 + os=$field3 + ;; + esac ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + os= + ;; + *) + basic_machine=$field1 + os=$field2 + ;; + esac + ;; + esac ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + os=bsd + ;; + a29khif) + basic_machine=a29k-amd + os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=scout + ;; + alliant) + basic_machine=fx80-alliant + os= + ;; + altos | altos3068) + basic_machine=m68k-altos + os= + ;; + am29k) + basic_machine=a29k-none + os=bsd + ;; + amdahl) + basic_machine=580-amdahl + os=sysv + ;; + amiga) + basic_machine=m68k-unknown + os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=bsd + ;; + aros) + basic_machine=i386-pc + os=aros + ;; + aux) + basic_machine=m68k-apple + os=aux + ;; + balance) + basic_machine=ns32k-sequent + os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=linux + ;; + cegcc) + basic_machine=arm-unknown + os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=bsd + ;; + convex-c2) + basic_machine=c2-convex + os=bsd + ;; + convex-c32) + basic_machine=c32-convex + os=bsd + ;; + convex-c34) + basic_machine=c34-convex + os=bsd + ;; + convex-c38) + basic_machine=c38-convex + os=bsd + ;; + cray) + basic_machine=j90-cray + os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + os= + ;; + da30) + basic_machine=m68k-da30 + os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + os= + ;; + delta88) + basic_machine=m88k-motorola + os=sysv3 + ;; + dicos) + basic_machine=i686-pc + os=dicos + ;; + djgpp) + basic_machine=i586-pc + os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=ose + ;; + gmicro) + basic_machine=tron-gmicro + os=sysv + ;; + go32) + basic_machine=i386-pc + os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=hms + ;; + harris) + basic_machine=m88k-harris + os=sysv3 + ;; + hp300 | hp300hpux) + basic_machine=m68k-hp + os=hpux + ;; + hp300bsd) + basic_machine=m68k-hp + os=bsd + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=proelf + ;; + i386mach) + basic_machine=i386-mach + os=mach + ;; + isi68 | isi) + basic_machine=m68k-isi + os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=sysv + ;; + merlin) + basic_machine=ns32k-utek + os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + os=coff + ;; + morphos) + basic_machine=powerpc-unknown + os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=moxiebox + ;; + msdos) + basic_machine=i386-pc + os=msdos + ;; + msys) + basic_machine=i686-pc + os=msys + ;; + mvs) + basic_machine=i370-ibm + os=mvs + ;; + nacl) + basic_machine=le32-unknown + os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=newsos + ;; + news1000) + basic_machine=m68030-sony + os=newsos + ;; + necv70) + basic_machine=v70-nec + os=sysv + ;; + nh3000) + basic_machine=m68k-harris + os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=cxux + ;; + nindy960) + basic_machine=i960-intel + os=nindy + ;; + mon960) + basic_machine=i960-intel + os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=ose + ;; + os68k) + basic_machine=m68k-none + os=os68k + ;; + paragon) + basic_machine=i860-intel + os=osf + ;; + parisc) + basic_machine=hppa-unknown + os=linux + ;; + pw32) + basic_machine=i586-unknown + os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=rdos + ;; + rdos32) + basic_machine=i386-pc + os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=coff + ;; + sa29200) + basic_machine=a29k-amd + os=udi + ;; + sei) + basic_machine=mips-sei + os=seiux + ;; + sequent) + basic_machine=i386-sequent + os= + ;; + sps7) + basic_machine=m68k-bull + os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + os= + ;; + stratus) + basic_machine=i860-stratus + os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + os= + ;; + sun2os3) + basic_machine=m68000-sun + os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + os= + ;; + sun3os3) + basic_machine=m68k-sun + os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + os= + ;; + sun4os3) + basic_machine=sparc-sun + os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + os= + ;; + sv1) + basic_machine=sv1-cray + os=unicos + ;; + symmetry) + basic_machine=i386-sequent + os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=unicos + ;; + t90) + basic_machine=t90-cray + os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + os=tpf + ;; + udi29k) + basic_machine=a29k-amd + os=udi + ;; + ultra3) + basic_machine=a29k-nyu + os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=none + ;; + vaxv) + basic_machine=vax-dec + os=sysv + ;; + vms) + basic_machine=vax-dec + os=vms + ;; + vsta) + basic_machine=i386-pc + os=vsta + ;; + vxworks960) + basic_machine=i960-wrs + os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=vxworks + ;; + xbox) + basic_machine=i686-pc + os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + os=unicos + ;; + *) + basic_machine=$1 + os= + ;; + esac ;; esac -# Decode aliases for certain CPU-COMPANY combinations. +# Decode 1-component or ad-hoc basic machines case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | epiphany \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond ;; - c54x) - basic_machine=tic54x-unknown + op50n) + cpu=hppa1.1 + vendor=oki ;; - c55x) - basic_machine=tic55x-unknown + op60c) + cpu=hppa1.1 + vendor=oki ;; - c6x) - basic_machine=tic6x-unknown + ibm*) + cpu=i370 + vendor=ibm + ;; + orion105) + cpu=clipper + vendor=highlevel + ;; + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple + ;; + pmac | pmac-mpw) + cpu=powerpc + vendor=apple + ;; + + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + cpu=m68000 + vendor=att + ;; + 3b*) + cpu=we32k + vendor=att + ;; + bluegene*) + cpu=powerpc + vendor=ibm + os=cnk + ;; + decsystem10* | dec10*) + cpu=pdp10 + vendor=dec + os=tops10 + ;; + decsystem20* | dec20*) + cpu=pdp10 + vendor=dec + os=tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + cpu=m68k + vendor=motorola + ;; + dpx2*) + cpu=m68k + vendor=bull + os=sysv3 + ;; + encore | umax | mmax) + cpu=ns32k + vendor=encore + ;; + elxsi) + cpu=elxsi + vendor=elxsi + os=${os:-bsd} + ;; + fx2800) + cpu=i860 + vendor=alliant + ;; + genix) + cpu=ns32k + vendor=ns + ;; + h3050r* | hiux*) + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + cpu=m68000 + vendor=hp + ;; + hp9k3[2-9][0-9]) + cpu=m68k + vendor=hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + i*86v32) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv32 + ;; + i*86v4*) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv4 + ;; + i*86v) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv + ;; + i*86sol2) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + os=${os:-unicos} + ;; + iris | iris4d) + cpu=mips + vendor=sgi + case $os in + irix*) + ;; + *) + os=irix4 + ;; + esac + ;; + miniframe) + cpu=m68000 + vendor=convergent + ;; + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + os=mint + ;; + news-3600 | risc-news) + cpu=mips + vendor=sony + os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + case $os in + openstep*) + ;; + nextstep*) + ;; + ns2*) + os=nextstep2 + ;; + *) + os=nextstep3 + ;; + esac + ;; + np1) + cpu=np1 + vendor=gould + ;; + op50n-* | op60c-*) + cpu=hppa1.1 + vendor=oki + os=proelf + ;; + pa-hitachi) + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 + ;; + pbd) + cpu=sparc + vendor=tti + ;; + pbb) + cpu=m68k + vendor=tti + ;; + pc532) + cpu=ns32k + vendor=pc532 + ;; + pn) + cpu=pn + vendor=gould + ;; + power) + cpu=power + vendor=ibm + ;; + ps2) + cpu=i386 + vendor=ibm + ;; + rm[46]00) + cpu=mips + vendor=siemens + ;; + rtpc | rtpc-*) + cpu=romp + vendor=ibm + ;; + sde) + cpu=mipsisa32 + vendor=sde + os=${os:-elf} + ;; + simso-wrs) + cpu=sparclite + vendor=wrs + os=vxworks + ;; + tower | tower-32) + cpu=m68k + vendor=ncr + ;; + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu + ;; + w65) + cpu=w65 + vendor=wdc + ;; + w89k-*) + cpu=hppa1.1 + vendor=winbond + os=proelf + ;; + none) + cpu=none + vendor=none ;; leon|leon[3-9]) - basic_machine=sparc-$basic_machine + cpu=sparc + vendor=$basic_machine ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; - strongarm | thumb | xscale) - basic_machine=arm-unknown + *-*) + # shellcheck disable=SC2162 + IFS="-" read cpu vendor <&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 + cpu=$basic_machine + vendor=pc ;; + # These rules are duplicated from below for sake of the special case above; + # i.e. things that normalized to x86 arches should also default to "pc" pc98) - basic_machine=i386-pc + cpu=i386 + vendor=pc ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + x64 | amd64) + cpu=x86_64 + vendor=pc ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc + # Recognize the basic CPU types without company name. + *) + cpu=$basic_machine + vendor=unknown ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc +esac + +unset -v basic_machine + +# Decode basic machines in the full and proper CPU-Company form. +case $cpu-$vendor in + # Here we handle the default manufacturer of certain CPU types in canonical form. It is in + # some cases the only manufacturer, in others, it is the most popular. + craynv-unknown) + vendor=cray + os=${os:-unicosmp} ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc + c90-unknown | c90-cray) + vendor=cray + os=${os:-unicos} ;; - pentium4) - basic_machine=i786-pc + fx80-unknown) + vendor=alliant ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + romp-unknown) + vendor=ibm ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + mmix-unknown) + vendor=knuth ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + microblaze-unknown | microblazeel-unknown) + vendor=xilinx ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + rs6000-unknown) + vendor=ibm ;; - pn) - basic_machine=pn-gould + vax-unknown) + vendor=dec ;; - power) basic_machine=power-ibm + pdp11-unknown) + vendor=dec ;; - ppc | ppcbe) basic_machine=powerpc-unknown + we32k-unknown) + vendor=att ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + cydra-unknown) + vendor=cydrome ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown + i370-ibm*) + vendor=ibm ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + orion-unknown) + vendor=highlevel ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos - ;; - rdos32) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none + xps-unknown | xps100-unknown) + cpu=xps100 + vendor=honeywell ;; -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond + # Here we normalize CPU types with a missing or matching vendor + dpx20-unknown | dpx20-bull) + cpu=rs6000 + vendor=bull + os=${os:-bosx} ;; - op50n) - basic_machine=hppa1.1-oki + + # Here we normalize CPU types irrespective of the vendor + amd64-*) + cpu=x86_64 ;; - op60c) - basic_machine=hppa1.1-oki + blackfin-*) + cpu=bfin + os=linux ;; - romp) - basic_machine=romp-ibm + c54x-*) + cpu=tic54x ;; - mmix) - basic_machine=mmix-knuth + c55x-*) + cpu=tic55x ;; - rs6000) - basic_machine=rs6000-ibm + c6x-*) + cpu=tic6x ;; - vax) - basic_machine=vax-dec + e500v[12]-*) + cpu=powerpc + os=$os"spe" ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown + mips3*-*) + cpu=mips64 ;; - pdp11) - basic_machine=pdp11-dec + ms1-*) + cpu=mt ;; - we32k) - basic_machine=we32k-att + m68knommu-*) + cpu=m68k + os=linux ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown + m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) + cpu=s12z ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun + openrisc-*) + cpu=or32 ;; - cydra) - basic_machine=cydra-cydrome + parisc-*) + cpu=hppa + os=linux ;; - orion) - basic_machine=orion-highlevel + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + cpu=i586 ;; - orion105) - basic_machine=clipper-highlevel + pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) + cpu=i686 ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + cpu=i686 ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple + pentium4-*) + cpu=i786 ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. + pc98-*) + cpu=i386 ;; + ppc-* | ppcbe-*) + cpu=powerpc + ;; + ppcle-* | powerpclittle-*) + cpu=powerpcle + ;; + ppc64-*) + cpu=powerpc64 + ;; + ppc64le-* | powerpc64little-*) + cpu=powerpc64le + ;; + sb1-*) + cpu=mipsisa64sb1 + ;; + sb1el-*) + cpu=mipsisa64sb1el + ;; + sh5e[lb]-*) + cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` + ;; + spur-*) + cpu=spur + ;; + strongarm-* | thumb-*) + cpu=arm + ;; + tx39-*) + cpu=mipstx39 + ;; + tx39el-*) + cpu=mipstx39el + ;; + x64-*) + cpu=x86_64 + ;; + xscale-* | xscalee[bl]-*) + cpu=`echo "$cpu" | sed 's/^xscale/arm/'` + ;; + + # Recognize the canonical CPU Types that limit and/or modify the + # company names they are paired with. + cr16-*) + os=${os:-elf} + ;; + crisv32-* | etraxfs*-*) + cpu=crisv32 + vendor=axis + ;; + cris-* | etrax*-*) + cpu=cris + vendor=axis + ;; + crx-*) + os=${os:-elf} + ;; + neo-tandem) + cpu=neo + vendor=tandem + ;; + nse-tandem) + cpu=nse + vendor=tandem + ;; + nsr-tandem) + cpu=nsr + vendor=tandem + ;; + nsv-tandem) + cpu=nsv + vendor=tandem + ;; + nsx-tandem) + cpu=nsx + vendor=tandem + ;; + s390-*) + cpu=s390 + vendor=ibm + ;; + s390x-*) + cpu=s390x + vendor=ibm + ;; + tile*-*) + os=${os:-linux-gnu} + ;; + *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 + # Recognize the canonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ + | am33_2.0 \ + | amdgcn \ + | arc | arceb \ + | arm | arm[lb]e | arme[lb] | armv* \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin | bpf | bs2000 \ + | c[123]* | c30 | [cjt]90 | c4x \ + | c8051 | clipper | craynv | csky | cydra \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | elxsi | epiphany \ + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | h8300 | h8500 \ + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle \ + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64eb | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mmix \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | none | np1 | ns16k | ns32k | nvptx \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | picochip \ + | pdp10 | pdp11 | pj | pjl | pn | power \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv64 \ + | rl78 | romp | rs6000 | rx \ + | score \ + | sh | shl \ + | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ + | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ + | spu \ + | tahoe \ + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ + | tron \ + | ubicom32 \ + | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ + | visium \ + | w65 \ + | wasm32 | wasm64 \ + | we32k \ + | x86 | x86_64 | xc16x | xgate | xps100 \ + | xstormy16 | xtensa* \ + | ymp \ + | z8k | z80) + ;; + + *) + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + exit 1 + ;; + esac ;; esac # Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` +case $vendor in + digital*) + vendor=dec ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + commodore*) + vendor=cbm ;; *) ;; @@ -1338,197 +1275,244 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if [ x"$os" != x"" ] +if [ x$os != x ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + # First match some system type aliases that might get confused + # with valid system types. + # solaris* is a basic system type, with this one exception. + auroraux) + os=auroraux ;; - -solaris1 | -solaris1.*) + bluegene*) + os=cnk + ;; + solaris1 | solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; - -solaris) - os=-solaris2 + solaris) + os=solaris2 ;; - -svr4*) - os=-sysv4 + unixware*) + os=sysv4.2uw ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) + gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; - # First accept the basic system types. + # es1800 is here to avoid being matched by es* (a different OS) + es1800*) + os=ose + ;; + # Some version numbers need modification + chorusos*) + os=chorusos + ;; + isc) + os=isc2.2 + ;; + sco6) + os=sco5v6 + ;; + sco5) + os=sco3.2v5 + ;; + sco4) + os=sco3.2v4 + ;; + sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + scout) + # Don't match below + ;; + sco*) + os=sco3.2v2 + ;; + psos*) + os=psos + ;; + # Now accept the basic system types. # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) + # Each alternative MUST end in a * to match a version number. + # sysv* is not here because it comes later, after sysvr4. + gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | kopensolaris* | plan9* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* | twizzler* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | knetbsd* | mirbsd* | netbsd* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ + | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ + | linux-newlib* | linux-musl* | linux-uclibc* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* \ + | morphos* | superux* | rtmk* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | nsk* | powerunix) # Remember, each alternative MUST END IN *, to match a version number. ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) + qnx*) + case $cpu in + x86 | i*86) ;; *) - os=-nto$os + os=nto-$os ;; esac ;; - -nto-qnx*) + hiux*) + os=hiuxwe2 ;; - -nto*) + nto-qnx*) + ;; + nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + sim | xray | os68k* | v88r* \ + | windows* | osx | abug | netware* | os9* \ + | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` + linux-dietlibc) + os=linux-dietlibc ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) + linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` + lynx*178) + os=lynxos178 ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` + lynx*5) + os=lynxos5 ;; - -opened*) - os=-openedition + lynx*) + os=lynxos ;; - -os400*) - os=-os400 + mac*) + os=`echo "$os" | sed -e 's|mac|macos|'` ;; - -wince*) - os=-wince + opened*) + os=openedition ;; - -osfrose*) - os=-osfrose + os400*) + os=os400 ;; - -osf*) - os=-osf + sunos5*) + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; - -utek*) - os=-bsd + sunos6*) + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; - -dynix*) - os=-bsd + wince*) + os=wince ;; - -acis*) - os=-aos + utek*) + os=bsd ;; - -atheos*) - os=-atheos + dynix*) + os=bsd ;; - -syllable*) - os=-syllable + acis*) + os=aos ;; - -386bsd) - os=-bsd + atheos*) + os=atheos ;; - -ctix* | -uts*) - os=-sysv + syllable*) + os=syllable ;; - -nova*) - os=-rtmk-nova + 386bsd) + os=bsd ;; - -ns2 ) - os=-nextstep2 + ctix* | uts*) + os=sysv ;; - -nsk*) - os=-nsk + nova*) + os=rtmk-nova + ;; + ns2) + os=nextstep2 ;; # Preserve the version number of sinix5. - -sinix5.*) + sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; - -sinix*) - os=-sysv4 + sinix*) + os=sysv4 ;; - -tpf*) - os=-tpf + tpf*) + os=tpf ;; - -triton*) - os=-sysv3 + triton*) + os=sysv3 ;; - -oss*) - os=-sysv3 + oss*) + os=sysv3 ;; - -svr4) - os=-sysv4 + svr4*) + os=sysv4 ;; - -svr3) - os=-sysv3 + svr3) + os=sysv3 ;; - -sysvr4) - os=-sysv4 + sysvr4) + os=sysv4 ;; - # This must come after -sysvr4. - -sysv*) + # This must come after sysvr4. + sysv*) ;; - -ose*) - os=-ose + ose*) + os=ose ;; - -es1800*) - os=-ose + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + os=mint ;; - -xenix) - os=-xenix + zvmoe) + os=zvmoe ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + dicos*) + os=dicos ;; - -aros*) - os=-aros + pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $cpu in + arm*) + os=eabi + ;; + *) + os=elf + ;; + esac ;; - -zvmoe) - os=-zvmoe + nacl*) ;; - -dicos*) - os=-dicos + ios) ;; - -nacl*) + none) ;; - -none) + *-eabi) ;; *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac @@ -1544,261 +1528,265 @@ else # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $basic_machine in +case $cpu-$vendor in score-*) - os=-elf + os=elf ;; spu-*) - os=-elf + os=elf ;; *-acorn) - os=-riscix1.2 + os=riscix1.2 ;; arm*-rebel) - os=-linux + os=linux ;; arm*-semi) - os=-aout + os=aout ;; c4x-* | tic4x-*) - os=-coff + os=coff ;; c8051-*) - os=-elf + os=elf + ;; + clipper-intergraph) + os=clix ;; hexagon-*) - os=-elf + os=elf ;; tic54x-*) - os=-coff + os=coff ;; tic55x-*) - os=-coff + os=coff ;; tic6x-*) - os=-coff + os=coff ;; # This must come before the *-dec entry. pdp10-*) - os=-tops20 + os=tops20 ;; pdp11-*) - os=-none + os=none ;; *-dec | vax-*) - os=-ultrix4.2 + os=ultrix4.2 ;; m68*-apollo) - os=-domain + os=domain ;; i386-sun) - os=-sunos4.0.2 + os=sunos4.0.2 ;; m68000-sun) - os=-sunos3 + os=sunos3 ;; m68*-cisco) - os=-aout + os=aout ;; mep-*) - os=-elf + os=elf ;; mips*-cisco) - os=-elf + os=elf ;; mips*-*) - os=-elf + os=elf ;; or32-*) - os=-coff + os=coff ;; *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 + os=sysv3 ;; sparc-* | *-sun) - os=-sunos4.1.1 + os=sunos4.1.1 + ;; + pru-*) + os=elf ;; *-be) - os=-beos - ;; - *-haiku) - os=-haiku + os=beos ;; *-ibm) - os=-aix + os=aix ;; *-knuth) - os=-mmixware + os=mmixware ;; *-wec) - os=-proelf + os=proelf ;; *-winbond) - os=-proelf + os=proelf ;; *-oki) - os=-proelf + os=proelf ;; *-hp) - os=-hpux + os=hpux ;; *-hitachi) - os=-hiux + os=hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv + os=sysv ;; *-cbm) - os=-amigaos + os=amigaos ;; *-dg) - os=-dgux + os=dgux ;; *-dolphin) - os=-sysv3 + os=sysv3 ;; m68k-ccur) - os=-rtu + os=rtu ;; m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs + os=luna ;; *-next) - os=-nextstep3 + os=nextstep + ;; + *-sequent) + os=ptx + ;; + *-crds) + os=unos + ;; + *-ns) + os=genix + ;; + i370-*) + os=mvs ;; *-gould) - os=-sysv + os=sysv ;; *-highlevel) - os=-bsd + os=bsd ;; *-encore) - os=-bsd + os=bsd ;; *-sgi) - os=-irix + os=irix ;; *-siemens) - os=-sysv4 + os=sysv4 ;; *-masscomp) - os=-rtu + os=rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=-uxpv + os=uxpv ;; *-rom68k) - os=-coff + os=coff ;; *-*bug) - os=-coff + os=coff ;; *-apple) - os=-macos + os=macos ;; *-atari*) - os=-mint + os=mint + ;; + *-wrs) + os=vxworks ;; *) - os=-none + os=none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) +case $vendor in + unknown) case $os in - -riscix*) + riscix*) vendor=acorn ;; - -sunos*) + sunos*) vendor=sun ;; - -cnk*|-aix*) + cnk*|-aix*) vendor=ibm ;; - -beos*) + beos*) vendor=be ;; - -hpux*) + hpux*) vendor=hp ;; - -mpeix*) + mpeix*) vendor=hp ;; - -hiux*) + hiux*) vendor=hitachi ;; - -unos*) + unos*) vendor=crds ;; - -dgux*) + dgux*) vendor=dg ;; - -luna*) + luna*) vendor=omron ;; - -genix*) + genix*) vendor=ns ;; - -mvs* | -opened*) + clix*) + vendor=intergraph + ;; + mvs* | opened*) vendor=ibm ;; - -os400*) + os400*) vendor=ibm ;; - -ptx*) + ptx*) vendor=sequent ;; - -tpf*) + tpf*) vendor=ibm ;; - -vxsim* | -vxworks* | -windiss*) + vxsim* | vxworks* | windiss*) vendor=wrs ;; - -aux*) + aux*) vendor=apple ;; - -hms*) + hms*) vendor=hitachi ;; - -mpw* | -macos*) + mpw* | macos*) vendor=apple ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) vendor=atari ;; - -vos*) + vos*) vendor=stratus ;; esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac -echo $basic_machine$os +echo "$cpu-$vendor-$os" exit # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/edit.c b/edit.c index 9db8372..ee1a1a7 100644 --- a/edit.c +++ b/edit.c @@ -11,13 +11,14 @@ * 2003-07-04 V 1.3.2 * 2006-04-05 V 1.3.3 alpha - binary representation * 2014-09-30 V 1.4.0 + * 2019-10-12 V 1.4.1 * - * Copyright 1996-2014 by Gerhard Buergmann + * Copyright 1996-2019 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any + * Free Software Foundation; either version 3, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, but @@ -474,17 +475,6 @@ statpos() } Char1 = *(mem + bytepos); - if (isprint(Char1)) { - sprintf(str, "'%c'", Char1); - } else if (Char1 < 32) { - if (P(P_US)) strcpy(str, contru[Char1]); - else strcpy(str, contrd[Char1]); - } else if (Char1 == 127) { - if (P(P_US)) strcpy(str, contru[32]); - else strcpy(str, contrd[32]); - } else { - strcpy(str, " "); - } for (i = 0; i < 8; ++i) { if(Char1 & (1< 159) && (Char1 < 255))) { + addstr("'"); + attrset(A_REVERSE); + sprintf(str, "%c", Char1 & 127); + addstr(str); + attrset(A_BOLD); + addstr("'"); + } else { + addstr(" "); + } + } else { + addstr(" "); + } + } attrset(A_NORMAL); } @@ -508,7 +526,6 @@ printline(mempos, scpos) PTR mempos; int scpos; { - /* int print_pos; */ PTR hl_start = 0; PTR hl_end = 0; PTR f_start = 0; @@ -574,16 +591,34 @@ printline(mempos, scpos) sprintf(tmpbuf, "%02X ", cur_ch); } strcat(linbuf, tmpbuf); - if (isprint(cur_ch)) - *(string + print_pos) = cur_ch; - else - *(string + print_pos) = '.'; } mvaddstr(scpos, mv_pos, linbuf); - mv_pos = AnzAdd + (3 * print_pos); attrset(A_NORMAL); - *(string + Anzahl) = '\0'; - mvaddstr(scpos, mv_pos, string); + + for (print_pos = 0; print_pos < Anzahl; print_pos++) { + if (mempos + print_pos < maxpos) { + cur_ch = *(mempos + print_pos); + if (isprint(cur_ch)) { + sprintf(string, "%c", cur_ch); + addstr(string); + } else { + if (P(P_RE)) { + if ((cur_ch & 128) && ((cur_ch > 159) && (cur_ch < 255))) { + attrset(A_REVERSE); + sprintf(string, "%c", cur_ch & 127); + addstr(string); + attrset(A_NORMAL); + } else { + addstr("."); + } + } else { + addstr("."); + } + } + } else { + addstr(" "); + } + } } diff --git a/io.c b/io.c index c8232ab..1a0eda4 100644 --- a/io.c +++ b/io.c @@ -10,15 +10,16 @@ * 2004-01-04 V 1.3.2 * 2010-06-02 V 1.3.4 * 2014-05-03 V 1.4.0 + * 2019-01-27 V 1.4.1 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2014 by Gerhard Buergmann + * Copyright 1996-2019 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any + * Free Software Foundation; either version 3, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, but @@ -59,6 +60,7 @@ static struct stat buf; static off_t block_read; char *terminal; +extern char *fname_buf; /*********** Save the patched file ********************/ int @@ -154,7 +156,7 @@ load(fname) char *fname; { int fd = -1; - char *string; + //char *string; buf.st_size = 0L; if (fname != NULL) { @@ -243,12 +245,13 @@ load(fname) } clear_marks(); + if (fname_buf) free(fname_buf); if (fname != NULL) { - string = malloc((size_t)strlen(fname) + MAXCMD); + fname_buf = malloc((size_t)strlen(fname) + MAXCMD); } else { - string = malloc(MAXCMD); + fname_buf = malloc(MAXCMD); } - if (string == NULL) { + if (fname_buf == NULL) { emsg("Out of memory"); return 0; } @@ -259,10 +262,10 @@ load(fname) filemode = ERROR; } else { if ((filesize = read(fd, mem, block_size)) == 0) { - sprintf(string, "\"%s\" Empty file", fname); + sprintf(fname_buf, "\"%s\" Empty file", fname); filemode = ERROR; } else { - sprintf(string, "\"%s\" range %llu-%llu", fname, + sprintf(fname_buf, "\"%s\" range %llu-%llu", fname, (unsigned long long)block_begin, (unsigned long long)(block_begin + filesize - 1)); filemode = PARTIAL; @@ -270,7 +273,7 @@ load(fname) P(P_OF) = block_begin; params[P_OF].flags |= P_CHANGED; } - msg(string); + msg(fname_buf); refresh(); } } else if ((filemode == REGULAR) || (filemode == DIRECTORY)) { @@ -286,31 +289,31 @@ load(fname) if (fname != NULL) { switch (filemode) { case NEW: - sprintf(string, "\"%s\" [New File]", fname); + sprintf(fname_buf, "\"%s\" [New File]", fname); break; case REGULAR: - sprintf(string, "\"%s\" %s%llu bytes", fname, + sprintf(fname_buf, "\"%s\" %s%llu bytes", fname, P(P_RO) ? "[Read only] " : "", (unsigned long long)filesize); break; case DIRECTORY: - sprintf(string, "\"%s\" Directory", fname); + sprintf(fname_buf, "\"%s\" Directory", fname); break; case CHARACTER_SPECIAL: - sprintf(string, "\"%s\" Character special file", fname); + sprintf(fname_buf, "\"%s\" Character special file", fname); break; case BLOCK_SPECIAL: - sprintf(string, "\"%s\" Block special file", fname); + sprintf(fname_buf, "\"%s\" Block special file", fname); break; } - if (filemode != ERROR) msg(string); + if (filemode != ERROR) msg(fname_buf); } pagepos = mem; maxpos = mem + filesize; loc = HEX; x = AnzAdd; y = 0; repaint(); - free(string); + //free(string); return(filesize); } diff --git a/patchlevel.h b/patchlevel.h index 7851500..276f7ba 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -1 +1 @@ -#define VERSION "1.4.0" +#define VERSION "1.4.1" diff --git a/re.c b/re.c index 414774d..bc5cdd8 100644 --- a/re.c +++ b/re.c @@ -10,13 +10,14 @@ * 2000-09-29 V 1.3.0 final * 2010-06-02 V 1.3.4 * 2013-08-24 V 1.4.0 + * 2019-01-28 V 1.4.1 * - * Copyright 1996-2013 by Gerhard Buergmann + * Copyright 1996-2019 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any + * Free Software Foundation; either version 3, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, but diff --git a/recomp.c b/recomp.c index f5e4b0c..1937b9c 100644 --- a/recomp.c +++ b/recomp.c @@ -5,13 +5,14 @@ * 1996-01-06 created; * 2000-04-25 V 1.3.0 beta * 2000-07-12 V 1.3.0 final + * 2019-01-28 V 1.4.1 * - * Copyright 1996-2002 by Gerhard Buergmann - * Gerhard.Buergmann@puon.at + * Copyright 1996-2019 by Gerhard Buergmann + * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any + * Free Software Foundation; either version 3, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, but diff --git a/set.c b/set.c index fefc63b..7f2707f 100644 --- a/set.c +++ b/set.c @@ -13,13 +13,14 @@ * 2003-07-03 V 1.3.2 * 2010-06-02 V 1.2.4 * 2014-09-30 V 1.4.0 + * 2019-01-22 V 1.4.1 * - * Copyright 1996-2014 by Gerhard Buergmann + * Copyright 1996-2019 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any + * Free Software Foundation; either version 3, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, but @@ -56,6 +57,7 @@ struct param params[] = { { "wordlength", "wl", 4, "", P_NUM }, { "wrapscan", "ws", TRUE, "", P_BOOL }, { "highlight", "hl", TRUE, "", P_BOOL }, + { "reverse", "re", FALSE, "", P_BOOL }, #if defined(__MSDOS__) && !defined(DJGPP) { "color", "co", 7, "", P_NUM }, #endif @@ -156,6 +158,9 @@ doset(arg) hl_spat = FALSE; repaint(); } + if (i == P_RE) { + repaint(); + } } } } else { diff --git a/set.h b/set.h index 55aac90..8995296 100644 --- a/set.h +++ b/set.h @@ -2,7 +2,7 @@ * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2014 by Gerhard Buergmann + * Copyright 1996-2019 by Gerhard Buergmann * Gerhard.Buergmann@puon.at * * 1998-03-14 V 1.0.0 @@ -13,10 +13,11 @@ * 2000-08-21 V 1.3.0 final * 2010-06-02 V 1.3.4 * 2013-08-23 V 1.4.0 + * 2019-01-22 V 1.4.1 * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any + * Free Software Foundation; either version 3, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, but @@ -67,7 +68,8 @@ extern struct param params[]; #define P_WL 14 /* Wordlength for w, W, b, B command */ #define P_WS 15 /* wrapscan */ #define P_HL 16 /* highlight search enabled */ -#define P_CO 17 /* color/attribute setting */ +#define P_RE 17 /* reverse video */ +#define P_CO 18 /* color/attribute setting */ /* * Macro to get the value of a parameter diff --git a/tags b/tags index 33be205..771ed94 100644 --- a/tags +++ b/tags @@ -3,14 +3,15 @@ !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ !_TAG_PROGRAM_NAME Exuberant Ctags // !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ -!_TAG_PROGRAM_VERSION 5.8 // -AND bvi.h 88;" d -ANSI bmore.h 103;" d -ANSI bvi.h 117;" d -APPEND comm.c 50;" d file: -APPEND comm.c 53;" d file: -ASCII bmore.h 82;" d -ASCII bvi.h 95;" d +!_TAG_PROGRAM_VERSION 5.9~svn20110310 // +AND bvi.h 90;" d +ANSI bmore.h 104;" d +ANSI bvi.h 120;" d +APPEND comm.c 51;" d file: +APPEND comm.c 54;" d file: +ASCII bmore.h 83;" d +ASCII bvi.h 97;" d +ASCII_DEL bvi.h 106;" d A_ATTRIBUTES doscur.h 56;" d A_BLINK doscur.h 54;" d A_BOLD doscur.h 52;" d @@ -23,87 +24,59 @@ AnzAdd bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v Anzahl bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v Anzahl3 bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v Ausgabe_Datei bvi.c /^FILE *Ausgabe_Datei;$/;" v -BACKWARD bmore.h 84;" d -BACKWARD bvi.h 97;" d +BACKWARD bmore.h 85;" d +BACKWARD bvi.h 99;" d BLOCK_BEGIN bvi.h /^ BLOCK_BEGIN = 1,$/;" e enum:_block_datum BLOCK_END bvi.h /^ BLOCK_END = 2,$/;" e enum:_block_datum BLOCK_LEN bvi.h /^ BLOCK_LEN = 4$/;" e enum:_block_datum -BLOCK_SPECIAL bmore.h 74;" d -BLOCK_SPECIAL bvi.h 64;" d -BMOBJ Makefile /^BMOBJ = bmore.o bm_unix.o recomp.o$/;" m -BS bmore.h 87;" d -BS bvi.h 100;" d -BUFFER bmore.h 115;" d -BUFFER bvi.h 131;" d -BVICTRL bmore.h 91;" d -BVICTRL bvi.h 103;" d -CC Makefile /^CC = gcc$/;" m -CFLAGS Makefile /^CFLAGS = -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES$/;" m -CHARACTER_SPECIAL bmore.h 73;" d -CHARACTER_SPECIAL bvi.h 63;" d -CMDLNG bvi.h 105;" d -CMDSZ comm.c 56;" d file: +BLOCK_SPECIAL bmore.h 75;" d +BLOCK_SPECIAL bvi.h 66;" d +BS bmore.h 88;" d +BS bvi.h 102;" d +BUFFER bmore.h 116;" d +BUFFER bvi.h 134;" d +BVICTRL bmore.h 92;" d +BVICTRL bvi.h 105;" d +CHARACTER_SPECIAL bmore.h 74;" d +CHARACTER_SPECIAL bvi.h 65;" d +CMDLNG bvi.h 108;" d +CMDSZ comm.c 57;" d file: COLS dosio.c /^int COLS = 80;$/;" v -CR bmore.h 85;" d -CR bvi.h 98;" d -DEFS Makefile /^DEFS = -DHAVE_CONFIG_H$/;" m -DELIM bmore.h 106;" d -DELIM bmore.h 111;" d -DELIM bvi.h 120;" d -DELIM bvi.h 127;" d -DIRECTORY bmore.h 72;" d -DIRECTORY bvi.h 62;" d +CR bmore.h 86;" d +CR bvi.h 100;" d +DELIM bmore.h 107;" d +DELIM bmore.h 112;" d +DELIM bvi.h 123;" d +DELIM bvi.h 130;" d +DIRECTORY bmore.h 73;" d +DIRECTORY bvi.h 64;" d ECHO dosio.c /^int ECHO = TRUE;$/;" v -END bmore.h 78;" d -END bvi.h 68;" d +END bmore.h 79;" d +END bvi.h 70;" d ERR doscur.h 147;" d -ERROR bmore.h 69;" d -ERROR bvi.h 59;" d -ESC bmore.h 88;" d -ESC bvi.h 101;" d +ERROR bmore.h 70;" d +ERROR bvi.h 61;" d +ESC bmore.h 89;" d +ESC bvi.h 103;" d ESC doscur.h 31;" d -FALSE bmore.h 99;" d -FALSE bvi.h 113;" d +FALSE bmore.h 100;" d +FALSE bvi.h 116;" d FALSE doscur.h 29;" d -FORWARD bmore.h 83;" d -FORWARD bvi.h 96;" d +FORWARD bmore.h 84;" d +FORWARD bvi.h 98;" d HAVE_CURSES_H acconfig.h 5;" d -HAVE_FCNTL_H config.h 16;" d HAVE_FCNTL_H dosconf.h 40;" d -HAVE_INTTYPES_H config.h 19;" d HAVE_LOCALE_H dosconf.h 44;" d -HAVE_MEMMOVE config.h 22;" d HAVE_MEMMOVE dosconf.h 31;" d -HAVE_MEMORY_H config.h 25;" d HAVE_NCURSES_H acconfig.h 3;" d -HAVE_NCURSES_H config.h 5;" d HAVE_NCURSES_TERM_H acconfig.h 11;" d -HAVE_STDINT_H config.h 31;" d -HAVE_STDLIB_H config.h 34;" d -HAVE_STRDUP config.h 37;" d HAVE_STRDUP dosconf.h 34;" d -HAVE_STRERROR config.h 40;" d -HAVE_STRINGS_H config.h 43;" d -HAVE_STRING_H config.h 46;" d -HAVE_STRTOL config.h 49;" d HAVE_STRTOL dosconf.h 37;" d -HAVE_SYS_STAT_H config.h 52;" d -HAVE_SYS_TYPES_H config.h 55;" d -HAVE_TERMCAP_H config.h 58;" d -HAVE_TERMIOS_H config.h 61;" d -HAVE_TERMIO_H config.h 64;" d -HAVE_TERM_H config.h 67;" d -HAVE_UNISTD_H config.h 70;" d -HEADER Makefile /^HEADER = bvi.h set.h$/;" m -HELPFILE bmore.c 42;" d file: -HELPFILE bmore.c 44;" d file: -HEX bvi.h 94;" d +HELPFILE bmore.c 43;" d file: +HELPFILE bmore.c 45;" d file: +HEX bvi.h 96;" d Home bm_unix.c /^char *Home; \/* go to home *\/$/;" v -INSTALL Makefile /^INSTALL = \/usr\/bin\/install -c$/;" m -INSTALL_DATA Makefile /^INSTALL_DATA = ${INSTALL} -m 644$/;" m -INSTALL_PROGRAM Makefile /^INSTALL_PROGRAM = ${INSTALL}$/;" m -JOEHTG bvi.h 41;" d -KEY_BACKSPACE bvi.h 150;" d +JOEHTG bvi.h 43;" d KEY_BACKSPACE doscur.h 42;" d KEY_DC doscur.h 45;" d KEY_DOWN doscur.h 34;" d @@ -119,117 +92,101 @@ KEY_PPAGE doscur.h 39;" d KEY_RETURN doscur.h 40;" d KEY_RIGHT doscur.h 37;" d KEY_UP doscur.h 35;" d -LDFLAGS Makefile /^LDFLAGS= $/;" m -LIBS Makefile /^LIBS = -lncurses $/;" m LINES dosio.c /^int LINES = 25;$/;" v -LROTATE bvi.h 86;" d -LSHIFT bvi.h 84;" d -MAXCMD bmore.h 114;" d -MAXCMD bvi.h 130;" d -MAXNAME comm.c 57;" d file: -MAX_ONE_ARG comm.c 62;" d file: -MAX_ONE_FILE comm.c 64;" d file: +LROTATE bvi.h 88;" d +LSHIFT bvi.h 86;" d +MAXCMD bmore.h 115;" d +MAXCMD bvi.h 133;" d +MAXNAME comm.c 58;" d file: +MAX_ONE_ARG comm.c 63;" d file: +MAX_ONE_FILE comm.c 65;" d file: NEED_PUTC_CHAR acconfig.h 9;" d NEED_PUTC_CHAR bm_unix.c 52;" d file: -NEG bvi.h 91;" d -NEW bmore.h 71;" d -NEW bvi.h 61;" d -NL bmore.h 86;" d -NL bvi.h 99;" d +NEG bvi.h 93;" d +NEW bmore.h 72;" d +NEW bvi.h 63;" d +NL bmore.h 87;" d +NL bvi.h 101;" d NODEL dosio.c /^int NODEL = FALSE;$/;" v -NOT bvi.h 92;" d -NO_ADDR comm.c 59;" d file: -NO_ARG comm.c 60;" d file: +NOT bvi.h 94;" d +NO_ADDR comm.c 60;" d file: +NO_ARG comm.c 61;" d file: NO_SYSERRL acconfig.h 7;" d -NULL bmore.h 94;" d -NULL bvi.h 108;" d -OBJS Makefile /^OBJS = bvi.o comm.o set.o re.o io.o edit.o recomp.o$/;" m -OFF_T_MAX io.c 46;" d file: -ONE bmore.h 79;" d -ONE bvi.h 69;" d -ONE_ARG comm.c 61;" d file: -ONE_FILE comm.c 63;" d file: -OR bvi.h 89;" d -P set.h 75;" d -PARTIAL bmore.h 75;" d -PARTIAL bvi.h 65;" d -PRINTF bmore.c 37;" d file: -PRINTF bmore.c 39;" d file: -PTR bmore.h 104;" d -PTR bmore.h 110;" d -PTR bvi.h 118;" d -PTR bvi.h 126;" d -P_AW set.h 53;" d -P_BOOL set.h 41;" d -P_CHANGED set.h 44;" d -P_CM set.h 54;" d -P_CO set.h 70;" d -P_EB set.h 55;" d -P_HL set.h 69;" d -P_IC set.h 56;" d -P_LI set.h 66;" d -P_MA set.h 57;" d -P_MM set.h 58;" d -P_MO set.h 62;" d -P_NUM set.h 42;" d -P_OF set.h 59;" d -P_RO set.h 60;" d -P_SS set.h 61;" d -P_TE set.h 64;" d -P_TEXT set.h 43;" d -P_TT set.h 63;" d -P_US set.h 65;" d -P_WL set.h 67;" d -P_WS set.h 68;" d -REGULAR bmore.h 70;" d -REGULAR bvi.h 60;" d -REPLACE bmore.h 90;" d -RROTATE bvi.h 87;" d -RSHIFT bvi.h 85;" d -SEARCH bmore.h 89;" d -SEARCH bvi.h 102;" d -SHELL Makefile /^SHELL = \/bin\/sh$/;" m -SIZEOF_INT config.h 73;" d -SIZEOF_LONG config.h 76;" d -SIZEOF_VOID_P config.h 79;" d -SKIP_WHITE bvi.h 133;" d -STAR bmore.h 80;" d -STAR bvi.h 70;" d -STDC_HEADERS config.h 82;" d +NULL bmore.h 95;" d +NULL bvi.h 111;" d +OFF_T_MAX io.c 47;" d file: +ONE bmore.h 80;" d +ONE bvi.h 71;" d +ONE_ARG comm.c 62;" d file: +ONE_FILE comm.c 64;" d file: +OR bvi.h 91;" d +P set.h 77;" d +PARTIAL bmore.h 76;" d +PARTIAL bvi.h 67;" d +PRINTF bmore.c 38;" d file: +PRINTF bmore.c 40;" d file: +PTR bmore.h 105;" d +PTR bmore.h 111;" d +PTR bvi.h 121;" d +PTR bvi.h 129;" d +P_AW set.h 54;" d +P_BOOL set.h 42;" d +P_CHANGED set.h 45;" d +P_CM set.h 55;" d +P_CO set.h 72;" d +P_EB set.h 56;" d +P_HL set.h 70;" d +P_IC set.h 57;" d +P_LI set.h 67;" d +P_MA set.h 58;" d +P_MM set.h 59;" d +P_MO set.h 63;" d +P_NUM set.h 43;" d +P_OF set.h 60;" d +P_RE set.h 71;" d +P_RO set.h 61;" d +P_SS set.h 62;" d +P_TE set.h 65;" d +P_TEXT set.h 44;" d +P_TT set.h 64;" d +P_US set.h 66;" d +P_WL set.h 68;" d +P_WS set.h 69;" d +REGULAR bmore.h 71;" d +REGULAR bvi.h 62;" d +REPLACE bmore.h 91;" d +RROTATE bvi.h 89;" d +RSHIFT bvi.h 87;" d +SEARCH bmore.h 90;" d +SEARCH bvi.h 104;" d +SKIP_WHITE bvi.h 136;" d +STAR bmore.h 81;" d +STAR bvi.h 72;" d STDC_HEADERS dosconf.h 28;" d -S_GLOBAL bvi.h 81;" d -S_ISBLK bvi.h 199;" d -S_ISCHR bvi.h 198;" d -S_ISDIR bvi.h 197;" d -S_ISFIFO bvi.h 201;" d -S_ISREG bvi.h 200;" d +S_GLOBAL bvi.h 83;" d +S_ISBLK bvi.h 198;" d +S_ISCHR bvi.h 197;" d +S_ISDIR bvi.h 196;" d +S_ISFIFO bvi.h 200;" d +S_ISREG bvi.h 199;" d TBUFSIZ bm_dos.c 32;" d file: TBUFSIZ bm_unix.c 32;" d file: -TRUE bmore.h 98;" d -TRUE bvi.h 112;" d +TRUE bmore.h 99;" d +TRUE bvi.h 115;" d TRUE doscur.h 28;" d -U_APPEND bvi.h 78;" d -U_BACK bvi.h 77;" d -U_DELETE bvi.h 76;" d -U_EDIT bvi.h 73;" d -U_INSERT bvi.h 75;" d -U_TILDE bvi.h 79;" d -U_TRUNC bvi.h 74;" d +U_APPEND bvi.h 80;" d +U_BACK bvi.h 79;" d +U_DELETE bvi.h 78;" d +U_EDIT bvi.h 75;" d +U_INSERT bvi.h 77;" d +U_TILDE bvi.h 81;" d +U_TRUNC bvi.h 76;" d VERSION patchlevel.h 1;" d WINDOW doscur.h 60;" d -WRITE comm.c 49;" d file: -WRITE comm.c 52;" d file: -XOR bvi.h 90;" d +WRITE comm.c 50;" d file: +WRITE comm.c 53;" d file: +XOR bvi.h 92;" d _block_datum bvi.h /^typedef enum _block_datum {$/;" g -ac_fn_c_check_func configure /^ac_fn_c_check_func ()$/;" f -ac_fn_c_check_header_compile configure /^ac_fn_c_check_header_compile ()$/;" f -ac_fn_c_check_header_mongrel configure /^ac_fn_c_check_header_mongrel ()$/;" f -ac_fn_c_check_type configure /^ac_fn_c_check_type ()$/;" f -ac_fn_c_compute_int configure /^ac_fn_c_compute_int ()$/;" f -ac_fn_c_try_compile configure /^ac_fn_c_try_compile ()$/;" f -ac_fn_c_try_cpp configure /^ac_fn_c_try_cpp ()$/;" f -ac_fn_c_try_link configure /^ac_fn_c_try_link ()$/;" f -ac_fn_c_try_run configure /^ac_fn_c_try_run ()$/;" f act_pat re.c /^char act_pat[MAXCMD]; \/* found pattern *\/$/;" v addch doscur.h 95;" d addfile dosio.c /^addfile(char *fname)$/;" f @@ -246,30 +203,11 @@ ambigous comm.c /^char *ambigous = "Ambigous|Too many file names";$/;" v ambvalue comm.c /^char *ambvalue = "Ambigous|Too many values";$/;" v arrnum bmore.c /^int arrnum = 0;$/;" v arrnum bvi.c /^int arrnum = 0;$/;" v -as_fn_append config.status /^ as_fn_append ()$/;" f -as_fn_append configure /^ as_fn_append ()$/;" f -as_fn_arith config.status /^ as_fn_arith ()$/;" f -as_fn_arith configure /^ as_fn_arith ()$/;" f -as_fn_error config.status /^as_fn_error ()$/;" f -as_fn_error configure /^as_fn_error ()$/;" f -as_fn_exit config.status /^as_fn_exit ()$/;" f -as_fn_exit configure /^as_fn_exit ()$/;" f -as_fn_failure configure /^as_fn_failure () { as_fn_return 1; }$/;" f -as_fn_mkdir_p config.status /^as_fn_mkdir_p ()$/;" f -as_fn_mkdir_p configure /^as_fn_mkdir_p ()$/;" f -as_fn_ret_failure configure /^as_fn_ret_failure () { return 1; }$/;" f -as_fn_ret_success configure /^as_fn_ret_success () { return 0; }$/;" f -as_fn_set_status config.status /^as_fn_set_status ()$/;" f -as_fn_set_status configure /^as_fn_set_status ()$/;" f -as_fn_success configure /^as_fn_success () { as_fn_return 0; }$/;" f -as_fn_unset config.status /^as_fn_unset ()$/;" f -as_fn_unset configure /^as_fn_unset ()$/;" f ascii_comp recomp.c /^ascii_comp(smem, pattern)$/;" f ascii_flag bmore.c /^int ascii_flag = 0;$/;" v attrset dosio.c /^attrset(int attr)$/;" f backsearch re.c /^backsearch(start, mode)$/;" f beep doscur.h 76;" d -bindir Makefile /^bindir = $(DESTDIR)${exec_prefix}\/bin$/;" m block_begin bvi.c /^off_t block_begin, block_end, block_size;$/;" v block_datum bvi.h /^} block_datum;$/;" t typeref:enum:_block_datum block_end bvi.c /^off_t block_begin, block_end, block_size;$/;" v @@ -284,7 +222,7 @@ bregexec re.c /^bregexec(start, scan)$/;" f buf comm.c /^static struct stat buf;$/;" v typeref:struct:stat file: buf dosio.c /^static struct stat buf;$/;" v typeref:struct:stat file: buf io.c /^static struct stat buf;$/;" v typeref:struct:stat file: -buf set.c /^static char buf[64];$/;" v file: +buf set.c /^static char buf[MAXCMD+1];$/;" v file: buffer1 bmore.c /^char buffer1[MAXCMD], buffer2[MAXCMD];$/;" v buffer2 bmore.c /^char buffer1[MAXCMD], buffer2[MAXCMD];$/;" v bvi_init dosio.c /^bvi_init(char *dir)$/;" f @@ -292,7 +230,7 @@ bvi_init io.c /^bvi_init(dir)$/;" f bytepos bmore.c /^off_t bytepos, oldpos;$/;" v c_argc comm.c /^static int c_argc = 0;$/;" v file: c_argv comm.c /^static char *c_argv[9];$/;" v file: -c_flag bmore.c /^int c_flag = 0, d_flag = 0;$/;" v +c_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v calc_addr re.c /^calc_addr(pointer, def_addr)$/;" f calc_size bvi.c /^calc_size(arg)$/;" f cbreak doscur.h 136;" d @@ -308,12 +246,12 @@ cleartoeol bm_dos.c /^cleartoeol()$/;" f cleartoeol bm_unix.c /^cleartoeol()$/;" f clrtoeol doscur.h 79;" d cmdbuf bmore.c /^static char cmdbuf[MAXCMD];$/;" v file: -cmdstr bvi.c /^char cmdstr[MAXCMD + 1] = "";$/;" v +cmdstr bvi.c /^char cmdstr[MAXCMD+1] = "";$/;" v cnt bmore.c /^static int cnt = 0;$/;" v file: contrd edit.c /^char contrd[][4] = {"NUL", " ^A", " ^B", " ^C", " ^D", " ^E", " ^F", "BEL",$/;" v contru edit.c /^char contru[][4] = {"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",$/;" v -copyright bmore.c /^char *copyright = "Copyright (C) 1990-2013 by Gerhard Buergmann";$/;" v -copyright bvi.c /^char *copyright = "Copyright (C) 1996-2013 by Gerhard Buergmann";$/;" v +copyright bmore.c /^char *copyright = "GPL (C) 1990-2019 by Gerhard Buergmann";$/;" v +copyright bvi.c /^char *copyright = "(C) GPL 1996-2019 by Gerhard Buergmann";$/;" v corr bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v cur_back edit.c /^cur_back()$/;" f cur_forw edit.c /^cur_forw(check)$/;" f @@ -322,10 +260,9 @@ curpos bvi.c /^PTR curpos;$/;" v curr_file bmore.c /^FILE *curr_file = NULL, *help_file;$/;" v current bvi.c /^PTR current;$/;" v current_start bvi.c /^PTR current_start;$/;" v -d_flag bmore.c /^int c_flag = 0, d_flag = 0;$/;" v +d_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v d_memcpy dosio.c /^d_memcpy(PTR dest, PTR src, off_t n)$/;" f d_memmove dosio.c /^d_memmove(PTR dest, PTR src, off_t n)$/;" f -datarootdir Makefile /^datarootdir = ${prefix}\/share$/;" m dbug bm_dos.c /^FILE *dbug;$/;" v delch dosio.c /^delch()$/;" f deleteln doscur.h 110;" d @@ -373,10 +310,9 @@ erase doscur.h 81;" d erase_ln bm_unix.c /^char *erase_ln; \/* erase line *\/$/;" v erasechar doscur.h 75;" d estring bmore.c /^char estring[MAXCMD] = ""; \/* string for shell escape *\/$/;" v -exec_prefix Makefile /^exec_prefix = ${prefix}$/;" m extra comm.c /^char *extra = "Extra chars|Extra characters at end of command";$/;" v exval bmore.c /^int exval = 0;$/;" v -fbuf set.c /^static char fbuf[256];$/;" v file: +fbuf set.c /^static char fbuf[MAXCMD+1];$/;" v file: ffp set.c /^static FILE *ffp;$/;" v file: file_nr bmore.c /^int file_nr = 0; \/* number of current input file *\/$/;" v fileinfo edit.c /^fileinfo(fname)$/;" f @@ -389,6 +325,7 @@ filesize bvi.c /^off_t filesize, memsize, undosize;$/;" v flags set.h /^ int flags;$/;" m struct:param flash doscur.h 77;" d flushinp doscur.h 120;" d +fname_buf bvi.c /^char *fname_buf = NULL;$/;" v fnum bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v from_file set.c /^static int from_file = 0;$/;" v file: fsearch re.c /^fsearch(start, end, smem)$/;" f @@ -404,7 +341,6 @@ getyx doscur.h 104;" d got_int bm_dos.c /^int got_int;$/;" v got_int bm_unix.c /^int got_int;$/;" v help_file bmore.c /^FILE *curr_file = NULL, *help_file;$/;" v -helpdir Makefile /^helpdir = $(DESTDIR)${datarootdir}\/bvi$/;" m helppath bmore.c /^char helppath[MAXCMD];$/;" v hex_comp recomp.c /^hex_comp(smem, pattern)$/;" f hexchar recomp.c /^hexchar()$/;" f @@ -428,9 +364,8 @@ jmpproc bvi.c /^jmpproc(sig)$/;" f keypad doscur.h 133;" d last_motion bvi.c /^PTR last_motion;$/;" v last_search bmore.c /^off_t last_search = 0;$/;" v -libdir Makefile /^libdir = $(DESTDIR)${exec_prefix}\/lib$/;" m linbuf edit.c /^char linbuf[16384];$/;" v -line bvi.c /^static char line[MAXCMD];$/;" v file: +line bvi.c /^static char line[MAXCMD+1];$/;" v file: lineout edit.c /^lineout()$/;" f load dosio.c /^load(char *fname)$/;" f load io.c /^load(fname)$/;" f @@ -438,8 +373,6 @@ loc bvi.c /^int loc;$/;" v magic recomp.c /^int magic = 1;$/;" v main bmore.c /^main(argc, argv)$/;" f main bvi.c /^main(argc, argv)$/;" f -man1dir Makefile /^man1dir = $(mandir)\/man1$/;" m -mandir Makefile /^mandir = $(DESTDIR)${datarootdir}\/man$/;" m mark bvi.c /^static int mark;$/;" v file: markbuf bvi.c /^PTR markbuf[26];$/;" v maxpos bvi.c /^PTR maxpos;$/;" v @@ -448,9 +381,9 @@ maxx bvi.c /^int maxx, maxy, x, xx, y;$/;" v maxy bmore.c /^int maxx, maxy;$/;" v maxy bvi.c /^int maxx, maxy, x, xx, y;$/;" v mem bvi.c /^PTR mem = NULL;$/;" v -memcpy bvi.h 123;" d +memcpy bvi.h 126;" d memmove bm_unix.c /^memmove(s1, s2, n)$/;" f -memmove bvi.h 124;" d +memmove bvi.h 127;" d memmove io.c /^memmove(s1, s2, n)$/;" f memsize bvi.c /^off_t filesize, memsize, undosize;$/;" v morefiles comm.c /^char *morefiles = "more files@to edit";$/;" v @@ -498,12 +431,12 @@ noval comm.c /^char *noval = "No value@for binary operation";$/;" v nowrtmsg comm.c /^char *nowrtmsg = "No write@since last change (:%s! overrides)";$/;" v nstate bm_unix.c /^struct termios ostate, nstate;$/;" v typeref:struct: numarr bmore.c /^char numarr[64]; \/* string for collecting number *\/$/;" v -numarr bvi.c /^char numarr[MAXCMD]; \/* string for collecting number *\/$/;" v +numarr bvi.c /^char numarr[MAXCMD+1]; \/* string for collecting number *\/$/;" v numfiles bmore.c /^int numfiles; \/* number of input files *\/$/;" v numfiles bvi.c /^int numfiles; \/* number of input files *\/$/;" v nvalue set.h /^ off_t nvalue;$/;" m struct:param -off_t bmore.h 105;" d -off_t bvi.h 119;" d +off_t bmore.h 106;" d +off_t bvi.h 122;" d oldbuf comm.c /^static char oldbuf[CMDSZ]; \/** for :!! command **\/$/;" v file: oldpos bmore.c /^off_t bytepos, oldpos;$/;" v open_file bmore.c /^open_file(name)$/;" f @@ -518,19 +451,18 @@ pattern re.c /^char pattern[MAXCMD + 1];$/;" v poi recomp.c /^char *poi;$/;" v precount bmore.c /^long precount = -1; \/* number preceding command *\/$/;" v precount bvi.c /^long precount = -1;$/;" v -prefix Makefile /^prefix = \/usr\/local$/;" m printline edit.c /^printline(mempos, scpos)$/;" f printout bmore.c /^printout(lns)$/;" f printw doscur.h 103;" d progname bmore.c /^static char progname[10];$/;" v file: progname bvi.c /^static char progname[8];$/;" v file: prompt bmore.c /^int prompt = 1;$/;" v -prototypes configure /^ function prototypes and stuff, but not '\\xHH' hex character constants.$/;" f pushback bmore.c /^pushback(n, where)$/;" f putchr bm_unix.c /^putchr(ch)$/;" f putchr bm_unix.c /^putchr(char ch)$/;" f putline bmore.c /^putline(buf, num)$/;" f quit edit.c /^quit()$/;" f +r_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v range bvi.c /^range(ch)$/;" f raw doscur.h 138;" d rdline bmore.c /^rdline(ch, sstring)$/;" f @@ -553,12 +485,11 @@ sbracket bmore.c /^sbracket(start, scan, count)$/;" f sbracket re.c /^sbracket(start, scan, count)$/;" f file: scanw doscur.h 124;" d scr dosio.c /^struct WINDOW scr;$/;" v typeref:struct:WINDOW -screen bvi.c /^int screen, status;$/;" v +screen bvi.c /^int screen, status, statsize;$/;" v screen_home bmore.c /^off_t screen_home, filesize;$/;" v scrolldown edit.c /^scrolldown(lns)$/;" f scrollok doscur.h 142;" d scrollup edit.c /^scrollup(lns)$/;" f -scrolly bvi.c /^static int scrolly;$/;" v file: search_pat re.c /^char search_pat[BUFFER]; \/* \/ or ? command *\/$/;" v searching re.c /^searching(ch, line, startpos, endpos, flag)$/;" f set_tty bm_dos.c /^set_tty ()$/;" f @@ -576,21 +507,21 @@ smode bmore.c /^static int smode;$/;" v file: smode recomp.c /^int smode;$/;" v smsg comm.c /^smsg(s)$/;" f spos bvi.c /^PTR spos;$/;" v -srcdir Makefile /^srcdir = .$/;" m sstring bmore.c /^char sstring[MAXCMD] = ""; \/* string for search *\/$/;" v standend doscur.h 89;" d standout doscur.h 88;" d start_addr comm.c /^PTR start_addr;$/;" v statpos edit.c /^statpos()$/;" f -status bvi.c /^int screen, status;$/;" v +statsize bvi.c /^int screen, status, statsize;$/;" v +status bvi.c /^int screen, status, statsize;$/;" v stdscr dosio.c /^int stdscr = 0;$/;" v -strcasecmp bmore.h 108;" d -strcasecmp bvi.h 122;" d +strcasecmp bmore.h 109;" d +strcasecmp bvi.h 125;" d strdup io.c /^strdup(s)$/;" f string bmore.c /^char string[MAXCMD];$/;" v -string bvi.c /^char string[MAXCMD];$/;" v -strncasecmp bmore.h 107;" d -strncasecmp bvi.h 121;" d +string bvi.c /^char string[MAXCMD+1];$/;" v +strncasecmp bmore.h 108;" d +strncasecmp bvi.h 124;" d stty bm_unix.c 34;" d file: stuffin edit.c /^stuffin(s)$/;" f svalue set.h /^ char *svalue;$/;" m struct:param diff --git a/testfile b/testfile new file mode 100644 index 0000000000000000000000000000000000000000..c86626638e0bc8cf47ca49bb1525b40e9737ee64 GIT binary patch literal 256 zcmV+b0ssC00RjUA1qKHQ2?`4g4Gs?w5fT#=6&4p585$cL9UdPbAtECrB_<~*DJm;0 zEiNxGF)}kWH8wXmIXXK$Jw87`K|(`BMMg(RNlHshO-@fxQBqS>RaRG6Sz23MU0z>c zVPa!sWoBn+X=-b1ZEkOHadLBXb#`}nd3t+%eSUv{fr5jCg@%WSiHeJijgF6yk&=^? zm6n&7nVOrNot~edp`xRtrKYE-sj922t*)=Iv9hzYwYImoxw^Z&y}rM|!NSAD#m2|T z$;!*j&Cbuz(bCh@)z;V8+1lIO-QM5e;o{@u<>u$;>FVq3?e6dJ@$&QZ_4fDp`TG0( G{r>;0_J4r@ literal 0 HcmV?d00001 diff --git a/tmp b/tmp new file mode 100644 index 0000000..4083215 --- /dev/null +++ b/tmp @@ -0,0 +1,15 @@ + if ((ch > 31) && (ch < 127)) { + PRINTF("%c", ch); + } else { + if (r_flag) { + if ((ch & 128) && ((ch > 159) && (ch < 255))) { + if (!no_tty) highlight(); + PRINTF("%c", ch & 127); + if (!no_tty) normal(); + } else { + PRINTF("."); + } + } else { + PRINTF("."); + } + } From 75fc14b57930d21a6380f85fe39a2d6e470e404f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20B=C3=BCrgmann?= Date: Tue, 7 Mar 2023 00:00:00 +0000 Subject: [PATCH 5/6] bvi-1.4.2.src.tar.gz 4bba16c2b496963a9b939336c0abcc8d488664492080ae43a86da18cf4ce94f2 bvi-1.4.2.src.tar.gz https://bvi.sourceforge.net/download.html --- CHANGES | 19 + CREDITS | 4 + Makefile.in | 5 +- README | 6 +- acconfig.h | 2 + bmore.1 | 2 +- bmore.c | 7 +- bmore.h | 44 +- bvi.1 | 2 +- bvi.c | 15 +- bvi.h | 23 +- comm.c | 7 +- config.guess | 1213 +++++++++++++++++++++++++++----------------------- config.h.in | 105 ++++- config.sub | 676 ++++++++++++++++------------ configure | 839 +++++++++++++++++++--------------- configure.ac | 19 +- io.c | 24 +- macro.m4 | 59 +++ patchlevel.h | 2 +- re.c | 7 +- tags | 939 +++++++++++++++++++------------------- test.txt | 209 +++++++++ tmp | 15 - 24 files changed, 2482 insertions(+), 1761 deletions(-) create mode 100644 macro.m4 create mode 100644 test.txt delete mode 100644 tmp diff --git a/CHANGES b/CHANGES index c81b958..f68748e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,22 @@ +New in release 1.4.2 +==================== +This release is dedicated to Sven Guckes (*1967-04-06 +2022-02-20). +Sven was an enthusiastic Linux explainer, his particular passion was the console tools. +I met Sven a couple of times. He always showed interest in the further development of +the bvi and liked to discuss new ideas. +R.I.P. Sven + +* :wq bug fixed +* Error-message if input no terminal +* Mixed licenses (SF bug #10) +* Segmentation fault occurs on undo (SF bug #11) +* Segmentation fault occurs on substitution in 32-bit systems (SF bug #12) +* ncursesw support +* Handling inputs larger than 2^31 bytes (SF bug #13) +* Some incorrect function prototypes in ANSI mode fixed (SF bug #14) +* Minor fixes + + New in release 1.4.1 ==================== diff --git a/CREDITS b/CREDITS index 1a90751..da1582b 100644 --- a/CREDITS +++ b/CREDITS @@ -22,6 +22,10 @@ Josef Hinteregger ZZ write bug, lfs Richard Yao Buffer overflow at terminals > 255, ncurses with tinfo, configure fixed ~ operator dumps core Dave Keaton ASCII_DEL patch +Udo Hertrich-Jeromin ncursesw for tinycorelinux +Takashi Yano Segmentation fault occurs on undo, Segmentation fault occurs on substitution in 32-bit systems +Dominik Köppl Handling inputs larger than 2^31 bytes +Christopher Head Some incorrect function prototypes in ANSI mode Packages: diff --git a/Makefile.in b/Makefile.in index ebf25a6..5f67d29 100644 --- a/Makefile.in +++ b/Makefile.in @@ -6,7 +6,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# Copyright (c) 1996-2019 by Gerhard Buergmann +# Copyright (c) 1996-2022 by Gerhard Buergmann # gerhard@puon.at # # 1996-01-18 V 1.0.0 @@ -18,6 +18,7 @@ # 2003-07-03 V 1.3.2 # 2014-10-01 V 1.4.0 # 2019-01-30 V 1.4.1 +# 2022-02-08 V 1.4.2 # ############################################### @@ -55,7 +56,7 @@ all: bvi bmore bvi: $(OBJS) $(HEADER) $(CC) $(LDFLAGS) -o bvi $(OBJS) $(LIBS) -bmore: $(BMOBJ) +bmore: $(BMOBJ) bmore.h $(CC) $(LDFLAGS) -o bmore $(BMOBJ) $(LIBS) %.o: %.c $(INCLUDES) diff --git a/README b/README index 03c60c1..4a63d35 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ BVI - Binary visual editor ========================== -http://bvi.sourceforge.net/ +https/bvi.sourceforge.net/ This editor for binary files was written by Gerhard Buergmann and is distributed under the GPL (GNU Public License). @@ -13,8 +13,8 @@ How to compile https://www.cyberciti.biz/faq/linux-install-ncurses-library-headers-on-debian-ubuntu-centos-fedora/ - gunzip -c bvi-1.4.1.src.tar.gz | tar xvf - - cd bvi-1.4.1 + gunzip -c bvi-1.4.2.src.tar.gz | tar xvf - + cd bvi-1.4.2 ./configure make make install diff --git a/acconfig.h b/acconfig.h index 8941d4c..7589674 100644 --- a/acconfig.h +++ b/acconfig.h @@ -4,6 +4,8 @@ #undef HAVE_CURSES_H +#undef HAVE_NCURSESW_CURSES_H + #undef NO_SYSERRL #undef NEED_PUTC_CHAR diff --git a/bmore.1 b/bmore.1 index 94d0dc4..fb82611 100644 --- a/bmore.1 +++ b/bmore.1 @@ -1,4 +1,4 @@ -.TH BMORE 1 "30 Jan 2019" +.TH BMORE 1 "8 Feb 2022" .SH NAME bmore \- browse through a binary file .SH SYNOPSIS diff --git a/bmore.c b/bmore.c index 0a577cc..fa6b809 100644 --- a/bmore.c +++ b/bmore.c @@ -8,8 +8,9 @@ * 2004-01-09 V 1.3.2 * 2013-08-23 V 1.4.0 * 2019-01-22 V 1.4.1 + * 2023-03-06 V 1.4.2 * - * Copyright 1990-2019 by Gerhard Buergmann + * Copyright 1990-2023 by Gerhard Buergmann * gerhard@puon.at * * NOTE: Edit this file with tabstop=4 ! @@ -49,7 +50,7 @@ #include "bmore.h" -char *copyright = "GPL (C) 1990-2019 by Gerhard Buergmann"; +char *copyright = "GPL (C) 1990-2022 by Gerhard Buergmann"; int maxx, maxy; int mymaxx = 0, mymaxy = 0; @@ -85,7 +86,7 @@ int prompt = 1; char helppath[MAXCMD]; static char progname[10]; -static char cmdbuf[MAXCMD]; +static char cmdbuf[2 * MAXCMD]; static int cnt = 0; static int icnt = 0; static int smode; diff --git a/bmore.h b/bmore.h index bb51745..2ebd4bf 100644 --- a/bmore.h +++ b/bmore.h @@ -11,10 +11,11 @@ * 2003-02-20 V 1.3.2 * 2010-03-28 V 1.3.4 * 2019-01-22 V 1.4.1 + * 2022-03-07 V 1.4.2 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2019 by Gerhard Buergmann + * Copyright 1996-2023 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -49,20 +50,23 @@ # include "patchlevel.h" # include "config.h" # include -# if HAVE_NCURSES_H -# include -# else -# include -# endif -# if HAVE_TERM_H -# include -# else -# if HAVE_NCURSES_TERM_H -# include -# else -# include -# endif -# endif +# if defined HAVE_NCURSESW_CURSES_H +# include +# include +# elif defined HAVE_NCURSESW_H +# include +# elif defined HAVE_NCURSES_CURSES_H +# include +# elif defined HAVE_NCURSES_H +# include +# elif defined HAVE_CURSES_H +# include +# else +# error "SysV or X/Open-compatible Curses header file required" +# endif +# if HAVE_TERM_H +# include +# endif #endif @@ -135,17 +139,17 @@ extern int no_tty, no_intty; #ifdef ANSI void initterm(void), set_tty(void), reset_tty(void); void cleartoeol(void), clearscreen(void), highlight(void); - void normal(void), bmbeep(void), home(void), sig(void); + void normal(void), bmbeep(void), home(void), sig(int); void doshell(char *), emsg(char *); void do_next(int); void bmsearch(int); void pushback(int, char *); - int open_file(void); - int printout(int), rdline(int, char *); - int nextchar(void), vgetc(void); + int open_file(char *); + int printout(int), rdline(int, char *); + int nextchar(void), vgetc(void); int sbracket(int, char *, int); int bmregexec(char *); - int ascii_comp(char *, char *), hex_comp(char *, char *); + int ascii_comp(char *, char *), hex_comp(char *, char *); void putline(char *, int); #else void initterm(), set_tty(), reset_tty(); diff --git a/bvi.1 b/bvi.1 index b0e7f33..3c3b00f 100644 --- a/bvi.1 +++ b/bvi.1 @@ -93,7 +93,7 @@ .nr % 0 .rr F .\} -.TH BVI 1 "BVI Version 1.4.1" "30/Jan/2019" "User Commands" +.TH BVI 1 "BVI Version 1.4.2" "8/Feb/2022" "User Commands" .IX Title "BVI 1" .UC .IX Name "bvi, bview - visual display editor for binary files" diff --git a/bvi.c b/bvi.c index dcc1f85..9c5e443 100644 --- a/bvi.c +++ b/bvi.c @@ -13,10 +13,11 @@ * 2013-08-23 V 1.4.0alpha * 2014-10-07 V 1.4.0 * 2019-10-12 V 1.4.1 + * 2023-03-06 V 1.4.2 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2019 by Gerhard Buergmann + * Copyright 1996-2023 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -33,6 +34,7 @@ */ #include +#include #include "bvi.h" #include "set.h" @@ -42,7 +44,7 @@ #endif -char *copyright = "(C) GPL 1996-2019 by Gerhard Buergmann"; +char *copyright = "(C) GPL 1996-2023 by Gerhard Buergmann"; jmp_buf env; /* context for `longjmp' function */ @@ -145,6 +147,13 @@ main(argc, argv) /* This should be the beginners version */ } + if (isatty(fileno(stdin)) == 0) { + // Guckes + fprintf(stderr, "Input is not from a terminal\n"); + exit(1); + } + + while (n < argc) { switch (argv[n][0]) { case '-': @@ -918,7 +927,7 @@ do_put(loc, n, buf) emsg(nobytes); return; } - if (loc > maxpos) { + if (loc >= maxpos) { beep(); return; } diff --git a/bvi.h b/bvi.h index 0881ce7..bc96547 100644 --- a/bvi.h +++ b/bvi.h @@ -12,10 +12,11 @@ * 2010-08-04 V 1.3.4 * 2014-10-01 V 1.4.0 * 2019-01-28 V 1.4.1 + * 2023-03-07 V 1.4.2 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2019 by Gerhard Buergmann + * Copyright 1996-2023 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -50,11 +51,19 @@ #else # include "patchlevel.h" # include "config.h" -#if HAVE_NCURSES_H -# include -#else -# include -#endif +#if defined HAVE_NCURSESW_CURSES_H + # include + #elif defined HAVE_NCURSESW_H + # include + #elif defined HAVE_NCURSES_CURSES_H + # include + #elif defined HAVE_NCURSES_H + # include + #elif defined HAVE_CURSES_H + # include + #else + # error "SysV or X/Open-compatible Curses header file required" + #endif #endif /* defines for filemode */ @@ -215,7 +224,7 @@ extern off_t block_begin, block_end, block_size; void docmdline(char *), do_over(PTR, off_t, PTR), do_put(PTR, off_t, PTR); void jmpproc(int), printline(PTR, int); int addfile(char *); - int bregexec(PTR, char *); + PTR bregexec(PTR, char *); int chk_comm(int); int doecmd(char *, int); int do_append(off_t, char *), do_logic(int, char *); diff --git a/comm.c b/comm.c index 6e0d884..72c0a47 100644 --- a/comm.c +++ b/comm.c @@ -14,10 +14,11 @@ * 2010-06-02 V 1.3.4 * 2014-01-28 V 1.4.0 * 2019-01-27 V 1.4.1 + * 2023-03-06 V 1.4.2 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2019 by Gerhard Buergmann + * Copyright 1996-2023 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -87,7 +88,7 @@ extern char **files; /* used for "next" and "rewind" */ extern int numfiles, curfile; extern int errno; -static char oldbuf[CMDSZ]; /** for :!! command **/ +static char oldbuf[CMDSZ + 3]; /** for :!! command **/ /* @@ -308,7 +309,7 @@ docmdline(cmdline) else ok = save(c_argv[0], start_addr, end_addr, saveflag); } else { if (c_argc == 0) { - save_chk(name, start_addr, end_addr, saveflag); + ok = save_chk(name, start_addr, end_addr, saveflag); } else { if (!stat(c_argv[0], &buf)) { if (saveflag == WRITE) { diff --git a/config.guess b/config.guess index 7f9ebbe..69188da 100644 --- a/config.guess +++ b/config.guess @@ -1,12 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2019 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. -timestamp='2019-09-10' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2023-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -27,11 +29,19 @@ timestamp='2019-09-10' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -50,7 +60,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2019 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -84,6 +94,9 @@ if test $# != 0; then exit 1 fi +# Just in case it came from the environment. +GUESS= + # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -99,8 +112,10 @@ tmp= trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039 + # shellcheck disable=SC2039,SC3028 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || @@ -110,7 +125,7 @@ set_cc_for_build() { ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$driver" + CC_FOR_BUILD=$driver break fi done @@ -131,14 +146,12 @@ fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "$UNAME_SYSTEM" in +case $UNAME_SYSTEM in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" @@ -147,24 +160,37 @@ Linux|GNU|GNU/*) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc - #else + #elif defined(__GLIBC__) LIBC=gnu + #else + #include + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -176,12 +202,12 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; @@ -190,13 +216,13 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown + machine=${arch}${endian}-unknown ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; @@ -217,7 +243,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in ;; esac # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` @@ -228,7 +254,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in + case $UNAME_VERSION in Debian*) release='-gnu' ;; @@ -239,51 +265,57 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi-}" - exit ;; + GUESS=$machine-${os}${release}${abi-} + ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; *:OS108:*:*) - echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; + GUESS=$UNAME_MACHINE-unknown-sortix + ;; *:Twizzler:*:*) - echo "$UNAME_MACHINE"-unknown-twizzler - exit ;; + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; + GUESS=$UNAME_MACHINE-unknown-redox + ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + GUESS=mips-dec-osf1 + ;; alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -297,7 +329,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in + case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") @@ -334,117 +366,121 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; + GUESS=m68k-unknown-sysv4 + ;; *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; + GUESS=$UNAME_MACHINE-unknown-morphos + ;; *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; + GUESS=i370-ibm-openedition + ;; *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + GUESS=s390-ibm-zvmoe + ;; *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + GUESS=powerpc-ibm-os400 + ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + GUESS=arm-unknown-riscos + ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; + GUESS=hppa1.1-hitachi-hiuxmpp + ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; + GUESS=pyramid-pyramid-svr4 + ;; DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; + GUESS=sparc-icl-nx6 + ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in + case `/usr/bin/arch -k` in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in + case `/bin/arch` in sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" + GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" + GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac - exit ;; + ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -454,41 +490,41 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; + GUESS=mips-dec-mach_bsd4.3 + ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -516,75 +552,76 @@ EOF dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; + GUESS=powerpc-motorola-powermax + ;; Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; + GUESS=powerpc-harris-powerunix + ;; m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; + GUESS=m88k-harris-cxux7 + ;; m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; + GUESS=m88k-motorola-sysv4 + ;; m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x then - echo m88k-dg-dgux"$UNAME_RELEASE" + GUESS=m88k-dg-dgux$UNAME_RELEASE else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else - echo i586-dg-dgux"$UNAME_RELEASE" + GUESS=i586-dg-dgux$UNAME_RELEASE fi - exit ;; + ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; + GUESS=m88k-dolphin-sysv3 + ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; + GUESS=m88k-tektronix-sysv3 + ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; + GUESS=m68k-tektronix-bsd + ;; *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" - exit ;; + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; + GUESS=i386-ibm-aix + ;; ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then + if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build @@ -601,16 +638,16 @@ EOF EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - echo "$SYSTEM_NAME" + GUESS=$SYSTEM_NAME else - echo rs6000-ibm-aix3.2.5 + GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 + GUESS=rs6000-ibm-aix3.2.4 else - echo rs6000-ibm-aix3.2 + GUESS=rs6000-ibm-aix3.2 fi - exit ;; + ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then @@ -618,56 +655,56 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + if test -x /usr/bin/lslpp ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; + GUESS=rs6000-ibm-aix + ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; + GUESS=romp-ibm-bsd4.4 + ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; + GUESS=rs6000-bull-bosx + ;; DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; + GUESS=m68k-bull-sysv3 + ;; 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; + GUESS=m68k-hp-bsd + ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; + GUESS=m68k-hp-bsd4.4 + ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - case "$UNAME_MACHINE" in + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then + if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "$sc_cpu_version" in + case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in + case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "$HP_ARCH" = "" ]; then + if test "$HP_ARCH" = ""; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -706,7 +743,7 @@ EOF test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ "$HP_ARCH" = hppa2.0w ] + if test "$HP_ARCH" = hppa2.0w then set_cc_for_build @@ -727,12 +764,12 @@ EOF HP_ARCH=hppa64 fi fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux"$HPUX_REV" - exit ;; + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -762,36 +799,36 @@ EOF EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; + GUESS=unknown-hitachi-hiuxwe2 + ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; + GUESS=hppa1.1-hp-bsd + ;; 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; + GUESS=hppa1.0-hp-bsd + ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; + GUESS=hppa1.0-hp-mpeix + ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; + GUESS=hppa1.1-hp-osf + ;; hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; + GUESS=hppa1.0-hp-osf + ;; i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo "$UNAME_MACHINE"-unknown-osf1mk + if test -x /usr/sbin/sysversion ; then + GUESS=$UNAME_MACHINE-unknown-osf1mk else - echo "$UNAME_MACHINE"-unknown-osf1 + GUESS=$UNAME_MACHINE-unknown-osf1 fi - exit ;; + ;; parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; + GUESS=hppa1.1-hp-lites + ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; + GUESS=c1-convex-bsd + ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -799,17 +836,18 @@ EOF fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; + GUESS=c34-convex-bsd + ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; + GUESS=c38-convex-bsd + ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; + GUESS=c4-convex-bsd + ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -817,114 +855,135 @@ EOF -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi - exit ;; + ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case "$UNAME_PROCESSOR" in + case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; + GUESS=$UNAME_MACHINE-pc-cygwin + ;; *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; + GUESS=$UNAME_MACHINE-pc-msys + ;; i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; *:Interix*:*) - case "$UNAME_MACHINE" in + case $UNAME_MACHINE in x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; + GUESS=i586-pc-interix$UNAME_RELEASE + ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; esac ;; i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; + GUESS=$UNAME_MACHINE-pc-uwin + ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-pc-cygwin - exit ;; + GUESS=x86_64-pc-cygwin + ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; *:GNU:*:*) # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" - exit ;; + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" - exit ;; + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" + ;; + *:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" + ;; *:Minix:*:*) - echo "$UNAME_MACHINE"-unknown-minix - exit ;; + GUESS=$UNAME_MACHINE-unknown-minix + ;; aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -935,60 +994,63 @@ EOF esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi - exit ;; + ;; avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 @@ -1033,113 +1095,135 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; + GUESS=or1k-unknown-linux-$LIBC + ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; + GUESS=sparc-unknown-linux-$LIBC + ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; + GUESS=hppa64-unknown-linux-$LIBC + ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; esac - exit ;; + ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64-unknown-linux-$LIBC + ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc-unknown-linux-$LIBC + ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64le-unknown-linux-$LIBC + ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpcle-unknown-linux-$LIBC + ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; x86_64:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __i386__ + ABI=x86 + #else + #ifdef __ILP32__ + ABI=x32 + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + x86) CPU=i686 ;; + x32) LIBCABI=${LIBC}x32 ;; + esac + fi + GUESS=$CPU-pc-linux-$LIBCABI + ;; xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; + GUESS=i386-sequent-sysv4 + ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; + GUESS=$UNAME_MACHINE-unknown-stop + ;; i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; + GUESS=$UNAME_MACHINE-unknown-atheos + ;; i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; + GUESS=$UNAME_MACHINE-pc-syllable + ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi - exit ;; + ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in @@ -1147,12 +1231,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" - exit ;; + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1162,11 +1246,11 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv32 + GUESS=$UNAME_MACHINE-pc-sysv32 fi - exit ;; + ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1174,31 +1258,31 @@ EOF # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; + GUESS=i586-pc-msdosdjgpp + ;; Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; + GUESS=i386-pc-mach3 + ;; paragon:*:*:*) - echo i860-intel-osf1 - exit ;; + GUESS=i860-intel-osf1 + ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi - exit ;; + ;; mini*:CTIX:SYS*5:*) # "miniframe" - echo m68010-convergent-sysv - exit ;; + GUESS=m68010-convergent-sysv + ;; mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; + GUESS=m68k-convergent-sysv + ;; M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; + GUESS=m68k-diab-dnix + ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) @@ -1223,113 +1307,119 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; + GUESS=m68k-atari-sysv4 + ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo "$UNAME_MACHINE"-sni-sysv4 + GUESS=$UNAME_MACHINE-sni-sysv4 else - echo ns32k-sni-sysv + GUESS=ns32k-sni-sysv fi - exit ;; + ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says - echo i586-unisys-sysv4 - exit ;; + GUESS=i586-unisys-sysv4 + ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; + GUESS=hppa1.1-stratus-sysv4 + ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; + GUESS=i860-stratus-sysv4 + ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; + GUESS=$UNAME_MACHINE-stratus-vos + ;; *:VOS:*:*) # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; + GUESS=hppa1.1-stratus-vos + ;; mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; + GUESS=mips-sony-newsos6 + ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv"$UNAME_RELEASE" + if test -d /usr/nec; then + GUESS=mips-nec-sysv$UNAME_RELEASE else - echo mips-unknown-sysv"$UNAME_RELEASE" + GUESS=mips-unknown-sysv$UNAME_RELEASE fi - exit ;; + ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; + GUESS=powerpc-be-beos + ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; + GUESS=powerpc-apple-beos + ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; + GUESS=i586-pc-beos + ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; + GUESS=i586-pc-haiku + ;; + ppc:Haiku:*:*) # Haiku running on Apple PowerPC + GUESS=powerpc-apple-haiku + ;; + *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) + GUESS=$UNAME_MACHINE-unknown-haiku + ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; + arm64:Darwin:*:*) + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in @@ -1344,7 +1434,7 @@ EOF else set_cc_for_build fi - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null @@ -1365,109 +1455,119 @@ EOF # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; *:QNX:*:4*) - echo i386-pc-qnx - exit ;; + GUESS=i386-pc-qnx + ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; + GUESS=mips-compaq-nonstopux + ;; BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; + GUESS=bs2000-siemens-sysv + ;; DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - # shellcheck disable=SC2154 - if test "$cputype" = 386; then + if test "${cputype-}" = 386; then UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; + GUESS=pdp10-unknown-tops10 + ;; *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; + GUESS=pdp10-unknown-tenex + ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; + GUESS=pdp10-dec-tops20 + ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; + GUESS=pdp10-xkl-tops20 + ;; *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; + GUESS=pdp10-unknown-tops20 + ;; *:ITS:*:*) - echo pdp10-unknown-its - exit ;; + GUESS=pdp10-unknown-its + ;; SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; + GUESS=i386-pc-xenix + ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" - exit ;; + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; + *:AROS:*:*) + GUESS=$UNAME_MACHINE-unknown-aros + ;; x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; + GUESS=$UNAME_MACHINE-unknown-esx + ;; amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; + GUESS=x86_64-unknown-onefs + ;; *:Unleashed:*:*) - echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; esac +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" </dev/null && SYSTEM_NAME=`$dummy` && +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. @@ -1607,7 +1707,7 @@ test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } echo "$0: unable to guess system type" >&2 -case "$UNAME_MACHINE:$UNAME_SYSTEM" in +case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 < header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H -/* Define if you have the header file. */ +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +#undef HAVE_FSEEKO + +/* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define if you have the `memmove' function. */ +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#undef HAVE_MALLOC + +/* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_NCURSES_TERM_H -/* Define if you have the header file. */ +/* Define to 1 if your system has a GNU libc compatible `realloc' function, + and to 0 otherwise. */ +#undef HAVE_REALLOC + +/* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H -/* Define if you have the `strdup' function. */ +/* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP -/* Define if you have the `strerror' function. */ +/* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define if you have the `strtol' function. */ +/* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL -/* Define if you have the header file. */ +/* Define to 1 if you have the `strtoll' function. */ +#undef HAVE_STRTOLL + +/* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_TERMCAP_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_TERMIO_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_TERM_H -/* Define if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* The size of a `int', as computed by sizeof. */ +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT -/* The size of a `long', as computed by sizeof. */ +/* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG -/* The size of a `void *', as computed by sizeof. */ +/* The size of `long long', as computed by sizeof. */ +#undef SIZEOF_LONG_LONG + +/* The size of `void *', as computed by sizeof. */ #undef SIZEOF_VOID_P -/* Define if you have the ANSI C header files. */ +/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +#undef _LARGEFILE_SOURCE + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define to rpl_malloc if the replacement function should be used. */ +#undef malloc + /* Define to `int' if does not define. */ #undef off_t +/* Define to rpl_realloc if the replacement function should be used. */ +#undef realloc + /* Define to `unsigned int' if does not define. */ #undef size_t diff --git a/config.sub b/config.sub index 0f2234c..de4259e 100644 --- a/config.sub +++ b/config.sub @@ -1,12 +1,14 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2019 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. -timestamp='2019-06-30' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2023-01-21' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -33,7 +35,7 @@ timestamp='2019-06-30' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -50,6 +52,13 @@ timestamp='2019-06-30' # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -67,7 +76,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2019 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -112,9 +121,11 @@ esac # Split fields of configuration type # shellcheck disable=SC2162 +saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 - exit 1 + # No normalization, but not necessarily accepted, that comes below. ;; esac + else # Here we handle the default operating systems that come with various machines. @@ -1528,6 +1531,7 @@ else # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. +kernel= case $cpu-$vendor in score-*) os=elf @@ -1539,7 +1543,8 @@ case $cpu-$vendor in os=riscix1.2 ;; arm*-rebel) - os=linux + kernel=linux + os=gnu ;; arm*-semi) os=aout @@ -1705,84 +1710,193 @@ case $cpu-$vendor in os=none ;; esac + fi +# Now, validate our (potentially fixed-up) OS. +case $os in + # Sometimes we do "kernel-libc", so those need to count as OSes. + musl* | newlib* | relibc* | uclibc*) + ;; + # Likewise for "kernel-abi" + eabi* | gnueabi*) + ;; + # VxWorks passes extra cpu info in the 4th filed. + simlinux | simwindows | spe) + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ + | hiux* | abug | nacl* | netware* | windows* \ + | os9* | macos* | osx* | ios* \ + | mpw* | magic* | mmixware* | mon960* | lnews* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* | twizzler* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | mirbsd* | netbsd* | dicos* | openedition* | ose* \ + | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ + | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* | serenity* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | mint* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ + | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ + | fiwix* | mlibc* ) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + none) + ;; + kernel* ) + # Restricted further below + ;; + *) + echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac + +# As a final step for OS-related things, validate the OS-kernel combination +# (given a valid OS), if there is a kernel. +case $kernel-$os in + linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ + | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* ) + ;; + uclinux-uclibc* ) + ;; + managarm-mlibc* | managarm-kernel* ) + ;; + -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; + -kernel* ) + echo "Invalid configuration \`$1': \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; + *-kernel* ) + echo "Invalid configuration \`$1': \`$kernel' does not support \`$os'." 1>&2 + exit 1 + ;; + kfreebsd*-gnu* | kopensolaris*-gnu*) + ;; + vxworks-simlinux | vxworks-simwindows | vxworks-spe) + ;; + nto-qnx*) + ;; + os2-emx) + ;; + *-eabi* | *-gnueabi*) + ;; + -*) + # Blank kernel with real OS is always fine. + ;; + *-*) + echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + exit 1 + ;; +esac + # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) - case $os in - riscix*) + case $cpu-$os in + *-riscix*) vendor=acorn ;; - sunos*) + *-sunos*) vendor=sun ;; - cnk*|-aix*) + *-cnk* | *-aix*) vendor=ibm ;; - beos*) + *-beos*) vendor=be ;; - hpux*) + *-hpux*) vendor=hp ;; - mpeix*) + *-mpeix*) vendor=hp ;; - hiux*) + *-hiux*) vendor=hitachi ;; - unos*) + *-unos*) vendor=crds ;; - dgux*) + *-dgux*) vendor=dg ;; - luna*) + *-luna*) vendor=omron ;; - genix*) + *-genix*) vendor=ns ;; - clix*) + *-clix*) vendor=intergraph ;; - mvs* | opened*) + *-mvs* | *-opened*) vendor=ibm ;; - os400*) + *-os400*) vendor=ibm ;; - ptx*) + s390-* | s390x-*) + vendor=ibm + ;; + *-ptx*) vendor=sequent ;; - tpf*) + *-tpf*) vendor=ibm ;; - vxsim* | vxworks* | windiss*) + *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; - aux*) + *-aux*) vendor=apple ;; - hms*) + *-hms*) vendor=hitachi ;; - mpw* | macos*) + *-mpw* | *-macos*) vendor=apple ;; - *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; - vos*) + *-vos*) vendor=stratus ;; esac ;; esac -echo "$cpu-$vendor-$os" +echo "$cpu-$vendor-${kernel:+$kernel-}$os" exit # Local variables: diff --git a/configure b/configure index af7d930..12d2990 100755 --- a/configure +++ b/configure @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65. +# Generated by GNU Autoconf 2.69. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -89,6 +87,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -133,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -166,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -211,14 +236,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -316,10 +352,18 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -356,19 +400,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -441,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -475,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -496,28 +544,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -530,7 +558,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -633,6 +661,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -705,6 +734,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' @@ -729,8 +759,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -775,7 +806,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -801,7 +832,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -956,6 +987,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1005,7 +1045,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1021,7 +1061,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1051,8 +1091,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1060,7 +1100,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1070,7 +1110,7 @@ Try \`$0 --help' for more information." $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1078,13 +1118,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1093,7 +1133,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1107,7 +1147,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1121,8 +1161,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1137,9 +1175,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1178,11 +1216,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1222,7 +1260,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1248,6 +1286,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1363,9 +1402,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.69 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1409,7 +1448,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1451,7 +1490,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1473,7 +1512,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1489,7 +1529,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1515,7 +1556,8 @@ int main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1531,7 +1573,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1565,7 +1608,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1629,7 +1673,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -1655,7 +1699,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1666,7 +1710,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1680,7 +1724,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1698,7 +1742,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1711,7 +1755,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -1752,7 +1796,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -1764,10 +1808,10 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1803,7 +1847,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -1830,7 +1874,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1839,7 +1883,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -1870,7 +1914,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1884,7 +1928,7 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1897,7 +1941,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1952,7 +1996,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF @@ -1960,7 +2004,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2070,11 +2114,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2108,11 +2150,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2125,11 +2165,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2143,11 +2181,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2202,7 +2238,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2217,7 +2258,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2293,7 +2338,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2319,7 +2364,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2331,7 +2376,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2359,7 +2404,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2371,7 +2416,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2412,7 +2457,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2424,7 +2469,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2452,7 +2497,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2465,7 +2510,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2511,7 +2556,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2523,7 +2568,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2555,7 +2600,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2567,7 +2612,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2609,8 +2654,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -2724,9 +2769,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -2768,8 +2812,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -2826,9 +2870,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -2839,7 +2883,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2879,8 +2923,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -2890,7 +2934,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2927,7 +2971,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3005,7 +3049,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3014,8 +3058,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3110,7 +3153,7 @@ if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : +if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no @@ -3126,7 +3169,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -3161,7 +3204,7 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -3172,7 +3215,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -3196,7 +3239,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -3230,7 +3273,7 @@ rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -3241,7 +3284,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -3265,7 +3308,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -3297,21 +3340,29 @@ _ACEOF esac rm -rf conftest* fi + + fi ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3325,27 +3376,27 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3363,14 +3414,14 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3378,7 +3429,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3414,7 +3465,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3426,7 +3477,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3454,7 +3505,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3466,7 +3517,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3507,7 +3558,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3519,7 +3570,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3547,7 +3598,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3560,7 +3611,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3606,7 +3657,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3618,7 +3669,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3650,7 +3701,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3662,7 +3713,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3704,8 +3755,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3734,7 +3785,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3771,7 +3822,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3849,7 +3900,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3858,8 +3909,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3976,7 +4026,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3996,7 +4046,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -4065,7 +4115,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -4095,7 +4145,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4111,11 +4161,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -4154,7 +4204,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4170,18 +4220,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -4193,7 +4243,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -4207,7 +4257,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4242,7 +4292,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4256,7 +4306,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4273,7 +4323,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4308,7 +4358,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4323,7 +4373,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4440,8 +4490,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -4457,7 +4506,7 @@ done # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } -if test "${ac_cv_sizeof_int+set}" = set; then : +if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : @@ -4466,9 +4515,8 @@ else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (int) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (int) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi @@ -4491,7 +4539,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } -if test "${ac_cv_sizeof_long+set}" = set; then : +if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : @@ -4500,9 +4548,8 @@ else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (long) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi @@ -4525,7 +4572,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 $as_echo_n "checking size of long long... " >&6; } -if test "${ac_cv_sizeof_long_long+set}" = set; then : +if ${ac_cv_sizeof_long_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : @@ -4534,9 +4581,8 @@ else if test "$ac_cv_type_long_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (long long) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (long long) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 fi @@ -4559,7 +4605,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 $as_echo_n "checking size of void *... " >&6; } -if test "${ac_cv_sizeof_void_p+set}" = set; then : +if ${ac_cv_sizeof_void_p+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : @@ -4568,9 +4614,8 @@ else if test "$ac_cv_type_void_p" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (void *) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (void *) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_void_p=0 fi @@ -4589,7 +4634,7 @@ _ACEOF ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : +if test "x$ac_cv_type_size_t" = xyes; then : else @@ -4600,7 +4645,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = x""yes; then : +if test "x$ac_cv_type_off_t" = xyes; then : else @@ -4613,7 +4658,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4727,8 +4772,7 @@ for ac_header in fcntl.h termcap.h termio.h termios.h unistd.h term.h ncurses/te do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -4754,11 +4798,11 @@ fi ac_fn_c_check_header_mongrel "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default" -if test "x$ac_cv_header_ncurses_h" = x""yes; then : +if test "x$ac_cv_header_ncurses_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 $as_echo_n "checking for library containing initscr... " >&6; } -if test "${ac_cv_search_initscr+set}" = set; then : +if ${ac_cv_search_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -4792,11 +4836,11 @@ for ac_lib in '' ncurses; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_initscr+set}" = set; then : + if ${ac_cv_search_initscr+:} false; then : break fi done -if test "${ac_cv_search_initscr+set}" = set; then : +if ${ac_cv_search_initscr+:} false; then : else ac_cv_search_initscr=no @@ -4810,11 +4854,11 @@ ac_res=$ac_cv_search_initscr if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - $as_echo "#define HAVE_NCURSES_H 1" >>confdefs.h + $as_echo "#define HAVE_NCURSES_H 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 $as_echo_n "checking for library containing tputs... " >&6; } -if test "${ac_cv_search_tputs+set}" = set; then : +if ${ac_cv_search_tputs+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -4848,11 +4892,11 @@ for ac_lib in '' tinfo; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_tputs+set}" = set; then : + if ${ac_cv_search_tputs+:} false; then : break fi done -if test "${ac_cv_search_tputs+set}" = set; then : +if ${ac_cv_search_tputs+:} false; then : else ac_cv_search_tputs=no @@ -4872,7 +4916,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 $as_echo_n "checking for library containing initscr... " >&6; } -if test "${ac_cv_search_initscr+set}" = set; then : +if ${ac_cv_search_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -4906,11 +4950,11 @@ for ac_lib in '' curses; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_initscr+set}" = set; then : + if ${ac_cv_search_initscr+:} false; then : break fi done -if test "${ac_cv_search_initscr+set}" = set; then : +if ${ac_cv_search_initscr+:} false; then : else ac_cv_search_initscr=no @@ -4928,7 +4972,7 @@ if test "$ac_res" != no; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 $as_echo_n "checking for library containing tputs... " >&6; } -if test "${ac_cv_search_tputs+set}" = set; then : +if ${ac_cv_search_tputs+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -4962,11 +5006,11 @@ for ac_lib in '' tinfo; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_tputs+set}" = set; then : + if ${ac_cv_search_tputs+:} false; then : break fi done -if test "${ac_cv_search_tputs+set}" = set; then : +if ${ac_cv_search_tputs+:} false; then : else ac_cv_search_tputs=no @@ -4984,19 +5028,20 @@ fi else - as_fn_error "bvi requires the curses library" "$LINENO" 5 + as_fn_error $? "bvi requires a curses library" "$LINENO" 5 fi fi + else ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default" -if test "x$ac_cv_header_curses_h" = x""yes; then : +if test "x$ac_cv_header_curses_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 $as_echo_n "checking for library containing initscr... " >&6; } -if test "${ac_cv_search_initscr+set}" = set; then : +if ${ac_cv_search_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -5030,11 +5075,11 @@ for ac_lib in '' curses; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_initscr+set}" = set; then : + if ${ac_cv_search_initscr+:} false; then : break fi done -if test "${ac_cv_search_initscr+set}" = set; then : +if ${ac_cv_search_initscr+:} false; then : else ac_cv_search_initscr=no @@ -5048,16 +5093,85 @@ ac_res=$ac_cv_search_initscr if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - $as_echo "#define HAVE_CURSES_H 1" >>confdefs.h + $as_echo "#define HAVE_CURSES_H 1" >>confdefs.h else - as_fn_error "bvi requires the curses library" "$LINENO" 5 + as_fn_error $? "bvi requires a curses library" "$LINENO" 5 fi else - as_fn_error "bvi requires the curses library" "$LINENO" 5 + ac_fn_c_check_header_mongrel "$LINENO" "ncursesw/curses.h" "ac_cv_header_ncursesw_curses_h" "$ac_includes_default" +if test "x$ac_cv_header_ncursesw_curses_h" = xyes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 +$as_echo_n "checking for library containing initscr... " >&6; } +if ${ac_cv_search_initscr+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char initscr (); +int +main () +{ +return initscr (); + ; + return 0; +} +_ACEOF +for ac_lib in '' ncursesw; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_initscr=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_initscr+:} false; then : + break +fi +done +if ${ac_cv_search_initscr+:} false; then : + +else + ac_cv_search_initscr=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_initscr" >&5 +$as_echo "$ac_cv_search_initscr" >&6; } +ac_res=$ac_cv_search_initscr +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + $as_echo "#define HAVE_NCURSESW_CURSES_H 1" >>confdefs.h + +else + + as_fn_error $? "bvi requires a curses library" "$LINENO" 5 +fi + +else + + as_fn_error $? "bvi requires a curses library" "$LINENO" 5 +fi + + fi @@ -5070,8 +5184,7 @@ for ac_func in strdup strtol strtoll strerror memmove do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -5081,7 +5194,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_source+set}" = set; then : +if ${ac_cv_sys_largefile_source+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -5150,7 +5263,7 @@ fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = x""yes; then : +if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF @@ -5161,7 +5274,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } -if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then : +if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -5217,7 +5330,7 @@ fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = x""yes; then : +if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF @@ -5228,7 +5341,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } -if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then : +if ${ac_cv_func_realloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -5350,10 +5463,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -5369,6 +5493,7 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -5384,7 +5509,7 @@ LTLIBOBJS=$ac_ltlibobjs -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -5485,6 +5610,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5530,19 +5656,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -5680,16 +5806,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -5738,7 +5864,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -5749,28 +5875,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -5792,7 +5906,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5854,10 +5968,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.65, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -5873,11 +5987,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -5899,6 +6018,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -5911,7 +6031,7 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -5920,7 +6040,7 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -5940,7 +6060,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -5972,7 +6092,7 @@ do "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -5994,9 +6114,10 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -6004,12 +6125,13 @@ $debug || { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -6026,12 +6148,12 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -6040,18 +6162,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -6059,7 +6181,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -6107,7 +6229,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -6139,21 +6261,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -6165,7 +6295,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -6177,11 +6307,11 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -6266,7 +6396,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -6279,7 +6409,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -6298,7 +6428,7 @@ do for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -6307,7 +6437,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -6333,8 +6463,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -6464,23 +6594,24 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -6489,21 +6620,21 @@ which seems to be undefined. Please make sure it is defined." >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; @@ -6518,7 +6649,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -6539,7 +6670,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff --git a/configure.ac b/configure.ac index dd12369..be763c7 100644 --- a/configure.ac +++ b/configure.ac @@ -63,18 +63,23 @@ AC_ARG_WITH(ncurses, ]) AC_CHECK_HEADER([ncurses.h],[ - AC_SEARCH_LIBS([initscr], [ncurses],[ - AC_DEFINE(HAVE_NCURSES_H) - AC_SEARCH_LIBS([tputs], [tinfo])], [ + AC_SEARCH_LIBS([initscr], [ncurses], [ + AC_DEFINE(HAVE_NCURSES_H) + AC_SEARCH_LIBS([tputs], [tinfo])],[ AC_SEARCH_LIBS([initscr], [curses],[ AC_DEFINE(HAVE_CURSES_H) AC_SEARCH_LIBS([tputs], [tinfo])],[ - AC_MSG_ERROR([bvi requires the curses library])])])],[ + AC_MSG_ERROR([bvi requires a curses library])])]) + ],[ AC_CHECK_HEADER([curses.h],[ AC_SEARCH_LIBS([initscr], [curses], [ - AC_DEFINE(HAVE_CURSES_H)],[ - AC_MSG_ERROR([bvi requires the curses library])])],[ - AC_MSG_ERROR([bvi requires the curses library])])]) + AC_DEFINE(HAVE_CURSES_H)],[ + AC_MSG_ERROR([bvi requires a curses library])])],[ + AC_CHECK_HEADER([ncursesw/curses.h], [ + AC_SEARCH_LIBS([initscr], [ncursesw], [ + AC_DEFINE(HAVE_NCURSESW_CURSES_H)],[ + AC_MSG_ERROR([bvi requires a curses library])])],[ + AC_MSG_ERROR([bvi requires a curses library])])])]) dnl Checks for typedefs, structures, and compiler characteristics. dnl AC_TYPE_SIZE_T diff --git a/io.c b/io.c index 1a0eda4..a34d8fc 100644 --- a/io.c +++ b/io.c @@ -11,10 +11,11 @@ * 2010-06-02 V 1.3.4 * 2014-05-03 V 1.4.0 * 2019-01-27 V 1.4.1 + * 2022-03-09 V 1.4.2 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2019 by Gerhard Buergmann + * Copyright 1996-2022 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -55,6 +56,20 @@ # include #endif + +//@ read on linux has a limit of 0x7ffff000 bytes (see `man read`) +//@ this function calls recursively read until all `count` characters are read. +static ssize_t +read_to_end(int fd, void *buf, size_t count) { + size_t read_bytes = 0; + while(read_bytes < count) { + const ssize_t ret = read(fd, ((char*)buf)+read_bytes, count-read_bytes); + if(ret <= 0) return ret; + read_bytes += ret; + } + return read_bytes; +} + int filemode; static struct stat buf; static off_t block_read; @@ -261,7 +276,7 @@ load(fname) sysemsg(fname); filemode = ERROR; } else { - if ((filesize = read(fd, mem, block_size)) == 0) { + if ((filesize = read_to_end(fd, mem, block_size)) == 0) { sprintf(fname_buf, "\"%s\" Empty file", fname); filemode = ERROR; } else { @@ -278,7 +293,7 @@ load(fname) } } else if ((filemode == REGULAR) || (filemode == DIRECTORY)) { filesize = buf.st_size; - if (read(fd, mem, filesize) != filesize) { + if (read_to_end(fd, mem, filesize) != filesize) { sysemsg(fname); filemode = ERROR; } @@ -478,7 +493,7 @@ addfile(fname) } oldsize = filesize; if (enlarge(buf.st_size)) return 1; - if (read(fd, mem + filesize, buf.st_size) == -1) { + if (read_to_end(fd, mem + filesize, buf.st_size) == -1) { sysemsg(fname); return 1; } @@ -488,3 +503,4 @@ addfile(fname) setpage(mem + oldsize); return 0; } + diff --git a/macro.m4 b/macro.m4 new file mode 100644 index 0000000..c28ed01 --- /dev/null +++ b/macro.m4 @@ -0,0 +1,59 @@ +AC_CHECK_HEADER +( + [ncurses.h], + [ + AC_SEARCH_LIBS + ([initscr], [ncurses], + [ + AC_DEFINE(HAVE_NCURSES_H) + AC_SEARCH_LIBS([tputs], [tinfo]) + ],[ + AC_SEARCH_LIBS + ( + [initscr], [curses], + [ + AC_DEFINE(HAVE_CURSES_H) + AC_SEARCH_LIBS([tputs], [tinfo]) + ],[ + AC_MSG_ERROR([bvi requires a curses library]) + ] + ) + ] + ) + ],[ + AC_CHECK_HEADER + ( + [curses.h], + [ + AC_SEARCH_LIBS + ( + [initscr], [curses], + [ + AC_DEFINE(HAVE_CURSES_H) + ],[ + AC_MSG_ERROR([bvi requires a curses library]) + ] + ) + ],[ +# statt: AC_MSG_ERROR([bvi requires a curses library]) + AC_CHECK_HEADER + ( + [ncursesw/curses.h], + [ + AC_SEARCH_LIBS + ( + [initscr], [curses], + [ + AC_DEFINE(HAVE_NCURSESW_CURSES_H) + ],[ + AC_MSG_ERROR([bvi requires a curses library]) + ] + ) + ],[ + AC_MSG_ERROR([bvi requires a curses library]) + ] + ) + ] + ) + ] +) diff --git a/patchlevel.h b/patchlevel.h index 276f7ba..af30db7 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -1 +1 @@ -#define VERSION "1.4.1" +#define VERSION "1.4.2" diff --git a/re.c b/re.c index bc5cdd8..df6f9c2 100644 --- a/re.c +++ b/re.c @@ -11,8 +11,9 @@ * 2010-06-02 V 1.3.4 * 2013-08-24 V 1.4.0 * 2019-01-28 V 1.4.1 + * 2023-03-07 V 1.4.2 * - * Copyright 1996-2019 by Gerhard Buergmann + * Copyright 1996-2023 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -312,7 +313,7 @@ do_substitution(delim, line, startpos, endpos) refresh(); if (global) { - if ((undo_count = alloc_buf(endpos - startpos, &undo_buf))) { + if ((undo_count = alloc_buf((off_t)(endpos - startpos), &undo_buf))) { memcpy(undo_buf, startpos + 1, undo_count); } undo_start = startpos + 1; @@ -350,7 +351,7 @@ AGAIN: repl_count++; current_start = pagepos + y * Anzahl + xpos(); if (!global) { - if ((undo_count = alloc_buf(pat_len, &undo_buf))) { + if ((undo_count = alloc_buf((off_t)pat_len, &undo_buf))) { memcpy(undo_buf, current_start, undo_count); } undo_start = current_start; diff --git a/tags b/tags index 771ed94..2f52151 100644 --- a/tags +++ b/tags @@ -1,566 +1,551 @@ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ -!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ -!_TAG_PROGRAM_NAME Exuberant Ctags // -!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ -!_TAG_PROGRAM_VERSION 5.9~svn20110310 // -AND bvi.h 90;" d -ANSI bmore.h 104;" d -ANSI bvi.h 120;" d -APPEND comm.c 51;" d file: -APPEND comm.c 54;" d file: -ASCII bmore.h 83;" d -ASCII bvi.h 97;" d -ASCII_DEL bvi.h 106;" d -A_ATTRIBUTES doscur.h 56;" d -A_BLINK doscur.h 54;" d -A_BOLD doscur.h 52;" d -A_CHARTEXT doscur.h 55;" d -A_NORMAL doscur.h 50;" d -A_REVERSE doscur.h 53;" d -A_STANDOUT doscur.h 51;" d -AnzAdd bmore.c /^int AnzAdd;$/;" v -AnzAdd bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v -Anzahl bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v -Anzahl3 bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v -Ausgabe_Datei bvi.c /^FILE *Ausgabe_Datei;$/;" v -BACKWARD bmore.h 85;" d -BACKWARD bvi.h 99;" d +!_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ +!_TAG_OUTPUT_FILESEP slash /slash or backslash/ +!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ +!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ +!_TAG_PROC_CWD /home/bg/src/bvi/bvi/ // +!_TAG_PROGRAM_AUTHOR Universal Ctags Team // +!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ +!_TAG_PROGRAM_URL https://ctags.io/ /official site/ +!_TAG_PROGRAM_VERSION 5.9.0 // +AND bvi.h /^#define AND /;" d +ANSI bmore.h /^# define ANSI$/;" d +ANSI bvi.h /^# define ANSI$/;" d +APPEND comm.c /^# define APPEND /;" d file: +ASCII bmore.h /^#define ASCII /;" d +ASCII bvi.h /^#define ASCII /;" d +ASCII_DEL bvi.h /^#define ASCII_DEL /;" d +A_ATTRIBUTES doscur.h /^#define A_ATTRIBUTES /;" d +A_BLINK doscur.h /^#define A_BLINK /;" d +A_BOLD doscur.h /^#define A_BOLD /;" d +A_CHARTEXT doscur.h /^#define A_CHARTEXT /;" d +A_NORMAL doscur.h /^#define A_NORMAL /;" d +A_REVERSE doscur.h /^#define A_REVERSE /;" d +A_STANDOUT doscur.h /^#define A_STANDOUT /;" d +AnzAdd bmore.c /^int AnzAdd;$/;" v typeref:typename:int +AnzAdd bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v typeref:typename:int +Anzahl bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v typeref:typename:int +Anzahl3 bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v typeref:typename:int +Ausgabe_Datei bvi.c /^FILE *Ausgabe_Datei;$/;" v typeref:typename:FILE * +BACKWARD bmore.h /^#define BACKWARD /;" d +BACKWARD bvi.h /^#define BACKWARD /;" d BLOCK_BEGIN bvi.h /^ BLOCK_BEGIN = 1,$/;" e enum:_block_datum BLOCK_END bvi.h /^ BLOCK_END = 2,$/;" e enum:_block_datum BLOCK_LEN bvi.h /^ BLOCK_LEN = 4$/;" e enum:_block_datum -BLOCK_SPECIAL bmore.h 75;" d -BLOCK_SPECIAL bvi.h 66;" d -BS bmore.h 88;" d -BS bvi.h 102;" d -BUFFER bmore.h 116;" d -BUFFER bvi.h 134;" d -BVICTRL bmore.h 92;" d -BVICTRL bvi.h 105;" d -CHARACTER_SPECIAL bmore.h 74;" d -CHARACTER_SPECIAL bvi.h 65;" d -CMDLNG bvi.h 108;" d -CMDSZ comm.c 57;" d file: -COLS dosio.c /^int COLS = 80;$/;" v -CR bmore.h 86;" d -CR bvi.h 100;" d -DELIM bmore.h 107;" d -DELIM bmore.h 112;" d -DELIM bvi.h 123;" d -DELIM bvi.h 130;" d -DIRECTORY bmore.h 73;" d -DIRECTORY bvi.h 64;" d -ECHO dosio.c /^int ECHO = TRUE;$/;" v -END bmore.h 79;" d -END bvi.h 70;" d -ERR doscur.h 147;" d -ERROR bmore.h 70;" d -ERROR bvi.h 61;" d -ESC bmore.h 89;" d -ESC bvi.h 103;" d -ESC doscur.h 31;" d -FALSE bmore.h 100;" d -FALSE bvi.h 116;" d -FALSE doscur.h 29;" d -FORWARD bmore.h 84;" d -FORWARD bvi.h 98;" d -HAVE_CURSES_H acconfig.h 5;" d -HAVE_FCNTL_H dosconf.h 40;" d -HAVE_LOCALE_H dosconf.h 44;" d -HAVE_MEMMOVE dosconf.h 31;" d -HAVE_NCURSES_H acconfig.h 3;" d -HAVE_NCURSES_TERM_H acconfig.h 11;" d -HAVE_STRDUP dosconf.h 34;" d -HAVE_STRTOL dosconf.h 37;" d -HELPFILE bmore.c 43;" d file: -HELPFILE bmore.c 45;" d file: -HEX bvi.h 96;" d -Home bm_unix.c /^char *Home; \/* go to home *\/$/;" v -JOEHTG bvi.h 43;" d -KEY_BACKSPACE doscur.h 42;" d -KEY_DC doscur.h 45;" d -KEY_DOWN doscur.h 34;" d -KEY_ENTER doscur.h 41;" d -KEY_F doscur.h 33;" d -KEY_F0 doscur.h 32;" d -KEY_HOME doscur.h 43;" d -KEY_IC doscur.h 46;" d -KEY_LEFT doscur.h 36;" d -KEY_LL doscur.h 44;" d -KEY_NPAGE doscur.h 38;" d -KEY_PPAGE doscur.h 39;" d -KEY_RETURN doscur.h 40;" d -KEY_RIGHT doscur.h 37;" d -KEY_UP doscur.h 35;" d -LINES dosio.c /^int LINES = 25;$/;" v -LROTATE bvi.h 88;" d -LSHIFT bvi.h 86;" d -MAXCMD bmore.h 115;" d -MAXCMD bvi.h 133;" d -MAXNAME comm.c 58;" d file: -MAX_ONE_ARG comm.c 63;" d file: -MAX_ONE_FILE comm.c 65;" d file: -NEED_PUTC_CHAR acconfig.h 9;" d -NEED_PUTC_CHAR bm_unix.c 52;" d file: -NEG bvi.h 93;" d -NEW bmore.h 72;" d -NEW bvi.h 63;" d -NL bmore.h 87;" d -NL bvi.h 101;" d -NODEL dosio.c /^int NODEL = FALSE;$/;" v -NOT bvi.h 94;" d -NO_ADDR comm.c 60;" d file: -NO_ARG comm.c 61;" d file: -NO_SYSERRL acconfig.h 7;" d -NULL bmore.h 95;" d -NULL bvi.h 111;" d -OFF_T_MAX io.c 47;" d file: -ONE bmore.h 80;" d -ONE bvi.h 71;" d -ONE_ARG comm.c 62;" d file: -ONE_FILE comm.c 64;" d file: -OR bvi.h 91;" d -P set.h 77;" d -PARTIAL bmore.h 76;" d -PARTIAL bvi.h 67;" d -PRINTF bmore.c 38;" d file: -PRINTF bmore.c 40;" d file: -PTR bmore.h 105;" d -PTR bmore.h 111;" d -PTR bvi.h 121;" d -PTR bvi.h 129;" d -P_AW set.h 54;" d -P_BOOL set.h 42;" d -P_CHANGED set.h 45;" d -P_CM set.h 55;" d -P_CO set.h 72;" d -P_EB set.h 56;" d -P_HL set.h 70;" d -P_IC set.h 57;" d -P_LI set.h 67;" d -P_MA set.h 58;" d -P_MM set.h 59;" d -P_MO set.h 63;" d -P_NUM set.h 43;" d -P_OF set.h 60;" d -P_RE set.h 71;" d -P_RO set.h 61;" d -P_SS set.h 62;" d -P_TE set.h 65;" d -P_TEXT set.h 44;" d -P_TT set.h 64;" d -P_US set.h 66;" d -P_WL set.h 68;" d -P_WS set.h 69;" d -REGULAR bmore.h 71;" d -REGULAR bvi.h 62;" d -REPLACE bmore.h 91;" d -RROTATE bvi.h 89;" d -RSHIFT bvi.h 87;" d -SEARCH bmore.h 90;" d -SEARCH bvi.h 104;" d -SKIP_WHITE bvi.h 136;" d -STAR bmore.h 81;" d -STAR bvi.h 72;" d -STDC_HEADERS dosconf.h 28;" d -S_GLOBAL bvi.h 83;" d -S_ISBLK bvi.h 198;" d -S_ISCHR bvi.h 197;" d -S_ISDIR bvi.h 196;" d -S_ISFIFO bvi.h 200;" d -S_ISREG bvi.h 199;" d -TBUFSIZ bm_dos.c 32;" d file: -TBUFSIZ bm_unix.c 32;" d file: -TRUE bmore.h 99;" d -TRUE bvi.h 115;" d -TRUE doscur.h 28;" d -U_APPEND bvi.h 80;" d -U_BACK bvi.h 79;" d -U_DELETE bvi.h 78;" d -U_EDIT bvi.h 75;" d -U_INSERT bvi.h 77;" d -U_TILDE bvi.h 81;" d -U_TRUNC bvi.h 76;" d -VERSION patchlevel.h 1;" d -WINDOW doscur.h 60;" d -WRITE comm.c 50;" d file: -WRITE comm.c 53;" d file: -XOR bvi.h 92;" d +BLOCK_SPECIAL bmore.h /^#define BLOCK_SPECIAL /;" d +BLOCK_SPECIAL bvi.h /^#define BLOCK_SPECIAL /;" d +BS bmore.h /^#define BS /;" d +BS bvi.h /^#define BS /;" d +BUFFER bmore.h /^#define BUFFER /;" d +BUFFER bvi.h /^#define BUFFER /;" d +BVICTRL bmore.h /^#define BVICTRL(/;" d +BVICTRL bvi.h /^#define BVICTRL(/;" d +CHARACTER_SPECIAL bmore.h /^#define CHARACTER_SPECIAL /;" d +CHARACTER_SPECIAL bvi.h /^#define CHARACTER_SPECIAL /;" d +CMDLNG bvi.h /^#define CMDLNG(/;" d +CMDSZ comm.c /^#define CMDSZ /;" d file: +COLS dosio.c /^int COLS = 80;$/;" v typeref:typename:int +CR bmore.h /^#define CR /;" d +CR bvi.h /^#define CR /;" d +DELIM bmore.h /^# define DELIM /;" d +DELIM bvi.h /^# define DELIM /;" d +DIRECTORY bmore.h /^#define DIRECTORY /;" d +DIRECTORY bvi.h /^#define DIRECTORY /;" d +ECHO dosio.c /^int ECHO = TRUE;$/;" v typeref:typename:int +END bmore.h /^#define END /;" d +END bvi.h /^#define END /;" d +ERR doscur.h /^#define ERR /;" d +ERROR bmore.h /^#define ERROR /;" d +ERROR bvi.h /^#define ERROR /;" d +ESC bmore.h /^#define ESC /;" d +ESC bvi.h /^#define ESC /;" d +ESC doscur.h /^#define ESC /;" d +FALSE bmore.h /^# define FALSE /;" d +FALSE bvi.h /^# define FALSE /;" d +FALSE doscur.h /^#define FALSE /;" d +FORWARD bmore.h /^#define FORWARD /;" d +FORWARD bvi.h /^#define FORWARD /;" d +HAVE_FCNTL_H dosconf.h /^#define HAVE_FCNTL_H /;" d +HAVE_LOCALE_H dosconf.h /^# define HAVE_LOCALE_H /;" d +HAVE_MEMMOVE dosconf.h /^#define HAVE_MEMMOVE /;" d +HAVE_STRDUP dosconf.h /^#define HAVE_STRDUP /;" d +HAVE_STRTOL dosconf.h /^#define HAVE_STRTOL /;" d +HELPFILE bmore.c /^# define HELPFILE /;" d file: +HEX bvi.h /^#define HEX /;" d +Home bm_unix.c /^char *Home; \/* go to home *\/$/;" v typeref:typename:char * +JOEHTG bvi.h /^#define JOEHTG$/;" d +KEY_BACKSPACE doscur.h /^#define KEY_BACKSPACE /;" d +KEY_DC doscur.h /^#define KEY_DC /;" d +KEY_DOWN doscur.h /^#define KEY_DOWN /;" d +KEY_ENTER doscur.h /^#define KEY_ENTER /;" d +KEY_F doscur.h /^#define KEY_F(/;" d +KEY_F0 doscur.h /^#define KEY_F0 /;" d +KEY_HOME doscur.h /^#define KEY_HOME /;" d +KEY_IC doscur.h /^#define KEY_IC /;" d +KEY_LEFT doscur.h /^#define KEY_LEFT /;" d +KEY_LL doscur.h /^#define KEY_LL /;" d +KEY_NPAGE doscur.h /^#define KEY_NPAGE /;" d +KEY_PPAGE doscur.h /^#define KEY_PPAGE /;" d +KEY_RETURN doscur.h /^#define KEY_RETURN /;" d +KEY_RIGHT doscur.h /^#define KEY_RIGHT /;" d +KEY_UP doscur.h /^#define KEY_UP /;" d +LINES dosio.c /^int LINES = 25;$/;" v typeref:typename:int +LROTATE bvi.h /^#define LROTATE /;" d +LSHIFT bvi.h /^#define LSHIFT /;" d +MAXCMD bmore.h /^#define MAXCMD /;" d +MAXCMD bvi.h /^#define MAXCMD /;" d +MAXNAME comm.c /^#define MAXNAME /;" d file: +MAX_ONE_ARG comm.c /^#define MAX_ONE_ARG /;" d file: +MAX_ONE_FILE comm.c /^#define MAX_ONE_FILE /;" d file: +NEG bvi.h /^#define NEG /;" d +NEW bmore.h /^#define NEW /;" d +NEW bvi.h /^#define NEW /;" d +NL bmore.h /^#define NL /;" d +NL bvi.h /^#define NL /;" d +NODEL dosio.c /^int NODEL = FALSE;$/;" v typeref:typename:int +NOT bvi.h /^#define NOT /;" d +NO_ADDR comm.c /^#define NO_ADDR /;" d file: +NO_ARG comm.c /^#define NO_ARG /;" d file: +NULL bmore.h /^# define NULL /;" d +NULL bvi.h /^# define NULL /;" d +OFF_T_MAX io.c /^# define OFF_T_MAX /;" d file: +ONE bmore.h /^#define ONE /;" d +ONE bvi.h /^#define ONE /;" d +ONE_ARG comm.c /^#define ONE_ARG /;" d file: +ONE_FILE comm.c /^#define ONE_FILE /;" d file: +OR bvi.h /^#define OR /;" d +P set.h /^#define P(/;" d +PARTIAL bmore.h /^#define PARTIAL /;" d +PARTIAL bvi.h /^#define PARTIAL /;" d +PRINTF bmore.c /^# define PRINTF /;" d file: +PTR bmore.h /^# define PTR /;" d +PTR bvi.h /^# define PTR /;" d +P_AW set.h /^#define P_AW /;" d +P_BOOL set.h /^#define P_BOOL /;" d +P_CHANGED set.h /^#define P_CHANGED /;" d +P_CM set.h /^#define P_CM /;" d +P_CO set.h /^#define P_CO /;" d +P_EB set.h /^#define P_EB /;" d +P_HL set.h /^#define P_HL /;" d +P_IC set.h /^#define P_IC /;" d +P_LI set.h /^#define P_LI /;" d +P_MA set.h /^#define P_MA /;" d +P_MM set.h /^#define P_MM /;" d +P_MO set.h /^#define P_MO /;" d +P_NUM set.h /^#define P_NUM /;" d +P_OF set.h /^#define P_OF /;" d +P_RE set.h /^#define P_RE /;" d +P_RO set.h /^#define P_RO /;" d +P_SS set.h /^#define P_SS /;" d +P_TE set.h /^#define P_TE /;" d +P_TEXT set.h /^#define P_TEXT /;" d +P_TT set.h /^#define P_TT /;" d +P_US set.h /^#define P_US /;" d +P_WL set.h /^#define P_WL /;" d +P_WS set.h /^#define P_WS /;" d +REGULAR bmore.h /^#define REGULAR /;" d +REGULAR bvi.h /^#define REGULAR /;" d +REPLACE bmore.h /^#define REPLACE /;" d +RROTATE bvi.h /^#define RROTATE /;" d +RSHIFT bvi.h /^#define RSHIFT /;" d +SEARCH bmore.h /^#define SEARCH /;" d +SEARCH bvi.h /^#define SEARCH /;" d +SKIP_WHITE bvi.h /^#define SKIP_WHITE /;" d +STAR bmore.h /^#define STAR /;" d +STAR bvi.h /^#define STAR /;" d +STDC_HEADERS dosconf.h /^#define STDC_HEADERS /;" d +S_GLOBAL bvi.h /^#define S_GLOBAL /;" d +S_ISBLK bvi.h /^#define S_ISBLK(/;" d +S_ISCHR bvi.h /^#define S_ISCHR(/;" d +S_ISDIR bvi.h /^#define S_ISDIR(/;" d +S_ISFIFO bvi.h /^#define S_ISFIFO(/;" d +S_ISREG bvi.h /^#define S_ISREG(/;" d +TBUFSIZ bm_dos.c /^#define TBUFSIZ /;" d file: +TBUFSIZ bm_unix.c /^#define TBUFSIZ /;" d file: +TRUE bmore.h /^# define TRUE /;" d +TRUE bvi.h /^# define TRUE /;" d +TRUE doscur.h /^#define TRUE /;" d +U_APPEND bvi.h /^#define U_APPEND /;" d +U_BACK bvi.h /^#define U_BACK /;" d +U_DELETE bvi.h /^#define U_DELETE /;" d +U_EDIT bvi.h /^#define U_EDIT /;" d +U_INSERT bvi.h /^#define U_INSERT /;" d +U_TILDE bvi.h /^#define U_TILDE /;" d +U_TRUNC bvi.h /^#define U_TRUNC /;" d +VERSION patchlevel.h /^#define VERSION /;" d +WINDOW doscur.h /^#define WINDOW /;" d +WRITE comm.c /^# define WRITE /;" d file: +XOR bvi.h /^#define XOR /;" d _block_datum bvi.h /^typedef enum _block_datum {$/;" g -act_pat re.c /^char act_pat[MAXCMD]; \/* found pattern *\/$/;" v -addch doscur.h 95;" d -addfile dosio.c /^addfile(char *fname)$/;" f +act_pat re.c /^char act_pat[MAXCMD]; \/* found pattern *\/$/;" v typeref:typename:char[] +addch doscur.h /^#define addch(/;" d addfile io.c /^addfile(fname)$/;" f -addr_flag comm.c /^int addr_flag;$/;" v -addr_form bmore.c /^char addr_form[15];$/;" v -addr_form bvi.c /^char addr_form[15];$/;" v -addstr doscur.h 99;" d -again recomp.c /^int again = 0;$/;" v -alloc_buf dosio.c /^alloc_buf(off_t n, char **buffer)$/;" f +addr_flag comm.c /^int addr_flag;$/;" v typeref:typename:int +addr_form bmore.c /^char addr_form[15];$/;" v typeref:typename:char[15] +addr_form bvi.c /^char addr_form[15];$/;" v typeref:typename:char[15] +addstr doscur.h /^#define addstr(/;" d +again recomp.c /^int again = 0;$/;" v typeref:typename:int alloc_buf io.c /^alloc_buf(n, buffer)$/;" f -altfile comm.c /^static char *altfile = NULL; \/* alternate file *\/$/;" v file: -ambigous comm.c /^char *ambigous = "Ambigous|Too many file names";$/;" v -ambvalue comm.c /^char *ambvalue = "Ambigous|Too many values";$/;" v -arrnum bmore.c /^int arrnum = 0;$/;" v -arrnum bvi.c /^int arrnum = 0;$/;" v +altfile comm.c /^static char *altfile = NULL; \/* alternate file *\/$/;" v typeref:typename:char * file: +ambigous comm.c /^char *ambigous = "Ambigous|Too many file names";$/;" v typeref:typename:char * +ambvalue comm.c /^char *ambvalue = "Ambigous|Too many values";$/;" v typeref:typename:char * +arrnum bmore.c /^int arrnum = 0;$/;" v typeref:typename:int +arrnum bvi.c /^int arrnum = 0;$/;" v typeref:typename:int ascii_comp recomp.c /^ascii_comp(smem, pattern)$/;" f -ascii_flag bmore.c /^int ascii_flag = 0;$/;" v -attrset dosio.c /^attrset(int attr)$/;" f +ascii_flag bmore.c /^int ascii_flag = 0;$/;" v typeref:typename:int +attrset dosio.c /^attrset(int attr)$/;" f typeref:typename:void backsearch re.c /^backsearch(start, mode)$/;" f -beep doscur.h 76;" d -block_begin bvi.c /^off_t block_begin, block_end, block_size;$/;" v +beep doscur.h /^#define beep(/;" d +block_begin bvi.c /^off_t block_begin, block_end, block_size;$/;" v typeref:typename:off_t block_datum bvi.h /^} block_datum;$/;" t typeref:enum:_block_datum -block_end bvi.c /^off_t block_begin, block_end, block_size;$/;" v -block_flag bvi.c /^int block_flag = 0;$/;" v -block_read io.c /^static off_t block_read;$/;" v file: -block_size bvi.c /^off_t block_begin, block_end, block_size;$/;" v -bmbeep bmore.c /^bmbeep() {$/;" f -bmore_search_pat bmore.c /^char bmore_search_pat[BUFFER]; \/* \/ or ? command *\/$/;" v +block_end bvi.c /^off_t block_begin, block_end, block_size;$/;" v typeref:typename:off_t +block_flag bvi.c /^int block_flag = 0;$/;" v typeref:typename:int +block_read io.c /^static off_t block_read;$/;" v typeref:typename:off_t file: +block_size bvi.c /^off_t block_begin, block_end, block_size;$/;" v typeref:typename:off_t +bmbeep bmore.c /^bmbeep() {$/;" f typeref:typename:void +bmore_search_pat bmore.c /^char bmore_search_pat[BUFFER]; \/* \/ or ? command *\/$/;" v typeref:typename:char[] bmregexec bmore.c /^bmregexec(scan)$/;" f bmsearch bmore.c /^bmsearch(ch)$/;" f bregexec re.c /^bregexec(start, scan)$/;" f buf comm.c /^static struct stat buf;$/;" v typeref:struct:stat file: buf dosio.c /^static struct stat buf;$/;" v typeref:struct:stat file: buf io.c /^static struct stat buf;$/;" v typeref:struct:stat file: -buf set.c /^static char buf[MAXCMD+1];$/;" v file: -buffer1 bmore.c /^char buffer1[MAXCMD], buffer2[MAXCMD];$/;" v -buffer2 bmore.c /^char buffer1[MAXCMD], buffer2[MAXCMD];$/;" v -bvi_init dosio.c /^bvi_init(char *dir)$/;" f +buf set.c /^static char buf[MAXCMD+1];$/;" v typeref:typename:char[] file: +buffer1 bmore.c /^char buffer1[MAXCMD], buffer2[MAXCMD];$/;" v typeref:typename:char[] +buffer2 bmore.c /^char buffer1[MAXCMD], buffer2[MAXCMD];$/;" v typeref:typename:char[] bvi_init io.c /^bvi_init(dir)$/;" f -bytepos bmore.c /^off_t bytepos, oldpos;$/;" v -c_argc comm.c /^static int c_argc = 0;$/;" v file: -c_argv comm.c /^static char *c_argv[9];$/;" v file: -c_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v +bytepos bmore.c /^off_t bytepos, oldpos;$/;" v typeref:typename:off_t +c_argc comm.c /^static int c_argc = 0;$/;" v typeref:typename:int file: +c_argv comm.c /^static char *c_argv[9];$/;" v typeref:typename:char * [9] file: +c_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v typeref:typename:int calc_addr re.c /^calc_addr(pointer, def_addr)$/;" f calc_size bvi.c /^calc_size(arg)$/;" f -cbreak doscur.h 136;" d +cbreak doscur.h /^#define cbreak(/;" d chk_comm comm.c /^chk_comm(flag)$/;" f -chtype doscur.h 58;" d -clear doscur.h 83;" d -clear_marks edit.c /^clear_marks()$/;" f -clear_sc bm_unix.c /^char *clear_sc; \/* clear screen *\/$/;" v -clearscreen bm_dos.c /^clearscreen()$/;" f -clearscreen bm_unix.c /^clearscreen()$/;" f -clearstr comm.c /^clearstr()$/;" f +chtype doscur.h /^#define chtype /;" d +clear doscur.h /^#define clear(/;" d +clear_marks edit.c /^clear_marks()$/;" f typeref:typename:void +clear_sc bm_unix.c /^char *clear_sc; \/* clear screen *\/$/;" v typeref:typename:char * +clearscreen bm_dos.c /^clearscreen()$/;" f typeref:typename:void +clearscreen bm_unix.c /^clearscreen()$/;" f typeref:typename:void +clearstr comm.c /^clearstr()$/;" f typeref:typename:void cleartoeol bm_dos.c /^cleartoeol()$/;" f -cleartoeol bm_unix.c /^cleartoeol()$/;" f -clrtoeol doscur.h 79;" d -cmdbuf bmore.c /^static char cmdbuf[MAXCMD];$/;" v file: -cmdstr bvi.c /^char cmdstr[MAXCMD+1] = "";$/;" v -cnt bmore.c /^static int cnt = 0;$/;" v file: -contrd edit.c /^char contrd[][4] = {"NUL", " ^A", " ^B", " ^C", " ^D", " ^E", " ^F", "BEL",$/;" v -contru edit.c /^char contru[][4] = {"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",$/;" v -copyright bmore.c /^char *copyright = "GPL (C) 1990-2019 by Gerhard Buergmann";$/;" v -copyright bvi.c /^char *copyright = "(C) GPL 1996-2019 by Gerhard Buergmann";$/;" v -corr bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v -cur_back edit.c /^cur_back()$/;" f +cleartoeol bm_unix.c /^cleartoeol()$/;" f typeref:typename:void +clrtoeol doscur.h /^#define clrtoeol(/;" d +cmdbuf bmore.c /^static char cmdbuf[2 * MAXCMD];$/;" v typeref:typename:char[] file: +cmdstr bvi.c /^char cmdstr[MAXCMD+1] = "";$/;" v typeref:typename:char[] +cnt bmore.c /^static int cnt = 0;$/;" v typeref:typename:int file: +contrd edit.c /^char contrd[][4] = {"NUL", " ^A", " ^B", " ^C", " ^D", " ^E", " ^F", "BEL",$/;" v typeref:typename:char[][4] +contru edit.c /^char contru[][4] = {"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",$/;" v typeref:typename:char[][4] +copyright bmore.c /^char *copyright = "GPL (C) 1990-2022 by Gerhard Buergmann";$/;" v typeref:typename:char * +copyright bvi.c /^char *copyright = "(C) GPL 1996-2023 by Gerhard Buergmann";$/;" v typeref:typename:char * +corr bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v typeref:typename:int +cur_back edit.c /^cur_back()$/;" f typeref:typename:int cur_forw edit.c /^cur_forw(check)$/;" f -curfile bvi.c /^int curfile; \/* number of the current file *\/$/;" v -curpos bvi.c /^PTR curpos;$/;" v -curr_file bmore.c /^FILE *curr_file = NULL, *help_file;$/;" v -current bvi.c /^PTR current;$/;" v -current_start bvi.c /^PTR current_start;$/;" v -d_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v -d_memcpy dosio.c /^d_memcpy(PTR dest, PTR src, off_t n)$/;" f -d_memmove dosio.c /^d_memmove(PTR dest, PTR src, off_t n)$/;" f -dbug bm_dos.c /^FILE *dbug;$/;" v -delch dosio.c /^delch()$/;" f -deleteln doscur.h 110;" d -dlines bm_unix.c /^int dum_opt, dlines;$/;" v +curfile bvi.c /^int curfile; \/* number of the current file *\/$/;" v typeref:typename:int +curpos bvi.c /^PTR curpos;$/;" v typeref:typename:PTR +curr_file bmore.c /^FILE *curr_file = NULL, *help_file;$/;" v typeref:typename:FILE * +current bvi.c /^PTR current;$/;" v typeref:typename:PTR +current_start bvi.c /^PTR current_start;$/;" v typeref:typename:PTR +d_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v typeref:typename:int +dbug bm_dos.c /^FILE *dbug;$/;" v typeref:typename:FILE * +delch dosio.c /^delch()$/;" f typeref:typename:void +deleteln doscur.h /^#define deleteln(/;" d +dlines bm_unix.c /^int dum_opt, dlines;$/;" v typeref:typename:int do_append bvi.c /^do_append(count, buf)$/;" f do_back edit.c /^do_back(n, start)$/;" f do_delete edit.c /^do_delete(n, start)$/;" f -do_exit comm.c /^do_exit()$/;" f +do_exit comm.c /^do_exit()$/;" f typeref:typename:void do_ft edit.c /^do_ft(ch, flag)$/;" f -do_header bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v +do_header bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v typeref:typename:int do_ins_chg edit.c /^do_ins_chg(start, arg, mode)$/;" f do_logic set.c /^do_logic(mode, str)$/;" f do_mark edit.c /^do_mark(mark, addr)$/;" f do_next bmore.c /^do_next(n)$/;" f do_over bvi.c /^do_over(loc, n, buf)$/;" f do_put bvi.c /^do_put(loc, n, buf)$/;" f -do_shell dosio.c /^do_shell()$/;" f -do_shell io.c /^do_shell()$/;" f +do_shell io.c /^do_shell()$/;" f typeref:typename:void do_substitution re.c /^do_substitution(delim, line, startpos, endpos)$/;" f do_tilde bvi.c /^do_tilde(count)$/;" f -do_undo bvi.c /^do_undo()$/;" f +do_undo bvi.c /^do_undo()$/;" f typeref:typename:void do_z edit.c /^do_z(mode)$/;" f docmdline comm.c /^docmdline(cmdline)$/;" f doecmd comm.c /^doecmd(arg, force)$/;" f doset set.c /^doset(arg)$/;" f doshell bm_dos.c /^doshell(cmd)$/;" f doshell bm_unix.c /^doshell(cmd)$/;" f -doupdate doscur.h 143;" d -dum_opt bm_unix.c /^int dum_opt, dlines;$/;" v -dup_print_flag bmore.c /^int dup_print_flag = 0;$/;" v -echo doscur.h 128;" d +doupdate doscur.h /^#define doupdate(/;" d +dum_opt bm_unix.c /^int dum_opt, dlines;$/;" v typeref:typename:int +dup_print_flag bmore.c /^int dup_print_flag = 0;$/;" v typeref:typename:int +echo doscur.h /^#define echo(/;" d edit edit.c /^edit(mode)$/;" f -edits bvi.c /^int edits = 0;$/;" v -emptyclass bmore.c /^char *emptyclass = "Empty byte class '[]' or '[^]'";$/;" v -emptyclass re.c /^char *emptyclass = "Bad character class|Empty byte class '[]' or '[^]' cannot match";$/;" v +edits bvi.c /^int edits = 0;$/;" v typeref:typename:int +emptyclass bmore.c /^char *emptyclass = "Empty byte class '[]' or '[^]'";$/;" v typeref:typename:char * +emptyclass re.c /^char *emptyclass = "Bad character class|Empty byte class '[]' or '[^]' cannot match";$/;" v typeref:typename:char * emsg bmore.c /^emsg(s)$/;" f emsg comm.c /^emsg(s)$/;" f -end_addr comm.c /^PTR end_addr;$/;" v +end_addr comm.c /^PTR end_addr;$/;" v typeref:typename:PTR end_word re.c /^end_word(start)$/;" f -endwin doscur.h 137;" d -enlarge dosio.c /^enlarge(off_t add)$/;" f +endwin doscur.h /^#define endwin(/;" d enlarge io.c /^enlarge(add)$/;" f -env bvi.c /^jmp_buf env; \/* context for `longjmp' function *\/$/;" v -erase doscur.h 81;" d -erase_ln bm_unix.c /^char *erase_ln; \/* erase line *\/$/;" v -erasechar doscur.h 75;" d -estring bmore.c /^char estring[MAXCMD] = ""; \/* string for shell escape *\/$/;" v -extra comm.c /^char *extra = "Extra chars|Extra characters at end of command";$/;" v -exval bmore.c /^int exval = 0;$/;" v -fbuf set.c /^static char fbuf[MAXCMD+1];$/;" v file: -ffp set.c /^static FILE *ffp;$/;" v file: -file_nr bmore.c /^int file_nr = 0; \/* number of current input file *\/$/;" v +env bvi.c /^jmp_buf env; \/* context for `longjmp' function *\/$/;" v typeref:typename:jmp_buf +erase doscur.h /^#define erase(/;" d +erase_ln bm_unix.c /^char *erase_ln; \/* erase line *\/$/;" v typeref:typename:char * +erasechar doscur.h /^#define erasechar(/;" d +estring bmore.c /^char estring[MAXCMD] = ""; \/* string for shell escape *\/$/;" v typeref:typename:char[] +extra comm.c /^char *extra = "Extra chars|Extra characters at end of command";$/;" v typeref:typename:char * +exval bmore.c /^int exval = 0;$/;" v typeref:typename:int +fbuf set.c /^static char fbuf[MAXCMD+1];$/;" v typeref:typename:char[] file: +ffp set.c /^static FILE *ffp;$/;" v typeref:typename:FILE * file: +file_nr bmore.c /^int file_nr = 0; \/* number of current input file *\/$/;" v typeref:typename:int fileinfo edit.c /^fileinfo(fname)$/;" f -filemode dosio.c /^int filemode;$/;" v -filemode io.c /^int filemode;$/;" v -files bmore.c /^char **files; \/* list of input files *\/$/;" v -files bvi.c /^char **files; \/* list of input files *\/$/;" v -filesize bmore.c /^off_t screen_home, filesize;$/;" v -filesize bvi.c /^off_t filesize, memsize, undosize;$/;" v -flags set.h /^ int flags;$/;" m struct:param -flash doscur.h 77;" d -flushinp doscur.h 120;" d -fname_buf bvi.c /^char *fname_buf = NULL;$/;" v -fnum bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v -from_file set.c /^static int from_file = 0;$/;" v file: +filemode dosio.c /^int filemode;$/;" v typeref:typename:int +filemode io.c /^int filemode;$/;" v typeref:typename:int +files bmore.c /^char **files; \/* list of input files *\/$/;" v typeref:typename:char ** +files bvi.c /^char **files; \/* list of input files *\/$/;" v typeref:typename:char ** +filesize bmore.c /^off_t screen_home, filesize;$/;" v typeref:typename:off_t +filesize bvi.c /^off_t filesize, memsize, undosize;$/;" v typeref:typename:off_t +flags set.h /^ int flags;$/;" m struct:param typeref:typename:int +flash doscur.h /^#define flash(/;" d +flushinp doscur.h /^#define flushinp(/;" d +fname_buf bvi.c /^char *fname_buf = NULL;$/;" v typeref:typename:char * +fnum bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v typeref:typename:int +from_file set.c /^static int from_file = 0;$/;" v typeref:typename:int file: fsearch re.c /^fsearch(start, end, smem)$/;" f fsearch_end re.c /^fsearch_end(start, end, smem, s_end)$/;" f -fullname set.h /^ char *fullname; \/* full parameter name *\/$/;" m struct:param -getbegyx doscur.h 105;" d -getcbuff edit.c /^static char getcbuff[BUFFER];$/;" v file: -getch dosio.c /^getch()$/;" f +fullname set.h /^ char *fullname; \/* full parameter name *\/$/;" m struct:param typeref:typename:char * +getbegyx doscur.h /^#define getbegyx(/;" d +getcbuff edit.c /^static char getcbuff[BUFFER];$/;" v typeref:typename:char[] file: +getch dosio.c /^getch()$/;" f typeref:typename:int getcmdstr set.c /^getcmdstr(p, x)$/;" f -getcnext edit.c /^static char *getcnext = NULL;$/;" v file: -getmaxyx doscur.h 106;" d -getyx doscur.h 104;" d -got_int bm_dos.c /^int got_int;$/;" v -got_int bm_unix.c /^int got_int;$/;" v -help_file bmore.c /^FILE *curr_file = NULL, *help_file;$/;" v -helppath bmore.c /^char helppath[MAXCMD];$/;" v +getcnext edit.c /^static char *getcnext = NULL;$/;" v typeref:typename:char * file: +getmaxyx doscur.h /^#define getmaxyx(/;" d +getyx doscur.h /^#define getyx(/;" d +got_int bm_dos.c /^int got_int;$/;" v typeref:typename:int +got_int bm_unix.c /^int got_int;$/;" v typeref:typename:int +help_file bmore.c /^FILE *curr_file = NULL, *help_file;$/;" v typeref:typename:FILE * +helppath bmore.c /^char helppath[MAXCMD];$/;" v typeref:typename:char[] hex_comp recomp.c /^hex_comp(smem, pattern)$/;" f -hexchar recomp.c /^hexchar()$/;" f -highlight bm_dos.c /^highlight()$/;" f -highlight bm_unix.c /^highlight()$/;" f -hl_spat edit.c /^long hl_spat = 0;$/;" v -home bm_dos.c /^home()$/;" f -home bm_unix.c /^home()$/;" f -icnt bmore.c /^static int icnt = 0;$/;" v file: -idlok doscur.h 141;" d -ignore_case recomp.c /^int ignore_case = 0;$/;" v -inch dosio.c /^inch()$/;" f -init_byte bmore.c /^off_t init_byte = 0;$/;" v -init_search bmore.c /^int init_search = 0;$/;" v -initscr doscur.h 73;" d -initterm bm_dos.c /^initterm()$/;" f -initterm bm_unix.c /^initterm()$/;" f -insch dosio.c /^insch(int c)$/;" f -insertln doscur.h 108;" d +hexchar recomp.c /^hexchar()$/;" f typeref:typename:int +highlight bm_dos.c /^highlight()$/;" f typeref:typename:void +highlight bm_unix.c /^highlight()$/;" f typeref:typename:void +hl_spat edit.c /^long hl_spat = 0;$/;" v typeref:typename:long +home bm_dos.c /^home()$/;" f typeref:typename:void +home bm_unix.c /^home()$/;" f typeref:typename:void +icnt bmore.c /^static int icnt = 0;$/;" v typeref:typename:int file: +idlok doscur.h /^#define idlok(/;" d +ignore_case recomp.c /^int ignore_case = 0;$/;" v typeref:typename:int +inch dosio.c /^inch()$/;" f typeref:typename:int +init_byte bmore.c /^off_t init_byte = 0;$/;" v typeref:typename:off_t +init_search bmore.c /^int init_search = 0;$/;" v typeref:typename:int +initscr doscur.h /^#define initscr(/;" d +initterm bm_dos.c /^initterm()$/;" f typeref:typename:void +initterm bm_unix.c /^initterm()$/;" f typeref:typename:void +insch dosio.c /^insch(int c)$/;" f typeref:typename:void +insertln doscur.h /^#define insertln(/;" d jmpproc bvi.c /^jmpproc(sig)$/;" f -keypad doscur.h 133;" d -last_motion bvi.c /^PTR last_motion;$/;" v -last_search bmore.c /^off_t last_search = 0;$/;" v -linbuf edit.c /^char linbuf[16384];$/;" v -line bvi.c /^static char line[MAXCMD+1];$/;" v file: -lineout edit.c /^lineout()$/;" f -load dosio.c /^load(char *fname)$/;" f +keypad doscur.h /^#define keypad(/;" d +last_motion bvi.c /^PTR last_motion;$/;" v typeref:typename:PTR +last_search bmore.c /^off_t last_search = 0;$/;" v typeref:typename:off_t +linbuf edit.c /^char linbuf[16384];$/;" v typeref:typename:char[16384] +line bvi.c /^static char line[MAXCMD+1];$/;" v typeref:typename:char[] file: +lineout edit.c /^lineout()$/;" f typeref:typename:int +load dosio.c /^load(char *fname)$/;" f typeref:typename:off_t load io.c /^load(fname)$/;" f -loc bvi.c /^int loc;$/;" v -magic recomp.c /^int magic = 1;$/;" v +loc bvi.c /^int loc;$/;" v typeref:typename:int +magic recomp.c /^int magic = 1;$/;" v typeref:typename:int main bmore.c /^main(argc, argv)$/;" f main bvi.c /^main(argc, argv)$/;" f -mark bvi.c /^static int mark;$/;" v file: -markbuf bvi.c /^PTR markbuf[26];$/;" v -maxpos bvi.c /^PTR maxpos;$/;" v -maxx bmore.c /^int maxx, maxy;$/;" v -maxx bvi.c /^int maxx, maxy, x, xx, y;$/;" v -maxy bmore.c /^int maxx, maxy;$/;" v -maxy bvi.c /^int maxx, maxy, x, xx, y;$/;" v -mem bvi.c /^PTR mem = NULL;$/;" v -memcpy bvi.h 126;" d +mark bvi.c /^static int mark;$/;" v typeref:typename:int file: +markbuf bvi.c /^PTR markbuf[26];$/;" v typeref:typename:PTR[26] +maxpos bvi.c /^PTR maxpos;$/;" v typeref:typename:PTR +maxx bmore.c /^int maxx, maxy;$/;" v typeref:typename:int +maxx bvi.c /^int maxx, maxy, x, xx, y;$/;" v typeref:typename:int +maxy bmore.c /^int maxx, maxy;$/;" v typeref:typename:int +maxy bvi.c /^int maxx, maxy, x, xx, y;$/;" v typeref:typename:int +mem bvi.c /^PTR mem = NULL;$/;" v typeref:typename:PTR +memcpy bvi.h /^# define memcpy /;" d memmove bm_unix.c /^memmove(s1, s2, n)$/;" f -memmove bvi.h 127;" d +memmove bvi.h /^# define memmove /;" d memmove io.c /^memmove(s1, s2, n)$/;" f -memsize bvi.c /^off_t filesize, memsize, undosize;$/;" v -morefiles comm.c /^char *morefiles = "more files@to edit";$/;" v -move doscur.h 91;" d -movebyte edit.c /^movebyte()$/;" f +memsize bvi.c /^off_t filesize, memsize, undosize;$/;" v typeref:typename:off_t +morefiles comm.c /^char *morefiles = "more files@to edit";$/;" v typeref:typename:char * +move doscur.h /^#define move(/;" d +movebyte edit.c /^movebyte()$/;" f typeref:typename:void msg comm.c /^msg(s)$/;" f -mvaddch doscur.h 93;" d -mvaddstr doscur.h 97;" d -mvgetch doscur.h 112;" d -mvgetstr doscur.h 115;" d -mvinch dosio.c /^mvinch(int y, int x)$/;" f -mvinsch doscur.h 125;" d -mvprintw doscur.h 101;" d -mvscanw doscur.h 122;" d -mvwaddch doscur.h 92;" d -mvwaddstr doscur.h 96;" d -mvwgetch doscur.h 111;" d -mvwgetstr doscur.h 114;" d -mvwprintw doscur.h 100;" d -mvwscanw doscur.h 121;" d -mymaxx bmore.c /^int mymaxx = 0, mymaxy = 0;$/;" v -mymaxy bmore.c /^int mymaxx = 0, mymaxy = 0;$/;" v -name bmore.c /^char *name = NULL;$/;" v -name bvi.c /^char *name = NULL;$/;" v -new_screen edit.c /^new_screen()$/;" f -newwin doscur.h 74;" d -nextchar bmore.c /^nextchar()$/;" f -nl doscur.h 131;" d -no_intty bm_dos.c /^int no_intty, no_tty;$/;" v -no_intty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v -no_tty bm_dos.c /^int no_intty, no_tty;$/;" v -no_tty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v -noaddr comm.c /^char *noaddr = "No address allowed@on this command";$/;" v -nobytes bvi.c /^char *nobytes = "No bytes@in the buffer";$/;" v -nodelay doscur.h 127;" d -noecho doscur.h 129;" d -nonl doscur.h 132;" d -noprev re.c /^char *noprev = "No previous expression";$/;" v -noraw doscur.h 139;" d -normal bm_dos.c /^normal()$/;" f -normal bm_unix.c /^normal()$/;" f -notfound re.c /^char *notfound = "Fail|Pattern not found";$/;" v -notimeout doscur.h 140;" d -noval comm.c /^char *noval = "No value@for binary operation";$/;" v -nowrtmsg comm.c /^char *nowrtmsg = "No write@since last change (:%s! overrides)";$/;" v -nstate bm_unix.c /^struct termios ostate, nstate;$/;" v typeref:struct: -numarr bmore.c /^char numarr[64]; \/* string for collecting number *\/$/;" v -numarr bvi.c /^char numarr[MAXCMD+1]; \/* string for collecting number *\/$/;" v -numfiles bmore.c /^int numfiles; \/* number of input files *\/$/;" v -numfiles bvi.c /^int numfiles; \/* number of input files *\/$/;" v -nvalue set.h /^ off_t nvalue;$/;" m struct:param -off_t bmore.h 106;" d -off_t bvi.h 122;" d -oldbuf comm.c /^static char oldbuf[CMDSZ]; \/** for :!! command **\/$/;" v file: -oldpos bmore.c /^off_t bytepos, oldpos;$/;" v +mvaddch doscur.h /^#define mvaddch(/;" d +mvaddstr doscur.h /^#define mvaddstr(/;" d +mvgetch doscur.h /^#define mvgetch(/;" d +mvgetstr doscur.h /^#define mvgetstr(/;" d +mvinch dosio.c /^mvinch(int y, int x)$/;" f typeref:typename:int +mvinsch doscur.h /^#define mvinsch(/;" d +mvprintw doscur.h /^#define mvprintw(/;" d +mvscanw doscur.h /^#define mvscanw(/;" d +mvwaddch doscur.h /^#define mvwaddch(/;" d +mvwaddstr doscur.h /^#define mvwaddstr(/;" d +mvwgetch doscur.h /^#define mvwgetch(/;" d +mvwgetstr doscur.h /^#define mvwgetstr(/;" d +mvwprintw doscur.h /^#define mvwprintw(/;" d +mvwscanw doscur.h /^#define mvwscanw(/;" d +mymaxx bmore.c /^int mymaxx = 0, mymaxy = 0;$/;" v typeref:typename:int +mymaxy bmore.c /^int mymaxx = 0, mymaxy = 0;$/;" v typeref:typename:int +name bmore.c /^char *name = NULL;$/;" v typeref:typename:char * +name bvi.c /^char *name = NULL;$/;" v typeref:typename:char * +new_screen edit.c /^new_screen()$/;" f typeref:typename:void +newwin doscur.h /^#define newwin(/;" d +nextchar bmore.c /^nextchar()$/;" f typeref:typename:int +nl doscur.h /^#define nl(/;" d +no_intty bm_dos.c /^int no_intty, no_tty;$/;" v typeref:typename:int +no_intty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v typeref:typename:int +no_tty bm_dos.c /^int no_intty, no_tty;$/;" v typeref:typename:int +no_tty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v typeref:typename:int +noaddr comm.c /^char *noaddr = "No address allowed@on this command";$/;" v typeref:typename:char * +nobytes bvi.c /^char *nobytes = "No bytes@in the buffer";$/;" v typeref:typename:char * +nodelay doscur.h /^#define nodelay(/;" d +noecho doscur.h /^#define noecho(/;" d +nonl doscur.h /^#define nonl(/;" d +noprev re.c /^char *noprev = "No previous expression";$/;" v typeref:typename:char * +noraw doscur.h /^#define noraw(/;" d +normal bm_dos.c /^normal()$/;" f typeref:typename:void +normal bm_unix.c /^normal()$/;" f typeref:typename:void +notfound re.c /^char *notfound = "Fail|Pattern not found";$/;" v typeref:typename:char * +notimeout doscur.h /^#define notimeout(/;" d +noval comm.c /^char *noval = "No value@for binary operation";$/;" v typeref:typename:char * +nowrtmsg comm.c /^char *nowrtmsg = "No write@since last change (:%s! overrides)";$/;" v typeref:typename:char * +nstate bm_unix.c /^struct termios ostate, nstate;$/;" v typeref:struct:termios +numarr bmore.c /^char numarr[64]; \/* string for collecting number *\/$/;" v typeref:typename:char[64] +numarr bvi.c /^char numarr[MAXCMD+1]; \/* string for collecting number *\/$/;" v typeref:typename:char[] +numfiles bmore.c /^int numfiles; \/* number of input files *\/$/;" v typeref:typename:int +numfiles bvi.c /^int numfiles; \/* number of input files *\/$/;" v typeref:typename:int +nvalue set.h /^ off_t nvalue;$/;" m struct:param typeref:typename:off_t +off_t bmore.h /^# define off_t /;" d +off_t bvi.h /^# define off_t /;" d +oldbuf comm.c /^static char oldbuf[CMDSZ + 3]; \/** for :!! command **\/$/;" v typeref:typename:char[] file: +oldpos bmore.c /^off_t bytepos, oldpos;$/;" v typeref:typename:off_t open_file bmore.c /^open_file(name)$/;" f ostate bm_unix.c /^struct termios ostate, nstate;$/;" v typeref:struct:termios -out_len bmore.c /^int out_len;$/;" v +out_len bmore.c /^int out_len;$/;" v typeref:typename:int outmsg comm.c /^outmsg(s)$/;" f -pagepos bvi.c /^PTR pagepos;$/;" v +pagepos bvi.c /^PTR pagepos;$/;" v typeref:typename:PTR param set.h /^struct param {$/;" s -params set.c /^struct param params[] = {$/;" v typeref:struct:param +params set.c /^struct param params[] = {$/;" v typeref:struct:param[] patcpy re.c /^patcpy(s1, s2, delim)$/;" f -pattern re.c /^char pattern[MAXCMD + 1];$/;" v -poi recomp.c /^char *poi;$/;" v -precount bmore.c /^long precount = -1; \/* number preceding command *\/$/;" v -precount bvi.c /^long precount = -1;$/;" v +pattern re.c /^char pattern[MAXCMD + 1];$/;" v typeref:typename:char[] +poi recomp.c /^char *poi;$/;" v typeref:typename:char * +precount bmore.c /^long precount = -1; \/* number preceding command *\/$/;" v typeref:typename:long +precount bvi.c /^long precount = -1;$/;" v typeref:typename:long printline edit.c /^printline(mempos, scpos)$/;" f printout bmore.c /^printout(lns)$/;" f -printw doscur.h 103;" d -progname bmore.c /^static char progname[10];$/;" v file: -progname bvi.c /^static char progname[8];$/;" v file: -prompt bmore.c /^int prompt = 1;$/;" v +printw doscur.h /^#define printw /;" d +progname bmore.c /^static char progname[10];$/;" v typeref:typename:char[10] file: +progname bvi.c /^static char progname[8];$/;" v typeref:typename:char[8] file: +prompt bmore.c /^int prompt = 1;$/;" v typeref:typename:int pushback bmore.c /^pushback(n, where)$/;" f putchr bm_unix.c /^putchr(ch)$/;" f -putchr bm_unix.c /^putchr(char ch)$/;" f +putchr bm_unix.c /^putchr(char ch)$/;" f typeref:typename:int putline bmore.c /^putline(buf, num)$/;" f -quit edit.c /^quit()$/;" f -r_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v +quit edit.c /^quit()$/;" f typeref:typename:void +r_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v typeref:typename:int range bvi.c /^range(ch)$/;" f -raw doscur.h 138;" d +raw doscur.h /^#define raw(/;" d rdline bmore.c /^rdline(ch, sstring)$/;" f read_rc set.c /^read_rc(fn)$/;" f -refresh doscur.h 134;" d -rep_buf bvi.c /^char rep_buf[BUFFER];$/;" v -repaint edit.c /^repaint() \/***** redraw screen *********************\/$/;" f -repl_count comm.c /^int repl_count = -1;$/;" v -reset_tty bm_dos.c /^reset_tty ()$/;" f -reset_tty bm_unix.c /^reset_tty()$/;" f -resetty doscur.h 145;" d -rev_end bm_unix.c /^char *rev_start, *rev_end; \/* enter and exit standout mode *\/$/;" v -rev_start bm_unix.c /^char *rev_start, *rev_end; \/* enter and exit standout mode *\/$/;" v +read_to_end io.c /^read_to_end(int fd, void *buf, size_t count) {$/;" f typeref:typename:ssize_t file: +refresh doscur.h /^#define refresh(/;" d +rep_buf bvi.c /^char rep_buf[BUFFER];$/;" v typeref:typename:char[] +repaint edit.c /^repaint() \/***** redraw screen *********************\/$/;" f typeref:typename:void +repl_count comm.c /^int repl_count = -1;$/;" v typeref:typename:int +reset_tty bm_dos.c /^reset_tty ()$/;" f typeref:typename:void +reset_tty bm_unix.c /^reset_tty()$/;" f typeref:typename:void +resetty doscur.h /^#define resetty(/;" d +rev_end bm_unix.c /^char *rev_start, *rev_end; \/* enter and exit standout mode *\/$/;" v typeref:typename:char * +rev_start bm_unix.c /^char *rev_start, *rev_end; \/* enter and exit standout mode *\/$/;" v typeref:typename:char * rsearch re.c /^rsearch(start, end, smem)$/;" f -save dosio.c /^save(char *fname, PTR start, PTR end, int flags)$/;" f +save dosio.c /^save(char *fname, PTR start, PTR end, int flags)$/;" f typeref:typename:int save io.c /^save(fname, start, end, flags)$/;" f save_chk comm.c /^save_chk(fname, start, end, flags)$/;" f -savetty doscur.h 144;" d +savetty doscur.h /^#define savetty(/;" d sbracket bmore.c /^sbracket(start, scan, count)$/;" f sbracket re.c /^sbracket(start, scan, count)$/;" f file: -scanw doscur.h 124;" d +scanw doscur.h /^#define scanw /;" d scr dosio.c /^struct WINDOW scr;$/;" v typeref:struct:WINDOW -screen bvi.c /^int screen, status, statsize;$/;" v -screen_home bmore.c /^off_t screen_home, filesize;$/;" v +screen bvi.c /^int screen, status, statsize;$/;" v typeref:typename:int +screen_home bmore.c /^off_t screen_home, filesize;$/;" v typeref:typename:off_t scrolldown edit.c /^scrolldown(lns)$/;" f -scrollok doscur.h 142;" d +scrollok doscur.h /^#define scrollok(/;" d scrollup edit.c /^scrollup(lns)$/;" f -search_pat re.c /^char search_pat[BUFFER]; \/* \/ or ? command *\/$/;" v +search_pat re.c /^char search_pat[BUFFER]; \/* \/ or ? command *\/$/;" v typeref:typename:char[] searching re.c /^searching(ch, line, startpos, endpos, flag)$/;" f -set_tty bm_dos.c /^set_tty ()$/;" f -set_tty bm_unix.c /^set_tty()$/;" f -setcur edit.c /^setcur()$/;" f +set_tty bm_dos.c /^set_tty ()$/;" f typeref:typename:void +set_tty bm_unix.c /^set_tty()$/;" f typeref:typename:void +setcur edit.c /^setcur()$/;" f typeref:typename:void setpage edit.c /^setpage(addr)$/;" f -shell bvi.c /^char *shell;$/;" v -shortname set.h /^ char *shortname; \/* permissible abbreviation *\/$/;" m struct:param +shell bvi.c /^char *shell;$/;" v typeref:typename:char * +shortname set.h /^ char *shortname; \/* permissible abbreviation *\/$/;" m struct:param typeref:typename:char * showparms set.c /^showparms(all)$/;" f -sig bm_dos.c /^sig()$/;" f +sig bm_dos.c /^sig()$/;" f typeref:typename:void sig bm_unix.c /^sig(sig)$/;" f -size bvi.c /^off_t size;$/;" v -slow_tty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v -smode bmore.c /^static int smode;$/;" v file: -smode recomp.c /^int smode;$/;" v +size bvi.c /^off_t size;$/;" v typeref:typename:off_t +slow_tty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v typeref:typename:int +smode bmore.c /^static int smode;$/;" v typeref:typename:int file: +smode recomp.c /^int smode;$/;" v typeref:typename:int smsg comm.c /^smsg(s)$/;" f -spos bvi.c /^PTR spos;$/;" v -sstring bmore.c /^char sstring[MAXCMD] = ""; \/* string for search *\/$/;" v -standend doscur.h 89;" d -standout doscur.h 88;" d -start_addr comm.c /^PTR start_addr;$/;" v -statpos edit.c /^statpos()$/;" f -statsize bvi.c /^int screen, status, statsize;$/;" v -status bvi.c /^int screen, status, statsize;$/;" v -stdscr dosio.c /^int stdscr = 0;$/;" v -strcasecmp bmore.h 109;" d -strcasecmp bvi.h 125;" d +spos bvi.c /^PTR spos;$/;" v typeref:typename:PTR +sstring bmore.c /^char sstring[MAXCMD] = ""; \/* string for search *\/$/;" v typeref:typename:char[] +standend doscur.h /^#define standend(/;" d +standout doscur.h /^#define standout(/;" d +start_addr comm.c /^PTR start_addr;$/;" v typeref:typename:PTR +statpos edit.c /^statpos()$/;" f typeref:typename:void +statsize bvi.c /^int screen, status, statsize;$/;" v typeref:typename:int +status bvi.c /^int screen, status, statsize;$/;" v typeref:typename:int +stdscr dosio.c /^int stdscr = 0;$/;" v typeref:typename:int +strcasecmp bmore.h /^# define strcasecmp /;" d +strcasecmp bvi.h /^# define strcasecmp /;" d strdup io.c /^strdup(s)$/;" f -string bmore.c /^char string[MAXCMD];$/;" v -string bvi.c /^char string[MAXCMD+1];$/;" v -strncasecmp bmore.h 108;" d -strncasecmp bvi.h 124;" d -stty bm_unix.c 34;" d file: +string bmore.c /^char string[MAXCMD];$/;" v typeref:typename:char[] +string bvi.c /^char string[MAXCMD+1];$/;" v typeref:typename:char[] +strncasecmp bmore.h /^# define strncasecmp /;" d +strncasecmp bvi.h /^# define strncasecmp /;" d +stty bm_unix.c /^#define stty(/;" d file: stuffin edit.c /^stuffin(s)$/;" f -svalue set.h /^ char *svalue;$/;" m struct:param +svalue set.h /^ char *svalue;$/;" m struct:param typeref:typename:char * sysemsg comm.c /^sysemsg(s)$/;" f -terminal dosio.c /^char *terminal = "ansi";$/;" v -terminal io.c /^char *terminal;$/;" v -tmpbuf edit.c /^char tmpbuf[10];$/;" v -to_print bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v -toggle edit.c /^toggle()$/;" f -trunc_cur bvi.c /^trunc_cur()$/;" f -undo_buf bvi.c /^char *undo_buf = NULL;$/;" v -undo_count bvi.c /^off_t undo_count;$/;" v -undo_start bvi.c /^PTR undo_start;$/;" v -undosize bvi.c /^off_t filesize, memsize, undosize;$/;" v -usage bmore.c /^usage()$/;" f -usage bvi.c /^usage()$/;" f -vgetc bm_dos.c /^vgetc()$/;" f -vgetc bm_unix.c /^vgetc()$/;" f -vgetc edit.c /^vgetc()$/;" f -waddch doscur.h 94;" d -waddstr doscur.h 98;" d +terminal dosio.c /^char *terminal = "ansi";$/;" v typeref:typename:char * +terminal io.c /^char *terminal;$/;" v typeref:typename:char * +tmpbuf edit.c /^char tmpbuf[10];$/;" v typeref:typename:char[10] +to_print bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v typeref:typename:int +toggle edit.c /^toggle()$/;" f typeref:typename:void +trunc_cur bvi.c /^trunc_cur()$/;" f typeref:typename:void +undo_buf bvi.c /^char *undo_buf = NULL;$/;" v typeref:typename:char * +undo_count bvi.c /^off_t undo_count;$/;" v typeref:typename:off_t +undo_start bvi.c /^PTR undo_start;$/;" v typeref:typename:PTR +undosize bvi.c /^off_t filesize, memsize, undosize;$/;" v typeref:typename:off_t +usage bmore.c /^usage()$/;" f typeref:typename:void +usage bvi.c /^usage()$/;" f typeref:typename:void +vgetc bm_dos.c /^vgetc()$/;" f typeref:typename:int +vgetc bm_unix.c /^vgetc()$/;" f typeref:typename:int +vgetc edit.c /^vgetc()$/;" f typeref:typename:int +waddch doscur.h /^#define waddch(/;" d +waddstr doscur.h /^#define waddstr(/;" d wait_return comm.c /^wait_return(flag)$/;" f -wclear doscur.h 82;" d -wclrtoeol doscur.h 78;" d -wdeleteln doscur.h 109;" d -werase doscur.h 80;" d -wgetch doscur.h 113;" d -wgetstr doscur.h 116;" d -winsertln doscur.h 107;" d -wmove doscur.h 90;" d +wclear doscur.h /^#define wclear(/;" d +wclrtoeol doscur.h /^#define wclrtoeol(/;" d +wdeleteln doscur.h /^#define wdeleteln(/;" d +werase doscur.h /^#define werase(/;" d +wgetch doscur.h /^#define wgetch(/;" d +wgetstr doscur.h /^#define wgetstr(/;" d +winsertln doscur.h /^#define winsertln(/;" d +wmove doscur.h /^#define wmove(/;" d wordsearch re.c /^wordsearch(start, mode)$/;" f -wprintw doscur.h 102;" d -wrefresh doscur.h 135;" d -wrstat bvi.c /^static int wrstat = 1;$/;" v file: -wscanw doscur.h 123;" d -x bvi.c /^int maxx, maxy, x, xx, y;$/;" v -xpos edit.c /^xpos()$/;" f -xx bvi.c /^int maxx, maxy, x, xx, y;$/;" v -y bvi.c /^int maxx, maxy, x, xx, y;$/;" v -yank_buf bvi.c /^char *yank_buf = NULL;$/;" v -yanked bvi.c /^off_t yanked = 0L;$/;" v -yd_addr comm.c /^yd_addr()$/;" f +wprintw doscur.h /^#define wprintw(/;" d +wrefresh doscur.h /^#define wrefresh(/;" d +wrstat bvi.c /^static int wrstat = 1;$/;" v typeref:typename:int file: +wscanw doscur.h /^#define wscanw(/;" d +x bvi.c /^int maxx, maxy, x, xx, y;$/;" v typeref:typename:int +xpos edit.c /^xpos()$/;" f typeref:typename:int +xx bvi.c /^int maxx, maxy, x, xx, y;$/;" v typeref:typename:int +y bvi.c /^int maxx, maxy, x, xx, y;$/;" v typeref:typename:int +yank_buf bvi.c /^char *yank_buf = NULL;$/;" v typeref:typename:char * +yanked bvi.c /^off_t yanked = 0L;$/;" v typeref:typename:off_t +yd_addr comm.c /^yd_addr()$/;" f typeref:typename:off_t diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..23e1062 --- /dev/null +++ b/test.txt @@ -0,0 +1,209 @@ +AAAAAAAAAAAAAAAAAAAAAAA +BBBBBBBBBBBBBBBBBBBBBBB +CCCCCCCCCCCCCCCCCCCCCCC +DDDDDDDDDDDDDDDDDDDDDDD +EEEEEEEEEEEEEEEEEEEEEEE +FFFFFFFFFFFFFFFFFFFFFFF +GGGGGGGGGGGGGGGGGGGGGGG +HHHHHHHHHHHHHHHHHHHHHHH +IIIIIIIIIIIIIIIIIIIIIII +JJJJJJJJJJJJJJJJJJJJJJJ +KKKKKKKKKKKKKKKKKKKKKKK +LLLLLLLLLLLLLLLLLLLLLLL +MMMMMMMMMMMMMMMMMMMMMMM +NNNNNNNNNNNNNNNNNNNNNNN +OOOOOOOOOOOOOOOOOOOOOOO +PPPPPPPPPPPPPPPPPPPPPPP +QQQQQQQQQQQQQQQQQQQQQQQ +RRRRRRRRRRRRRRRRRRRRRRR +SSSSSSSSSSSSSSSSSSSSSSS +TTTTTTTTTTTTTTTTTTTTTTT +UUUUUUUUUUUUUUUUUUUUUUU +VVVVVVVVVVVVVVVVVVVVVVV +WWWWWWWWWWWWWWWWWWWWWWW +XXXXXXXXXXXXXXXXXXXXXXX +YYYYYYYYYYYYYYYYYYYYYYY +ZZZZZZZZZZZZZZZZZZZZZZZ +aaaaaaaaaaaaaaaaaaaaaaa +bbbbbbbbbbbbbbbbbbbbbbb +ccccccccccccccccccccccc +ddddddddddddddddddddddd +eeeeeeeeeeeeeeeeeeeeeee +fffffffffffffffffffffff +ggggggggggggggggggggggg +hhhhhhhhhhhhhhhhhhhhhhh +iiiiiiiiiiiiiiiiiiiiiii +jjjjjjjjjjjjjjjjjjjjjjj +kkkkkkkkkkkkkkkkkkkkkkk +lllllllllllllllllllllll +mmmmmmmmmmmmmmmmmmmmmmm +nnnnnnnnnnnnnnnnnnnnnnn +ooooooooooooooooooooooo +ppppppppppppppppppppppp +qqqqqqqqqqqqqqqqqqqqqqq +rrrrrrrrrrrrrrrrrrrrrrr +sssssssssssssssssssssss +ttttttttttttttttttttttt +uuuuuuuuuuuuuuuuuuuuuuu +vvvvvvvvvvvvvvvvvvvvvvv +wwwwwwwwwwwwwwwwwwwwwww +xxxxxxxxxxxxxxxxxxxxxxx +AAAAAAAAAAAAAAAAAAAAAAA +BBBBBBBBBBBBBBBBBBBBBBB +CCCCCCCCCCCCCCCCCCCCCCC +DDDDDDDDDDDDDDDDDDDDDDD +EEEEEEEEEEEEEEEEEEEEEEE +FFFFFFFFFFFFFFFFFFFFFFF +GGGGGGGGGGGGGGGGGGGGGGG +HHHHHHHHHHHHHHHHHHHHHHH +IIIIIIIIIIIIIIIIIIIIIII +JJJJJJJJJJJJJJJJJJJJJJJ +KKKKKKKKKKKKKKKKKKKKKKK +LLLLLLLLLLLLLLLLLLLLLLL +MMMMMMMMMMMMMMMMMMMMMMM +NNNNNNNNNNNNNNNNNNNNNNN +OOOOOOOOOOOOOOOOOOOOOOO +PPPPPPPPPPPPPPPPPPPPPPP +QQQQQQQQQQQQQQQQQQQQQQQ +RRRRRRRRRRRRRRRRRRRRRRR +SSSSSSSSSSSSSSSSSSSSSSS +TTTTTTTTTTTTTTTTTTTTTTT +UUUUUUUUUUUUUUUUUUUUUUU +VVVVVVVVVVVVVVVVVVVVVVV +WWWWWWWWWWWWWWWWWWWWWWW +XXXXXXXXXXXXXXXXXXXXXXX +YYYYYYYYYYYYYYYYYYYYYYY +ZZZZZZZZZZZZZZZZZZZZZZZ +aaaaaaaaaaaaaaaaaaaaaaa +bbbbbbbbbbbbbbbbbbbbbbb +ccccccccccccccccccccccc +ddddddddddddddddddddddd +eeeeeeeeeeeeeeeeeeeeeee +fffffffffffffffffffffff +ggggggggggggggggggggggg +hhhhhhhhhhhhhhhhhhhhhhh +iiiiiiiiiiiiiiiiiiiiiii +jjjjjjjjjjjjjjjjjjjjjjj +kkkkkkkkkkkkkkkkkkkkkkk +lllllllllllllllllllllll +mmmmmmmmmmmmmmmmmmmmmmm +nnnnnnnnnnnnnnnnnnnnnnn +ooooooooooooooooooooooo +ppppppppppppppppppppppp +qqqqqqqqqqqqqqqqqqqqqqq +rrrrrrrrrrrrrrrrrrrrrrr +sssssssssssssssssssssss +ttttttttttttttttttttttt +uuuuuuuuuuuuuuuuuuuuuuu +vvvvvvvvvvvvvvvvvvvvvvv +wwwwwwwwwwwwwwwwwwwwwww +xxxxxxxxxxxxxxxxxxxxxxx +yyyyyyyyyyyyyyyyyyyyyyy +zzzzzzzzzzzzzzzzzzzzzzz +yyyyyyyyyyyyyyyyyyyyyyy +AAAAAAAAAAAAAAAAAAAAAAA +BBBBBBBBBBBBBBBBBBBBBBB +CCCCCCCCCCCCCCCCCCCCCCC +DDDDDDDDDDDDDDDDDDDDDDD +EEEEEEEEEEEEEEEEEEEEEEE +FFFFFFFFFFFFFFFFFFFFFFF +GGGGGGGGGGGGGGGGGGGGGGG +HHHHHHHHHHHHHHHHHHHHHHH +IIIIIIIIIIIIIIIIIIIIIII +JJJJJJJJJJJJJJJJJJJJJJJ +KKKKKKKKKKKKKKKKKKKKKKK +LLLLLLLLLLLLLLLLLLLLLLL +MMMMMMMMMMMMMMMMMMMMMMM +NNNNNNNNNNNNNNNNNNNNNNN +OOOOOOOOOOOOOOOOOOOOOOO +PPPPPPPPPPPPPPPPPPPPPPP +QQQQQQQQQQQQQQQQQQQQQQQ +RRRRRRRRRRRRRRRRRRRRRRR +SSSSSSSSSSSSSSSSSSSSSSS +TTTTTTTTTTTTTTTTTTTTTTT +UUUUUUUUUUUUUUUUUUUUUUU +VVVVVVVVVVVVVVVVVVVVVVV +WWWWWWWWWWWWWWWWWWWWWWW +XXXXXXXXXXXXXXXXXXXXXXX +YYYYYYYYYYYYYYYYYYYYYYY +ZZZZZZZZZZZZZZZZZZZZZZZ +aaaaaaaaaaaaaaaaaaaaaaa +bbbbbbbbbbbbbbbbbbbbbbb +ccccccccccccccccccccccc +ddddddddddddddddddddddd +eeeeeeeeeeeeeeeeeeeeeee +fffffffffffffffffffffff +ggggggggggggggggggggggg +hhhhhhhhhhhhhhhhhhhhhhh +iiiiiiiiiiiiiiiiiiiiiii +jjjjjjjjjjjjjjjjjjjjjjj +kkkkkkkkkkkkkkkkkkkkkkk +lllllllllllllllllllllll +mmmmmmmmmmmmmmmmmmmmmmm +nnnnnnnnnnnnnnnnnnnnnnn +ooooooooooooooooooooooo +ppppppppppppppppppppppp +qqqqqqqqqqqqqqqqqqqqqqq +rrrrrrrrrrrrrrrrrrrrrrr +sssssssssssssssssssssss +ttttttttttttttttttttttt +uuuuuuuuuuuuuuuuuuuuuuu +vvvvvvvvvvvvvvvvvvvvvvv +wwwwwwwwwwwwwwwwwwwwwww +xxxxxxxxxxxxxxxxxxxxxxx +yyyyyyyyyyyyyyyyyyyyyyy +zzzzzzzzzzzzzzzzzzzzzzz +zzzzzzzzzzzzzzzzzzzzzzz +AAAAAAAAAAAAAAAAAAAAAAA +BBBBBBBBBBBBBBBBBBBBBBB +CCCCCCCCCCCCCCCCCCCCCCC +DDDDDDDDDDDDDDDDDDDDDDD +EEEEEEEEEEEEEEEEEEEEEEE +FFFFFFFFFFFFFFFFFFFFFFF +GGGGGGGGGGGGGGGGGGGGGGG +HHHHHHHHHHHHHHHHHHHHHHH +IIIIIIIIIIIIIIIIIIIIIII +JJJJJJJJJJJJJJJJJJJJJJJ +KKKKKKKKKKKKKKKKKKKKKKK +LLLLLLLLLLLLLLLLLLLLLLL +MMMMMMMMMMMMMMMMMMMMMMM +NNNNNNNNNNNNNNNNNNNNNNN +OOOOOOOOOOOOOOOOOOOOOOO +PPPPPPPPPPPPPPPPPPPPPPP +QQQQQQQQQQQQQQQQQQQQQQQ +RRRRRRRRRRRRRRRRRRRRRRR +SSSSSSSSSSSSSSSSSSSSSSS +TTTTTTTTTTTTTTTTTTTTTTT +UUUUUUUUUUUUUUUUUUUUUUU +VVVVVVVVVVVVVVVVVVVVVVV +WWWWWWWWWWWWWWWWWWWWWWW +XXXXXXXXXXXXXXXXXXXXXXX +YYYYYYYYYYYYYYYYYYYYYYY +ZZZZZZZZZZZZZZZZZZZZZZZ +aaaaaaaaaaaaaaaaaaaaaaa +bbbbbbbbbbbbbbbbbbbbbbb +ccccccccccccccccccccccc +ddddddddddddddddddddddd +eeeeeeeeeeeeeeeeeeeeeee +fffffffffffffffffffffff +ggggggggggggggggggggggg +hhhhhhhhhhhhhhhhhhhhhhh +iiiiiiiiiiiiiiiiiiiiiii +jjjjjjjjjjjjjjjjjjjjjjj +kkkkkkkkkkkkkkkkkkkkkkk +lllllllllllllllllllllll +mmmmmmmmmmmmmmmmmmmmmmm +nnnnnnnnnnnnnnnnnnnnnnn +ooooooooooooooooooooooo +ppppppppppppppppppppppp +qqqqqqqqqqqqqqqqqqqqqqq +rrrrrrrrrrrrrrrrrrrrrrr +sssssssssssssssssssssss +ttttttttttttttttttttttt +uuuuuuuuuuuuuuuuuuuuuuu +vvvvvvvvvvvvvvvvvvvvvvv +wwwwwwwwwwwwwwwwwwwwwww +xxxxxxxxxxxxxxxxxxxxxxx +yyyyyyyyyyyyyyyyyyyyyyy +zzzzzzzzzzzzzzzzzzzzzzz + diff --git a/tmp b/tmp deleted file mode 100644 index 4083215..0000000 --- a/tmp +++ /dev/null @@ -1,15 +0,0 @@ - if ((ch > 31) && (ch < 127)) { - PRINTF("%c", ch); - } else { - if (r_flag) { - if ((ch & 128) && ((ch > 159) && (ch < 255))) { - if (!no_tty) highlight(); - PRINTF("%c", ch & 127); - if (!no_tty) normal(); - } else { - PRINTF("."); - } - } else { - PRINTF("."); - } - } From 50898d8d59b8381a569bfffbc15fda312ce8e25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20B=C3=BCrgmann?= Date: Sun, 27 Jul 2025 10:02:07 -0400 Subject: [PATCH 6/6] bvi-1.5.0.src.tar.gz 6540716a1a3b2b9711635108da14b26baea488881d4a682121c0bddbba6b74cb bvi-1.5.0.src.tar.gz Signed-off-by: Vincent Batts --- CHANGES | 23 +- CREDITS | 6 +- Makefile.in | 2 +- README | 14 +- acconfig.h | 2 +- bm_dos.c | 2 +- bm_unix.c | 23 +- bmore.1 | 6 +- bmore.c | 80 ++-- bmore.h | 22 +- bvi.1 | 77 ++-- bvi.c | 156 ++++---- bvi.h | 165 ++++---- comm.c | 94 ++--- config.guess | 71 +++- config.h.in | 2 +- config.sub | 935 +++++++++++++++++++++++++++++++----------- configure.ac | 40 +- dosio.c | 66 +-- edit.c | 177 ++++---- io.c | 41 +- macro.m4 | 84 ++-- patchlevel.h | 2 +- re.c | 74 ++-- recomp.c | 13 +- set.c | 134 ++++--- set.h | 7 +- tags | 1091 +++++++++++++++++++++++++------------------------- 28 files changed, 1936 insertions(+), 1473 deletions(-) diff --git a/CHANGES b/CHANGES index f68748e..dd63b0c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,20 @@ +New in release 1.5.0 +==================== + +* Terminal window resizeable +* fix build fails with gcc-15/C23 +* fix statusline for small windows +* various issues caught by lintian solved +* fix old-style-definition warnings +* Minor fixes + + New in release 1.4.2 ==================== This release is dedicated to Sven Guckes (*1967-04-06 +2022-02-20). -Sven was an enthusiastic Linux explainer, his particular passion was the console tools. +Sven was an enthusiastic Linux explainer, his particular passion was the console tools. I met Sven a couple of times. He always showed interest in the further development of -the bvi and liked to discuss new ideas. +the bvi and liked to discuss new ideas. R.I.P. Sven * :wq bug fixed @@ -29,7 +40,7 @@ New in release 1.4.1rc * Compile warning: implicit declaration of function ‘save_chk’ fixed (SF bug #9) * bmore seg fault on file not found fixed * set columns prevents filename display on the commandline fixed (SF bug #8) -* bmore new option -r +* bmore new option -r bvi new setting: set reverse Characters between 160 - 254 are displayed as "reverse video text" as used in some legacy systems (Atari, Commodore, Apple II, etc). @@ -128,9 +139,9 @@ New in release 1.3.0 * Reading of Block Special Files * New Command line options: +cmd - -b begin \ - -e end > for partial file read - -s size / + -b begin \ + -e end > for partial file read + -s size / * :e# bug fixed * Debian bug #68436 (Buffer overflow in io.c) fixed diff --git a/CREDITS b/CREDITS index da1582b..cf930a1 100644 --- a/CREDITS +++ b/CREDITS @@ -1,7 +1,7 @@ Patches: -Guido sys_errlist -Christian "naddy" Weisgerber {Free,Open}BSD -Gunnar Larisch ^ZZ bug +Etienne Mollier gcc-15/C23 issues +Matthias Klose GCC-15 issues +Vincent Batts nit cleanup Peter J. Holzer setlocale Albert Chin-A-Young Makefile.in Ralf AIX fixes diff --git a/Makefile.in b/Makefile.in index 5f67d29..81a596e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -8,7 +8,7 @@ # # Copyright (c) 1996-2022 by Gerhard Buergmann # gerhard@puon.at -# +# # 1996-01-18 V 1.0.0 # 1999-01-15 V 1.1.0 # 1999-03-03 V 1.1.1 diff --git a/README b/README index 4a63d35..c6c2e2c 100644 --- a/README +++ b/README @@ -9,12 +9,12 @@ and is distributed under the GPL (GNU Public License). How to compile ============== - You need the curses (ncurses) library for cursor movement on your system. + You need the curses (ncurses) library for cursor movement on your system. https://www.cyberciti.biz/faq/linux-install-ncurses-library-headers-on-debian-ubuntu-centos-fedora/ - gunzip -c bvi-1.4.2.src.tar.gz | tar xvf - - cd bvi-1.4.2 + gunzip -c bvi-1.5.0.src.tar.gz | tar xvf - + cd bvi-1.5.0 ./configure make make install @@ -32,14 +32,6 @@ To avoid this behaviour use: stty dsusp undef ---------------------------------------------------------------------------- -Subscribe to the bvi mailing for support, updates and other news: - - Send a blank email to bvi-subscribe@yahoogroups.com. You will receive a - subscription confirmation message. Simply reply this message and your - subscription will be complete. - - --------------------------------------------------------------------------- PLEASE send any bug reports (and fixes), code for new features, comments, questions, etc. (even flames) to: diff --git a/acconfig.h b/acconfig.h index 7589674..2eaf7ce 100644 --- a/acconfig.h +++ b/acconfig.h @@ -10,4 +10,4 @@ #undef NEED_PUTC_CHAR -#undef HAVE_NCURSES_TERM_H +#undef HAVE_NCURSES_TERM_H diff --git a/bm_dos.c b/bm_dos.c index 29ccf8c..ba2ed25 100644 --- a/bm_dos.c +++ b/bm_dos.c @@ -126,7 +126,7 @@ cleartoeol() int vgetc() { - return ((char)bioskey(0)); + return ((char)bioskey(0)); } diff --git a/bm_unix.c b/bm_unix.c index dd5c92f..4ae043f 100644 --- a/bm_unix.c +++ b/bm_unix.c @@ -7,10 +7,11 @@ * 2010-06-02 V 1.3.4 * 2013-08-22 V 1.4.0 * 2019-10-09 V 1.4.1 + * 2025-07-19 V 1.5.0 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2019 by Gerhard Buergmann + * Copyright 1996-2025 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -64,8 +65,7 @@ putchr(char ch) #else int -putchr(ch) - int ch; +putchr(int ch) {return putchar(ch);} #endif @@ -116,7 +116,7 @@ initterm() no_intty = tcgetattr(fileno(stdin), &ostate); tcgetattr(fileno(stderr), &ostate); - + nstate = ostate; if (!no_tty) { ostate.c_lflag &= ~(ICANON|ECHO); @@ -143,8 +143,7 @@ reset_tty() void -sig(sig) - int sig; +sig(int sig) { reset_tty(); printf("\r\n"); @@ -156,12 +155,15 @@ sig(sig) * doshell() - run a command or an interactive shell */ void -doshell(cmd) - char *cmd; +doshell(char *cmd) { int ret; #ifndef DJGPP +#ifdef __STDC__ + char *getenv(const char *); +#else char *getenv(); +#endif char *shell; char cline[128]; #endif @@ -277,10 +279,7 @@ vgetc() * Copy contents of memory (with possible overlapping). */ char * -memmove(s1, s2, n) - char *s1; - char *s2; - size_t n; +memmove(char *s1, char *s2, size_t n) { bcopy(s2, s1, n); return(s1); diff --git a/bmore.1 b/bmore.1 index fb82611..89ac7fe 100644 --- a/bmore.1 +++ b/bmore.1 @@ -1,4 +1,4 @@ -.TH BMORE 1 "8 Feb 2022" +.TH BMORE 1 "24 May 2025" .SH NAME bmore \- browse through a binary file .SH SYNOPSIS @@ -77,7 +77,7 @@ except that a header is printed before each file in a series. .SH OPTIONS .TP .B \-a -ASCII mode: no hex representation of the contents. Non printable +ASCII mode: no hex representation of the contents. Non printable characters are displayed as a dot (.) .TP .B \-c @@ -232,7 +232,7 @@ in the file remains unchanged. Regular expressions can be edited using erase and kill characters. Erasing back past the first column cancels the search command. .TP -.B \' +.B ' Single quote. Go to the point from which the last search started. If no search has been performed in the current file, go to the beginning of the file. diff --git a/bmore.c b/bmore.c index fa6b809..49231b8 100644 --- a/bmore.c +++ b/bmore.c @@ -9,8 +9,9 @@ * 2013-08-23 V 1.4.0 * 2019-01-22 V 1.4.1 * 2023-03-06 V 1.4.2 + * 2025-07-19 V 1.5.0 * - * Copyright 1990-2023 by Gerhard Buergmann + * Copyright 1990-2025 by Gerhard Buergmann * gerhard@puon.at * * NOTE: Edit this file with tabstop=4 ! @@ -113,9 +114,7 @@ usage() int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ch, ch1; int colon = 0, last_ch = 0; @@ -141,7 +140,7 @@ main(argc, argv) #endif poi = strrchr(argv[0], DELIM); - + if (poi) strncpy(progname, ++poi, 9); else strncpy(progname, argv[0], 9); strtok(progname, "."); @@ -177,7 +176,7 @@ main(argc, argv) break; case 'r': r_flag++; break; - default: + default: usage(); } i++; @@ -340,7 +339,7 @@ main(argc, argv) fclose(curr_file); reset_tty(); exit(exval); - case ':' : + case ':' : switch (colon) { case 'f': prompt = 0; @@ -449,7 +448,7 @@ main(argc, argv) bytepos = screen_home; to_print = maxy; break; - case '\\': + case '\\': if (ascii_flag) { bmbeep(); break; @@ -460,13 +459,13 @@ main(argc, argv) if (rdline(ch, sstring)) break; } case 'n': /**** Search Next ****/ - case 'N': + case 'N': bmsearch(ch); /* to_print--; */ break; - case '\'': + case '\'': if (no_intty) { bmbeep(); } else { @@ -493,7 +492,7 @@ main(argc, argv) break; } while ((ch1 = getc(help_file)) != EOF) - putchar(ch1); + putchar(ch1); fclose(help_file); to_print = 0; break; @@ -502,13 +501,13 @@ main(argc, argv) if (!no_intty) { cleartoeol(); if (ch == 'v') { - sprintf(string, "bvi +%lu %s", - (unsigned long)(screen_home + + sprintf(string, "bvi +%lu %s", + (unsigned long)(screen_home + (maxy + 1) / 2 * out_len), name); } else { if (precount < 1) precount = bytepos - screen_home; sprintf(string, "bvi -b %lu -s %lu %s", - (unsigned long)screen_home, + (unsigned long)screen_home, (unsigned long)precount, name); } doshell(string); @@ -533,9 +532,7 @@ main(argc, argv) int -rdline(ch, sstring) - int ch; - char *sstring; +rdline(int ch, char *sstring) { int i = 0; int ch1 = 0; @@ -587,8 +584,7 @@ rdline(ch, sstring) void -do_next(n) - int n; +do_next(int n) { if (numfiles) { if (n == 1 && file_nr == numfiles) { @@ -614,8 +610,7 @@ do_next(n) int -open_file(name) - char *name; +open_file(char *name) { struct stat buf; @@ -636,9 +631,7 @@ open_file(name) void -putline(buf, num) - char *buf; - int num; +putline(char *buf, int num) { int print_pos; unsigned char ch; @@ -649,31 +642,31 @@ putline(buf, num) if (!ascii_flag) { for (print_pos = 0; print_pos < num; print_pos++) { ch = buf[print_pos]; - PRINTF("%02X ", ch); + PRINTF("%02X ", ch); } for (; print_pos < out_len; print_pos++) { - PRINTF(" "); + PRINTF(" "); } PRINTF(" "); } - + // ASCII section for (print_pos = 0; print_pos < num; print_pos++) { ++bytepos; ch = buf[print_pos]; if ((ch > 31) && (ch < 127)) { - PRINTF("%c", ch); + PRINTF("%c", ch); } else { if (r_flag) { if ((ch & 128) && ((ch > 159) && (ch < 255))) { if (!no_tty) highlight(); - PRINTF("%c", ch & 127); + PRINTF("%c", ch & 127); if (!no_tty) normal(); } else { - PRINTF("."); + PRINTF("."); } } else { - PRINTF("."); + PRINTF("."); } } } @@ -689,13 +682,12 @@ putline(buf, num) int -printout(lns) - int lns; +printout(int lns) { int c, num; int doub = 0; static int flag; - + if (c_flag) { clearscreen(); } @@ -755,9 +747,7 @@ nextchar() void -pushback(n, where) - int n; - char *where; +pushback(int n, char *where) { if (cnt) memmove(cmdbuf + n, cmdbuf, n); memcpy(cmdbuf, where, n); @@ -774,8 +764,7 @@ pushback(n, where) * 1 found */ int -bmregexec(scan) - char *scan; +bmregexec(char *scan) { char *act; int count, test; @@ -869,7 +858,7 @@ bmregexec(scan) pushback(1, --act); l--; } - } else { /* ".*" */ + } else { /* ".*" */ do { if ((test = nextchar()) == -1) return -5; *act++ = test; @@ -893,10 +882,7 @@ bmregexec(scan) int -sbracket(start, scan, count) - int start; - char *scan; - int count; +sbracket(int start, char *scan, int count) { if (*scan++ == '^') { if (!memchr(scan, start, --count)) return 0; @@ -908,8 +894,7 @@ sbracket(start, scan, count) void -bmsearch(ch) - int ch; +bmsearch(int ch) { int i; @@ -961,8 +946,7 @@ emsg(string); void -emsg(s) - char *s; +emsg(char *s) { putchar('\r'); cleartoeol(); diff --git a/bmore.h b/bmore.h index 2ebd4bf..e33439a 100644 --- a/bmore.h +++ b/bmore.h @@ -7,7 +7,7 @@ * 1999-08-21 V 1.2.0 final * 2000-05-31 V 1.3.0 beta * 2000-10-04 V 1.3.0 final - * 2002-01-16 V 1.3.1 + * 2002-01-16 V 1.3.1 * 2003-02-20 V 1.3.2 * 2010-03-28 V 1.3.4 * 2019-01-22 V 1.4.1 @@ -43,7 +43,7 @@ #if defined(__MSDOS__) && !defined(DJGPP) # include "patchlev.h" # include "dosconf.h" -# include +# include # include # include #else @@ -51,21 +51,21 @@ # include "config.h" # include # if defined HAVE_NCURSESW_CURSES_H -# include -# include +# include +# include # elif defined HAVE_NCURSESW_H -# include +# include # elif defined HAVE_NCURSES_CURSES_H -# include +# include # elif defined HAVE_NCURSES_H -# include +# include # elif defined HAVE_CURSES_H -# include +# include # else -# error "SysV or X/Open-compatible Curses header file required" +# error "SysV or X/Open-compatible Curses header file required" # endif # if HAVE_TERM_H -# include +# include # endif #endif @@ -136,7 +136,7 @@ extern int no_tty, no_intty; -#ifdef ANSI +#if defined(ANSI) || defined(__STDC__) void initterm(void), set_tty(void), reset_tty(void); void cleartoeol(void), clearscreen(void), highlight(void); void normal(void), bmbeep(void), home(void), sig(int); diff --git a/bvi.1 b/bvi.1 index 3c3b00f..3ac9cce 100644 --- a/bvi.1 +++ b/bvi.1 @@ -1,8 +1,8 @@ .rn '' }` -''' $RCSfile$$Revision$$Date$ -''' -''' $Log$ -''' +.\" $RCSfile$$Revision$$Date$ +.\" +.\" $Log$ +.\" .de Sh .br .if t .Sp @@ -31,12 +31,12 @@ .fi .. -''' -''' -''' Set up \*(-- to give an unbreakable dash; -''' string Tr holds user defined translation string. -''' Bell System Logo is used as a dummy character. -''' +.\" +.\" +.\" Set up \*(-- to give an unbreakable dash; +.\" string Tr holds user defined translation string. +.\" Bell System Logo is used as a dummy character. +.\" .tr \(*W-|\(bv\*(Tr .ie n \{\ .ds -- \(*W- @@ -45,10 +45,10 @@ .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch .ds L" "" .ds R" "" -''' \*(M", \*(S", \*(N" and \*(T" are the equivalent of -''' \*(L" and \*(R", except that they are used on ".xx" lines, -''' such as .IP and .SH, which do another additional levels of -''' double-quote interpretation +.\" \*(M", \*(S", \*(N" and \*(T" are the equivalent of +.\" \*(L" and \*(R", except that they are used on ".xx" lines, +.\" such as .IP and .SH, which do another additional levels of +.\" double-quote interpretation .ds M" """ .ds S" """ .ds N" """"" @@ -79,9 +79,9 @@ 'br\} .\" If the F register is turned on, we'll generate .\" index entries out stderr for the following things: -.\" TH Title +.\" TH Title .\" SH Header -.\" Sh Subsection +.\" Sh Subsection .\" Ip Item .\" X<> Xref (embedded .\" Of course, you have to process the output yourself @@ -93,7 +93,7 @@ .nr % 0 .rr F .\} -.TH BVI 1 "BVI Version 1.4.2" "8/Feb/2022" "User Commands" +.TH BVI 1 "BVI Version 1.5.0" "31/May/2025" "User Commands" .IX Title "BVI 1" .UC .IX Name "bvi, bview - visual display editor for binary files" @@ -194,7 +194,7 @@ bvi, bview \- visual editor for binary files .SH "VERSION" .IX Header "VERSION" -bvi-1.4.1 +bvi-1.5.0 .SH "SYNOPSIS" .IX Header "SYNOPSIS" \fBbvi\fR\ \ \ [\fB\-R\fR]\ [\fB\-c\fR\ \fIcmd\fR]\ [\fB\-f\fR\ \fIscript\fR]\ [\fB\-s\fR\ \fIskip\fR]\ [\fB\-e\fR\ \fIend\fR]\ [\fB\-n\fR\ \fIlength\fR]\ \fIfile\fR... @@ -203,10 +203,10 @@ bvi-1.4.1 .IX Header "OPTIONS" .Ip "\fIfile\fR..." 4 .IX Item "\fIfile\fR..." -A list of filenames. The first one will be the current file and -will be read +A list of filenames. The first one will be the current file and +will be read into the buffer. The cursor will be positioned on the first line of -the buffer. You can get to the other files with the ":next" command. +the buffer. You can get to the other files with the ":next" command. .Ip "\fB\-R\fR" 4 .IX Item "\fB\-R\fR" \*(L"Readonly": The readonly flag is set for all the files, @@ -261,7 +261,7 @@ The byte offset (extreme left), the hex pane (middle), and an ascii pane (right) which shows as printable characters those bytes in the hex pane. On an 80 column terminal there will be sixteen hex values -and their ASCII values on each screen line. +and their ASCII values on each screen line. Note that (as one would expect) the first byte has the offset \*(L'0\*(R' (zero). .PP You can toggle between the hex and ascii windows with the tab key (TAB). @@ -270,10 +270,10 @@ position (offset) within the file. .PP No \*(L"lines\*(R" concept: Files are treated as one long stream of bytes. The characters -\*(L"newline\*(R" and \*(L"carriage return\*(R" are not special, id est they +\*(L"newline\*(R" and \*(L"carriage return\*(R" are not special, id est they never mark the end of lines. Therefore the lines on the screen do not represent lines in the usual way. Data is broken across screen lines -arbitarily. +arbitrarily. As a consequence there are no commands in bvi from ex or vi that are based on line numbers, eg \*(L"dd\*(R", \*(L"yy\*(R", \*(L'C\*(R', \*(L'S\*(R', \*(L'o\*(R', \*(L'O\*(R'. This also changes the meaning of \*(L"range\*(R" before the \*(L":write\*(R" command @@ -313,13 +313,13 @@ using these meta sequences: .Ve Additional search commands: Similar to the text search commands there are additional hex-search -functions \*(L'\e\*(R' and \*(L'#\*(R' which allow to search for any byte value. +functions \*(L'\e\*(R' and \*(L'#\*(R' which allow one to search for any byte value. Example: \*(L"\e62 76 69\*(R" will search for the string \*(L"bvi\*(R". Spaces between hex value are optional, so searching for \*(L"6775636B6573\*(R" will find \*(L"guckes\*(R". .PP Changing the length of data (insertion, deletion) moves the data to other addresses; -this is bad for many cases (eg. databases, program files) and is +this is bad for many cases (eg. databases, program files) and is thus disabled by default. You can enable this commands by typing .PP \f(CW :set memmove\fR @@ -334,11 +334,11 @@ Use ESC (escape) to cancel a partial (uncompleted) command. .PP Input Mode: .PP -Input is treated as replacement of current characters or +Input is treated as replacement of current characters or (after the end of the file) is appended to the current file. This mode is entered from command mode by typing one of \*(L'i\*(R', \*(L'I\*(R', \*(L'A\*(R', \*(L'r\*(R', or \*(L'R\*(R'. -You can enter the characters from the keyboard (in the ASCII window) or +You can enter the characters from the keyboard (in the ASCII window) or hexadecimal values (in the HEX window). Type TAB to switch between these two windows. Type ESC to finish the current input and return to command mode. @@ -346,8 +346,8 @@ Type CTRL\-C to cancel current command abnormally. .PP Command line mode (Last Line Mode or : mode): .PP -Similar to vi, this mode is entered by typing one of the -characters +Similar to vi, this mode is entered by typing one of the +characters : / ? \e # ! The command is terminated and executed by typing a carriage return; to cancel a partially typed command, type @@ -439,10 +439,10 @@ used within the following description of commands. You can insert/append/change bytes in ASCII/binary/decimal/ hexadecimal or octal representation. You can enter several (screen) lines of input. A line with only a period (.) in it -will terminate the command. You must not type in values greater +will terminate the command. You must not type in values greater than a byte value. This causes an abandonment of the command. Pressing the CR key does not insert a newline \- character into -the file. If you use ASCII mode you can use the special characters +the file. If you use ASCII mode you can use the special characters \en, \er, \et and \e0. .PP .Vb 3 @@ -507,7 +507,7 @@ the file. If you use ASCII mode you can use the special characters `\fIx\fR move cursor to mark \fIx\fR in HEX section \*(L'\*(R' move cursor to previous context in ASCII section `` move cursor to previous context in HEX section - + \fBLine positioning:\fR H jump to first line on screen ("top") L jump to last line on screen ("low") @@ -554,7 +554,7 @@ the file. If you use ASCII mode you can use the special characters rx replace current bte with char \*(L'x\*(R' R enter replace mode; for all subsequent input, the current byte is overwritten with the next - input character; leave replace mode with ESC. + input character; leave replace mode with ESC. .PP \fBMiscellaneous Operations:\fR TAB toggle between ASCII and HEX section @@ -583,8 +583,8 @@ the file. If you use ASCII mode you can use the special characters \& columns cm=16 on an 80 character wide terminal \& ignorecase noic Ignores letter case in searching \& magic nomagic Makes . [ * special in patterns -\& memmove nomm enables insert and delete commands -\& offset of=0 adds an offset to the diplayed addresses +\& memmove nomm enables insert and delete commands +\& offset of=0 adds an offset to the displayed addresses \& readonly noro If set, write fails unless you use ! after command \& reverse nore display otherwise-printable characters with their \& high bit set as reverse video @@ -606,7 +606,7 @@ bvi was developed by Gerhard Buergmann, Vienna, Austria \fIgerhard@puon.at\fR .SH "WWW" .IX Header "WWW" -Bvi\ Homepage:\ \ http://bvi.sourceforge.net/ +Bvi\ Homepage:\ \ https://bvi.sourceforge.net/ Vi\ Pages:\ \ \ \ \ \ http://www.guckes.net/vi/clones.php3 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (all\ about\ Vi\ and\ its\ clones) .SH "FILES" @@ -614,9 +614,6 @@ Vi\ Pages:\ \ \ \ \ \ http://www.guckes.net/vi/clones.php3 \fI\ $HOME/.bvirc\fR\ \ \ \ \ \ \ \ \ \ editor\ startup\ file .BR \fI\ ./.bvirc\fR\ \ \ \ \ \ \ \ \ \ \ \ \ \ editor\ startup\ file -.SH "BUGS" -.IX Header "BUGS" -Bvi does not update the screen when the terminal changes its size. .SH "SEE ALSO" .IX Header "SEE ALSO" \fIbmore\fR\|(1), \fIvi\fR\|(1), \fIstrings\fR\|(1), \fIascii\fR\|(5) diff --git a/bvi.c b/bvi.c index 9c5e443..50574ff 100644 --- a/bvi.c +++ b/bvi.c @@ -2,7 +2,7 @@ * * 1996-02-28 V 1.0.0 * 1999-01-27 V 1.1.0 - * 1999-04-22 V 1.1.1 + * 1999-04-22 V 1.1.1 * 1999-07-01 V 1.2.0 beta * 1999-10-22 V 1.2.0 final * 2000-05-10 V 1.3.0 alpha @@ -14,10 +14,11 @@ * 2014-10-07 V 1.4.0 * 2019-10-12 V 1.4.1 * 2023-03-06 V 1.4.2 + * 2025-07-19 V 1.5.0 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2023 by Gerhard Buergmann + * Copyright 1996-2025 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -44,55 +45,56 @@ #endif -char *copyright = "(C) GPL 1996-2023 by Gerhard Buergmann"; +char *copyright = "(C) GPL 1996-2025 by Gerhard Buergmann"; jmp_buf env; /* context for `longjmp' function */ -int loc; -int maxx, maxy, x, xx, y; -int screen, status, statsize; +int loc; +int maxx, maxy, x, xx, y; +int screen, status, statsize; off_t size; -PTR mem = NULL; -PTR curpos; -PTR maxpos; -PTR pagepos; -PTR spos; +PTR mem = NULL; +PTR curpos; +PTR maxpos; +PTR pagepos; +PTR spos; char *name = NULL; char *shell; char string[MAXCMD+1]; char cmdstr[MAXCMD+1] = ""; FILE *Ausgabe_Datei; -int edits = 0; -int AnzAdd, Anzahl, Anzahl3; +int edits = 0; +int AnzAdd, Anzahl, Anzahl3; off_t filesize, memsize, undosize; - +int statusflag = 1; +int space = 2; long precount = -1; -int block_flag = 0; +int block_flag = 0; off_t block_begin, block_end, block_size; char **files; /* list of input files */ -int numfiles; /* number of input files */ -int curfile; /* number of the current file */ +int numfiles; /* number of input files */ +int curfile; /* number of the current file */ -int arrnum = 0; +int arrnum = 0; char numarr[MAXCMD+1]; /* string for collecting number */ char rep_buf[BUFFER]; -PTR current; -PTR last_motion; -PTR current_start; -PTR undo_start; +PTR current; +PTR last_motion; +PTR current_start; +PTR undo_start; off_t undo_count; off_t yanked = 0L; char *yank_buf = NULL; char *undo_buf = NULL; char *fname_buf = NULL; -PTR markbuf[26]; +PTR markbuf[26]; char addr_form[15]; @@ -100,8 +102,8 @@ char *nobytes = "No bytes@in the buffer"; static char progname[8]; static char line[MAXCMD+1]; -static int mark; -static int wrstat = 1; +static int mark; +static int wrstat = 1; void @@ -117,9 +119,7 @@ usage() int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int ch; int lflag; @@ -248,7 +248,7 @@ main(argc, argv) break; case BLOCK_BEGIN|BLOCK_END|BLOCK_LEN: if (block_end - block_begin != block_size + 1) { - fprintf(stderr, "Ambigous block data\n"); + fprintf(stderr, "Ambiguous block data\n"); exit(1); } break; @@ -267,7 +267,9 @@ main(argc, argv) maxy = LINES; if (params[P_LI].flags & P_CHANGED) maxy = P(P_LI); P(P_SS) = maxy / 2; + /* We do not set P(P_LI) and P(P_CM) anymore, because 0 means "auto" P(P_LI) = maxy; + */ maxy--; keypad(stdscr, TRUE); scrollok(stdscr, TRUE); @@ -275,21 +277,21 @@ main(argc, argv) cbreak(); noecho(); - /* address column width */ - /* default is 8 + 2 blanks */ - /* if block_begin has 8 hex digits or more */ - /* reserve 1 hex digit more than required */ - char tmp[sizeof(block_begin) * 2 + 3]; - AnzAdd = sprintf(tmp, "%llX", (long long unsigned)block_begin) + 1; - if (AnzAdd < 8) - AnzAdd = 8; - if (AnzAdd > sizeof(block_begin) * 2) - AnzAdd = sizeof(block_begin) * 2; - sprintf(addr_form, "%%0%dllX ", AnzAdd); - AnzAdd = sprintf(tmp, addr_form, block_begin); + /* address column width */ + /* default is 8 + 2 blanks */ + /* if block_begin has 8 hex digits or more */ + /* reserve 1 hex digit more than required */ + char tmp[sizeof(block_begin) * 2 + 3]; + AnzAdd = sprintf(tmp, "%llX", (long long unsigned)block_begin) + 1; + if (AnzAdd < 8) AnzAdd = 8; + if (AnzAdd > sizeof(block_begin) * 2) AnzAdd = sizeof(block_begin) * 2; + sprintf(addr_form, "%%0%dllX ", AnzAdd); + AnzAdd = sprintf(tmp, addr_form, block_begin); - Anzahl = ((COLS - AnzAdd - 1) / 16) * 4; + Anzahl = ((COLS - AnzAdd - space) / 16) * 4; + /* P(P_CM) = Anzahl; + */ maxx = Anzahl * 4 + AnzAdd + 1; Anzahl3 = Anzahl * 3; statsize = 35; @@ -310,7 +312,7 @@ main(argc, argv) if (*cmdstr != '\0') docmdline(cmdstr); msg(fname_buf); - + /* main loop */ do { setjmp(env); @@ -328,6 +330,10 @@ main(argc, argv) else precount = -1; lflag = arrnum = 0; + if (statusflag == 0) { + statusflag = 1; + clearstr(); + } switch (ch) { case '^': x = AnzAdd; loc = HEX; @@ -426,7 +432,7 @@ main(argc, argv) x = AnzAdd - 1 + Anzahl3 + Anzahl; loc = ASCII; } break; - case ':' : clearstr(); + case ':' : clearstr(); addch(ch); refresh(); getcmdstr(cmdstr, 1); @@ -467,6 +473,18 @@ main(argc, argv) fileinfo(name); wrstat = 0; break; + case KEY_RESIZE: + if (P(P_CM) == 0) { + Anzahl = ((COLS - AnzAdd - space) / 4); + maxx = Anzahl * 4 + AnzAdd + 1; + Anzahl3 = Anzahl * 3; + status = Anzahl3 + Anzahl - statsize; + } + if (P(P_LI) == 0) { + screen = Anzahl * (maxy - 1); + maxy = LINES - 1; + P(P_SS) = maxy / 2; + } case BVICTRL('L'): /*** REDRAW SCREEN ***/ new_screen(); break; @@ -491,9 +509,9 @@ main(argc, argv) break; case ';': do_ft(0, 0); break; - case 'F': - case 'f': - case 't': + case 'F': + case 'f': + case 't': case 'T': do_ft(ch, 0); break; case 'G': last_motion = current; @@ -501,10 +519,10 @@ main(argc, argv) if ((precount < P(P_OF)) || (precount - P(P_OF)) > (filesize - 1L)) { beep(); - } else { + } else { setpage((PTR)(mem + precount - P(P_OF))); } - } else { + } else { setpage((PTR)(mem + filesize - 1L)); } break; @@ -735,8 +753,7 @@ main(argc, argv) off_t -calc_size(arg) - char *arg; +calc_size(char *arg) { off_t val; extern int errno; @@ -756,13 +773,13 @@ calc_size(arg) switch (*poi) { case 'k': case 'K': val *= 1024; - break; + break; case 'm': case 'M': val *= 1048576; - break; + break; case 'g': - case 'G': val *= 1024*1024*1024LL; - break; + case 'G': val *= 1024*1024*1024LL; + break; case '\0': break; default: usage(); } @@ -787,9 +804,7 @@ trunc_cur() int -do_append(count, buf) - off_t count; - char *buf; +do_append(off_t count, char *buf) { if (filesize + count > memsize) { if (enlarge(count + 100L)) return 1; @@ -806,8 +821,7 @@ do_append(count, buf) void -do_tilde(count) - off_t count; +do_tilde(off_t count) { if (filesize == 0L) return; undo_start = current; @@ -893,10 +907,7 @@ do_undo() void -do_over(loc, n, buf) - PTR loc; - off_t n; - PTR buf; +do_over(PTR loc, off_t n, PTR buf) { if (n < 1L) { emsg(nobytes); @@ -918,10 +929,7 @@ do_over(loc, n, buf) void -do_put(loc, n, buf) - PTR loc; - off_t n; - PTR buf; +do_put(PTR loc, off_t n, PTR buf) { if (n < 1L) { emsg(nobytes); @@ -949,8 +957,7 @@ do_put(loc, n, buf) /* argument sig not used, because only SIGINT will be catched */ void -jmpproc(sig) - int sig; +jmpproc(int sig) { if (P(P_EB)) beep(); repaint(); @@ -961,8 +968,7 @@ jmpproc(sig) off_t -range(ch) - int ch; +range(int ch) { int ch1; long count; @@ -1033,7 +1039,7 @@ range(ch) - (off_t)P(P_OF)) > (filesize - 1L)) { beep(); return 0; - } else { + } else { if (mem + count < current) { return(mem + count - current); } else { @@ -1051,9 +1057,9 @@ range(ch) } end_addr = markbuf[mark - 'a']; if (end_addr == NULL) { - beep(); + beep(); return 0; - } + } if (end_addr < current) { return(end_addr - current); } else { diff --git a/bvi.h b/bvi.h index bc96547..978846c 100644 --- a/bvi.h +++ b/bvi.h @@ -13,10 +13,11 @@ * 2014-10-01 V 1.4.0 * 2019-01-28 V 1.4.1 * 2023-03-07 V 1.4.2 + * 2025-05-24 V 1.5.0 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2023 by Gerhard Buergmann + * Copyright 1996-2025 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -46,8 +47,8 @@ #if defined(__MSDOS__) && !defined(DJGPP) # include "patchlev.h" # include "dosconf.h" -# include "doscur.h" -# include +# include "doscur.h" +# include #else # include "patchlevel.h" # include "config.h" @@ -129,14 +130,14 @@ # define ANSI # define PTR char huge * # define off_t long -# define DELIM '\\' -# define strncasecmp strnicmp -# define strcasecmp stricmp +# define DELIM '\\' +# define strncasecmp strnicmp +# define strcasecmp stricmp # define memcpy d_memcpy # define memmove d_memmove #else # define PTR char * -# define DELIM '/' +# define DELIM '/' #endif #define MAXCMD 255 @@ -164,27 +165,27 @@ extern char search_pat[]; extern long hl_spat; extern char pattern[]; extern char rep_buf[]; -extern int maxx, maxy, x, y; -extern int filemode, loc; -extern int edits, new; -extern int AnzAdd; -extern int Anzahl, Anzahl3; -extern int addr_flag; -extern int ignore_case, magic; -extern int screen, status, statsize; -extern PTR mem; -extern PTR maxpos; -extern PTR pagepos; -extern PTR undo_start; -extern PTR current_start; -extern PTR curpos; -extern PTR current; -extern PTR start_addr; -extern PTR end_addr; +extern int maxx, maxy, x, y; +extern int filemode, loc; +extern int edits, new; +extern int AnzAdd; +extern int Anzahl, Anzahl3; +extern int addr_flag; +extern int ignore_case, magic; +extern int screen, status, statsize; +extern PTR mem; +extern PTR maxpos; +extern PTR pagepos; +extern PTR undo_start; +extern PTR current_start; +extern PTR curpos; +extern PTR current; +extern PTR start_addr; +extern PTR end_addr; extern char *name, cmdstr[]; extern off_t filesize, memsize; -extern PTR markbuf[]; -extern PTR last_motion; +extern PTR markbuf[]; +extern PTR last_motion; extern off_t undo_count; extern off_t yanked; extern off_t undosize; @@ -192,14 +193,16 @@ extern char *copyright, *notfound; extern char *terminal; extern char *undo_buf; extern char *yank_buf; -extern int repl_count; +extern int repl_count; extern char string[]; extern char *shell; extern char *poi; -extern int smode; -extern int again; +extern int smode; +extern int again; extern int block_flag; extern off_t block_begin, block_end, block_size; +extern int statusflag; +extern int space; #ifndef S_ISDIR /* POSIX 1003.1 file type tests. */ #define S_ISDIR(m) ((m & 0170000) == 0040000) /* directory */ @@ -214,7 +217,7 @@ extern off_t block_begin, block_end, block_size; void d_memmove(PTR, PTR, off_t); #endif -#ifdef ANSI +#if defined(ANSI) || defined(__STDC__) off_t alloc_buf(off_t, char **), yd_addr(void); off_t range(int); void do_dot(void), do_exit(void), do_shell(void), do_undo(void); @@ -223,26 +226,26 @@ extern off_t block_begin, block_end, block_size; void do_mark(int, PTR), badcmd(char *), movebyte(void); void docmdline(char *), do_over(PTR, off_t, PTR), do_put(PTR, off_t, PTR); void jmpproc(int), printline(PTR, int); - int addfile(char *); - PTR bregexec(PTR, char *); - int chk_comm(int); - int doecmd(char *, int); - int do_append(off_t, char *), do_logic(int, char *); - int do_delete(off_t, PTR); - int doset(char *); - int do_substitution(int, char *, PTR, PTR); - int hexchar(void); - int outmsg(char *); - int save_chk(char *, char *, char *, int); - PTR searching(int, char *, PTR, PTR, int); - PTR wordsearch(PTR, char); - PTR backsearch(PTR, char); - PTR fsearch(PTR, PTR, char *); - PTR fsearch_end(PTR, PTR, char *, PTR *); - PTR rsearch(PTR, PTR, char *); - PTR end_word(PTR); - PTR calc_addr(char **, PTR); - PTR do_ft(int, int); + int addfile(char *); + PTR bregexec(PTR, char *); + int chk_comm(int); + int doecmd(char *, int); + int do_append(off_t, char *), do_logic(int, char *); + int do_delete(off_t, PTR); + int doset(char *); + int do_substitution(int, char *, PTR, PTR); + int hexchar(void); + int outmsg(char *); + int save_chk(char *, char *, char *, int); + PTR searching(int, char *, PTR, PTR, int); + PTR wordsearch(PTR, char); + PTR backsearch(PTR, char); + PTR fsearch(PTR, PTR, char *); + PTR fsearch_end(PTR, PTR, char *, PTR *); + PTR rsearch(PTR, PTR, char *); + PTR end_word(PTR); + PTR calc_addr(char **, PTR); + PTR do_ft(int, int); char *patcpy(char *, char *, char); void setpage(PTR), msg(char *), emsg(char *), smsg(char *); void usage(void), bvi_init(char *), statpos(void), setcur(void); @@ -253,43 +256,43 @@ extern off_t block_begin, block_end, block_size; off_t edit(int), load(char *); off_t calc_size(char *); int ascii_comp(char *, char *), hex_comp(char *, char *); - int cur_forw(int), cur_back(void); - int lineout(void), save(char *, PTR, PTR, int); - int at_least(char *, char *, int); - int vgetc(void), xpos(void), enlarge(off_t); - int getcmdstr(char *, int), read_rc(char *); - int wait_return(int); + int cur_forw(int), cur_back(void); + int lineout(void), save(char *, PTR, PTR, int); + int at_least(char *, char *, int); + int vgetc(void), xpos(void), enlarge(off_t); + int getcmdstr(char *, int), read_rc(char *); + int wait_return(int); #else - int addfile(); + int addfile(); off_t alloc_buf(), yd_addr(); off_t range(); off_t calc_size(); void do_mark(), badcmd(), movebyte(); void do_back(), do_ins_chg(); void jmpproc(), printline(); - int chk_comm(); + int chk_comm(); void docmdline(), do_over(), do_put(); - int doecmd(); + int doecmd(); void do_dot(), do_exit(), do_shell(), do_undo(); void do_tilde(), trunc_cur(); - int do_append(), do_logic(); - int do_delete(); - int doset(); - int do_substitution(); - int hexchar(); - int outmsg(); - int save_chk(); - PTR searching(); - PTR wordsearch(); - PTR backsearch(); + int do_append(), do_logic(); + int do_delete(); + int doset(); + int do_substitution(); + int hexchar(); + int outmsg(); + int save_chk(); + PTR searching(); + PTR wordsearch(); + PTR backsearch(); /* int bregexec(); */ - PTR bregexec(); - PTR fsearch(); - PTR fsearch_end(); - PTR rsearch(); - PTR end_word(); - PTR calc_addr(); - PTR do_ft(); + PTR bregexec(); + PTR fsearch(); + PTR fsearch_end(); + PTR rsearch(); + PTR end_word(); + PTR calc_addr(); + PTR do_ft(); char *patcpy(); void setpage(), msg(), emsg(), smsg(); void usage(), bvi_init(), statpos(), setcur(); @@ -299,9 +302,9 @@ extern off_t block_begin, block_end, block_size; void quit(), sysemsg(), do_z(), stuffin(); off_t edit(), load(); int ascii_comp(), hex_comp(); - int cur_forw(), cur_back(); - int lineout(), save(), at_least(), read_rc(); - int getcmdstr(), enlarge(); - int vgetc(), xpos(); - int wait_return(); + int cur_forw(), cur_back(); + int lineout(), save(), at_least(), read_rc(); + int getcmdstr(), enlarge(); + int vgetc(), xpos(); + int wait_return(); #endif diff --git a/comm.c b/comm.c index 72c0a47..51079ec 100644 --- a/comm.c +++ b/comm.c @@ -8,17 +8,18 @@ * 1999-09-10 V 1.2.0 final * 2000-03-03 V 1.3.0 beta * 2000-07-15 V 1.3.0 final - * 2001-10-10 V 1.3.1 + * 2001-10-10 V 1.3.1 * 2003-07-04 V 1.3.2 * 2005-08-17 V 1.3.3 * 2010-06-02 V 1.3.4 * 2014-01-28 V 1.4.0 * 2019-01-27 V 1.4.1 * 2023-03-06 V 1.4.2 + * 2025-07-19 V 1.5.0 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2023 by Gerhard Buergmann + * Copyright 1996-2025 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -72,8 +73,8 @@ static char *c_argv[9]; char *nowrtmsg = "No write@since last change (:%s! overrides)"; char *morefiles = "more files@to edit"; -char *ambigous = "Ambigous|Too many file names"; -char *ambvalue = "Ambigous|Too many values"; +char *ambigous = "Ambiguous|Too many file names"; +char *ambvalue = "Ambiguous|Too many values"; char *extra = "Extra chars|Extra characters at end of command"; char *noaddr = "No address allowed@on this command"; char *noval = "No value@for binary operation"; @@ -98,8 +99,7 @@ static char oldbuf[CMDSZ + 3]; /** for :!! command **/ * the environment variable "BVIINIT" (or eventually .bvirc). */ void -docmdline(cmdline) - char *cmdline; +docmdline(char *cmdline) { char buff[CMDSZ]; char cmdbuf[CMDSZ]; @@ -286,22 +286,22 @@ docmdline(cmdline) if ((c_argv[c_argc] = strtok(cmd, " \t")) != NULL) c_argc++; while ((c_argv[c_argc] = strtok(NULL, " \t")) != NULL) c_argc++; - if (c_argc > 1) { + if (c_argc > 1) { emsg(ambigous); return; } if (c_argc == 1) { - /* change '%' to Filename */ - while ((p = strchr(c_argv[0], '%')) != NULL && *(p-1) != '\\') { - if (name == NULL) { - emsg("No filename@to substitute for %"); - return; - } - *p = '\0'; - strcpy (oldbuf, c_argv[0]); - strcat (oldbuf, name); - strcat (oldbuf, p + 1); + /* change '%' to Filename */ + while ((p = strchr(c_argv[0], '%')) != NULL && *(p-1) != '\\') { + if (name == NULL) { + emsg("No filename@to substitute for %"); + return; + } + *p = '\0'; + strcpy (oldbuf, c_argv[0]); + strcat (oldbuf, name); + strcat (oldbuf, p + 1); c_argv[0] = oldbuf; - } + } } if (name == NULL && c_argc != 0) name = strdup(c_argv[0]); if (force) { @@ -629,11 +629,7 @@ yd_addr() /*********** Save file if not read only ********************/ int -save_chk(fname, start, end, flags) - char *fname; - char *start; - char *end; - int flags; +save_chk(char *fname, char *start, char *end, int flags) { if (P(P_RO)) { sprintf(string, "\"%s\" File is read only", name); @@ -657,9 +653,7 @@ do_exit() int -doecmd(arg, force) - char *arg; - int force; +doecmd(char *arg, int force) { char *tmp; @@ -722,33 +716,34 @@ clearstr() /**** displays an error message *****/ void -emsg(s) - char *s; +emsg(char *s) { int cnt; - int stchar; + /* + int stchar; - if (P(P_EB)) beep(); if (P(P_MO)) { stchar = statsize; } else { stchar = 0; } - + */ + if (P(P_EB)) beep(); + statusflag = 0; clearstr(); attrset(A_REVERSE); cnt = outmsg(s); attrset(A_NORMAL); - if (cnt >= (maxx - stchar)) { - addch('\n'); - wait_return(TRUE); } + if (cnt >= (maxx)) { + // addch('\n'); + wait_return(TRUE); + } } /*** System error message *****/ void -sysemsg(s) - char *s; +sysemsg(char *s) { char string[256]; @@ -764,8 +759,7 @@ sysemsg(s) /*** displays mode if showmode set *****/ void -smsg(s) - char *s; +smsg(char *s) { if (P(P_MO)) { msg(s); @@ -776,30 +770,30 @@ smsg(s) /************* displays s on status line *****************/ void -msg(s) - char *s; +msg(char *s) { + /* int stchar; if (P(P_MO)) { stchar = statsize; } else { stchar = 0; - } + }o*/ + statusflag = 0; clearstr(); - if (outmsg(s) >= (maxx - stchar)) { - addch('\n'); + if (outmsg(s) >= maxx) { + // addch('\n'); wait_return(TRUE); } } int -outmsg(s) - char *s; +outmsg(char *s) { char *poi; - int cnt = 0; + int cnt = 0; move(maxy, 0); poi = strchr(s, '|'); @@ -811,7 +805,7 @@ outmsg(s) cnt++; } } else { - if (poi) poi++; + if (poi) poi++; else poi = s; while (*poi) { if (*poi == '@') addch(' '); @@ -828,8 +822,7 @@ outmsg(s) * */ int -wait_return(flag) - int flag; +wait_return(int flag) { int c; @@ -852,8 +845,7 @@ wait_return(flag) int -chk_comm(flag) - int flag; +chk_comm(int flag) { if ((flag & NO_ADDR) && (addr_flag > 0)) { emsg(noaddr); return 1; } diff --git a/config.guess b/config.guess index 69188da..48a6846 100644 --- a/config.guess +++ b/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2023 Free Software Foundation, Inc. +# Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2023-01-01' +timestamp='2024-07-27' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of the system \`$me' is run on. +Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit @@ -60,13 +60,13 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2023 Free Software Foundation, Inc. +Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -102,8 +102,8 @@ GUESS= # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. +# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still +# use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. @@ -123,7 +123,7 @@ set_cc_for_build() { dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" - for driver in cc gcc c89 c99 ; do + for driver in cc gcc c17 c99 c89 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD=$driver break @@ -155,6 +155,9 @@ Linux|GNU|GNU/*) set_cc_for_build cat <<-EOF > "$dummy.c" + #if defined(__ANDROID__) + LIBC=android + #else #include #if defined(__UCLIBC__) LIBC=uclibc @@ -162,6 +165,8 @@ Linux|GNU|GNU/*) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu + #elif defined(__LLVM_LIBC__) + LIBC=llvm #else #include /* First heuristic to detect musl libc. */ @@ -169,6 +174,7 @@ Linux|GNU|GNU/*) LIBC=musl #endif #endif + #endif EOF cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` eval "$cc_set_libc" @@ -459,7 +465,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in UNAME_RELEASE=`uname -v` ;; esac - # Japanese Language versions have a version number like `4.1.3-JL'. + # Japanese Language versions have a version number like '4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; @@ -628,7 +634,8 @@ EOF sed 's/^ //' << EOF > "$dummy.c" #include - main() + int + main () { if (!__power_pc()) exit(1); @@ -712,7 +719,8 @@ EOF #include #include - int main () + int + main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); @@ -904,7 +912,7 @@ EOF fi ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` + UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; @@ -976,7 +984,27 @@ EOF GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) - GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __ARM_EABI__ + #ifdef __ARM_PCS_VFP + ABI=eabihf + #else + ABI=eabi + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; + esac + fi + GUESS=$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be @@ -1042,6 +1070,15 @@ EOF k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; + kvx:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:cos:*:*) + GUESS=$UNAME_MACHINE-unknown-cos + ;; + kvx:mbr:*:*) + GUESS=$UNAME_MACHINE-unknown-mbr + ;; loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; @@ -1197,7 +1234,7 @@ EOF GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility + # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; @@ -1338,7 +1375,7 @@ EOF GUESS=ns32k-sni-sysv fi ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; @@ -1560,6 +1597,9 @@ EOF *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; + *:Ironclad:*:*) + GUESS=$UNAME_MACHINE-unknown-ironclad + ;; esac # Do we have a guess based on uname results? @@ -1583,6 +1623,7 @@ cat > "$dummy.c" < header file. */ #undef HAVE_FCNTL_H diff --git a/config.sub b/config.sub index de4259e..4aaae46 100644 --- a/config.sub +++ b/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2023 Free Software Foundation, Inc. +# Copyright 1992-2024 Free Software Foundation, Inc. -# shellcheck disable=SC2006,SC2268 # see below for rationale +# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale -timestamp='2023-01-21' +timestamp='2024-05-27' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -76,13 +76,13 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2023 Free Software Foundation, Inc. +Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -120,7 +120,6 @@ case $# in esac # Split fields of configuration type -# shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 + echo "Invalid configuration '$1': more than four components" >&2 exit 1 ;; *-*-*-*) @@ -142,10 +141,21 @@ case $1 in # parts maybe_os=$field2-$field3 case $maybe_os in - nto-qnx* | linux-* | uclinux-uclibc* \ - | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ - | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova* | managarm-*) + cloudabi*-eabi* \ + | kfreebsd*-gnu* \ + | knetbsd*-gnu* \ + | kopensolaris*-gnu* \ + | linux-* \ + | managarm-* \ + | netbsd*-eabi* \ + | netbsd*-gnu* \ + | nto-qnx* \ + | os2-emx* \ + | rtmk-nova* \ + | storm-chaos* \ + | uclinux-gnu* \ + | uclinux-uclibc* \ + | windows-* ) basic_machine=$field1 basic_os=$maybe_os ;; @@ -160,8 +170,12 @@ case $1 in esac ;; *-*) - # A lone config we happen to match not fitting any pattern case $field1-$field2 in + # Shorthands that happen to contain a single dash + convex-c[12] | convex-c3[248]) + basic_machine=$field2-convex + basic_os= + ;; decstation-3100) basic_machine=mips-dec basic_os= @@ -169,28 +183,88 @@ case $1 in *-*) # Second component is usually, but not always the OS case $field2 in - # Prevent following clause from handling this valid os + # Do not treat sunos as a manufacturer sun*os*) basic_machine=$field1 basic_os=$field2 ;; + # Manufacturers + 3100* \ + | 32* \ + | 3300* \ + | 3600* \ + | 7300* \ + | acorn \ + | altos* \ + | apollo \ + | apple \ + | atari \ + | att* \ + | axis \ + | be \ + | bull \ + | cbm \ + | ccur \ + | cisco \ + | commodore \ + | convergent* \ + | convex* \ + | cray \ + | crds \ + | dec* \ + | delta* \ + | dg \ + | digital \ + | dolphin \ + | encore* \ + | gould \ + | harris \ + | highlevel \ + | hitachi* \ + | hp \ + | ibm* \ + | intergraph \ + | isi* \ + | knuth \ + | masscomp \ + | microblaze* \ + | mips* \ + | motorola* \ + | ncr* \ + | news \ + | next \ + | ns \ + | oki \ + | omron* \ + | pc533* \ + | rebel \ + | rom68k \ + | rombug \ + | semi \ + | sequent* \ + | siemens \ + | sgi* \ + | siemens \ + | sim \ + | sni \ + | sony* \ + | stratus \ + | sun \ + | sun[234]* \ + | tektronix \ + | tti* \ + | ultra \ + | unicom* \ + | wec \ + | winbond \ + | wrs) + basic_machine=$field1-$field2 + basic_os= + ;; zephyr*) basic_machine=$field1-unknown basic_os=$field2 ;; - # Manufacturers - dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ - | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ - | unicom* | ibm* | next | hp | isi* | apollo | altos* \ - | convergent* | ncr* | news | 32* | 3600* | 3100* \ - | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ - | ultra | tti* | harris | dolphin | highlevel | gould \ - | cbm | ns | masscomp | apple | axis | knuth | cray \ - | microblaze* | sim | cisco \ - | oki | wec | wrs | winbond) - basic_machine=$field1-$field2 - basic_os= - ;; *) basic_machine=$field1 basic_os=$field2 @@ -271,26 +345,6 @@ case $1 in basic_machine=arm-unknown basic_os=cegcc ;; - convex-c1) - basic_machine=c1-convex - basic_os=bsd - ;; - convex-c2) - basic_machine=c2-convex - basic_os=bsd - ;; - convex-c32) - basic_machine=c32-convex - basic_os=bsd - ;; - convex-c34) - basic_machine=c34-convex - basic_os=bsd - ;; - convex-c38) - basic_machine=c38-convex - basic_os=bsd - ;; cray) basic_machine=j90-cray basic_os=unicos @@ -713,15 +767,26 @@ case $basic_machine in vendor=dec basic_os=tops20 ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) + delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300) cpu=m68k vendor=motorola ;; - dpx2*) + # This used to be dpx2*, but that gets the RS6000-based + # DPX/20 and the x86-based DPX/2-100 wrong. See + # https://oldskool.silicium.org/stations/bull_dpx20.htm + # https://www.feb-patrimoine.com/english/bull_dpx2.htm + # https://www.feb-patrimoine.com/english/unix_and_bull.htm + dpx2 | dpx2[23]00 | dpx2[23]xx) cpu=m68k vendor=bull - basic_os=sysv3 + ;; + dpx2100 | dpx21xx) + cpu=i386 + vendor=bull + ;; + dpx20) + cpu=rs6000 + vendor=bull ;; encore | umax | mmax) cpu=ns32k @@ -836,18 +901,6 @@ case $basic_machine in next | m*-next) cpu=m68k vendor=next - case $basic_os in - openstep*) - ;; - nextstep*) - ;; - ns2*) - basic_os=nextstep2 - ;; - *) - basic_os=nextstep3 - ;; - esac ;; np1) cpu=np1 @@ -936,14 +989,13 @@ case $basic_machine in ;; *-*) - # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read cpu vendor <&2 + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 exit 1 ;; esac @@ -1306,11 +1491,12 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if test x$basic_os != x +if test x"$basic_os" != x then # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. +obj= case $basic_os in gnu/linux*) kernel=linux @@ -1325,7 +1511,6 @@ case $basic_os in os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) - # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read kernel os <&2 + fi + ;; *) - echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 + exit 1 + ;; +esac + +case $obj in + aout* | coff* | elf* | pe*) + ;; + '') + # empty is fine + ;; + *) + echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 + exit 1 + ;; +esac + +# Here we handle the constraint that a (synthetic) cpu and os are +# valid only in combination with each other and nowhere else. +case $cpu-$os in + # The "javascript-unknown-ghcjs" triple is used by GHC; we + # accept it here in order to tolerate that, but reject any + # variations. + javascript-ghcjs) + ;; + javascript-* | *-ghcjs) + echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. -case $kernel-$os in - linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ - | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* ) +case $kernel-$os-$obj in + linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ + | linux-mlibc*- | linux-musl*- | linux-newlib*- \ + | linux-relibc*- | linux-uclibc*- | linux-ohos*- ) ;; - uclinux-uclibc* ) + uclinux-uclibc*- | uclinux-gnu*- ) ;; - managarm-mlibc* | managarm-kernel* ) + managarm-mlibc*- | managarm-kernel*- ) ;; - -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) + windows*-msvc*-) + ;; + -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ + | -uclibc*- ) # These are just libc implementations, not actual OSes, and thus # require a kernel. - echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 exit 1 ;; - -kernel* ) - echo "Invalid configuration \`$1': \`$os' needs explicit kernel." 1>&2 + -kernel*- ) + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 exit 1 ;; - *-kernel* ) - echo "Invalid configuration \`$1': \`$kernel' does not support \`$os'." 1>&2 + *-kernel*- ) + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 exit 1 ;; - kfreebsd*-gnu* | kopensolaris*-gnu*) + *-msvc*- ) + echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 + exit 1 ;; - vxworks-simlinux | vxworks-simwindows | vxworks-spe) + kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-) ;; - nto-qnx*) + vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) ;; - os2-emx) + nto-qnx*-) ;; - *-eabi* | *-gnueabi*) + os2-emx-) ;; - -*) + rtmk-nova-) + ;; + *-eabi*- | *-gnueabi*-) + ;; + none--*) + # None (no kernel, i.e. freestanding / bare metal), + # can be paired with an machine code file format + ;; + -*-) # Blank kernel with real OS is always fine. ;; - *-*) - echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + --*) + # Blank kernel and OS with real machine code file format is always fine. + ;; + *-*-*) + echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac @@ -1826,7 +2273,7 @@ case $vendor in *-riscix*) vendor=acorn ;; - *-sunos*) + *-sunos* | *-solaris*) vendor=sun ;; *-cnk* | *-aix*) @@ -1896,7 +2343,7 @@ case $vendor in ;; esac -echo "$cpu-$vendor-${kernel:+$kernel-}$os" +echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" exit # Local variables: diff --git a/configure.ac b/configure.ac index be763c7..1a57146 100644 --- a/configure.ac +++ b/configure.ac @@ -12,13 +12,13 @@ dnl On SunOS4 systems you have to use the /usr/5bin/cc compiler dnl to get the SYSV curses library: case "$host_os" in sunos4*) - AC_MSG_RESULT("using /usr/5bin/cc") - CC="/usr/5bin/cc" - ac_objext="o" - ;; + AC_MSG_RESULT("using /usr/5bin/cc") + CC="/usr/5bin/cc" + ac_objext="o" + ;; *) - AC_PROG_CC - ;; + AC_PROG_CC + ;; esac @@ -26,11 +26,11 @@ dnl Some curses specials dnl Solaris needs for tputs 'putc(char)' instead of 'putc(int)' case "$host_os" in solaris*) - CPPFLAGS="${CPPFLAGS} -D_MSE_INT_H" - AC_DEFINE(NEED_PUTC_CHAR) - ;; + CPPFLAGS="${CPPFLAGS} -D_MSE_INT_H" + AC_DEFINE(NEED_PUTC_CHAR) + ;; hpux9*) DEFS=${DEFS-"-DMINICURSES"} - ;; + ;; esac @@ -65,21 +65,21 @@ AC_ARG_WITH(ncurses, AC_CHECK_HEADER([ncurses.h],[ AC_SEARCH_LIBS([initscr], [ncurses], [ AC_DEFINE(HAVE_NCURSES_H) - AC_SEARCH_LIBS([tputs], [tinfo])],[ + AC_SEARCH_LIBS([tputs], [tinfo])],[ AC_SEARCH_LIBS([initscr], [curses],[ AC_DEFINE(HAVE_CURSES_H) AC_SEARCH_LIBS([tputs], [tinfo])],[ - AC_MSG_ERROR([bvi requires a curses library])])]) - ],[ + AC_MSG_ERROR([bvi requires a curses library])])]) + ],[ AC_CHECK_HEADER([curses.h],[ - AC_SEARCH_LIBS([initscr], [curses], [ - AC_DEFINE(HAVE_CURSES_H)],[ - AC_MSG_ERROR([bvi requires a curses library])])],[ + AC_SEARCH_LIBS([initscr], [curses], [ + AC_DEFINE(HAVE_CURSES_H)],[ + AC_MSG_ERROR([bvi requires a curses library])])],[ AC_CHECK_HEADER([ncursesw/curses.h], [ - AC_SEARCH_LIBS([initscr], [ncursesw], [ - AC_DEFINE(HAVE_NCURSESW_CURSES_H)],[ - AC_MSG_ERROR([bvi requires a curses library])])],[ - AC_MSG_ERROR([bvi requires a curses library])])])]) + AC_SEARCH_LIBS([initscr], [ncursesw], [ + AC_DEFINE(HAVE_NCURSESW_CURSES_H)],[ + AC_MSG_ERROR([bvi requires a curses library])])],[ + AC_MSG_ERROR([bvi requires a curses library])])])]) dnl Checks for typedefs, structures, and compiler characteristics. dnl AC_TYPE_SIZE_T diff --git a/dosio.c b/dosio.c index 90cd281..e5d44a1 100644 --- a/dosio.c +++ b/dosio.c @@ -141,14 +141,14 @@ save(char *fname, PTR start, PTR end, int flags) if (!fname) { emsg("No file|No current filename"); return 0; - } + } if (stat(fname, &buf) == -1) { newstr = "[New file] "; - } else { - if (S_ISDIR(buf.st_mode)) { - sprintf(string, "\"%s\" Is a directory", fname); - msg(string); - return 0; + } else { + if (S_ISDIR(buf.st_mode)) { + sprintf(string, "\"%s\" Is a directory", fname); + msg(string); + return 0; } newstr = ""; } @@ -159,20 +159,20 @@ save(char *fname, PTR start, PTR end, int flags) return 0; } if (filemode == PARTIAL) { - if (block_read) { - filesize = block_read; - sprintf(string, "\"%s\" range %lu-%lu", fname, - (unsigned long)block_begin, - (unsigned long)(block_begin - 1 + filesize)); - if (lseek(fd, block_begin, SEEK_SET) < 0) { - sysemsg(fname); - return 0; - } - } else { - msg("Null range"); - return 0; - } - } else { + if (block_read) { + filesize = block_read; + sprintf(string, "\"%s\" range %lu-%lu", fname, + (unsigned long)block_begin, + (unsigned long)(block_begin - 1 + filesize)); + if (lseek(fd, block_begin, SEEK_SET) < 0) { + sysemsg(fname); + return 0; + } + } else { + msg("Null range"); + return 0; + } + } else { filesize = end - start + 1L; sprintf(string, "\"%s\" %s%lu@bytes", fname, newstr, (long)filesize); } @@ -228,7 +228,7 @@ load(char *fname) } else if (filemode == REGULAR) { memsize = buf.st_size + 100; } else { - memsize = 1000; + memsize = 1000; } if (farcoreleft() < memsize) { @@ -255,18 +255,18 @@ load(char *fname) filesize += (off_t)n; } while (filesize < buf.st_size); if ((filesize == 0) { - sprintf(string, "\"%s\" No such range: %lu-%lu", fname, - (unsigned long)block_begin, (unsigned long)(block_end)); - } else { - sprintf(string, "\"%s\" range %lu-%lu", fname, - (unsigned long)block_begin, - (unsigned long)(block_begin + filesize - 1)); - } - filemode = PARTIAL; - block_read = filesize; - msg(string); - P(P_OF) = block_begin; - params[P_OF].flags |= P_CHANGED; + sprintf(string, "\"%s\" No such range: %lu-%lu", fname, + (unsigned long)block_begin, (unsigned long)(block_end)); + } else { + sprintf(string, "\"%s\" range %lu-%lu", fname, + (unsigned long)block_begin, + (unsigned long)(block_begin + filesize - 1)); + } + filemode = PARTIAL; + block_read = filesize; + msg(string); + P(P_OF) = block_begin; + params[P_OF].flags |= P_CHANGED; } } else if (filemode == REGULAR) { chunk = buf.st_size > 0xfffe ? 0xfffe : buf.st_size; diff --git a/edit.c b/edit.c index ee1a1a7..3e9d5fa 100644 --- a/edit.c +++ b/edit.c @@ -12,8 +12,9 @@ * 2006-04-05 V 1.3.3 alpha - binary representation * 2014-09-30 V 1.4.0 * 2019-10-12 V 1.4.1 + * 2025-07-19 V 1.5.0 * - * Copyright 1996-2019 by Gerhard Buergmann + * Copyright 1996-2025 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -63,8 +64,7 @@ static char *getcnext = NULL; * characters (for "." command) */ off_t -edit(mode) - int mode; +edit(int mode) { int ch, ch1; size_t len; @@ -117,7 +117,7 @@ edit(mode) setcur(); continue; } - if (ch == KEY_BACKSPACE + if (ch == KEY_BACKSPACE || ch == ASCII_DEL || ch == BVICTRL('H')) { if (count > 0) { @@ -286,8 +286,7 @@ escape: * else setpage() */ PTR -do_ft(ch, flag) - int ch, flag; +do_ft(int ch, int flag) { static int chi; static int chp = 1; @@ -298,7 +297,7 @@ do_ft(ch, flag) switch (ch) { /* case 1: beep(); - return NULL; no previous command + return NULL; no previous command case -1: if (chp == 'f' || chp == 't') dir = BACKWARD; else dir = FORWARD; break; @@ -364,8 +363,7 @@ do_ft(ch, flag) void -do_z(mode) - int mode; +do_z(int mode) { switch (mode) { case '.': while (y != maxy / 2) { @@ -401,8 +399,7 @@ do_z(mode) void -scrolldown(lns) - int lns; +scrolldown(int lns) { while (lns--) { if (maxpos >= (pagepos + Anzahl)) pagepos += Anzahl; @@ -414,8 +411,7 @@ scrolldown(lns) void -scrollup(lns) - int lns; +scrollup(int lns) { while (lns--) { if (mem <= (PTR)(pagepos - Anzahl)) pagepos -= Anzahl; @@ -459,13 +455,14 @@ setcur() void statpos() { - char bin_val [9]; + char bin_val [9]; unsigned char Char1; - int i; + int i; off_t bytepos; char string[MAXCMD+1], str[6]; - if (!P(P_MO)) return; + // if (!P(P_MO)) return; + if (!statusflag) return; bytepos = current - mem; if (bytepos >= filesize) { // mvaddstr(maxy, status, " "); @@ -483,11 +480,19 @@ statpos() } } bin_val[8] = '\0'; - - sprintf(string, "%08llX %s \\%03o 0x%02X %3d ", - (long long)(bytepos + P(P_OF)), bin_val, Char1, Char1, Char1); + attrset(A_BOLD); status = maxx - 1 - statsize; + if (status > 0) { + sprintf(string, "%08llX %s \\%03o 0x%02X %3d ", + (long long)(bytepos + P(P_OF)), bin_val, Char1, Char1, Char1); + } else { + sprintf(string, "%08llX %3d ", + (long long)(bytepos + P(P_OF)), Char1); + mvaddstr(maxy, 0, string); + attrset(A_NORMAL); + return; + } mvaddstr(maxy, status, string); if (isprint(Char1)) { @@ -521,10 +526,9 @@ statpos() } + void -printline(mempos, scpos) - PTR mempos; - int scpos; +printline(PTR mempos, int scpos) { PTR hl_start = 0; PTR hl_end = 0; @@ -544,44 +548,44 @@ printline(mempos, scpos) mv_pos = AnzAdd; *linbuf = '\0'; if (hl_spat) { - f_start = (mempos - Anzahl) < mem ? mem : (mempos - Anzahl); - f_end = mempos + (2 * Anzahl); - hl_start = fsearch_end(f_start, f_end, search_pat, &hl_end); + f_start = (mempos - Anzahl) < mem ? mem : (mempos - Anzahl); + f_end = mempos + (2 * Anzahl); + hl_start = fsearch_end(f_start, f_end, search_pat, &hl_end); } for (print_pos = 0; print_pos < Anzahl; print_pos++) { if (hl_spat) { - while (hl_start != NULL) { - if (hl_start < mempos) { - if (hl_end < mempos) { - f_start = hl_start + 1; - hl_start = fsearch_end(f_start, f_end, search_pat, &hl_end); - } else { - attrset(A_STANDOUT); /* start out highlighted */ - break; - } - } else if (hl_start >= mempos) { - break; - } - } - if (hl_start != NULL) { - if ((hl_start - mempos) == print_pos) { - mvaddstr(scpos, mv_pos, linbuf); - mv_pos = AnzAdd + (3 * print_pos); - *linbuf = '\0'; - attrset(A_STANDOUT); - } - if ((hl_end - mempos) == print_pos) { - mvaddstr(scpos, mv_pos, linbuf); - *linbuf = '\0'; - mv_pos = AnzAdd + (3 * print_pos); - f_start = hl_end; - hl_start = fsearch_end(f_start, f_end, search_pat, &hl_end); - if (f_start != hl_start) { - attrset(A_NORMAL); - } - } - } + while (hl_start != NULL) { + if (hl_start < mempos) { + if (hl_end < mempos) { + f_start = hl_start + 1; + hl_start = fsearch_end(f_start, f_end, search_pat, &hl_end); + } else { + attrset(A_STANDOUT); /* start out highlighted */ + break; + } + } else if (hl_start >= mempos) { + break; + } + } + if (hl_start != NULL) { + if ((hl_start - mempos) == print_pos) { + mvaddstr(scpos, mv_pos, linbuf); + mv_pos = AnzAdd + (3 * print_pos); + *linbuf = '\0'; + attrset(A_STANDOUT); + } + if ((hl_end - mempos) == print_pos) { + mvaddstr(scpos, mv_pos, linbuf); + *linbuf = '\0'; + mv_pos = AnzAdd + (3 * print_pos); + f_start = hl_end; + hl_start = fsearch_end(f_start, f_end, search_pat, &hl_end); + if (f_start != hl_start) { + attrset(A_NORMAL); + } + } + } } if (mempos + print_pos >= maxpos) { sprintf(tmpbuf, " "); @@ -609,10 +613,10 @@ printline(mempos, scpos) addstr(string); attrset(A_NORMAL); } else { - addstr("."); + addstr("."); } } else { - addstr("."); + addstr("."); } } } else { @@ -660,8 +664,7 @@ repaint() /***** redraw screen *********************/ /******* display an arbitrary address on screen *******/ void -setpage(addr) - PTR addr; +setpage(PTR addr) { if ((addr >= pagepos) && ((addr - pagepos) < screen)) { y = (addr - pagepos) / Anzahl; @@ -684,8 +687,7 @@ setpage(addr) int -cur_forw(check) - int check; +cur_forw(int check) { if (check) { if (current - mem >= filesize) { @@ -760,8 +762,7 @@ cur_back() void -fileinfo(fname) - char *fname; +fileinfo(char *fname) { off_t bytepos; char fstatus[MAXCMD]; @@ -788,8 +789,8 @@ fileinfo(fname) if (edits) strcat(string, "[Modified] "); if (filesize) { bytepos = (pagepos + y * Anzahl + xpos()) - mem + 1L; - sprintf(fstatus, "byte %llu of %llu --%llu%%--", - (unsigned long long)bytepos, + sprintf(fstatus, "byte %llu of %llu --%llu%%--", + (unsigned long long)bytepos, (unsigned long long)filesize, (unsigned long long)(bytepos * 100L / filesize)); strcat(string, fstatus); @@ -830,8 +831,7 @@ vgetc() void -stuffin(s) -char *s; +stuffin(char *s) { if (s == NULL) { /* clear the stuff buffer */ getcnext = NULL; @@ -846,9 +846,7 @@ char *s; void -do_back(n, start) - off_t n; - PTR start; +do_back(off_t n, PTR start) { if (start - n < mem) { beep(); @@ -870,9 +868,7 @@ do_back(n, start) int -do_delete(n, start) - off_t n; - PTR start; +do_delete(off_t n, PTR start) { if (n + start > maxpos) { beep(); @@ -902,10 +898,7 @@ do_delete(n, start) * The :insert, :append and :change command */ void -do_ins_chg(start, arg, mode) - PTR start; - char *arg; - int mode; +do_ins_chg(PTR start, char *arg, int mode) { int base; off_t buffer = BUFFER; @@ -945,22 +938,22 @@ do_ins_chg(start, arg, mode) if (base == 1) { /* ASCII */ while (*poi != '\0') { if (*poi == '\\') { - switch (*(++poi)) { - case 'n': val = '\n'; break; - case 'r': val = '\r'; break; - case 't': val = '\t'; break; - case '0': val = '\0'; break; - case '\\': val = '\\'; break; - default : val = '\\'; poi--; - } - poi++; + switch (*(++poi)) { + case 'n': val = '\n'; break; + case 'r': val = '\r'; break; + case 't': val = '\t'; break; + case '0': val = '\0'; break; + case '\\': val = '\\'; break; + default : val = '\\'; poi--; + } + poi++; } else { val = *poi++; } *(tempbuf + count++) = val; } } else { - while (isspace(cmdstr[strlen(cmdstr) - 1])) + while (isspace(cmdstr[strlen(cmdstr) - 1])) cmdstr[strlen(cmdstr) - 1] = '\0'; while (*poi != '\0') { val = strtol(poi, &epoi, base); @@ -993,7 +986,7 @@ do_ins_chg(start, arg, mode) case U_APPEND: if ((undo_count = alloc_buf(count, &undo_buf)) == 0L) { repaint(); - goto mfree; + goto mfree; } do_append((off_t)count, tempbuf); memcpy(undo_buf, tempbuf, count); @@ -1021,11 +1014,9 @@ clear_marks() void -do_mark(mark, addr) - int mark; - PTR addr; +do_mark(int mark, PTR addr) { - if (mark < 'a' || mark > 'z' || current >= maxpos) + if (mark < 'a' || mark > 'z' || current >= maxpos) return; markbuf[mark - 'a'] = addr; } diff --git a/io.c b/io.c index a34d8fc..b9c2741 100644 --- a/io.c +++ b/io.c @@ -12,10 +12,11 @@ * 2014-05-03 V 1.4.0 * 2019-01-27 V 1.4.1 * 2022-03-09 V 1.4.2 + * 2025-07-19 V 1.5.0 * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2022 by Gerhard Buergmann + * Copyright 1996-2025 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -79,11 +80,7 @@ extern char *fname_buf; /*********** Save the patched file ********************/ int -save(fname, start, end, flags) - char *fname; - char *start; - char *end; - int flags; +save(char *fname, char *start, char *end, int flags) { int fd; char *string; @@ -167,8 +164,7 @@ save(fname, start, end, flags) /* loads a file, returns the filesize */ off_t -load(fname) - char *fname; +load(char *fname) { int fd = -1; //char *string; @@ -235,7 +231,7 @@ load(fname) params[P_RO].flags |= P_CHANGED; } } else { - sysemsg(fname); + sysemsg(fname); filemode = ERROR; } } @@ -333,12 +329,11 @@ load(fname) } -/* argument "dir" not used! +/* argument "dir" not used! * Needed for DOS version only */ void -bvi_init(dir) - char *dir; +bvi_init(char *dir) { char *initstr; char rcpath[MAXCMD]; @@ -352,7 +347,7 @@ bvi_init(dir) docmdline(initstr); return; } - + #ifdef DJGPP strcpy(rcpath, "c:"); strcpy(rcpath, dir); @@ -378,8 +373,7 @@ bvi_init(dir) int -enlarge(add) - off_t add; +enlarge(off_t add) { char *newmem; off_t savecur, savepag, savemax, saveundo; @@ -428,11 +422,10 @@ do_shell() #ifndef HAVE_STRDUP char * -strdup(s) - char *s; +strdup(char *s) { char *p; - size_t n; + size_t n; n = strlen(s) + 1; if ((p = (char *)malloc(n)) != NULL) @@ -447,10 +440,7 @@ strdup(s) * Copy contents of memory (with possible overlapping). */ char * -memmove(s1, s2, n) - char *s1; - char *s2; - size_t n; +memmove(char *s1, char *s2, size_t n) { bcopy(s2, s1, n); return(s1); @@ -459,9 +449,7 @@ memmove(s1, s2, n) off_t -alloc_buf(n, buffer) - off_t n; - char **buffer; +alloc_buf(off_t n, char **buffer) { if (*buffer == NULL) { *buffer = (char *)malloc(n); @@ -477,8 +465,7 @@ alloc_buf(n, buffer) int -addfile(fname) - char *fname; +addfile(char *fname) { int fd; off_t oldsize; diff --git a/macro.m4 b/macro.m4 index c28ed01..c8c0698 100644 --- a/macro.m4 +++ b/macro.m4 @@ -1,59 +1,59 @@ AC_CHECK_HEADER ( - [ncurses.h], - [ + [ncurses.h], + [ AC_SEARCH_LIBS ([initscr], [ncurses], - [ - AC_DEFINE(HAVE_NCURSES_H) - AC_SEARCH_LIBS([tputs], [tinfo]) - ],[ - AC_SEARCH_LIBS - ( - [initscr], [curses], + [ + AC_DEFINE(HAVE_NCURSES_H) + AC_SEARCH_LIBS([tputs], [tinfo]) + ],[ + AC_SEARCH_LIBS + ( + [initscr], [curses], [ - AC_DEFINE(HAVE_CURSES_H) - AC_SEARCH_LIBS([tputs], [tinfo]) + AC_DEFINE(HAVE_CURSES_H) + AC_SEARCH_LIBS([tputs], [tinfo]) ],[ - AC_MSG_ERROR([bvi requires a curses library]) + AC_MSG_ERROR([bvi requires a curses library]) ] ) - ] + ] ) - ],[ + ],[ AC_CHECK_HEADER ( - [curses.h], - [ - AC_SEARCH_LIBS + [curses.h], + [ + AC_SEARCH_LIBS + ( + [initscr], [curses], + [ + AC_DEFINE(HAVE_CURSES_H) + ],[ + AC_MSG_ERROR([bvi requires a curses library]) + ] + ) + ],[ + # statt: AC_MSG_ERROR([bvi requires a curses library]) + AC_CHECK_HEADER ( - [initscr], [curses], + [ncursesw/curses.h], [ - AC_DEFINE(HAVE_CURSES_H) + AC_SEARCH_LIBS + ( + [initscr], [curses], + [ + AC_DEFINE(HAVE_NCURSESW_CURSES_H) + ],[ + AC_MSG_ERROR([bvi requires a curses library]) + ] + ) ],[ - AC_MSG_ERROR([bvi requires a curses library]) + AC_MSG_ERROR([bvi requires a curses library]) ] ) - ],[ -# statt: AC_MSG_ERROR([bvi requires a curses library]) - AC_CHECK_HEADER - ( - [ncursesw/curses.h], - [ - AC_SEARCH_LIBS - ( - [initscr], [curses], - [ - AC_DEFINE(HAVE_NCURSESW_CURSES_H) - ],[ - AC_MSG_ERROR([bvi requires a curses library]) - ] - ) - ],[ - AC_MSG_ERROR([bvi requires a curses library]) - ] - ) - ] - ) - ] + ] + ) + ] ) diff --git a/patchlevel.h b/patchlevel.h index af30db7..2ed1b2c 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -1 +1 @@ -#define VERSION "1.4.2" +#define VERSION "1.5.0" diff --git a/re.c b/re.c index df6f9c2..cee506d 100644 --- a/re.c +++ b/re.c @@ -12,8 +12,9 @@ * 2013-08-24 V 1.4.0 * 2019-01-28 V 1.4.1 * 2023-03-07 V 1.4.2 + * 2025-07-19 V 1.5.0 * - * Copyright 1996-2023 by Gerhard Buergmann + * Copyright 1996-2025 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -32,11 +33,15 @@ /* You cannot use a common regexp subroutine, because \0 is a regular * character in a binary string ! */ - + #include "bvi.h" #include "set.h" +#ifdef __STDC__ +static int sbracket(int, char *, int); +#else static int sbracket(); +#endif char act_pat[MAXCMD]; /* found pattern */ char pattern[MAXCMD + 1]; @@ -48,9 +53,7 @@ char *emptyclass = "Bad character class|Empty byte class '[]' or '[^]' cannot ma PTR -bregexec(start, scan) - PTR start; - char *scan; +bregexec(PTR start, char *scan) { char *act; int count, test; @@ -125,10 +128,7 @@ bregexec(start, scan) static int -sbracket(start, scan, count) - int start; - char *scan; - int count; +sbracket(int start, char *scan, int count) { if (*scan++ == '^') { if (!memchr(scan, start, --count)) return 0; @@ -140,8 +140,7 @@ sbracket(start, scan, count) PTR -end_word(start) - PTR start; +end_word(PTR start) { PTR pos; @@ -155,9 +154,7 @@ end_word(start) /* wordsearch serves the 'W' and 'w' - command */ PTR -wordsearch(start, mode) - PTR start; - char mode; +wordsearch(PTR start, char mode) { PTR found; PTR pos; @@ -187,9 +184,7 @@ wordsearch(start, mode) /* backsearch serves the 'b' and 'B' command */ PTR -backsearch(start, mode) - PTR start; - char mode; +backsearch(PTR start, char mode) { PTR pos; int ccount; @@ -216,11 +211,7 @@ backsearch(start, mode) /* used by :s */ int -do_substitution(delim, line, startpos, endpos) - int delim; - char *line; - PTR startpos; - PTR endpos; +do_substitution(int delim, char *line, PTR startpos, PTR endpos) { int n; char *found; @@ -332,9 +323,9 @@ AGAIN: emsg(notfound); } else { if (P(P_TE)) - sprintf(string, "No match to %s", direct == FORWARD ? "BOTTOM" : "TOP"); + sprintf(string, "No match to %s", direct == FORWARD ? "BOTTOM" : "TOP"); else - sprintf(string, "Address search hit %s without matching pattern", + sprintf(string, "Address search hit %s without matching pattern", direct == FORWARD ? "BOTTOM" : "TOP"); emsg(string); } @@ -376,12 +367,7 @@ SKIP: * return address found */ PTR -searching(ch, line, startpos, endpos, flag) - int ch; - char *line; - PTR startpos; - PTR endpos; - int flag; +searching(int ch, char *line, PTR startpos, PTR endpos, int flag) { char *cmd = NULL; PTR found; @@ -455,9 +441,9 @@ searching(ch, line, startpos, endpos, flag) emsg(notfound); } else { if (P(P_TE)) { - sprintf(string, "No match to %s", sdir == FORWARD ? "BOTTOM" : "TOP"); + sprintf(string, "No match to %s", sdir == FORWARD ? "BOTTOM" : "TOP"); } else { - sprintf(string, "Address search hit %s without matching pattern", + sprintf(string, "Address search hit %s without matching pattern", sdir == FORWARD ? "BOTTOM" : "TOP"); } emsg(string); @@ -485,9 +471,7 @@ searching(ch, line, startpos, endpos, flag) * returns pointer to next character */ char * -patcpy(s1, s2, delim) - char *s1, *s2; - char delim; +patcpy(char *s1, char *s2, char delim) { while (*s2 != '\0' && *s2 != delim) { if (*s2 == '\\' && *(s2 + 1) == delim) s2++; @@ -500,14 +484,10 @@ patcpy(s1, s2, delim) PTR -fsearch_end(start, end, smem, s_end) +fsearch_end(PTR start, PTR end, char *smem, PTR *s_end) /* fsearch(start, end, smem) */ - PTR start; - PTR end; - char *smem; - PTR *s_end; { PTR spos; @@ -526,10 +506,7 @@ fsearch(start, end, smem) PTR -fsearch(start, end, smem) - PTR start; - PTR end; - char *smem; +fsearch(PTR start, PTR end, char *smem) { PTR s_end; return fsearch_end(start, end, smem, &s_end); @@ -537,10 +514,7 @@ fsearch(start, end, smem) PTR -rsearch(start, end, smem) - PTR start; - PTR end; - char *smem; +rsearch(PTR start, PTR end, char *smem) { PTR spos; @@ -560,9 +534,7 @@ rsearch(start, end, smem) * returns NULL on error or default_address, if nothing found */ PTR -calc_addr(pointer, def_addr) - char **pointer; - PTR def_addr; +calc_addr(char **pointer, PTR def_addr) { PTR addr; int ch, mark; diff --git a/recomp.c b/recomp.c index 1937b9c..e078689 100644 --- a/recomp.c +++ b/recomp.c @@ -6,8 +6,9 @@ * 2000-04-25 V 1.3.0 beta * 2000-07-12 V 1.3.0 final * 2019-01-28 V 1.4.1 + * 2025-07-19 V 1.5.0 * - * Copyright 1996-2019 by Gerhard Buergmann + * Copyright 1996-2025 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -26,7 +27,7 @@ /* You cannot use a common regexp subroutine, because \0 is a regular * character in a binary string ! */ - + #include "bvi.h" #include "set.h" @@ -46,9 +47,7 @@ extern char *emptyclass; * Compiling an ASCII sequence to a regex string */ int -ascii_comp(smem, pattern) - char *smem; - char *pattern; +ascii_comp(char *smem, char *pattern) { char *end; char *comp; @@ -167,9 +166,7 @@ ascii_comp(smem, pattern) * Compiling a hex expression to a regex string */ int -hex_comp(smem, pattern) - char *smem; - char *pattern; +hex_comp(char *smem, char *pattern) { char *end; char *comp; diff --git a/set.c b/set.c index 7f2707f..7a507ff 100644 --- a/set.c +++ b/set.c @@ -9,13 +9,14 @@ * 1999-07-02 V 1.2.0 beta * 1999-08-14 V 1.2.0 final * 2000-07-15 V 1.3.0 final - * 2001-10-10 V 1.3.1 + * 2001-10-10 V 1.3.1 * 2003-07-03 V 1.3.2 * 2010-06-02 V 1.2.4 * 2014-09-30 V 1.4.0 * 2019-01-22 V 1.4.1 + * 2025-07-19 V 1.5.0 * - * Copyright 1996-2019 by Gerhard Buergmann + * Copyright 1996-2025 by Gerhard Buergmann * gerhard@puon.at * * This program is free software; you can redistribute it and/or modify it @@ -34,46 +35,47 @@ #include "bvi.h" #include "set.h" -static int from_file = 0; +static int from_file = 0; static FILE *ffp; static char fbuf[MAXCMD+1]; static char buf[MAXCMD+1]; struct param params[] = { { "autowrite", "aw", FALSE, "", P_BOOL }, - { "columns", "cm", 16, "", P_NUM }, + { "columns", "cm", 0, "", P_NUM }, { "errorbells", "eb", FALSE, "", P_BOOL }, { "ignorecase", "ic", FALSE, "", P_BOOL }, - { "magic", "ma", TRUE, "", P_BOOL }, + { "magic", "ma", TRUE, "", P_BOOL }, { "memmove", "mm", FALSE, "", P_BOOL }, - { "offset", "of", 0, "", P_NUM }, + { "offset", "of", 0, "", P_NUM }, { "readonly", "ro", FALSE, "", P_BOOL }, - { "scroll", "scroll", 12, "", P_NUM }, + { "scroll", "scroll", 12, "", P_NUM }, { "showmode", "mo", TRUE, "", P_BOOL }, - { "term", "term", 0, "", P_TEXT }, - { "terse", "terse", FALSE, "", P_BOOL }, + { "term", "term", 0, "", P_TEXT }, + { "terse", "terse", FALSE, "", P_BOOL }, { "unixstyle", "us", FALSE, "", P_BOOL }, - { "window", "window", 25, "", P_NUM }, - { "wordlength", "wl", 4, "", P_NUM }, + { "window", "window", 0, "", P_NUM }, + { "wordlength", "wl", 4, "", P_NUM }, { "wrapscan", "ws", TRUE, "", P_BOOL }, - { "highlight", "hl", TRUE, "", P_BOOL }, - { "reverse", "re", FALSE, "", P_BOOL }, + { "highlight", "hl", TRUE, "", P_BOOL }, + { "reverse", "re", FALSE, "", P_BOOL }, #if defined(__MSDOS__) && !defined(DJGPP) - { "color", "co", 7, "", P_NUM }, + { "color", "co", 7, "", P_NUM }, #endif - { "", "", 0, "", 0, } /* end marker */ + { "", "", 0, "", 0, } /* end marker */ }; + int -doset(arg) - char *arg; /* parameter string */ +doset(char *arg) { - int i; + int i; char *s; - int did_window = FALSE; - int state = TRUE; /* new state of boolean parms. */ + int did_window = FALSE; + int state = TRUE; /* new state of boolean parms. */ char string[80]; + off_t val; if (arg == NULL) { showparms(FALSE); @@ -111,20 +113,38 @@ doset(arg) return 0; } if (!strcmp(params[i].fullname, "term")) { - emsg("Can't change type of terminal from within bvi"); + emsg("Can't change@type of terminal from within bvi"); return 1; } if (params[i].flags & P_NUM) { - if ((i == P_LI) || (i == P_OF)) did_window++; + if ((i == P_LI) || (i == P_OF) || (i == P_CM)) did_window++; if (arg[strlen(s)] != '=' || state == FALSE) { - sprintf(string, "Option %s is not a toggle", - params[i].fullname); + sprintf(string, "Option %s is not a toggle", params[i].fullname); emsg(string); return 1; } else { s = arg + strlen(s) + 1; - params[i].nvalue = strtoll(s, &s, 0); + val = strtoll(s, &s, 0); + if ((i == P_CM || i == P_LI) && (!strcmp("auto", s) || (val == 0))) { + if (i == P_CM) { + params[i].nvalue = 0; + Anzahl = ((COLS - AnzAdd - space) / 4); + } else { + params[i].nvalue = 0; + maxy = LINES - 1; + } + } else { + params[i].nvalue = val; + if (i == P_CM) { + Anzahl = val; + } else { + maxy = val; + } + } params[i].flags |= P_CHANGED; + if (i == P_LI) params[P_SS].nvalue = val / 2; + + #if defined(__MSDOS__) && !defined(DJGPP) if (i == P_CO) { textcolor(P(P_CO) & 0x07); @@ -134,22 +154,23 @@ doset(arg) } #endif if (i == P_CM) { + /* if (((COLS - AnzAdd - 1) / 4) >= P(P_CM)) { Anzahl = P(P_CM); } else { - Anzahl = P(P_CM) = ((COLS - AnzAdd - 1) / 4); + Anzahl = ((COLS - AnzAdd - 1) / 4); } - maxx = Anzahl * 4 + AnzAdd + 1; - Anzahl3 = Anzahl * 3; - status = Anzahl3 + Anzahl - 17; - screen = Anzahl * (maxy - 1); - did_window++; + */ + maxx = Anzahl * 4 + AnzAdd + 1; + Anzahl3 = Anzahl * 3; + status = Anzahl3 + Anzahl - statsize; + screen = Anzahl * (maxy - 1); stuffin("H"); /* set cursor at HOME */ } } } else { /* boolean */ if (arg[strlen(s)] == '=') { - emsg("Invalid set of boolean parameter"); + emsg("Invalid set@of boolean parameter"); return 1; } else { params[i].nvalue = state; @@ -169,7 +190,10 @@ doset(arg) } if (did_window) { + /* maxy = P(P_LI) - 1; + maxy = LINES - 1; + */ new_screen(); } @@ -179,28 +203,33 @@ doset(arg) /* show ALL parameters */ void -showparms(all) - int all; +showparms(int all) { struct param *p; - int n; + int n, i; + statusflag = 0; n = 2; + i = -1; msg("Parameters:\n"); for (p = ¶ms[0]; p->fullname[0] != '\0' ;p++) { + i++; if (!all && ((p->flags & P_CHANGED) == 0)) continue; - if (p->flags & P_BOOL) - sprintf(buf, " %s%s\n", - (p->nvalue ? " " : "no"), p->fullname); - else if (p->flags & P_TEXT) + if (p->flags & P_BOOL) { + sprintf(buf, " %s%s\n", (p->nvalue ? " " : "no"), p->fullname); + } else if (p->flags & P_TEXT) { sprintf(buf, " %s=%s\n", p->fullname, p->svalue); - else - sprintf(buf, " %s=%lld\n", p->fullname, (long long)p->nvalue); - + } else { + if ((p->nvalue == 0) && (i == P_CM || i == P_LI)) { + sprintf(buf, " %s=auto\n", p->fullname); + } else { + sprintf(buf, " %s=%lld\n", p->fullname, (long long)p->nvalue); + } + } msg(buf); n++; - if (n == params[P_LI].nvalue) { + if (n == maxy) { if (wait_return(FALSE)) return; n = 1; } @@ -211,8 +240,7 @@ showparms(all) /* reads the init file (.bvirc) */ int -read_rc(fn) - char *fn; +read_rc(char *fn) { int i; @@ -230,9 +258,7 @@ read_rc(fn) int -do_logic(mode, str) - int mode; - char *str; +do_logic(int mode, char *str) { int a, b; int value; @@ -289,13 +315,13 @@ do_logic(mode, str) b = a >> 8; a |= b; break; - case RROTATE: + case RROTATE: b = a << 8; a |= b; - a >>= value; + a >>= value; /* b = a << (8 - value); - a >>= value; + a >>= value; a |= b; */ break; @@ -303,7 +329,7 @@ do_logic(mode, str) break; case OR: a |= value; break; - case XOR: + case XOR: case NOT: a ^= value; break; case NEG: a ^= value; @@ -318,9 +344,7 @@ do_logic(mode, str) int -getcmdstr(p, x) - char *p; - int x; +getcmdstr(char *p, int x) { int c; int i, n; diff --git a/set.h b/set.h index 8995296..1abc28b 100644 --- a/set.h +++ b/set.h @@ -2,8 +2,8 @@ * * NOTE: Edit this file with tabstop=4 ! * - * Copyright 1996-2019 by Gerhard Buergmann - * Gerhard.Buergmann@puon.at + * Copyright 1996-2025 by Gerhard Buergmann + * gerhard@puon.at * * 1998-03-14 V 1.0.0 * 1999-01-14 V 1.1.0 @@ -14,6 +14,7 @@ * 2010-06-02 V 1.3.4 * 2013-08-23 V 1.4.0 * 2019-01-22 V 1.4.1 + * 2025-05-24 V 1.5.0 * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -34,7 +35,7 @@ struct param { char *shortname; /* permissible abbreviation */ off_t nvalue; char *svalue; - int flags; + int flags; }; extern struct param params[]; diff --git a/tags b/tags index 2f52151..d5989e2 100644 --- a/tags +++ b/tags @@ -1,551 +1,570 @@ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ -!_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ -!_TAG_OUTPUT_FILESEP slash /slash or backslash/ -!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ -!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ -!_TAG_PROC_CWD /home/bg/src/bvi/bvi/ // -!_TAG_PROGRAM_AUTHOR Universal Ctags Team // -!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ -!_TAG_PROGRAM_URL https://ctags.io/ /official site/ -!_TAG_PROGRAM_VERSION 5.9.0 // -AND bvi.h /^#define AND /;" d -ANSI bmore.h /^# define ANSI$/;" d -ANSI bvi.h /^# define ANSI$/;" d -APPEND comm.c /^# define APPEND /;" d file: -ASCII bmore.h /^#define ASCII /;" d -ASCII bvi.h /^#define ASCII /;" d -ASCII_DEL bvi.h /^#define ASCII_DEL /;" d -A_ATTRIBUTES doscur.h /^#define A_ATTRIBUTES /;" d -A_BLINK doscur.h /^#define A_BLINK /;" d -A_BOLD doscur.h /^#define A_BOLD /;" d -A_CHARTEXT doscur.h /^#define A_CHARTEXT /;" d -A_NORMAL doscur.h /^#define A_NORMAL /;" d -A_REVERSE doscur.h /^#define A_REVERSE /;" d -A_STANDOUT doscur.h /^#define A_STANDOUT /;" d -AnzAdd bmore.c /^int AnzAdd;$/;" v typeref:typename:int -AnzAdd bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v typeref:typename:int -Anzahl bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v typeref:typename:int -Anzahl3 bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v typeref:typename:int -Ausgabe_Datei bvi.c /^FILE *Ausgabe_Datei;$/;" v typeref:typename:FILE * -BACKWARD bmore.h /^#define BACKWARD /;" d -BACKWARD bvi.h /^#define BACKWARD /;" d +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION 5.9~svn20110310 // +AND bvi.h 100;" d +ANSI bmore.h 108;" d +ANSI bvi.h 130;" d +APPEND comm.c 53;" d file: +APPEND comm.c 56;" d file: +ASCII bmore.h 87;" d +ASCII bvi.h 107;" d +ASCII_DEL bvi.h 116;" d +A_ATTRIBUTES doscur.h 56;" d +A_BLINK doscur.h 54;" d +A_BOLD doscur.h 52;" d +A_CHARTEXT doscur.h 55;" d +A_NORMAL doscur.h 50;" d +A_REVERSE doscur.h 53;" d +A_STANDOUT doscur.h 51;" d +AnzAdd bmore.c /^int AnzAdd;$/;" v +AnzAdd bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v +Anzahl bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v +Anzahl3 bvi.c /^int AnzAdd, Anzahl, Anzahl3;$/;" v +Ausgabe_Datei bvi.c /^FILE *Ausgabe_Datei;$/;" v +BACKWARD bmore.h 89;" d +BACKWARD bvi.h 109;" d BLOCK_BEGIN bvi.h /^ BLOCK_BEGIN = 1,$/;" e enum:_block_datum BLOCK_END bvi.h /^ BLOCK_END = 2,$/;" e enum:_block_datum BLOCK_LEN bvi.h /^ BLOCK_LEN = 4$/;" e enum:_block_datum -BLOCK_SPECIAL bmore.h /^#define BLOCK_SPECIAL /;" d -BLOCK_SPECIAL bvi.h /^#define BLOCK_SPECIAL /;" d -BS bmore.h /^#define BS /;" d -BS bvi.h /^#define BS /;" d -BUFFER bmore.h /^#define BUFFER /;" d -BUFFER bvi.h /^#define BUFFER /;" d -BVICTRL bmore.h /^#define BVICTRL(/;" d -BVICTRL bvi.h /^#define BVICTRL(/;" d -CHARACTER_SPECIAL bmore.h /^#define CHARACTER_SPECIAL /;" d -CHARACTER_SPECIAL bvi.h /^#define CHARACTER_SPECIAL /;" d -CMDLNG bvi.h /^#define CMDLNG(/;" d -CMDSZ comm.c /^#define CMDSZ /;" d file: -COLS dosio.c /^int COLS = 80;$/;" v typeref:typename:int -CR bmore.h /^#define CR /;" d -CR bvi.h /^#define CR /;" d -DELIM bmore.h /^# define DELIM /;" d -DELIM bvi.h /^# define DELIM /;" d -DIRECTORY bmore.h /^#define DIRECTORY /;" d -DIRECTORY bvi.h /^#define DIRECTORY /;" d -ECHO dosio.c /^int ECHO = TRUE;$/;" v typeref:typename:int -END bmore.h /^#define END /;" d -END bvi.h /^#define END /;" d -ERR doscur.h /^#define ERR /;" d -ERROR bmore.h /^#define ERROR /;" d -ERROR bvi.h /^#define ERROR /;" d -ESC bmore.h /^#define ESC /;" d -ESC bvi.h /^#define ESC /;" d -ESC doscur.h /^#define ESC /;" d -FALSE bmore.h /^# define FALSE /;" d -FALSE bvi.h /^# define FALSE /;" d -FALSE doscur.h /^#define FALSE /;" d -FORWARD bmore.h /^#define FORWARD /;" d -FORWARD bvi.h /^#define FORWARD /;" d -HAVE_FCNTL_H dosconf.h /^#define HAVE_FCNTL_H /;" d -HAVE_LOCALE_H dosconf.h /^# define HAVE_LOCALE_H /;" d -HAVE_MEMMOVE dosconf.h /^#define HAVE_MEMMOVE /;" d -HAVE_STRDUP dosconf.h /^#define HAVE_STRDUP /;" d -HAVE_STRTOL dosconf.h /^#define HAVE_STRTOL /;" d -HELPFILE bmore.c /^# define HELPFILE /;" d file: -HEX bvi.h /^#define HEX /;" d -Home bm_unix.c /^char *Home; \/* go to home *\/$/;" v typeref:typename:char * -JOEHTG bvi.h /^#define JOEHTG$/;" d -KEY_BACKSPACE doscur.h /^#define KEY_BACKSPACE /;" d -KEY_DC doscur.h /^#define KEY_DC /;" d -KEY_DOWN doscur.h /^#define KEY_DOWN /;" d -KEY_ENTER doscur.h /^#define KEY_ENTER /;" d -KEY_F doscur.h /^#define KEY_F(/;" d -KEY_F0 doscur.h /^#define KEY_F0 /;" d -KEY_HOME doscur.h /^#define KEY_HOME /;" d -KEY_IC doscur.h /^#define KEY_IC /;" d -KEY_LEFT doscur.h /^#define KEY_LEFT /;" d -KEY_LL doscur.h /^#define KEY_LL /;" d -KEY_NPAGE doscur.h /^#define KEY_NPAGE /;" d -KEY_PPAGE doscur.h /^#define KEY_PPAGE /;" d -KEY_RETURN doscur.h /^#define KEY_RETURN /;" d -KEY_RIGHT doscur.h /^#define KEY_RIGHT /;" d -KEY_UP doscur.h /^#define KEY_UP /;" d -LINES dosio.c /^int LINES = 25;$/;" v typeref:typename:int -LROTATE bvi.h /^#define LROTATE /;" d -LSHIFT bvi.h /^#define LSHIFT /;" d -MAXCMD bmore.h /^#define MAXCMD /;" d -MAXCMD bvi.h /^#define MAXCMD /;" d -MAXNAME comm.c /^#define MAXNAME /;" d file: -MAX_ONE_ARG comm.c /^#define MAX_ONE_ARG /;" d file: -MAX_ONE_FILE comm.c /^#define MAX_ONE_FILE /;" d file: -NEG bvi.h /^#define NEG /;" d -NEW bmore.h /^#define NEW /;" d -NEW bvi.h /^#define NEW /;" d -NL bmore.h /^#define NL /;" d -NL bvi.h /^#define NL /;" d -NODEL dosio.c /^int NODEL = FALSE;$/;" v typeref:typename:int -NOT bvi.h /^#define NOT /;" d -NO_ADDR comm.c /^#define NO_ADDR /;" d file: -NO_ARG comm.c /^#define NO_ARG /;" d file: -NULL bmore.h /^# define NULL /;" d -NULL bvi.h /^# define NULL /;" d -OFF_T_MAX io.c /^# define OFF_T_MAX /;" d file: -ONE bmore.h /^#define ONE /;" d -ONE bvi.h /^#define ONE /;" d -ONE_ARG comm.c /^#define ONE_ARG /;" d file: -ONE_FILE comm.c /^#define ONE_FILE /;" d file: -OR bvi.h /^#define OR /;" d -P set.h /^#define P(/;" d -PARTIAL bmore.h /^#define PARTIAL /;" d -PARTIAL bvi.h /^#define PARTIAL /;" d -PRINTF bmore.c /^# define PRINTF /;" d file: -PTR bmore.h /^# define PTR /;" d -PTR bvi.h /^# define PTR /;" d -P_AW set.h /^#define P_AW /;" d -P_BOOL set.h /^#define P_BOOL /;" d -P_CHANGED set.h /^#define P_CHANGED /;" d -P_CM set.h /^#define P_CM /;" d -P_CO set.h /^#define P_CO /;" d -P_EB set.h /^#define P_EB /;" d -P_HL set.h /^#define P_HL /;" d -P_IC set.h /^#define P_IC /;" d -P_LI set.h /^#define P_LI /;" d -P_MA set.h /^#define P_MA /;" d -P_MM set.h /^#define P_MM /;" d -P_MO set.h /^#define P_MO /;" d -P_NUM set.h /^#define P_NUM /;" d -P_OF set.h /^#define P_OF /;" d -P_RE set.h /^#define P_RE /;" d -P_RO set.h /^#define P_RO /;" d -P_SS set.h /^#define P_SS /;" d -P_TE set.h /^#define P_TE /;" d -P_TEXT set.h /^#define P_TEXT /;" d -P_TT set.h /^#define P_TT /;" d -P_US set.h /^#define P_US /;" d -P_WL set.h /^#define P_WL /;" d -P_WS set.h /^#define P_WS /;" d -REGULAR bmore.h /^#define REGULAR /;" d -REGULAR bvi.h /^#define REGULAR /;" d -REPLACE bmore.h /^#define REPLACE /;" d -RROTATE bvi.h /^#define RROTATE /;" d -RSHIFT bvi.h /^#define RSHIFT /;" d -SEARCH bmore.h /^#define SEARCH /;" d -SEARCH bvi.h /^#define SEARCH /;" d -SKIP_WHITE bvi.h /^#define SKIP_WHITE /;" d -STAR bmore.h /^#define STAR /;" d -STAR bvi.h /^#define STAR /;" d -STDC_HEADERS dosconf.h /^#define STDC_HEADERS /;" d -S_GLOBAL bvi.h /^#define S_GLOBAL /;" d -S_ISBLK bvi.h /^#define S_ISBLK(/;" d -S_ISCHR bvi.h /^#define S_ISCHR(/;" d -S_ISDIR bvi.h /^#define S_ISDIR(/;" d -S_ISFIFO bvi.h /^#define S_ISFIFO(/;" d -S_ISREG bvi.h /^#define S_ISREG(/;" d -TBUFSIZ bm_dos.c /^#define TBUFSIZ /;" d file: -TBUFSIZ bm_unix.c /^#define TBUFSIZ /;" d file: -TRUE bmore.h /^# define TRUE /;" d -TRUE bvi.h /^# define TRUE /;" d -TRUE doscur.h /^#define TRUE /;" d -U_APPEND bvi.h /^#define U_APPEND /;" d -U_BACK bvi.h /^#define U_BACK /;" d -U_DELETE bvi.h /^#define U_DELETE /;" d -U_EDIT bvi.h /^#define U_EDIT /;" d -U_INSERT bvi.h /^#define U_INSERT /;" d -U_TILDE bvi.h /^#define U_TILDE /;" d -U_TRUNC bvi.h /^#define U_TRUNC /;" d -VERSION patchlevel.h /^#define VERSION /;" d -WINDOW doscur.h /^#define WINDOW /;" d -WRITE comm.c /^# define WRITE /;" d file: -XOR bvi.h /^#define XOR /;" d +BLOCK_SPECIAL bmore.h 79;" d +BLOCK_SPECIAL bvi.h 76;" d +BS bmore.h 92;" d +BS bvi.h 112;" d +BUFFER bmore.h 120;" d +BUFFER bvi.h 144;" d +BVICTRL bmore.h 96;" d +BVICTRL bvi.h 115;" d +CHARACTER_SPECIAL bmore.h 78;" d +CHARACTER_SPECIAL bvi.h 75;" d +CMDLNG bvi.h 118;" d +CMDSZ comm.c 59;" d file: +COLS dosio.c /^int COLS = 80;$/;" v +CR bmore.h 90;" d +CR bvi.h 110;" d +DELIM bmore.h 111;" d +DELIM bmore.h 116;" d +DELIM bvi.h 133;" d +DELIM bvi.h 140;" d +DIRECTORY bmore.h 77;" d +DIRECTORY bvi.h 74;" d +ECHO dosio.c /^int ECHO = TRUE;$/;" v +END bmore.h 83;" d +END bvi.h 80;" d +ERR doscur.h 147;" d +ERROR bmore.h 74;" d +ERROR bvi.h 71;" d +ESC bmore.h 93;" d +ESC bvi.h 113;" d +ESC doscur.h 31;" d +FALSE bmore.h 104;" d +FALSE bvi.h 126;" d +FALSE doscur.h 29;" d +FORWARD bmore.h 88;" d +FORWARD bvi.h 108;" d +HAVE_CURSES_H acconfig.h 5;" d +HAVE_FCNTL_H dosconf.h 40;" d +HAVE_LOCALE_H dosconf.h 44;" d +HAVE_MEMMOVE dosconf.h 31;" d +HAVE_NCURSESW_CURSES_H acconfig.h 7;" d +HAVE_NCURSES_H acconfig.h 3;" d +HAVE_NCURSES_TERM_H acconfig.h 13;" d +HAVE_STRDUP dosconf.h 34;" d +HAVE_STRTOL dosconf.h 37;" d +HELPFILE bmore.c 45;" d file: +HELPFILE bmore.c 47;" d file: +HEX bvi.h 106;" d +Home bm_unix.c /^char *Home; \/* go to home *\/$/;" v +JOEHTG bvi.h 45;" d +KEY_BACKSPACE doscur.h 42;" d +KEY_DC doscur.h 45;" d +KEY_DOWN doscur.h 34;" d +KEY_ENTER doscur.h 41;" d +KEY_F doscur.h 33;" d +KEY_F0 doscur.h 32;" d +KEY_HOME doscur.h 43;" d +KEY_IC doscur.h 46;" d +KEY_LEFT doscur.h 36;" d +KEY_LL doscur.h 44;" d +KEY_NPAGE doscur.h 38;" d +KEY_PPAGE doscur.h 39;" d +KEY_RETURN doscur.h 40;" d +KEY_RIGHT doscur.h 37;" d +KEY_UP doscur.h 35;" d +LINES dosio.c /^int LINES = 25;$/;" v +LROTATE bvi.h 98;" d +LSHIFT bvi.h 96;" d +MAXCMD bmore.h 119;" d +MAXCMD bvi.h 143;" d +MAXNAME comm.c 60;" d file: +MAX_ONE_ARG comm.c 65;" d file: +MAX_ONE_FILE comm.c 67;" d file: +NEED_PUTC_CHAR acconfig.h 11;" d +NEED_PUTC_CHAR bm_unix.c 54;" d file: +NEG bvi.h 103;" d +NEW bmore.h 76;" d +NEW bvi.h 73;" d +NL bmore.h 91;" d +NL bvi.h 111;" d +NODEL dosio.c /^int NODEL = FALSE;$/;" v +NOT bvi.h 104;" d +NO_ADDR comm.c 62;" d file: +NO_ARG comm.c 63;" d file: +NO_SYSERRL acconfig.h 9;" d +NULL bmore.h 99;" d +NULL bvi.h 121;" d +OFF_T_MAX io.c 49;" d file: +ONE bmore.h 84;" d +ONE bvi.h 81;" d +ONE_ARG comm.c 64;" d file: +ONE_FILE comm.c 66;" d file: +OR bvi.h 101;" d +P set.h 78;" d +PARTIAL bmore.h 80;" d +PARTIAL bvi.h 77;" d +PRINTF bmore.c 40;" d file: +PRINTF bmore.c 42;" d file: +PTR bmore.h 109;" d +PTR bmore.h 115;" d +PTR bvi.h 131;" d +PTR bvi.h 139;" d +P_AW set.h 55;" d +P_BOOL set.h 43;" d +P_CHANGED set.h 46;" d +P_CM set.h 56;" d +P_CO set.h 73;" d +P_EB set.h 57;" d +P_HL set.h 71;" d +P_IC set.h 58;" d +P_LI set.h 68;" d +P_MA set.h 59;" d +P_MM set.h 60;" d +P_MO set.h 64;" d +P_NUM set.h 44;" d +P_OF set.h 61;" d +P_RE set.h 72;" d +P_RO set.h 62;" d +P_SS set.h 63;" d +P_TE set.h 66;" d +P_TEXT set.h 45;" d +P_TT set.h 65;" d +P_US set.h 67;" d +P_WL set.h 69;" d +P_WS set.h 70;" d +REGULAR bmore.h 75;" d +REGULAR bvi.h 72;" d +REPLACE bmore.h 95;" d +RROTATE bvi.h 99;" d +RSHIFT bvi.h 97;" d +SEARCH bmore.h 94;" d +SEARCH bvi.h 114;" d +SKIP_WHITE bvi.h 146;" d +STAR bmore.h 85;" d +STAR bvi.h 82;" d +STDC_HEADERS dosconf.h 28;" d +S_GLOBAL bvi.h 93;" d +S_ISBLK bvi.h 210;" d +S_ISCHR bvi.h 209;" d +S_ISDIR bvi.h 208;" d +S_ISFIFO bvi.h 212;" d +S_ISREG bvi.h 211;" d +TBUFSIZ bm_dos.c 32;" d file: +TBUFSIZ bm_unix.c 34;" d file: +TRUE bmore.h 103;" d +TRUE bvi.h 125;" d +TRUE doscur.h 28;" d +U_APPEND bvi.h 90;" d +U_BACK bvi.h 89;" d +U_DELETE bvi.h 88;" d +U_EDIT bvi.h 85;" d +U_INSERT bvi.h 87;" d +U_TILDE bvi.h 91;" d +U_TRUNC bvi.h 86;" d +VERSION patchlevel.h 1;" d +WINDOW doscur.h 60;" d +WRITE comm.c 52;" d file: +WRITE comm.c 55;" d file: +XOR bvi.h 102;" d _block_datum bvi.h /^typedef enum _block_datum {$/;" g -act_pat re.c /^char act_pat[MAXCMD]; \/* found pattern *\/$/;" v typeref:typename:char[] -addch doscur.h /^#define addch(/;" d -addfile io.c /^addfile(fname)$/;" f -addr_flag comm.c /^int addr_flag;$/;" v typeref:typename:int -addr_form bmore.c /^char addr_form[15];$/;" v typeref:typename:char[15] -addr_form bvi.c /^char addr_form[15];$/;" v typeref:typename:char[15] -addstr doscur.h /^#define addstr(/;" d -again recomp.c /^int again = 0;$/;" v typeref:typename:int -alloc_buf io.c /^alloc_buf(n, buffer)$/;" f -altfile comm.c /^static char *altfile = NULL; \/* alternate file *\/$/;" v typeref:typename:char * file: -ambigous comm.c /^char *ambigous = "Ambigous|Too many file names";$/;" v typeref:typename:char * -ambvalue comm.c /^char *ambvalue = "Ambigous|Too many values";$/;" v typeref:typename:char * -arrnum bmore.c /^int arrnum = 0;$/;" v typeref:typename:int -arrnum bvi.c /^int arrnum = 0;$/;" v typeref:typename:int -ascii_comp recomp.c /^ascii_comp(smem, pattern)$/;" f -ascii_flag bmore.c /^int ascii_flag = 0;$/;" v typeref:typename:int -attrset dosio.c /^attrset(int attr)$/;" f typeref:typename:void -backsearch re.c /^backsearch(start, mode)$/;" f -beep doscur.h /^#define beep(/;" d -block_begin bvi.c /^off_t block_begin, block_end, block_size;$/;" v typeref:typename:off_t +act_pat re.c /^char act_pat[MAXCMD]; \/* found pattern *\/$/;" v +addch doscur.h 95;" d +addfile dosio.c /^addfile(char *fname)$/;" f +addfile io.c /^addfile(char *fname)$/;" f +addr_flag comm.c /^int addr_flag;$/;" v +addr_form bmore.c /^char addr_form[15];$/;" v +addr_form bvi.c /^char addr_form[15];$/;" v +addstr doscur.h 99;" d +again recomp.c /^int again = 0;$/;" v +alloc_buf dosio.c /^alloc_buf(off_t n, char **buffer)$/;" f +alloc_buf io.c /^alloc_buf(off_t n, char **buffer)$/;" f +altfile comm.c /^static char *altfile = NULL; \/* alternate file *\/$/;" v file: +ambigous comm.c /^char *ambigous = "Ambiguous|Too many file names";$/;" v +ambvalue comm.c /^char *ambvalue = "Ambiguous|Too many values";$/;" v +arrnum bmore.c /^int arrnum = 0;$/;" v +arrnum bvi.c /^int arrnum = 0;$/;" v +ascii_comp recomp.c /^ascii_comp(char *smem, char *pattern)$/;" f +ascii_flag bmore.c /^int ascii_flag = 0;$/;" v +attrset dosio.c /^attrset(int attr)$/;" f +backsearch re.c /^backsearch(PTR start, char mode)$/;" f +beep doscur.h 76;" d +block_begin bvi.c /^off_t block_begin, block_end, block_size;$/;" v block_datum bvi.h /^} block_datum;$/;" t typeref:enum:_block_datum -block_end bvi.c /^off_t block_begin, block_end, block_size;$/;" v typeref:typename:off_t -block_flag bvi.c /^int block_flag = 0;$/;" v typeref:typename:int -block_read io.c /^static off_t block_read;$/;" v typeref:typename:off_t file: -block_size bvi.c /^off_t block_begin, block_end, block_size;$/;" v typeref:typename:off_t -bmbeep bmore.c /^bmbeep() {$/;" f typeref:typename:void -bmore_search_pat bmore.c /^char bmore_search_pat[BUFFER]; \/* \/ or ? command *\/$/;" v typeref:typename:char[] -bmregexec bmore.c /^bmregexec(scan)$/;" f -bmsearch bmore.c /^bmsearch(ch)$/;" f -bregexec re.c /^bregexec(start, scan)$/;" f +block_end bvi.c /^off_t block_begin, block_end, block_size;$/;" v +block_flag bvi.c /^int block_flag = 0;$/;" v +block_read io.c /^static off_t block_read;$/;" v file: +block_size bvi.c /^off_t block_begin, block_end, block_size;$/;" v +bmbeep bmore.c /^bmbeep() {$/;" f +bmore_search_pat bmore.c /^char bmore_search_pat[BUFFER]; \/* \/ or ? command *\/$/;" v +bmregexec bmore.c /^bmregexec(char *scan)$/;" f +bmsearch bmore.c /^bmsearch(int ch)$/;" f +bregexec re.c /^bregexec(PTR start, char *scan)$/;" f buf comm.c /^static struct stat buf;$/;" v typeref:struct:stat file: buf dosio.c /^static struct stat buf;$/;" v typeref:struct:stat file: buf io.c /^static struct stat buf;$/;" v typeref:struct:stat file: -buf set.c /^static char buf[MAXCMD+1];$/;" v typeref:typename:char[] file: -buffer1 bmore.c /^char buffer1[MAXCMD], buffer2[MAXCMD];$/;" v typeref:typename:char[] -buffer2 bmore.c /^char buffer1[MAXCMD], buffer2[MAXCMD];$/;" v typeref:typename:char[] -bvi_init io.c /^bvi_init(dir)$/;" f -bytepos bmore.c /^off_t bytepos, oldpos;$/;" v typeref:typename:off_t -c_argc comm.c /^static int c_argc = 0;$/;" v typeref:typename:int file: -c_argv comm.c /^static char *c_argv[9];$/;" v typeref:typename:char * [9] file: -c_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v typeref:typename:int -calc_addr re.c /^calc_addr(pointer, def_addr)$/;" f -calc_size bvi.c /^calc_size(arg)$/;" f -cbreak doscur.h /^#define cbreak(/;" d -chk_comm comm.c /^chk_comm(flag)$/;" f -chtype doscur.h /^#define chtype /;" d -clear doscur.h /^#define clear(/;" d -clear_marks edit.c /^clear_marks()$/;" f typeref:typename:void -clear_sc bm_unix.c /^char *clear_sc; \/* clear screen *\/$/;" v typeref:typename:char * -clearscreen bm_dos.c /^clearscreen()$/;" f typeref:typename:void -clearscreen bm_unix.c /^clearscreen()$/;" f typeref:typename:void -clearstr comm.c /^clearstr()$/;" f typeref:typename:void +buf set.c /^static char buf[MAXCMD+1];$/;" v file: +buffer1 bmore.c /^char buffer1[MAXCMD], buffer2[MAXCMD];$/;" v +buffer2 bmore.c /^char buffer1[MAXCMD], buffer2[MAXCMD];$/;" v +bvi_init dosio.c /^bvi_init(char *dir)$/;" f +bvi_init io.c /^bvi_init(char *dir)$/;" f +bytepos bmore.c /^off_t bytepos, oldpos;$/;" v +c_argc comm.c /^static int c_argc = 0;$/;" v file: +c_argv comm.c /^static char *c_argv[9];$/;" v file: +c_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v +calc_addr re.c /^calc_addr(char **pointer, PTR def_addr)$/;" f +calc_size bvi.c /^calc_size(char *arg)$/;" f +cbreak doscur.h 136;" d +chk_comm comm.c /^chk_comm(int flag)$/;" f +chtype doscur.h 58;" d +clear doscur.h 83;" d +clear_marks edit.c /^clear_marks()$/;" f +clear_sc bm_unix.c /^char *clear_sc; \/* clear screen *\/$/;" v +clearscreen bm_dos.c /^clearscreen()$/;" f +clearscreen bm_unix.c /^clearscreen()$/;" f +clearstr comm.c /^clearstr()$/;" f cleartoeol bm_dos.c /^cleartoeol()$/;" f -cleartoeol bm_unix.c /^cleartoeol()$/;" f typeref:typename:void -clrtoeol doscur.h /^#define clrtoeol(/;" d -cmdbuf bmore.c /^static char cmdbuf[2 * MAXCMD];$/;" v typeref:typename:char[] file: -cmdstr bvi.c /^char cmdstr[MAXCMD+1] = "";$/;" v typeref:typename:char[] -cnt bmore.c /^static int cnt = 0;$/;" v typeref:typename:int file: -contrd edit.c /^char contrd[][4] = {"NUL", " ^A", " ^B", " ^C", " ^D", " ^E", " ^F", "BEL",$/;" v typeref:typename:char[][4] -contru edit.c /^char contru[][4] = {"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",$/;" v typeref:typename:char[][4] -copyright bmore.c /^char *copyright = "GPL (C) 1990-2022 by Gerhard Buergmann";$/;" v typeref:typename:char * -copyright bvi.c /^char *copyright = "(C) GPL 1996-2023 by Gerhard Buergmann";$/;" v typeref:typename:char * -corr bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v typeref:typename:int -cur_back edit.c /^cur_back()$/;" f typeref:typename:int -cur_forw edit.c /^cur_forw(check)$/;" f -curfile bvi.c /^int curfile; \/* number of the current file *\/$/;" v typeref:typename:int -curpos bvi.c /^PTR curpos;$/;" v typeref:typename:PTR -curr_file bmore.c /^FILE *curr_file = NULL, *help_file;$/;" v typeref:typename:FILE * -current bvi.c /^PTR current;$/;" v typeref:typename:PTR -current_start bvi.c /^PTR current_start;$/;" v typeref:typename:PTR -d_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v typeref:typename:int -dbug bm_dos.c /^FILE *dbug;$/;" v typeref:typename:FILE * -delch dosio.c /^delch()$/;" f typeref:typename:void -deleteln doscur.h /^#define deleteln(/;" d -dlines bm_unix.c /^int dum_opt, dlines;$/;" v typeref:typename:int -do_append bvi.c /^do_append(count, buf)$/;" f -do_back edit.c /^do_back(n, start)$/;" f -do_delete edit.c /^do_delete(n, start)$/;" f -do_exit comm.c /^do_exit()$/;" f typeref:typename:void -do_ft edit.c /^do_ft(ch, flag)$/;" f -do_header bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v typeref:typename:int -do_ins_chg edit.c /^do_ins_chg(start, arg, mode)$/;" f -do_logic set.c /^do_logic(mode, str)$/;" f -do_mark edit.c /^do_mark(mark, addr)$/;" f -do_next bmore.c /^do_next(n)$/;" f -do_over bvi.c /^do_over(loc, n, buf)$/;" f -do_put bvi.c /^do_put(loc, n, buf)$/;" f -do_shell io.c /^do_shell()$/;" f typeref:typename:void -do_substitution re.c /^do_substitution(delim, line, startpos, endpos)$/;" f -do_tilde bvi.c /^do_tilde(count)$/;" f -do_undo bvi.c /^do_undo()$/;" f typeref:typename:void -do_z edit.c /^do_z(mode)$/;" f -docmdline comm.c /^docmdline(cmdline)$/;" f -doecmd comm.c /^doecmd(arg, force)$/;" f -doset set.c /^doset(arg)$/;" f +cleartoeol bm_unix.c /^cleartoeol()$/;" f +clrtoeol doscur.h 79;" d +cmdbuf bmore.c /^static char cmdbuf[2 * MAXCMD];$/;" v file: +cmdstr bvi.c /^char cmdstr[MAXCMD+1] = "";$/;" v +cnt bmore.c /^static int cnt = 0;$/;" v file: +contrd edit.c /^char contrd[][4] = {"NUL", " ^A", " ^B", " ^C", " ^D", " ^E", " ^F", "BEL",$/;" v +contru edit.c /^char contru[][4] = {"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",$/;" v +copyright bmore.c /^char *copyright = "GPL (C) 1990-2022 by Gerhard Buergmann";$/;" v +copyright bvi.c /^char *copyright = "(C) GPL 1996-2025 by Gerhard Buergmann";$/;" v +corr bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v +cur_back edit.c /^cur_back()$/;" f +cur_forw edit.c /^cur_forw(int check)$/;" f +curfile bvi.c /^int curfile; \/* number of the current file *\/$/;" v +curpos bvi.c /^PTR curpos;$/;" v +curr_file bmore.c /^FILE *curr_file = NULL, *help_file;$/;" v +current bvi.c /^PTR current;$/;" v +current_start bvi.c /^PTR current_start;$/;" v +d_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v +d_memcpy dosio.c /^d_memcpy(PTR dest, PTR src, off_t n)$/;" f +d_memmove dosio.c /^d_memmove(PTR dest, PTR src, off_t n)$/;" f +dbug bm_dos.c /^FILE *dbug;$/;" v +delch dosio.c /^delch()$/;" f +deleteln doscur.h 110;" d +dlines bm_unix.c /^int dum_opt, dlines;$/;" v +do_append bvi.c /^do_append(off_t count, char *buf)$/;" f +do_back edit.c /^do_back(off_t n, PTR start)$/;" f +do_delete edit.c /^do_delete(off_t n, PTR start)$/;" f +do_exit comm.c /^do_exit()$/;" f +do_ft edit.c /^do_ft(int ch, int flag)$/;" f +do_header bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v +do_ins_chg edit.c /^do_ins_chg(PTR start, char *arg, int mode)$/;" f +do_logic set.c /^do_logic(int mode, char *str)$/;" f +do_mark edit.c /^do_mark(int mark, PTR addr)$/;" f +do_next bmore.c /^do_next(int n)$/;" f +do_over bvi.c /^do_over(PTR loc, off_t n, PTR buf)$/;" f +do_put bvi.c /^do_put(PTR loc, off_t n, PTR buf)$/;" f +do_shell dosio.c /^do_shell()$/;" f +do_shell io.c /^do_shell()$/;" f +do_substitution re.c /^do_substitution(int delim, char *line, PTR startpos, PTR endpos)$/;" f +do_tilde bvi.c /^do_tilde(off_t count)$/;" f +do_undo bvi.c /^do_undo()$/;" f +do_z edit.c /^do_z(int mode)$/;" f +docmdline comm.c /^docmdline(char *cmdline)$/;" f +doecmd comm.c /^doecmd(char *arg, int force)$/;" f +doset set.c /^doset(char *arg)$/;" f doshell bm_dos.c /^doshell(cmd)$/;" f -doshell bm_unix.c /^doshell(cmd)$/;" f -doupdate doscur.h /^#define doupdate(/;" d -dum_opt bm_unix.c /^int dum_opt, dlines;$/;" v typeref:typename:int -dup_print_flag bmore.c /^int dup_print_flag = 0;$/;" v typeref:typename:int -echo doscur.h /^#define echo(/;" d -edit edit.c /^edit(mode)$/;" f -edits bvi.c /^int edits = 0;$/;" v typeref:typename:int -emptyclass bmore.c /^char *emptyclass = "Empty byte class '[]' or '[^]'";$/;" v typeref:typename:char * -emptyclass re.c /^char *emptyclass = "Bad character class|Empty byte class '[]' or '[^]' cannot match";$/;" v typeref:typename:char * -emsg bmore.c /^emsg(s)$/;" f -emsg comm.c /^emsg(s)$/;" f -end_addr comm.c /^PTR end_addr;$/;" v typeref:typename:PTR -end_word re.c /^end_word(start)$/;" f -endwin doscur.h /^#define endwin(/;" d -enlarge io.c /^enlarge(add)$/;" f -env bvi.c /^jmp_buf env; \/* context for `longjmp' function *\/$/;" v typeref:typename:jmp_buf -erase doscur.h /^#define erase(/;" d -erase_ln bm_unix.c /^char *erase_ln; \/* erase line *\/$/;" v typeref:typename:char * -erasechar doscur.h /^#define erasechar(/;" d -estring bmore.c /^char estring[MAXCMD] = ""; \/* string for shell escape *\/$/;" v typeref:typename:char[] -extra comm.c /^char *extra = "Extra chars|Extra characters at end of command";$/;" v typeref:typename:char * -exval bmore.c /^int exval = 0;$/;" v typeref:typename:int -fbuf set.c /^static char fbuf[MAXCMD+1];$/;" v typeref:typename:char[] file: -ffp set.c /^static FILE *ffp;$/;" v typeref:typename:FILE * file: -file_nr bmore.c /^int file_nr = 0; \/* number of current input file *\/$/;" v typeref:typename:int -fileinfo edit.c /^fileinfo(fname)$/;" f -filemode dosio.c /^int filemode;$/;" v typeref:typename:int -filemode io.c /^int filemode;$/;" v typeref:typename:int -files bmore.c /^char **files; \/* list of input files *\/$/;" v typeref:typename:char ** -files bvi.c /^char **files; \/* list of input files *\/$/;" v typeref:typename:char ** -filesize bmore.c /^off_t screen_home, filesize;$/;" v typeref:typename:off_t -filesize bvi.c /^off_t filesize, memsize, undosize;$/;" v typeref:typename:off_t -flags set.h /^ int flags;$/;" m struct:param typeref:typename:int -flash doscur.h /^#define flash(/;" d -flushinp doscur.h /^#define flushinp(/;" d -fname_buf bvi.c /^char *fname_buf = NULL;$/;" v typeref:typename:char * -fnum bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v typeref:typename:int -from_file set.c /^static int from_file = 0;$/;" v typeref:typename:int file: -fsearch re.c /^fsearch(start, end, smem)$/;" f -fsearch_end re.c /^fsearch_end(start, end, smem, s_end)$/;" f -fullname set.h /^ char *fullname; \/* full parameter name *\/$/;" m struct:param typeref:typename:char * -getbegyx doscur.h /^#define getbegyx(/;" d -getcbuff edit.c /^static char getcbuff[BUFFER];$/;" v typeref:typename:char[] file: -getch dosio.c /^getch()$/;" f typeref:typename:int -getcmdstr set.c /^getcmdstr(p, x)$/;" f -getcnext edit.c /^static char *getcnext = NULL;$/;" v typeref:typename:char * file: -getmaxyx doscur.h /^#define getmaxyx(/;" d -getyx doscur.h /^#define getyx(/;" d -got_int bm_dos.c /^int got_int;$/;" v typeref:typename:int -got_int bm_unix.c /^int got_int;$/;" v typeref:typename:int -help_file bmore.c /^FILE *curr_file = NULL, *help_file;$/;" v typeref:typename:FILE * -helppath bmore.c /^char helppath[MAXCMD];$/;" v typeref:typename:char[] -hex_comp recomp.c /^hex_comp(smem, pattern)$/;" f -hexchar recomp.c /^hexchar()$/;" f typeref:typename:int -highlight bm_dos.c /^highlight()$/;" f typeref:typename:void -highlight bm_unix.c /^highlight()$/;" f typeref:typename:void -hl_spat edit.c /^long hl_spat = 0;$/;" v typeref:typename:long -home bm_dos.c /^home()$/;" f typeref:typename:void -home bm_unix.c /^home()$/;" f typeref:typename:void -icnt bmore.c /^static int icnt = 0;$/;" v typeref:typename:int file: -idlok doscur.h /^#define idlok(/;" d -ignore_case recomp.c /^int ignore_case = 0;$/;" v typeref:typename:int -inch dosio.c /^inch()$/;" f typeref:typename:int -init_byte bmore.c /^off_t init_byte = 0;$/;" v typeref:typename:off_t -init_search bmore.c /^int init_search = 0;$/;" v typeref:typename:int -initscr doscur.h /^#define initscr(/;" d -initterm bm_dos.c /^initterm()$/;" f typeref:typename:void -initterm bm_unix.c /^initterm()$/;" f typeref:typename:void -insch dosio.c /^insch(int c)$/;" f typeref:typename:void -insertln doscur.h /^#define insertln(/;" d -jmpproc bvi.c /^jmpproc(sig)$/;" f -keypad doscur.h /^#define keypad(/;" d -last_motion bvi.c /^PTR last_motion;$/;" v typeref:typename:PTR -last_search bmore.c /^off_t last_search = 0;$/;" v typeref:typename:off_t -linbuf edit.c /^char linbuf[16384];$/;" v typeref:typename:char[16384] -line bvi.c /^static char line[MAXCMD+1];$/;" v typeref:typename:char[] file: -lineout edit.c /^lineout()$/;" f typeref:typename:int -load dosio.c /^load(char *fname)$/;" f typeref:typename:off_t -load io.c /^load(fname)$/;" f -loc bvi.c /^int loc;$/;" v typeref:typename:int -magic recomp.c /^int magic = 1;$/;" v typeref:typename:int -main bmore.c /^main(argc, argv)$/;" f -main bvi.c /^main(argc, argv)$/;" f -mark bvi.c /^static int mark;$/;" v typeref:typename:int file: -markbuf bvi.c /^PTR markbuf[26];$/;" v typeref:typename:PTR[26] -maxpos bvi.c /^PTR maxpos;$/;" v typeref:typename:PTR -maxx bmore.c /^int maxx, maxy;$/;" v typeref:typename:int -maxx bvi.c /^int maxx, maxy, x, xx, y;$/;" v typeref:typename:int -maxy bmore.c /^int maxx, maxy;$/;" v typeref:typename:int -maxy bvi.c /^int maxx, maxy, x, xx, y;$/;" v typeref:typename:int -mem bvi.c /^PTR mem = NULL;$/;" v typeref:typename:PTR -memcpy bvi.h /^# define memcpy /;" d -memmove bm_unix.c /^memmove(s1, s2, n)$/;" f -memmove bvi.h /^# define memmove /;" d -memmove io.c /^memmove(s1, s2, n)$/;" f -memsize bvi.c /^off_t filesize, memsize, undosize;$/;" v typeref:typename:off_t -morefiles comm.c /^char *morefiles = "more files@to edit";$/;" v typeref:typename:char * -move doscur.h /^#define move(/;" d -movebyte edit.c /^movebyte()$/;" f typeref:typename:void -msg comm.c /^msg(s)$/;" f -mvaddch doscur.h /^#define mvaddch(/;" d -mvaddstr doscur.h /^#define mvaddstr(/;" d -mvgetch doscur.h /^#define mvgetch(/;" d -mvgetstr doscur.h /^#define mvgetstr(/;" d -mvinch dosio.c /^mvinch(int y, int x)$/;" f typeref:typename:int -mvinsch doscur.h /^#define mvinsch(/;" d -mvprintw doscur.h /^#define mvprintw(/;" d -mvscanw doscur.h /^#define mvscanw(/;" d -mvwaddch doscur.h /^#define mvwaddch(/;" d -mvwaddstr doscur.h /^#define mvwaddstr(/;" d -mvwgetch doscur.h /^#define mvwgetch(/;" d -mvwgetstr doscur.h /^#define mvwgetstr(/;" d -mvwprintw doscur.h /^#define mvwprintw(/;" d -mvwscanw doscur.h /^#define mvwscanw(/;" d -mymaxx bmore.c /^int mymaxx = 0, mymaxy = 0;$/;" v typeref:typename:int -mymaxy bmore.c /^int mymaxx = 0, mymaxy = 0;$/;" v typeref:typename:int -name bmore.c /^char *name = NULL;$/;" v typeref:typename:char * -name bvi.c /^char *name = NULL;$/;" v typeref:typename:char * -new_screen edit.c /^new_screen()$/;" f typeref:typename:void -newwin doscur.h /^#define newwin(/;" d -nextchar bmore.c /^nextchar()$/;" f typeref:typename:int -nl doscur.h /^#define nl(/;" d -no_intty bm_dos.c /^int no_intty, no_tty;$/;" v typeref:typename:int -no_intty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v typeref:typename:int -no_tty bm_dos.c /^int no_intty, no_tty;$/;" v typeref:typename:int -no_tty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v typeref:typename:int -noaddr comm.c /^char *noaddr = "No address allowed@on this command";$/;" v typeref:typename:char * -nobytes bvi.c /^char *nobytes = "No bytes@in the buffer";$/;" v typeref:typename:char * -nodelay doscur.h /^#define nodelay(/;" d -noecho doscur.h /^#define noecho(/;" d -nonl doscur.h /^#define nonl(/;" d -noprev re.c /^char *noprev = "No previous expression";$/;" v typeref:typename:char * -noraw doscur.h /^#define noraw(/;" d -normal bm_dos.c /^normal()$/;" f typeref:typename:void -normal bm_unix.c /^normal()$/;" f typeref:typename:void -notfound re.c /^char *notfound = "Fail|Pattern not found";$/;" v typeref:typename:char * -notimeout doscur.h /^#define notimeout(/;" d -noval comm.c /^char *noval = "No value@for binary operation";$/;" v typeref:typename:char * -nowrtmsg comm.c /^char *nowrtmsg = "No write@since last change (:%s! overrides)";$/;" v typeref:typename:char * -nstate bm_unix.c /^struct termios ostate, nstate;$/;" v typeref:struct:termios -numarr bmore.c /^char numarr[64]; \/* string for collecting number *\/$/;" v typeref:typename:char[64] -numarr bvi.c /^char numarr[MAXCMD+1]; \/* string for collecting number *\/$/;" v typeref:typename:char[] -numfiles bmore.c /^int numfiles; \/* number of input files *\/$/;" v typeref:typename:int -numfiles bvi.c /^int numfiles; \/* number of input files *\/$/;" v typeref:typename:int -nvalue set.h /^ off_t nvalue;$/;" m struct:param typeref:typename:off_t -off_t bmore.h /^# define off_t /;" d -off_t bvi.h /^# define off_t /;" d -oldbuf comm.c /^static char oldbuf[CMDSZ + 3]; \/** for :!! command **\/$/;" v typeref:typename:char[] file: -oldpos bmore.c /^off_t bytepos, oldpos;$/;" v typeref:typename:off_t -open_file bmore.c /^open_file(name)$/;" f +doshell bm_unix.c /^doshell(char *cmd)$/;" f +doupdate doscur.h 143;" d +dum_opt bm_unix.c /^int dum_opt, dlines;$/;" v +dup_print_flag bmore.c /^int dup_print_flag = 0;$/;" v +echo doscur.h 128;" d +edit edit.c /^edit(int mode)$/;" f +edits bvi.c /^int edits = 0;$/;" v +emptyclass bmore.c /^char *emptyclass = "Empty byte class '[]' or '[^]'";$/;" v +emptyclass re.c /^char *emptyclass = "Bad character class|Empty byte class '[]' or '[^]' cannot match";$/;" v +emsg bmore.c /^emsg(char *s)$/;" f +emsg comm.c /^emsg(char *s)$/;" f +end_addr comm.c /^PTR end_addr;$/;" v +end_word re.c /^end_word(PTR start)$/;" f +endwin doscur.h 137;" d +enlarge dosio.c /^enlarge(off_t add)$/;" f +enlarge io.c /^enlarge(off_t add)$/;" f +env bvi.c /^jmp_buf env; \/* context for `longjmp' function *\/$/;" v +erase doscur.h 81;" d +erase_ln bm_unix.c /^char *erase_ln; \/* erase line *\/$/;" v +erasechar doscur.h 75;" d +estring bmore.c /^char estring[MAXCMD] = ""; \/* string for shell escape *\/$/;" v +extra comm.c /^char *extra = "Extra chars|Extra characters at end of command";$/;" v +exval bmore.c /^int exval = 0;$/;" v +fbuf set.c /^static char fbuf[MAXCMD+1];$/;" v file: +ffp set.c /^static FILE *ffp;$/;" v file: +file_nr bmore.c /^int file_nr = 0; \/* number of current input file *\/$/;" v +fileinfo edit.c /^fileinfo(char *fname)$/;" f +filemode dosio.c /^int filemode;$/;" v +filemode io.c /^int filemode;$/;" v +files bmore.c /^char **files; \/* list of input files *\/$/;" v +files bvi.c /^char **files; \/* list of input files *\/$/;" v +filesize bmore.c /^off_t screen_home, filesize;$/;" v +filesize bvi.c /^off_t filesize, memsize, undosize;$/;" v +flags set.h /^ int flags;$/;" m struct:param +flash doscur.h 77;" d +flushinp doscur.h 120;" d +fname_buf bvi.c /^char *fname_buf = NULL;$/;" v +fnum bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v +from_file set.c /^static int from_file = 0;$/;" v file: +fsearch re.c /^fsearch(PTR start, PTR end, char *smem)$/;" f +fsearch_end re.c /^fsearch_end(PTR start, PTR end, char *smem, PTR *s_end)$/;" f +fullname set.h /^ char *fullname; \/* full parameter name *\/$/;" m struct:param +getbegyx doscur.h 105;" d +getcbuff edit.c /^static char getcbuff[BUFFER];$/;" v file: +getch dosio.c /^getch()$/;" f +getcmdstr set.c /^getcmdstr(char *p, int x)$/;" f +getcnext edit.c /^static char *getcnext = NULL;$/;" v file: +getmaxyx doscur.h 106;" d +getyx doscur.h 104;" d +got_int bm_dos.c /^int got_int;$/;" v +got_int bm_unix.c /^int got_int;$/;" v +help_file bmore.c /^FILE *curr_file = NULL, *help_file;$/;" v +helppath bmore.c /^char helppath[MAXCMD];$/;" v +hex_comp recomp.c /^hex_comp(char *smem, char *pattern)$/;" f +hexchar recomp.c /^hexchar()$/;" f +highlight bm_dos.c /^highlight()$/;" f +highlight bm_unix.c /^highlight()$/;" f +hl_spat edit.c /^long hl_spat = 0;$/;" v +home bm_dos.c /^home()$/;" f +home bm_unix.c /^home()$/;" f +icnt bmore.c /^static int icnt = 0;$/;" v file: +idlok doscur.h 141;" d +ignore_case recomp.c /^int ignore_case = 0;$/;" v +inch dosio.c /^inch()$/;" f +init_byte bmore.c /^off_t init_byte = 0;$/;" v +init_search bmore.c /^int init_search = 0;$/;" v +initscr doscur.h 73;" d +initterm bm_dos.c /^initterm()$/;" f +initterm bm_unix.c /^initterm()$/;" f +insch dosio.c /^insch(int c)$/;" f +insertln doscur.h 108;" d +jmpproc bvi.c /^jmpproc(int sig)$/;" f +keypad doscur.h 133;" d +last_motion bvi.c /^PTR last_motion;$/;" v +last_search bmore.c /^off_t last_search = 0;$/;" v +linbuf edit.c /^char linbuf[16384];$/;" v +line bvi.c /^static char line[MAXCMD+1];$/;" v file: +lineout edit.c /^lineout()$/;" f +load dosio.c /^load(char *fname)$/;" f +load io.c /^load(char *fname)$/;" f +loc bvi.c /^int loc;$/;" v +magic recomp.c /^int magic = 1;$/;" v +main bmore.c /^main(int argc, char *argv[])$/;" f +main bvi.c /^main(int argc, char *argv[])$/;" f +mark bvi.c /^static int mark;$/;" v file: +markbuf bvi.c /^PTR markbuf[26];$/;" v +maxpos bvi.c /^PTR maxpos;$/;" v +maxx bmore.c /^int maxx, maxy;$/;" v +maxx bvi.c /^int maxx, maxy, x, xx, y;$/;" v +maxy bmore.c /^int maxx, maxy;$/;" v +maxy bvi.c /^int maxx, maxy, x, xx, y;$/;" v +mem bvi.c /^PTR mem = NULL;$/;" v +memcpy bvi.h 136;" d +memmove bm_unix.c /^memmove(char *s1, char *s2, size_t n)$/;" f +memmove bvi.h 137;" d +memmove io.c /^memmove(char *s1, char *s2, size_t n)$/;" f +memsize bvi.c /^off_t filesize, memsize, undosize;$/;" v +morefiles comm.c /^char *morefiles = "more files@to edit";$/;" v +move doscur.h 91;" d +movebyte edit.c /^movebyte()$/;" f +msg comm.c /^msg(char *s)$/;" f +mvaddch doscur.h 93;" d +mvaddstr doscur.h 97;" d +mvgetch doscur.h 112;" d +mvgetstr doscur.h 115;" d +mvinch dosio.c /^mvinch(int y, int x)$/;" f +mvinsch doscur.h 125;" d +mvprintw doscur.h 101;" d +mvscanw doscur.h 122;" d +mvwaddch doscur.h 92;" d +mvwaddstr doscur.h 96;" d +mvwgetch doscur.h 111;" d +mvwgetstr doscur.h 114;" d +mvwprintw doscur.h 100;" d +mvwscanw doscur.h 121;" d +mymaxx bmore.c /^int mymaxx = 0, mymaxy = 0;$/;" v +mymaxy bmore.c /^int mymaxx = 0, mymaxy = 0;$/;" v +name bmore.c /^char *name = NULL;$/;" v +name bvi.c /^char *name = NULL;$/;" v +new_screen edit.c /^new_screen()$/;" f +newwin doscur.h 74;" d +nextchar bmore.c /^nextchar()$/;" f +nl doscur.h 131;" d +no_intty bm_dos.c /^int no_intty, no_tty;$/;" v +no_intty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v +no_tty bm_dos.c /^int no_intty, no_tty;$/;" v +no_tty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v +noaddr comm.c /^char *noaddr = "No address allowed@on this command";$/;" v +nobytes bvi.c /^char *nobytes = "No bytes@in the buffer";$/;" v +nodelay doscur.h 127;" d +noecho doscur.h 129;" d +nonl doscur.h 132;" d +noprev re.c /^char *noprev = "No previous expression";$/;" v +noraw doscur.h 139;" d +normal bm_dos.c /^normal()$/;" f +normal bm_unix.c /^normal()$/;" f +notfound re.c /^char *notfound = "Fail|Pattern not found";$/;" v +notimeout doscur.h 140;" d +noval comm.c /^char *noval = "No value@for binary operation";$/;" v +nowrtmsg comm.c /^char *nowrtmsg = "No write@since last change (:%s! overrides)";$/;" v +nstate bm_unix.c /^struct termios ostate, nstate;$/;" v typeref:struct: +numarr bmore.c /^char numarr[64]; \/* string for collecting number *\/$/;" v +numarr bvi.c /^char numarr[MAXCMD+1]; \/* string for collecting number *\/$/;" v +numfiles bmore.c /^int numfiles; \/* number of input files *\/$/;" v +numfiles bvi.c /^int numfiles; \/* number of input files *\/$/;" v +nvalue set.h /^ off_t nvalue;$/;" m struct:param +off_t bmore.h 110;" d +off_t bvi.h 132;" d +oldbuf comm.c /^static char oldbuf[CMDSZ + 3]; \/** for :!! command **\/$/;" v file: +oldpos bmore.c /^off_t bytepos, oldpos;$/;" v +open_file bmore.c /^open_file(char *name)$/;" f ostate bm_unix.c /^struct termios ostate, nstate;$/;" v typeref:struct:termios -out_len bmore.c /^int out_len;$/;" v typeref:typename:int -outmsg comm.c /^outmsg(s)$/;" f -pagepos bvi.c /^PTR pagepos;$/;" v typeref:typename:PTR +out_len bmore.c /^int out_len;$/;" v +outmsg comm.c /^outmsg(char *s)$/;" f +pagepos bvi.c /^PTR pagepos;$/;" v param set.h /^struct param {$/;" s -params set.c /^struct param params[] = {$/;" v typeref:struct:param[] -patcpy re.c /^patcpy(s1, s2, delim)$/;" f -pattern re.c /^char pattern[MAXCMD + 1];$/;" v typeref:typename:char[] -poi recomp.c /^char *poi;$/;" v typeref:typename:char * -precount bmore.c /^long precount = -1; \/* number preceding command *\/$/;" v typeref:typename:long -precount bvi.c /^long precount = -1;$/;" v typeref:typename:long -printline edit.c /^printline(mempos, scpos)$/;" f -printout bmore.c /^printout(lns)$/;" f -printw doscur.h /^#define printw /;" d -progname bmore.c /^static char progname[10];$/;" v typeref:typename:char[10] file: -progname bvi.c /^static char progname[8];$/;" v typeref:typename:char[8] file: -prompt bmore.c /^int prompt = 1;$/;" v typeref:typename:int -pushback bmore.c /^pushback(n, where)$/;" f -putchr bm_unix.c /^putchr(ch)$/;" f -putchr bm_unix.c /^putchr(char ch)$/;" f typeref:typename:int -putline bmore.c /^putline(buf, num)$/;" f -quit edit.c /^quit()$/;" f typeref:typename:void -r_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v typeref:typename:int -range bvi.c /^range(ch)$/;" f -raw doscur.h /^#define raw(/;" d -rdline bmore.c /^rdline(ch, sstring)$/;" f -read_rc set.c /^read_rc(fn)$/;" f -read_to_end io.c /^read_to_end(int fd, void *buf, size_t count) {$/;" f typeref:typename:ssize_t file: -refresh doscur.h /^#define refresh(/;" d -rep_buf bvi.c /^char rep_buf[BUFFER];$/;" v typeref:typename:char[] -repaint edit.c /^repaint() \/***** redraw screen *********************\/$/;" f typeref:typename:void -repl_count comm.c /^int repl_count = -1;$/;" v typeref:typename:int -reset_tty bm_dos.c /^reset_tty ()$/;" f typeref:typename:void -reset_tty bm_unix.c /^reset_tty()$/;" f typeref:typename:void -resetty doscur.h /^#define resetty(/;" d -rev_end bm_unix.c /^char *rev_start, *rev_end; \/* enter and exit standout mode *\/$/;" v typeref:typename:char * -rev_start bm_unix.c /^char *rev_start, *rev_end; \/* enter and exit standout mode *\/$/;" v typeref:typename:char * -rsearch re.c /^rsearch(start, end, smem)$/;" f -save dosio.c /^save(char *fname, PTR start, PTR end, int flags)$/;" f typeref:typename:int -save io.c /^save(fname, start, end, flags)$/;" f -save_chk comm.c /^save_chk(fname, start, end, flags)$/;" f -savetty doscur.h /^#define savetty(/;" d -sbracket bmore.c /^sbracket(start, scan, count)$/;" f -sbracket re.c /^sbracket(start, scan, count)$/;" f file: -scanw doscur.h /^#define scanw /;" d +params set.c /^struct param params[] = {$/;" v typeref:struct:param +patcpy re.c /^patcpy(char *s1, char *s2, char delim)$/;" f +pattern re.c /^char pattern[MAXCMD + 1];$/;" v +poi recomp.c /^char *poi;$/;" v +precount bmore.c /^long precount = -1; \/* number preceding command *\/$/;" v +precount bvi.c /^long precount = -1;$/;" v +printline edit.c /^printline(PTR mempos, int scpos)$/;" f +printout bmore.c /^printout(int lns)$/;" f +printw doscur.h 103;" d +progname bmore.c /^static char progname[10];$/;" v file: +progname bvi.c /^static char progname[8];$/;" v file: +prompt bmore.c /^int prompt = 1;$/;" v +pushback bmore.c /^pushback(int n, char *where)$/;" f +putchr bm_unix.c /^putchr(char ch)$/;" f +putchr bm_unix.c /^putchr(int ch)$/;" f +putline bmore.c /^putline(char *buf, int num)$/;" f +quit edit.c /^quit()$/;" f +r_flag bmore.c /^int c_flag = 0, d_flag = 0, r_flag = 0;$/;" v +range bvi.c /^range(int ch)$/;" f +raw doscur.h 138;" d +rdline bmore.c /^rdline(int ch, char *sstring)$/;" f +read_rc set.c /^read_rc(char *fn)$/;" f +read_to_end io.c /^read_to_end(int fd, void *buf, size_t count) {$/;" f file: +refresh doscur.h 134;" d +rep_buf bvi.c /^char rep_buf[BUFFER];$/;" v +repaint edit.c /^repaint() \/***** redraw screen *********************\/$/;" f +repl_count comm.c /^int repl_count = -1;$/;" v +reset_tty bm_dos.c /^reset_tty ()$/;" f +reset_tty bm_unix.c /^reset_tty()$/;" f +resetty doscur.h 145;" d +rev_end bm_unix.c /^char *rev_start, *rev_end; \/* enter and exit standout mode *\/$/;" v +rev_start bm_unix.c /^char *rev_start, *rev_end; \/* enter and exit standout mode *\/$/;" v +rsearch re.c /^rsearch(PTR start, PTR end, char *smem)$/;" f +save dosio.c /^save(char *fname, PTR start, PTR end, int flags)$/;" f +save io.c /^save(char *fname, char *start, char *end, int flags)$/;" f +save_chk comm.c /^save_chk(char *fname, char *start, char *end, int flags)$/;" f +savetty doscur.h 144;" d +sbracket bmore.c /^sbracket(int start, char *scan, int count)$/;" f +sbracket re.c /^sbracket(int start, char *scan, int count)$/;" f file: +scanw doscur.h 124;" d scr dosio.c /^struct WINDOW scr;$/;" v typeref:struct:WINDOW -screen bvi.c /^int screen, status, statsize;$/;" v typeref:typename:int -screen_home bmore.c /^off_t screen_home, filesize;$/;" v typeref:typename:off_t -scrolldown edit.c /^scrolldown(lns)$/;" f -scrollok doscur.h /^#define scrollok(/;" d -scrollup edit.c /^scrollup(lns)$/;" f -search_pat re.c /^char search_pat[BUFFER]; \/* \/ or ? command *\/$/;" v typeref:typename:char[] -searching re.c /^searching(ch, line, startpos, endpos, flag)$/;" f -set_tty bm_dos.c /^set_tty ()$/;" f typeref:typename:void -set_tty bm_unix.c /^set_tty()$/;" f typeref:typename:void -setcur edit.c /^setcur()$/;" f typeref:typename:void -setpage edit.c /^setpage(addr)$/;" f -shell bvi.c /^char *shell;$/;" v typeref:typename:char * -shortname set.h /^ char *shortname; \/* permissible abbreviation *\/$/;" m struct:param typeref:typename:char * -showparms set.c /^showparms(all)$/;" f -sig bm_dos.c /^sig()$/;" f typeref:typename:void -sig bm_unix.c /^sig(sig)$/;" f -size bvi.c /^off_t size;$/;" v typeref:typename:off_t -slow_tty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v typeref:typename:int -smode bmore.c /^static int smode;$/;" v typeref:typename:int file: -smode recomp.c /^int smode;$/;" v typeref:typename:int -smsg comm.c /^smsg(s)$/;" f -spos bvi.c /^PTR spos;$/;" v typeref:typename:PTR -sstring bmore.c /^char sstring[MAXCMD] = ""; \/* string for search *\/$/;" v typeref:typename:char[] -standend doscur.h /^#define standend(/;" d -standout doscur.h /^#define standout(/;" d -start_addr comm.c /^PTR start_addr;$/;" v typeref:typename:PTR -statpos edit.c /^statpos()$/;" f typeref:typename:void -statsize bvi.c /^int screen, status, statsize;$/;" v typeref:typename:int -status bvi.c /^int screen, status, statsize;$/;" v typeref:typename:int -stdscr dosio.c /^int stdscr = 0;$/;" v typeref:typename:int -strcasecmp bmore.h /^# define strcasecmp /;" d -strcasecmp bvi.h /^# define strcasecmp /;" d -strdup io.c /^strdup(s)$/;" f -string bmore.c /^char string[MAXCMD];$/;" v typeref:typename:char[] -string bvi.c /^char string[MAXCMD+1];$/;" v typeref:typename:char[] -strncasecmp bmore.h /^# define strncasecmp /;" d -strncasecmp bvi.h /^# define strncasecmp /;" d -stty bm_unix.c /^#define stty(/;" d file: -stuffin edit.c /^stuffin(s)$/;" f -svalue set.h /^ char *svalue;$/;" m struct:param typeref:typename:char * -sysemsg comm.c /^sysemsg(s)$/;" f -terminal dosio.c /^char *terminal = "ansi";$/;" v typeref:typename:char * -terminal io.c /^char *terminal;$/;" v typeref:typename:char * -tmpbuf edit.c /^char tmpbuf[10];$/;" v typeref:typename:char[10] -to_print bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v typeref:typename:int -toggle edit.c /^toggle()$/;" f typeref:typename:void -trunc_cur bvi.c /^trunc_cur()$/;" f typeref:typename:void -undo_buf bvi.c /^char *undo_buf = NULL;$/;" v typeref:typename:char * -undo_count bvi.c /^off_t undo_count;$/;" v typeref:typename:off_t -undo_start bvi.c /^PTR undo_start;$/;" v typeref:typename:PTR -undosize bvi.c /^off_t filesize, memsize, undosize;$/;" v typeref:typename:off_t -usage bmore.c /^usage()$/;" f typeref:typename:void -usage bvi.c /^usage()$/;" f typeref:typename:void -vgetc bm_dos.c /^vgetc()$/;" f typeref:typename:int -vgetc bm_unix.c /^vgetc()$/;" f typeref:typename:int -vgetc edit.c /^vgetc()$/;" f typeref:typename:int -waddch doscur.h /^#define waddch(/;" d -waddstr doscur.h /^#define waddstr(/;" d -wait_return comm.c /^wait_return(flag)$/;" f -wclear doscur.h /^#define wclear(/;" d -wclrtoeol doscur.h /^#define wclrtoeol(/;" d -wdeleteln doscur.h /^#define wdeleteln(/;" d -werase doscur.h /^#define werase(/;" d -wgetch doscur.h /^#define wgetch(/;" d -wgetstr doscur.h /^#define wgetstr(/;" d -winsertln doscur.h /^#define winsertln(/;" d -wmove doscur.h /^#define wmove(/;" d -wordsearch re.c /^wordsearch(start, mode)$/;" f -wprintw doscur.h /^#define wprintw(/;" d -wrefresh doscur.h /^#define wrefresh(/;" d -wrstat bvi.c /^static int wrstat = 1;$/;" v typeref:typename:int file: -wscanw doscur.h /^#define wscanw(/;" d -x bvi.c /^int maxx, maxy, x, xx, y;$/;" v typeref:typename:int -xpos edit.c /^xpos()$/;" f typeref:typename:int -xx bvi.c /^int maxx, maxy, x, xx, y;$/;" v typeref:typename:int -y bvi.c /^int maxx, maxy, x, xx, y;$/;" v typeref:typename:int -yank_buf bvi.c /^char *yank_buf = NULL;$/;" v typeref:typename:char * -yanked bvi.c /^off_t yanked = 0L;$/;" v typeref:typename:off_t -yd_addr comm.c /^yd_addr()$/;" f typeref:typename:off_t +screen bvi.c /^int screen, status, statsize;$/;" v +screen_home bmore.c /^off_t screen_home, filesize;$/;" v +scrolldown edit.c /^scrolldown(int lns)$/;" f +scrollok doscur.h 142;" d +scrollup edit.c /^scrollup(int lns)$/;" f +search_pat re.c /^char search_pat[BUFFER]; \/* \/ or ? command *\/$/;" v +searching re.c /^searching(int ch, char *line, PTR startpos, PTR endpos, int flag)$/;" f +set_tty bm_dos.c /^set_tty ()$/;" f +set_tty bm_unix.c /^set_tty()$/;" f +setcur edit.c /^setcur()$/;" f +setpage edit.c /^setpage(PTR addr)$/;" f +shell bvi.c /^char *shell;$/;" v +shortname set.h /^ char *shortname; \/* permissible abbreviation *\/$/;" m struct:param +showparms set.c /^showparms(int all)$/;" f +sig bm_dos.c /^sig()$/;" f +sig bm_unix.c /^sig(int sig)$/;" f +size bvi.c /^off_t size;$/;" v +slow_tty bm_unix.c /^int fnum, no_intty, no_tty, slow_tty;$/;" v +smode bmore.c /^static int smode;$/;" v file: +smode recomp.c /^int smode;$/;" v +smsg comm.c /^smsg(char *s)$/;" f +space bvi.c /^int space = 2;$/;" v +spos bvi.c /^PTR spos;$/;" v +sstring bmore.c /^char sstring[MAXCMD] = ""; \/* string for search *\/$/;" v +standend doscur.h 89;" d +standout doscur.h 88;" d +start_addr comm.c /^PTR start_addr;$/;" v +statpos edit.c /^statpos()$/;" f +statsize bvi.c /^int screen, status, statsize;$/;" v +status bvi.c /^int screen, status, statsize;$/;" v +statusflag bvi.c /^int statusflag = 1;$/;" v +stdscr dosio.c /^int stdscr = 0;$/;" v +strcasecmp bmore.h 113;" d +strcasecmp bvi.h 135;" d +strdup io.c /^strdup(char *s)$/;" f +string bmore.c /^char string[MAXCMD];$/;" v +string bvi.c /^char string[MAXCMD+1];$/;" v +strncasecmp bmore.h 112;" d +strncasecmp bvi.h 134;" d +stty bm_unix.c 36;" d file: +stuffin edit.c /^stuffin(char *s)$/;" f +svalue set.h /^ char *svalue;$/;" m struct:param +sysemsg comm.c /^sysemsg(char *s)$/;" f +terminal dosio.c /^char *terminal = "ansi";$/;" v +terminal io.c /^char *terminal;$/;" v +tmpbuf edit.c /^char tmpbuf[10];$/;" v +to_print bmore.c /^int corr = 0, do_header = 0, to_print;$/;" v +toggle edit.c /^toggle()$/;" f +trunc_cur bvi.c /^trunc_cur()$/;" f +undo_buf bvi.c /^char *undo_buf = NULL;$/;" v +undo_count bvi.c /^off_t undo_count;$/;" v +undo_start bvi.c /^PTR undo_start;$/;" v +undosize bvi.c /^off_t filesize, memsize, undosize;$/;" v +usage bmore.c /^usage()$/;" f +usage bvi.c /^usage()$/;" f +vgetc bm_dos.c /^vgetc()$/;" f +vgetc bm_unix.c /^vgetc()$/;" f +vgetc edit.c /^vgetc()$/;" f +waddch doscur.h 94;" d +waddstr doscur.h 98;" d +wait_return comm.c /^wait_return(int flag)$/;" f +wclear doscur.h 82;" d +wclrtoeol doscur.h 78;" d +wdeleteln doscur.h 109;" d +werase doscur.h 80;" d +wgetch doscur.h 113;" d +wgetstr doscur.h 116;" d +winsertln doscur.h 107;" d +wmove doscur.h 90;" d +wordsearch re.c /^wordsearch(PTR start, char mode)$/;" f +wprintw doscur.h 102;" d +wrefresh doscur.h 135;" d +wrstat bvi.c /^static int wrstat = 1;$/;" v file: +wscanw doscur.h 123;" d +x bvi.c /^int maxx, maxy, x, xx, y;$/;" v +xpos edit.c /^xpos()$/;" f +xx bvi.c /^int maxx, maxy, x, xx, y;$/;" v +y bvi.c /^int maxx, maxy, x, xx, y;$/;" v +yank_buf bvi.c /^char *yank_buf = NULL;$/;" v +yanked bvi.c /^off_t yanked = 0L;$/;" v +yd_addr comm.c /^yd_addr()$/;" f