summaryrefslogtreecommitdiffstats
path: root/abs/extra/most
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2013-02-19 21:10:18 (GMT)
committerJames Meyer <james.meyer@operamail.com>2013-02-19 21:10:18 (GMT)
commit2648e999d277eac5c3d331a3609bcc73fafbea71 (patch)
tree40951fb8e7fdbe28a0baa324ae615055203f1e2e /abs/extra/most
parentc759b5e0c4aa6fc37412b4dee2cf9ad993fd376d (diff)
parent7e6f7ca174e1af67178dc5293a312a4a733eb095 (diff)
downloadlinhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.zip
linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.gz
linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.bz2
Merge branch 'testing'
# By James Meyer (1091) and others # Via James Meyer (5) and others * testing: (1148 commits) LinHES-config: during install don't kill off lirc. This keeps the remote active all the way to the finish Change version numbers to 8.0 to match the release number. LinHES-conifg LinHES-system mythdb-initial runit-scripts supplemental-web LinHES-conifig: mv_install.py for the last partition don't go all the way to the end. Gotta leave room for gpt tables. xf86-video-ati: xorg ati driver. LinHES-config: timezip.py add syncing up of parental lvl passwords and starting level with MBE. LinHES-system: correct the logic for breaking out of the wmctrl loop. As written it would break out of the inner loop..but not the 60 iteration loop. e16_theme_settings: remove slide-in prop for new windows. For whatever reason this was preventing mplayer from being positioned correctly for appletrailers. LinHES-config, mythinstall: change case of hd_pvr and serial to all lower refs #902 zilog-firmware: firmware for TX support of the hdpvr and pvr-150 In general I can't recommend anybody using these transmitters but including the firmware just in case someone really wants to linhes-udev-rules: added hdprv_lirc rule. All of these lirc rules are limited to exactly one device. If more then one device is present then only the last device in init will get the symlink runit-scripts: fix logging for igdeamon, add support to remote init script so that the blaster is always the first device in the chain. added support specificly for hd_pvr LinHES-system: add lh_system_restore and lh_system_backup. These scripts are called from the mythmenu. refs #900 iguanair: rebuild with python 2.7 LinHES-system: msg_daemon.py fix init and nasty bug related to timeout. In a nutshell timeout wouldn't work unless a msg without a timeout was called first. linhes-udev-rules: add rules for mce,streamzap,serial lirc devices. mythinstall: recompile for matching libs mythtv: latest .25-fixes and change mythbackup/restore call lh_system_$op to replace mythbackup/mythrestore. mythbackup no longer works correctly with the new windowmanager linhes-scripts: myth2mp3, myth2x264, myth2xvid: use mythutil to get cutlist LinHES-config, supplimental-web: Fix proxy numbering for Ceton infiniTV linhes-system: add additional stuff to the system backup and also introduced an exclude file. The exclude/include files are locate in /home/mythtv/backup_config/ ...
Diffstat (limited to 'abs/extra/most')
-rw-r--r--abs/extra/most/PKGBUILD30
-rw-r--r--abs/extra/most/most-debian.patch3908
-rw-r--r--abs/extra/most/most-leak-fd.patch14
3 files changed, 2318 insertions, 1634 deletions
diff --git a/abs/extra/most/PKGBUILD b/abs/extra/most/PKGBUILD
index b2d8624..6d91e7d 100644
--- a/abs/extra/most/PKGBUILD
+++ b/abs/extra/most/PKGBUILD
@@ -1,20 +1,32 @@
-# $Id: PKGBUILD 57011 2009-10-31 08:09:42Z allan $
-# Maintainer: juergen <juergen@archlinux.org>
+# $Id: PKGBUILD 144477 2011-12-06 14:33:19Z stephane $
+# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributor: juergen <juergen@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
pkgname=most
pkgver=5.0.0a
-pkgrel=2
+pkgrel=4
pkgdesc="A terminal pager similar to 'more' and 'less'"
arch=('i686' 'x86_64')
depends=('slang')
license=('GPL')
-url="ftp://space.mit.edu/pub/davis/most/"
-source=(ftp://space.mit.edu/pub/davis/$pkgname/$pkgname-$pkgver.tar.gz)
-md5sums=('30f2131b67f61716f6fe1f65205da48b')
+url="http://www.jedsoft.org/most/index.html"
+source=(ftp://space.mit.edu/pub/davis/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ most-debian.patch
+ most-leak-fd.patch)
+sha1sums=('99eedb7169754b9a47c7755ac48949d76531e3b2'
+ '937796040c69bae3bf735fa3cd734775c582e7d0'
+ 'c5713e1278febdd0ed434e6e3044feb220b5d525')
build() {
- cd $srcdir/$pkgname-$pkgver
- ./configure --prefix=/usr --sysconfdir=/etc || return 1
- make DESTDIR=$pkgdir install || return 1
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i ../most-debian.patch
+ patch -Np1 -i ../most-leak-fd.patch
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR=$pkgdir install
}
diff --git a/abs/extra/most/most-debian.patch b/abs/extra/most/most-debian.patch
index 4387420..292c83b 100644
--- a/abs/extra/most/most-debian.patch
+++ b/abs/extra/most/most-debian.patch
@@ -1,1655 +1,2313 @@
---- most-4.10.2.orig/most.1
-+++ most-4.10.2/most.1
-@@ -134,7 +134,7 @@
- Use this switch when you want to view files
- containing 8 bit characters.
- .I most
--will display the file 16 bytes per line in hexidecimal notation.
-+will display the file 16 bytes per line in hexadecimal notation.
- A typical line looks like:
- .IP
- .Ds
-@@ -185,12 +185,13 @@
- This option is meaningful only when used with the
- .B \-v
- option.
-+.TP
- .BI + lineno
- Start up at
- .IR lineno .
+--- most-5.0.0a.orig/lesskeys.rc
++++ most-5.0.0a/lesskeys.rc
+@@ -57,3 +57,8 @@
+ setkey goto_mark "'"
+ setkey find_file "E"
+ setkey edit "v"
++setkey bob "^[[7~"
++setkey eob "^[[8~"
++setkey bob "^[OH"
++setkey eob "^[OF"
++
+--- most-5.0.0a.orig/most.1
++++ most-5.0.0a/most.1
+@@ -203,7 +203,7 @@
+ .TP
+ .B +u
+ Force UTF-8 mode. By default most will use the current locale to
+-determine if UTF-8 mode shoul be used. The
++determine if UTF-8 mode should be used. The
+ .B +u
+ and
+ .B \-u
+@@ -224,20 +224,28 @@
+ Start up at the line containing the first occurrence of
+ .IR string .
+ .SH "COMMAND USAGE"
+-The commands take effect immediately; it is not necessary to type a
+-carriage return.
+-.PP
+-In the following commands,
+-.I i
+-is a numerical argument
+-(1 by default).
+-.TP
+-.BR SPACE ", " CTRL-D ", " NEXT_SCREEN
+-Display another windowful, or jump
+-.I i
+-windowfuls if
+-.I i
+-is specified.
++Some commands have an optional numeric argument
++.I id
++,entered before the command. If not given, the
++default value of
++.I i
++is 1.
++.PP
++Commands take effect immediately; typing a
++.I RETURN
++after isn't necessary or correct. (Besides,
++.I RETURN
++itself is a command.)
++.PP
++Example: to go down one line, press the
++.I DOWN_ARROW
++key. To go down 20 lines, press
++.I 2
++then
++.I 0
++then the
++.I DOWN_ARROW
++key.
+ .TP
+ \fBRETURN\fR, \fBDOWN_ARROW\fR, \fBV\fR, \fBCTRL-N\fR
+ Display another line, or
+@@ -341,7 +349,7 @@
+ .PD
+ Set a mark on the current line for later reference.
.TP
--.B +c
--Make search case sensitive.
-+.B -c
-+Make searches case sensitive.
- By default, they are not.
+-.BR "INSERT_HERE, CTRL-X CTRL-X, COMMA, CTRL-K RETURN, GOLD PERIOD"
++.BR "INSERT_HERE" ", " "CTRL-X CTRL-X" ", " "COMMA" ", " "CTRL-K RETURN" ", " "GOLD PERIOD"
+ Set a mark on the current line but return to previous mark.
+ This allows the user to toggle back and forth between two positions
+ in the file.
+@@ -355,7 +363,7 @@
+ .BR "CTRL-X 2" ", " "CTRL-W 2" ", " "GOLD X"
+ Split this window in half.
.TP
- .B +d
-@@ -482,7 +483,7 @@
- descriptors that represent the file name and line number,
- respectively. For example, if JED is your editor, then set
- .B MOST_EDITOR
--to 'jed %s -g %d'.
-+to 'jed %s -g %d'. This will only work where the %s preceeds the %d.
+-.BR "CTRL-X o" ", " "CTRL-W o" ", " o ", " GOLD UP ", " GOLD DOWN
++.BR "CTRL-X o" ", " "CTRL-W o" ", " o ", " "GOLD UP" ", " "GOLD DOWN"
+ Move to other window.
.TP
- .B MOST_HELP
- This variable may be used to specify an alternate help file.
-@@ -496,7 +497,7 @@
- .I most.rc
- on other systems.
+ .BR "CTRL-X 0" ", " "CTRL-W 0" ", " "GOLD V"
+@@ -506,13 +514,15 @@
+ .B MOST_INITFILE
+ Set this variable to specify the initialization file to load during
+ startup. The default action is to load the system configuration file
+-and then a personal configuration file called
+-.I .mostrc
+-on Unix, and
+-.I most.rc
+-on other systems.
++from
++.I /etc/most.conf
++and then a personal configuration file located at
++.I $HOME/.mostrc
++.
.SH CONFIGURATION FILE SYNTAX
--When most starts up, it tries to read a system confiuration file and
-+When most starts up, it tries to read a system configuration file and
+-When most starts up, it tries to read a system configuration file and
++When
++.I most
++starts up, it tries to read a system configuration file and
then a personal configuration file. These files may be used to
specify keybindings and colors.
.PP
---- most-4.10.2.orig/src/buffer.c
-+++ most-4.10.2/src/buffer.c
-@@ -44,10 +44,10 @@
-
- Most_Buffer_Type *Most_Buf;
-
--int Most_Num_Lines;
-+long long Most_Num_Lines;
-
--unsigned int Most_C_Offset;
--int Most_C_Line;
-+unsigned long long Most_C_Offset;
-+long long Most_C_Line;
-
- static unsigned char *beg_of_line1(void)
- {
-@@ -61,24 +61,29 @@
- {
- if (*pos == '\n')
- {
-- pos--;
-- while ((pos > Most_Beg)
-- && (*pos != '\n'))
-+ pos--; /* Skip back the new-line. */
-+ /* This block is UTF-8 safe, because it only scans the
-+ buffer for a new-line, and doesn't count
-+ characters. */
-+ while ((pos > Most_Beg) && (*pos != '\n'))
- pos--;
-
-- if (*pos != '\n') return pos;
-+ if (*pos != '\n') return Most_Beg;
-+ /* from here on *pos == '\n' */
- if (pos + 1 != cpos)
- return pos + 1;
- }
- }
-- else pos--;
-+ else
-+ pos = SLutf8_bskip_char(Most_Beg, pos);
-
- if (*pos != '\n')
- {
-- while ((pos > Most_Beg)
-- && (*pos != '\n'))
-+ /* This block is UTF-8 safe. See comment above. */
-+ while ((pos > Most_Beg) && (*pos != '\n'))
- pos--;
- if (*pos != '\n') return Most_Beg;
-+ /* from here on *pos == '\n' */
- return pos + 1;
- }
-
-@@ -93,55 +98,6 @@
- return pos;
- }
-
--
--static unsigned char *forward_columns (unsigned char *b, unsigned char *e, unsigned int num_cols)
--{
-- unsigned int col = 0;
--
-- while ((b < e)
-- && (col < num_cols))
-- {
-- unsigned char ch = *b++;
-- if (((ch >= ' ') && (ch < 0x7F))
-- || (ch >= SLsmg_Display_Eight_Bit))
-- {
-- col++;
-- continue;
-- }
--
-- if ((ch == '\b') || (ch == '\t') || (ch == '\r'))
-- switch (ch)
-- {
-- case '\b':
-- if (Most_V_Opt == 0)
-- {
-- if (col > 0) col--;
-- }
-- else col += 2;
-- break;
--
-- case '\r':
-- if (Most_V_Opt == 0)
-- col = 0;
-- else
-- col += 2;
-- break;
--
-- case '\t':
-- if (Most_T_Opt == 0)
-- col = Most_Tab_Width * (col/Most_Tab_Width + 1);
-- else
-- col += 2;
-- break;
-- }
-- else if (ch & 0x80)
-- col += 3;
-- else
-- col += 2;
-- }
-- return b;
--}
--
- /* does not move point */
- static unsigned char *end_of_line1(void)
- {
-@@ -164,6 +120,9 @@
-
- if (*pos != '\n')
- {
-+ /* This block is UTF-8 safe, because it only scans the buffer
-+ for a new-line, and doesn't count characters. */
-+
- n = pmax - pos;
- n2 = n % 8;
- pmax = pos + (n - 8);
-@@ -215,7 +174,7 @@
- ncols = SLtt_Screen_Cols-1;
- while (1)
- {
-- unsigned char *next_b = forward_columns (b, e, ncols);
-+ unsigned char *next_b = most_forward_columns (b, e, ncols, 1);
- if ((next_b == e) || (next_b == b))
- break;
-
-@@ -237,11 +196,12 @@
- return e;
-
- if (b == NULL) b = most_beg_of_line ();
-- b = forward_columns (b, e, SLtt_Screen_Cols-1);
-+ b = most_forward_columns (b, e, SLtt_Screen_Cols-1, 1);
-
- /* Do not wrap the line if the last character falls on the last column
- * of the display.
- */
-+ /* FIXME potential bug if dealing with multi-byte char. */
- if ((b + 1 <= e)
- && (b + 1 < Most_Eob)
- && (b[1] == '\n'))
-@@ -250,10 +210,10 @@
- return b;
- }
-
--int most_forward_line(int save)
-+long long most_forward_line(long long save)
- {
-- int m;
-- register int n = save;
-+ long long m;
-+ register long long n = save;
- unsigned char *p;
- unsigned char *pmax;
-
-@@ -346,14 +306,14 @@
- }
-
- /* Count lines in the region. A half line counts as 1 */
--int most_count_lines(unsigned char *beg, unsigned char *end)
-+long long most_count_lines(unsigned char *beg, unsigned char *end)
- {
-- int save_line, n;
-+ long long save_line, n;
- unsigned char *save_beg, *save_eob;
-- unsigned int save_pos;
-+ unsigned long long save_pos;
- int dn = 1000;
-
-- if (Most_B_Opt) return(1 + (int)(end - beg) / 16);
-+ if (Most_B_Opt) return(1 + (long long)(end - beg) / 16);
-
- save_line = Most_C_Line; save_beg = Most_Beg; save_eob = Most_Eob;
- save_pos = Most_C_Offset;
-@@ -371,9 +331,9 @@
- return(n);
- }
-
--void most_goto_line(int line)
-+void most_goto_line(long long line)
- {
-- int dif_c, dif_b,dif_t;
-+ long long dif_c, dif_b,dif_t;
-
- if (line < 1) line = 1;
- most_read_to_line(line);
-@@ -420,7 +380,7 @@
- }
-
- /* return line the point is on without the final '\n's */
--int most_extract_line(unsigned char **beg, unsigned char **end)
-+long long most_extract_line(unsigned char **beg, unsigned char **end)
- {
- *beg = most_beg_of_line();
- *end = end_of_line (*beg);
-@@ -428,12 +388,12 @@
- return 0;
- }
-
--int most_what_line(unsigned char *pos)
-+long long most_what_line(unsigned char *pos)
- {
-- unsigned int save_pos;
-- int save_line, dir;
-- register int dif_c, dif_b,dif_t;
-- int ret;
-+ unsigned long long save_pos;
-+ long long save_line, dir;
-+ register long long dif_c, dif_b,dif_t;
-+ long long ret;
-
- if (Most_B_Opt)
- {
-@@ -517,7 +477,7 @@
- }
-
- /* given a buffer position, find the line and column */
--void most_find_row_column(unsigned char *pos, int *r, int *c)
-+void most_find_row_column(unsigned char *pos, long long *r, long long *c)
- {
- unsigned char *beg;
- unsigned int save_offset;
-@@ -545,7 +505,10 @@
- /* Now we have found the line it is on so.... */
- beg = most_beg_of_line();
- *c = 1;
-- while (beg++ < pos) *c = *c + 1;
-+ if (Most_UTF8_Mode)
-+ while ((beg = SLutf8_skip_char(beg, pos)) < pos) *c = *c + 1;
-+ else
-+ while (beg++ < pos) *c = *c + 1;
- Most_C_Line = save_line;
- Most_C_Offset = save_offset;
- }
---- most-4.10.2.orig/src/buffer.h
-+++ most-4.10.2/src/buffer.h
-@@ -23,12 +23,12 @@
-
- extern Most_Buffer_Type *Most_Buf;
- extern unsigned char *Most_Beg, *Most_Eob;
--extern int Most_Num_Lines;
-+extern long long Most_Num_Lines;
-
- /* Offset of current position from beginning of buffer */
--extern unsigned int Most_C_Offset;
-+extern unsigned long long Most_C_Offset;
-
--extern int Most_C_Line;
-+extern long long Most_C_Line;
- /*
- * Current line number. If at the beginning of the buffer, it is 1. If
- * we are at the last point of the buffer it is the number of lines.
-@@ -37,26 +37,26 @@
- /* This routine does not move the point */
- extern unsigned char *most_beg_of_line(void);
-
--extern int most_forward_line(int);
-+extern long long most_forward_line(long long);
- /* This routine moves the point forward n lines. n can be negative.
- It returns the number moved. */
-
--extern void most_goto_line(int);
-+extern void most_goto_line(long long);
- /* Move the point somewhere on the nth line of the buffer returning
- C_POS */
-
--extern int most_what_line(unsigned char *);
-+extern long long most_what_line(unsigned char *);
- /* return the line number of position 'argument'. Does not move point */
-
- /* count the number of lines in the region delimited by beg and end.
- Counts lines from beg up to end but does not count end.
- Does not move point. */
--extern int most_count_lines(unsigned char *, unsigned char *);
--extern int most_extract_line(unsigned char **, unsigned char **);
-+extern long long most_count_lines(unsigned char *, unsigned char *);
-+extern long long most_extract_line(unsigned char **, unsigned char **);
-
- extern Most_Buffer_Type *most_switch_to_buffer(Most_Buffer_Type *);
- extern Most_Buffer_Type *most_create_buffer(char *);
--extern void most_find_row_column(unsigned char *, int *, int *);
-+extern void most_find_row_column(unsigned char *, long long *, long long *);
-
- #endif
-
---- most-4.10.2.orig/src/keym.c
-+++ most-4.10.2/src/keym.c
-@@ -228,7 +228,7 @@
- static void goto_percent_cmd(void)
- {
- unsigned char *pos;
-- int n;
-+ long long n;
-
- if (Most_Digit_Arg != (int *) NULL) n = *Most_Digit_Arg;
- else
-@@ -282,7 +282,7 @@
-
- static void find_next_cmd(void)
- {
-- int col, line, n = 1;
-+ long long col, line, n = 1;
- unsigned long ofs;
-
- if (Most_Digit_Arg != NULL) n = *Most_Digit_Arg;
-@@ -309,7 +309,7 @@
- #else
- "Search: ",
- #endif
-- Most_Search_Str,
-+ (char *) Most_Search_Str,
- MOST_SEARCH_BUF_LEN
- ) == -1) return;
- Most_Curs_Offset = Most_C_Offset;
-@@ -325,7 +325,7 @@
- #else
- "Search Backwards: ",
- #endif
-- Most_Search_Str,
-+ (char *) Most_Search_Str,
- MOST_SEARCH_BUF_LEN) == -1) return;
- find_next_cmd();
- }
---- most-4.10.2.orig/src/line.c
-+++ most-4.10.2/src/line.c
-@@ -87,8 +87,7 @@
- while (b < end)
- {
- ch = *b++;
-- if (((ch >= ' ') && (ch < 0x7F))
-- || (ch >= SLsmg_Display_Eight_Bit))
-+ if (most_isprint(ch))
- {
- *s++ = ch;
- continue;
-@@ -108,103 +107,156 @@
-
- if (end > Most_Eob) end = Most_Eob;
-
-- sprintf (buf, "0x%08X: ", Most_C_Offset);
-+ sprintf (buf, "0x%08llX: ", Most_C_Offset);
- ascii_format_line (beg, end, buf + 12);
- SLsmg_write_string (buf);
- SLsmg_erase_eol ();
- }
-
--static int most_analyse_line(unsigned char *begg, unsigned char *endd,
-- char *out, char *attributes)
-+int most_isprint(unsigned char ch)
- {
-- unsigned char *beg, *end;
-- unsigned int min_col, max_col;
-- unsigned int i, i_max;
-+ /* Can this be directly replaced with isprint? */
-+ return (ch >= ' ' && ch < 0x7F) || ch >= SLsmg_Display_Eight_Bit;
-+}
-+
-+static void most_analyse_line(unsigned char *beg, unsigned char *end,
-+ unsigned char *out, char *attributes)
-+{
-+ unsigned char *pout;
-+ char* pattributes;
-+
-+ /* Holds the number of columns for the current character counting
-+ * from the left margin (in contrast to the leftmost visible
-+ * column).
-+ */
-+ unsigned int col;
-+
-+ /* Holds the number of the column up to which to apply the
-+ * current/following formatting. Only meaningful when format_rlim > i.
-+ */
-+ unsigned int format_rlim;
-
-- beg = begg;
-- end = endd;
-- i = i_max = 0;
-- min_col = Most_Column - 1;
-- max_col = min_col + SLtt_Screen_Cols;
-+ beg = most_forward_columns(beg, end, Most_Column - 1, 0);
-+ pout = out;
-+ pattributes = attributes;
-+ col = format_rlim = 0;
-
- while (beg < end)
- {
- char attr = ' ';
-- unsigned char ch;
-+ unsigned char ch = *beg++;
-
-- if ('\n' == (ch = *beg++))
-+ if ('\n' == ch)
- break;
-
- if ((ch == '\r') && (Most_V_Opt == 0))
- {
-- if (i > i_max) i_max = i;
-- i = 0;
-+ if (col > format_rlim) format_rlim = col;
-+ col = 0;
- continue;
- }
-
- if ((ch == '\b') && (Most_V_Opt == 0))
- {
-- if (i > i_max) i_max = i;
-- if (i > 0)
-- i--;
-+ if (col > format_rlim) format_rlim = col;
-+ if (col > 0)
-+ {
-+ if (Most_UTF8_Mode)
-+ {
-+ SLwchar_Type wc;
-+ pout = SLutf8_bskip_char(out, pout);
-+ if (SLutf8_decode(pout, pout + SLUTF8_MAX_MBLEN, &wc, NULL))
-+ {
-+ unsigned int char_len = SLwchar_wcwidth(wc);
-+ if (char_len > 1)
-+ col -= char_len - 1;
-+ }
-+ }
-+ else
-+ pout--;
-+ pattributes--;
-+ col--;
-+ }
- continue;
- }
-
-- if (i < i_max) /* overstrike */
-+ if (col < format_rlim) /* overstrike */
- {
- attr = 'b';
-- if ((i >= min_col) && (i < max_col))
-+ if (col < SLtt_Screen_Cols)
- {
-- if (out[i-min_col] == '_')
-+ if (*pout == '_')
- attr = 'u';
- else if (ch == '_')
- {
- attr = 'u';
-- ch = out[i - min_col];
-+ ch = *pout;
- }
- }
- if (ch == ' ')
- {
-- i++;
-+ col++;
- continue;
- }
- /* drop */
- }
--
-- if ((ch >= ' ') && (ch < 0x7F))
-- {
-- if ((i >= min_col) && (i < max_col))
-+
-+ if (Most_UTF8_Mode) {
-+ unsigned char *prev = --beg;
-+ SLwchar_Type wc;
-+ unsigned int len;
-+
-+ if (SLutf8_decode(beg, end, &wc, NULL))
-+ {
-+ unsigned int char_len = SLwchar_wcwidth(wc);
-+ if (char_len > 1)
-+ col += char_len - 1;
-+ }
-+
-+ beg = SLutf8_skip_char(beg, end);
-+ len = beg - prev;
-+
-+ if (len > 1) {
-+ /* Non-ASCII char, display it. */
-+ if (col < SLtt_Screen_Cols)
- {
-- out[i-min_col] = ch;
-- attributes[i-min_col] = attr;
-+ memcpy(pout, prev, len);
-+ pout += len;
-+ *pattributes++ = attr;
- }
-- i++;
-+ col++;
- continue;
-- }
--
-- if (ch >= SLsmg_Display_Eight_Bit)
-+ }
-+ }
-+
-+ if (most_isprint(ch))
- {
-- if ((i >= min_col) && (i < max_col))
-+ if (col < SLtt_Screen_Cols)
- {
-- out[i-min_col] = ch;
-- attributes[i-min_col] = attr;
-+ *pout++ = ch;
-+ *pattributes++ = attr;
- }
-- i++;
-+ col++;
- continue;
- }
-
- if ((ch == '\t') && (Most_T_Opt == 0) && (Most_Tab_Width))
- {
--
-- int nspaces = Most_Tab_Width * (i/Most_Tab_Width + 1) - i;
-+ /* Tab expansion must take into consideration the
-+ * leftmost visible column. However, variable col holds the
-+ * number of columns from the left margin and must be
-+ * corrected.
-+ */
-+ int vis_col = col + Most_Column - 1;
-+ int nspaces = Most_Tab_Width - (vis_col % Most_Tab_Width);
- while (nspaces > 0)
- {
-- if ((i >= min_col) && (i < max_col))
-+ if (col < SLtt_Screen_Cols)
- {
-- out[i-min_col] = ' ';
-- attributes[i-min_col] = attr;
-+ *pout++ = ' ';
-+ *pattributes++ = attr;
- }
-- i++;
-+ col++;
- nspaces--;
- }
- continue;
-@@ -212,36 +264,36 @@
-
- if (ch & 0x80)
- {
-- if ((i >= min_col) && (i < max_col))
-+ if (col < SLtt_Screen_Cols)
- {
-- out[i-min_col] = '~';
-- attributes[i-min_col] = attr;
-+ *pout++ = '~';
-+ *pattributes++ = attr;
- }
-- i++;
-+ col++;
- ch &= 0x7F;
- /* drop */
- }
-
-- if ((i >= min_col) && (i < max_col))
-+ if (col < SLtt_Screen_Cols)
- {
-- out[i-min_col] = '^';
-- attributes[i-min_col] = attr;
-+ *pout++ = '^';
-+ *pattributes++ = attr;
- }
-- i++;
-+ col++;
-
- if (ch == 0x7F) ch = '?';
- else ch += '@';
-
-- if ((i >= min_col) && (i < max_col))
-+ if (col < SLtt_Screen_Cols)
- {
-- out[i-min_col] = ch;
-- attributes[i-min_col] = attr;
-+ *pout++ = ch;
-+ *pattributes++ = attr;
- }
-- i++;
-+ col++;
- }
-
-- if (i < i_max)
-- i = i_max;
-+ if (col < format_rlim)
-+ col = format_rlim;
-
- /* Now add "..." if selective display. To do that, the next line needs to
- * be dealt with to determine whether or not it will be hidden.
-@@ -249,7 +301,7 @@
- if (Most_Selective_Display
- && (Most_W_Opt == 0)
- && (beg < Most_Eob)
-- && ((i >= min_col) && (i < max_col)))
-+ && (col < SLtt_Screen_Cols))
- {
- if (*beg == '\n') beg++;
-
-@@ -260,37 +312,29 @@
- if ((beg >= Most_Eob) || (*beg == '\n')
- || (most_apparant_distance(beg) >= Most_Selective_Display))
- {
-- i_max = i + 3;
-- while (i < i_max)
-+ /* Add an ellipsis, if they fit on the screen. */
-+ int rlimit = col + 3;
-+ while (col < rlimit)
- {
-- if (i < max_col)
-+ if (col < SLtt_Screen_Cols)
- {
-- out[i] = '.';
-- attributes[i] = ' ';
-+ *pout++ = '.';
-+ *pattributes++ = ' ';
- }
-- i++;
-+ col++;
- }
- }
- }
--
-- i_max = i;
-
-- if (i < min_col)
-- i = min_col;
-- else if (i >= max_col)
-- i = max_col;
--
-- i -= min_col;
--
-- out[i] = 0;
-- attributes[i] = 0;
-- return i_max;
-+ *pout = 0;
-+ *pattributes = 0;
- }
-
--static void output_with_attr (unsigned char *out, unsigned char *attr)
-+static void output_with_attr (unsigned char *out, char *attr)
- {
-- unsigned char at, ch, lat;
-+ unsigned char at, lat;
- unsigned char *p = out;
-+ unsigned char *pmax = p + strlen((char *) p);
-
- if (Most_V_Opt)
- {
-@@ -299,7 +343,7 @@
- }
-
- lat = ' ';
-- while ((ch = *p) != 0)
-+ while (p < pmax)
- {
- if (lat != *attr)
- {
-@@ -321,7 +365,7 @@
- else most_tt_normal_video ();
- lat = at;
- }
-- p++;
-+ p = SLutf8_skip_char(p, pmax);
- attr++;
- }
-
-@@ -340,10 +384,11 @@
- void most_display_line (void)
+@@ -520,13 +530,13 @@
+ .PP
+ .B setkey function-name key-sequence
+ .PP
+-The
++The
+ .I setkey
+ command requires two arguments. The
+ .I function-name
+ argument specifies the function that is to be executed as a response
+ to the keys specified by the
+-.I key-sequence
++.I key-sequence
+ argument are pressed. For example,
+ .PP
+ setkey "up" "^P"
+@@ -544,9 +554,9 @@
+ .PP
+ unsetkey "^F"
+ .PP
+-Colors may be defined through the use of the
++Colors may be defined through the use of the
+ .I color
+-keyword in the the configuration file using the syntax:
++keyword in the configuration file using the syntax:
+ .PP
+ .B color OBJECT-NAME FOREGROUND-COLOR BACKGROUND-COLOR
+ .PP
+@@ -589,19 +599,19 @@
+ for valuable comments and criticisms.
+ I would especially like to thank those individuals
+ who have contributed code to
+-.IR most.
++.IR most .
+ .PP
+ Mats Akerberg, Henk D. Davids, Rex O. Livingston, and Mark
+ Pizzolato contributed to the early VMS versions of
+-.IR most.
++.IR most .
+ In particular, Mark worked on it to get it ready for DECUS.
+ .PP
+ Foteos Macrides <MACRIDES@SCI.WFEB.EDU> adapted
+ .IR most
+-for use in
++for use in
+ .IR cswing
+ and
+-.IR gopher.
++.IR gopher .
+ A few features of the present version of
+ .IR most
+ was inspired from his work.
+@@ -613,7 +623,7 @@
+ automatic detection of zipped files.
+ .PP
+ I would also like to thank Shinichi Hama for his valuable criticisms of
+-.IR most.
++.IR most .
+ .PP
+ Javier Kohen was instrumental in the support for UTF-8.
+ .PP
+--- most-5.0.0a.orig/src/file.h
++++ most-5.0.0a/src/file.h
+@@ -22,6 +22,7 @@
+ #define MOST_MAX_FILES 4096
+ #define MOST_GUNZIP_POPEN_FORMAT "gzip -dc \"%s\""
+ #define MOST_BZIP2_POPEN_FORMAT "bzip2 -dc \"%s\""
++#define MOST_LZMA_POPEN_FORMAT "lzma -dc '%s'"
+
+ extern void most_reread_file (void);
+ extern void most_read_to_line (int);
+--- most-5.0.0a.orig/src/file.c
++++ most-5.0.0a/src/file.c
+@@ -77,7 +77,7 @@
+ static int open_compressed_file(char *file, int mode, int *size)
{
- unsigned char *beg, *end;
-- unsigned int len;
-+#if 0
- unsigned char dollar;
-+#endif
- static unsigned char *line;
-- static unsigned char *attr;
-+ static char *attr;
- static unsigned int line_len;
-
- if (Most_B_Opt)
-@@ -357,37 +402,43 @@
- if (line_len < (unsigned int)(SLtt_Screen_Cols + 1) * SLUTF8_MAX_MBLEN)
- {
- SLfree ((char *) line);
-- SLfree ((char *) attr);
-+ SLfree (attr);
-
- line_len = (SLtt_Screen_Cols + 1) * SLUTF8_MAX_MBLEN;
-
- if ((NULL == (line = (unsigned char *) SLmalloc (line_len)))
-- || (NULL == (attr = (unsigned char *) SLmalloc (line_len))))
-+ || (NULL == (attr = SLmalloc (line_len))))
- most_exit_error ("Out of memory");
- }
+ int fd;
+- char buf[4], cmdbuf[2*MAX_PATHLEN];
++ char buf[6], cmdbuf[2*MAX_PATHLEN];
+ struct stat st;
- (void) most_extract_line (&beg, &end);
+ # ifdef O_BINARY
+@@ -97,7 +97,7 @@
-- len = most_analyse_line(beg, end, (char *) line, (char *) attr);
-+ most_analyse_line(beg, end, line, attr);
+ if (fd < 0) return fd;
-+#if 0
-+ /* Currently the dollar sign is not always being written at the
-+ rightmost column when displaying multi-byte characters. */
- dollar = 0;
- if (Most_W_Opt)
- {
-- if ((end < Most_Eob)
-- && (*end != '\n'))
-- dollar = '\\';
-+ if ((end < Most_Eob)
-+ && (*end != '\n'))
-+ dollar = '\\';
- }
- else if (len > (unsigned int) SLtt_Screen_Cols + (Most_Column - 1))
- dollar = '$';
--
-+
- if (dollar)
+- if (4 == read(fd, buf, 4))
++ if (6 == read(fd, buf, 6))
{
-- line[SLtt_Screen_Cols-1] = dollar;
-- attr[SLtt_Screen_Cols-1] = ' ';
-- line[SLtt_Screen_Cols] = 0;
-- attr[SLtt_Screen_Cols] = 0;
-+ unsigned char *pline =
-+ most_forward_columns(line, line + line_len, SLtt_Screen_Cols-1, 1);
-+ *pline = dollar;
-+ *(pline+1) = 0;
-+ attr[SLtt_Screen_Cols-1] = ' ';
-+ attr[SLtt_Screen_Cols] = 0;
- }
--
-+#endif
-+
- output_with_attr (line, attr);
- SLsmg_erase_eol ();
- }
-@@ -398,21 +449,34 @@
- int most_apparant_distance (unsigned char *pos)
- {
- int i;
-- unsigned char *save_pos, ch;
-+ unsigned char *save_pos, *beg, ch;
- unsigned int save_offset;
+ char *cmd = NULL;
- save_offset = Most_C_Offset;
- save_pos = pos;
- Most_C_Offset = (unsigned int) (pos - Most_Beg);
-- pos = most_beg_of_line();
-+ beg = pos = most_beg_of_line();
- Most_C_Offset = save_offset;
-
- i = 0;
- while (pos < save_pos)
- {
-- ch = *pos++;
-- if (((ch >= ' ') && (ch < 0x7F))
-- || (ch >= SLsmg_Display_Eight_Bit))
-+ ch = *pos;
-+
-+ if (Most_UTF8_Mode) {
-+ unsigned char *prev = pos;
-+ int len;
-+ pos = SLutf8_skip_char(pos, save_pos);
-+ len = pos - prev;
-+ if (len > 1) {
-+ i++;
-+ continue;
-+ }
-+ } else {
-+ pos++;
-+ }
-+
-+ if (most_isprint(ch))
+@@ -113,6 +113,13 @@
{
- i++;
- continue;
-@@ -420,7 +484,13 @@
-
- if (!Most_V_Opt && (ch == '\b'))
- {
-- if (i > 0) i--;
-+ if (i > 0)
-+ {
-+ if (Most_UTF8_Mode)
-+ i -= pos - SLutf8_bskip_char(beg, pos);
-+ else
-+ i--;
-+ }
+ cmd = MOST_BZIP2_POPEN_FORMAT;
}
- else if (!Most_V_Opt && (ch == '\015')) /* ^M */
- {
-@@ -439,3 +509,95 @@
- }
- return i;
- }
-+
-+/*
-+ * Returns a pointer to the num_cols'th character after the one
-+ * pointed at b. Invisible character runs are not counted toward this
-+ * limit, i.e. strings that represent attributes, such as "_\b" for
-+ * underlines.
-+ *
-+ * If multi_column is non-zero, characters spanning more than one
-+ * column will add their extra width to the column count.
-+ *
-+ * If there the end of the buffer is reached, as delimited by argument
-+ * e, then e is returned.
-+ */
-+unsigned char *most_forward_columns (unsigned char *beg, unsigned char *e, unsigned int num_cols, int multi_column)
-+{
-+ unsigned int col = 0;
-+ unsigned int prev_width = 1;
-+ unsigned char* b = beg;
-+
-+ while ((b < e)
-+ && ((col < num_cols)
-+ || (*b == '\b')
-+ || (*b == '\r')))
-+ {
-+ unsigned char ch = *b;
-+
-+ if (Most_UTF8_Mode)
++ else if ((buf[0] == (char) 0xff)
++ && (buf[1] == 'L') && (buf[2] == 'Z')
++ && (buf[3] == 'M') && (buf[4] == 'A')
++ && (buf[5] == (char) 0x00))
+ {
-+ unsigned char *prev = b;
-+ int len;
-+ b = SLutf8_skip_char(b, e);
-+ len = b - prev;
-+ if (len > 1)
-+ {
-+ if (multi_column)
-+ {
-+ SLwchar_Type wc;
-+ if (SLutf8_decode(prev, e, &wc, NULL))
-+ col += prev_width = SLwchar_wcwidth(wc);
-+ }
-+ else
-+ col++;
-+ continue;
-+ }
++ cmd = MOST_LZMA_POPEN_FORMAT;
+ }
-+ else
-+ b++;
-+
-+ if (most_isprint(ch))
-+ {
-+ col++;
-+ prev_width = 1;
-+ continue;
-+ }
-+
-+ if ((ch == '\b') || (ch == '\t') || (ch == '\r'))
-+ switch (ch)
-+ {
-+ case '\b':
-+ if (Most_V_Opt == 0)
-+ {
-+ if (col > 0) col -= prev_width;
-+ }
-+ else col += 2;
-+ break;
-+
-+ case '\r':
-+ if (Most_V_Opt == 0)
-+ col = 0;
-+ else
-+ col += 2;
-+ break;
+
+ if (cmd != NULL)
+ {
+--- most-5.0.0a.orig/autoconf/config.guess
++++ most-5.0.0a/autoconf/config.guess
+@@ -1,9 +1,10 @@
+ #! /bin/sh
+ # Attempt to guess a canonical system name.
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
++# Free Software Foundation, Inc.
+
+-timestamp='2005-04-22'
++timestamp='2009-12-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
+@@ -17,23 +18,25 @@
+ #
+ # 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.
++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
++# 02110-1301, USA.
+ #
+ # 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.
+
+-# Originally written by Per Bothner <per@bothner.com>.
+-# Please send patches to <config-patches@gnu.org>. Submit a context
+-# diff and a properly formatted ChangeLog entry.
+
-+ case '\t':
-+ if (Most_T_Opt == 0)
-+ col = Most_Tab_Width * (col/Most_Tab_Width + 1);
-+ else
-+ col += 2; /* ^I is two chars long. */
-+ break;
-+ }
-+ else if (ch & 0x80)
-+ col += 3;
-+ else
-+ col += 2;
-+ }
++# Originally written by Per Bothner. Please send patches (context
++# diff format) to <config-patches@gnu.org> and include a 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.
++# 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
+
+ me=`echo "$0" | sed -e 's,.*/,,'`
+
+@@ -53,8 +56,9 @@
+ GNU config.guess ($timestamp)
+
+ Originally written by Per Bothner.
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+-Free Software Foundation, Inc.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 +70,11 @@
+ 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.
+@@ -104,7 +108,7 @@
+ 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 -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$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 ; } ;
+@@ -123,7 +127,7 @@
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+-esac ;'
++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)
+@@ -158,6 +162,7 @@
+ 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
+@@ -166,7 +171,7 @@
+ 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?
+@@ -196,55 +201,23 @@
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+- exit 0 ;;
+- amd64:OpenBSD:*:*)
+- echo x86_64-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- amiga:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- cats:OpenBSD:*:*)
+- echo arm-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- hp300:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- luna88k:OpenBSD:*:*)
+- echo m88k-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 ;;
+- sgi:OpenBSD:*:*)
+- echo mips64-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- sun3:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
++ 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 0 ;;
++ exit ;;
++ *:SolidBSD:*:*)
++ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
++ exit ;;
+ macppc:MirBSD:*:*)
+- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+- exit 0 ;;
++ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
++ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+@@ -297,40 +270,43 @@
+ # 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'`
+- exit 0 ;;
++ exit ;;
+ 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 0 ;;
++ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+- exit 0 ;;
++ 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
+@@ -338,32 +314,51 @@
+ else
+ echo pyramid-pyramid-bsd
+ fi
+- exit 0 ;;
++ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+- exit 0 ;;
++ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+- exit 0 ;;
++ 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*)
+@@ -372,10 +367,10 @@
+ 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
+@@ -387,10 +382,10 @@
+ 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
+@@ -401,40 +396,40 @@
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+- exit 0 ;;
++ 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 ;;
++ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+- exit 0 ;;
++ 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
+@@ -458,32 +453,33 @@
+ exit (-1);
+ }
+ EOF
+- $CC_FOR_BUILD -o $dummy $dummy.c \
+- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+- && exit 0
++ $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`
+@@ -499,29 +495,29 @@
+ 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`
+@@ -529,7 +525,7 @@
+ 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
+@@ -544,15 +540,19 @@
+ exit(0);
+ }
+ EOF
+- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+- 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:*:[456])
+ 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
+@@ -565,28 +565,28 @@
+ 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
+@@ -648,9 +648,19 @@
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+- # avoid double evaluation of $set_cc_for_build
+- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
++ eval $set_cc_for_build
+
-+ /* Last character was too wide. Backstep it. */
-+ if (col > num_cols)
-+ b = SLutf8_bskip_char(beg, b);
++ # 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
+
-+ return b;
-+}
---- most-4.10.2.orig/src/line.h
-+++ most-4.10.2/src/line.h
-@@ -7,5 +7,7 @@
-
- extern void most_display_line(void);
- extern int most_apparant_distance(unsigned char *);
-+extern int most_isprint(unsigned char);
-+extern unsigned char *most_forward_columns (unsigned char *, unsigned char *, unsigned int, int);
- #endif
-
---- most-4.10.2.orig/src/most.c
-+++ most-4.10.2/src/most.c
-@@ -125,7 +125,7 @@
- ch = *(++str);
- if ( ch == '/')
- {
-- strcpy (Most_Search_Str,++str);
-+ strcpy ((char *) Most_Search_Str,++str);
- return;
- }
-
-@@ -329,7 +329,8 @@
-
- static void do_most (char *file, int start)
- {
-- int piped, row, col;
-+ int piped;
-+ long long row, col;
-
- most_get_cdir(Most_C_Dir);
-
-@@ -347,7 +348,7 @@
- Most_Curs_Offset = Most_C_Offset;
-
- if (*Most_Search_Str
-- && ((row = most_search (Most_Beg + Most_C_Offset, 1, &col)) > 0))
-+ && ((row = most_search (Most_Beg + Most_C_Offset, 1LL, &col)) > 0))
- most_goto_line(row);
- else
- {
-@@ -455,13 +456,7 @@
-
- SLtt_get_terminfo();
- #if SLANG_VERSION >= 20000
--#if 0
-- Most_UTF8_Mode = SLutf8_enable (1);
-- if (Most_UTF8_Mode)
-- {
-- fprintf (stderr, "UTF-8 Mode is in effect\n");
-- }
--#endif
-+ Most_UTF8_Mode = SLutf8_enable (-1);
- #endif
- SLtt_Ignore_Beep = 1;
- if (No_Colors)
---- most-4.10.2.orig/src/most.h
-+++ most-4.10.2/src/most.h
-@@ -1,4 +1,5 @@
- #include "config.h"
-+#define SLANG_REGEXP
- extern int Most_S_Opt;
- extern int Most_A_Opt; /* automatically choose -b if necessary */
- extern int Most_V_Opt; /* display control chars */
---- most-4.10.2.orig/src/search.c
-+++ most-4.10.2/src/search.c
-@@ -20,6 +20,7 @@
- */
- #include "config.h"
-
-+#include <ctype.h>
- #include <stdio.h>
- #include <string.h>
- #include <slang.h>
-@@ -31,18 +32,18 @@
- #include "display.h"
- #include "search.h"
-
--/* Note!!! The regular expression searches may not work. I have not
-- * tested them.
-- * FIXME!!!
-- */
--
- int Most_Case_Sensitive = 0;
--char Most_Search_Str[256];
-+unsigned char Most_Search_Str[256];
- int Most_Search_Dir = 1;
-
- #include "jdmacros.h"
-
--#define UPCASE(ch) ((!Most_Case_Sensitive && (ch <= 'z') && (ch >= 'a')) ? (ch - 32) : ch)
-+#if SLANG_VERSION < 20000
-+# define NORM_CHAR(ch) ((!Most_Case_Sensitive) ? toupper(ch) : ch)
-+# define UPCASE(ch) NORM_CHAR(ch)
-+#else
-+# define NORM_CHAR(ch) (ch)
-+#endif
-
- #if defined(HAVE_V8_REGCOMP) || defined(SLANG_REGEXP)
-
-@@ -78,7 +79,7 @@
- * This function is called by the V8 regcomp to report
- * errors in regular expressions.
- */
--static void regerror(char *s)
-+static void regerror(const char *s)
- {
- char string[256];
-
-@@ -95,13 +96,17 @@
- * 0 error
- *
- */
--static int do_regcomp(unsigned char *key)
-+static int do_regcomp(const unsigned char *key)
- {
- static int old_Most_Case_Sensitive;
-- unsigned char UpCaseKey[sizeof(savepattern)];
- # ifndef HAVE_V8_REGCOMP
- int posn; /* reg exp error at this offset */
- # endif
-+# if SLANG_VERSION < 20000
-+ unsigned char UpCaseKey[sizeof(savepattern)];
-+# else
-+ int re_flags = 0;
-+# endif
-
- /*
- * Only recompile search string if it has changed
-@@ -124,6 +129,7 @@
-
- old_Most_Case_Sensitive = Most_Case_Sensitive;
-
-+# if SLANG_VERSION < 20000
- if ( Most_Case_Sensitive == 0 )
- {
- register unsigned char *p; /* ptr to UpCaseKey */
-@@ -141,6 +147,7 @@
-
- *p = '\0';
- }
-+# endif
-
- strcpy((char *)savepattern, (char *)key);
-
-@@ -162,7 +169,12 @@
- # else
- if (Regexp != NULL)
- SLregexp_free (Regexp);
-- if (NULL == (Regexp = SLregexp_compile ((char *)key, Most_Case_Sensitive ? 0 : SLREGEXP_CASELESS)))
-+
-+ if (!Most_Case_Sensitive)
-+ re_flags |= SLREGEXP_CASELESS;
-+ if (Most_UTF8_Mode)
-+ re_flags |= SLREGEXP_UTF8;
-+ if (NULL == (Regexp = SLregexp_compile ((char *)key, re_flags)))
- posn = -1;
- else
- posn = 0;
-@@ -187,7 +199,7 @@
- * Call the appropriate regular expression execute function
- */
-
--static unsigned char *do_regexec(unsigned char *string)
-+static unsigned char *do_regexec(const unsigned char *string, size_t length)
- {
- # ifdef HAVE_V8_REGCOMP
- if ( regexec(regpattern, (char *)string) )
-@@ -196,40 +208,46 @@
- return( NULL );
- # else
- # if SLANG_VERSION < 20000
-- return ( SLang_regexp_match(string, strlen((char *)string), &regdata) );
-+ return ( SLang_regexp_match(string, length, &regdata) );
- # else
-- return (unsigned char *)SLregexp_match (Regexp, (char *)string, strlen ((char *)string));
-+ return (unsigned char *)SLregexp_match (Regexp, (char *)string, length);
- # endif
- # endif /* HAVE_V8_REGCOMP */
- }
-
- /*
-- * Make a upper case copy of a string. Also changes any "c\b" character
-- * strings into just "" so that highlighted and underlined characters
-- * can be searched.
-+ * Changes any "c\b" character strings into just "" so that
-+ * highlighted and underlined characters can be searched. Stores in
-+ * length the new size of the string, after the aforementioned
-+ * changes.
-+ *
-+ * If using a version of S-Lang that does not support case
-+ * insensitive regular expressions, this function upper cases the
-+ * input string, as well.
- *
- * Reuses malloced memory, so a copy cannot be retained between calls.
- */
-
--static unsigned char *StrUpCaseCopy(unsigned char *input)
-+static const unsigned char *StrNormCopy(const unsigned char *input,
-+ size_t *length)
- {
- static unsigned char *uppercase; /* ptr to malloced area */
- static size_t bufsize; /* size of malloced area */
-- unsigned char *src; /* ptr to source */
-+ const unsigned char *src; /* ptr to source */
-+ const unsigned char *end; /* ptr to end of source */
- register unsigned char *dest; /* ptr to destination */
- register int idx; /* index into uppercase[] */
-- register unsigned char c; /* source character */
-- size_t length; /* size of string to copy */
-
- src = input;
-- length = strlen((char *)src) + 1; /* len of line plus terminator */
-+ end = input + *length;
-
-- if ( length > bufsize )
-+ if ( *length >= bufsize )
- {
- if ( uppercase != (unsigned char *)NULL )
- free(uppercase);
-
-- bufsize = (length > 256 ) ? length : 256; /* 256 byte default */
-+ /* len of line plus terminator */
-+ bufsize = (*length >= 256 ) ? *length + 1 : 256; /* 256 byte default */
-
- uppercase = (unsigned char *)malloc(bufsize);
- if ( uppercase == (unsigned char *)NULL )
-@@ -242,8 +260,9 @@
-
- dest = uppercase;
-
-- for ( idx = 0 ; (c = *src) != '\0' ; src++ )
-+ for ( idx = 0 ; src < end ; src++ )
- {
-+ unsigned char c = *src;
- if ( c == '\b' ) /* backspace */
- {
- if ( idx-- > 0 )
-@@ -252,54 +271,79 @@
++ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
++ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+@@ -658,11 +668,11 @@
+ 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
+@@ -690,219 +700,248 @@
+ exit (0);
+ }
+ EOF
+- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
++ $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
- {
- if ( idx++ >= 0 )
-- *dest++ = UPCASE(c);
-+ *dest++ = NORM_CHAR(c);
- }
- }
-
- *dest = '\0'; /* add termination */
-
-+ *length = dest - uppercase;
- return(uppercase);
- }
-
- /*
-- * Given an offset into a copy made by StrUpCaseCopy() and a pointer to the
-+ * Given an offset into a copy made by StrNormCopy() and a pointer to the
- * original string, returns a pointer into the original string corresponding
- * to this offset.
- */
-
--static unsigned char *GetOrigPtr(unsigned char *original, int offset)
-+static const unsigned char *
-+GetOrigPtr(const unsigned char *original, int offset,
-+ const unsigned char *end)
- {
-- register unsigned char *p = original;
-+ const unsigned char *p = original;
- register int j = offset;
-
- /*
- * Step through, adjusting offset according to backspaces found
- */
-- while ( *p != '\0' )
-+ while ( p < end )
- {
-+ const unsigned char *next;
-+ if (Most_UTF8_Mode)
-+ next = SLutf8_skip_char((unsigned char*) p, (unsigned char*) end);
+ 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 ;;
++ 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 0 ;;
++ 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 ;;
++ 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 0 ;;
++ 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:*:*)
+- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+- exit 0 ;;
++ case ${UNAME_MACHINE} in
++ pc98)
++ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ amd64)
++ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ *)
++ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ esac
++ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+- exit 0 ;;
+- i*:MINGW*:*)
++ exit ;;
++ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+- exit 0 ;;
++ 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*:[34]*)
+- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+- 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 ;;
+- amd64:CYGWIN*:*:*)
++ exit ;;
++ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+- exit 0 ;;
++ 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:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+- exit 0 ;;
++ 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/[-(].*//'`-gnu
+- exit 0 ;;
++ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+- exit 0 ;;
++ exit ;;
++ 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=alphaev68 ;;
++ esac
++ objdump --private-headers /bin/sh | grep -q ld.so.1
++ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
++ echo ${UNAME_MACHINE}-unknown-linux-gnu${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-gnu
+ else
-+ next = p + 1;
-+ size_t length_last = next - p;
-+
- if ( *p == '\b' )
-- j++;
-+ j += length_last;
++ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++ fi
++ exit ;;
++ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+- exit 0 ;;
++ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+- exit 0 ;;
++ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
++ i*86:Linux:*:*)
++ LIBC=gnu
++ eval $set_cc_for_build
++ sed 's/^ //' << EOF >$dummy.c
++ #ifdef __dietlibc__
++ LIBC=dietlibc
++ #endif
++EOF
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
++ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
+- mips:Linux:*:*)
++ exit ;;
++ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+- #undef mips
+- #undef mipsel
++ #undef ${UNAME_MACHINE}
++ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+- CPU=mipsel
++ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+- CPU=mips
++ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+ EOF
+- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+- 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=`
+- 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 ;;
+- EV56) UNAME_MACHINE=alphaev56 ;;
+- PCA56) UNAME_MACHINE=alphapca56 ;;
+- PCA57) UNAME_MACHINE=alphapca56 ;;
+- 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 ;;
++ or32:Linux:*:*)
++ echo or32-unknown-linux-gnu
++ exit ;;
++ padre:Linux:*:*)
++ echo sparc-unknown-linux-gnu
++ exit ;;
++ parisc64:Linux:*:* | hppa64:Linux:*:*)
++ echo hppa64-unknown-linux-gnu
++ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+@@ -910,87 +949,40 @@
+ 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 ;;
++ exit ;;
++ ppc64:Linux:*:*)
++ echo powerpc64-unknown-linux-gnu
++ exit ;;
++ ppc:Linux:*:*)
++ echo powerpc-unknown-linux-gnu
++ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+- exit 0 ;;
++ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
++ vax:Linux:*:*)
++ echo ${UNAME_MACHINE}-dec-linux-gnu
++ exit ;;
+ 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. 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
+- eval $set_cc_for_build
+- sed 's/^ //' << EOF >$dummy.c
+- #include <features.h>
+- #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
+- #ifdef __dietlibc__
+- LIBC=dietlibc
+- #endif
+-EOF
+- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+- ;;
++ exit ;;
++ xtensa*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ 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...
+@@ -998,27 +990,27 @@
+ # I just have to hope. -- rms.
+ # 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:syllable:*:*)
++ exit ;;
++ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+- exit 0 ;;
+- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
++ 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
+@@ -1026,15 +1018,16 @@
else
-- j--;
-+ j -= length_last;
-
- if ( j < 0 )
- break;
+ 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' </usr/options/cb.name`
+@@ -1052,73 +1045,86 @@
else
-- p++;
-+ p = next;
- }
-
- return(p);
- }
- #endif /* HAVE_V8_REGCOMP || SLANG_REGEXP */
-
-+/* Returns a pointer to the first occurrence of '\n' in string beg, or
-+ * end if no '\n' can be found between inclusive beg and exclusive
-+ * end.
-+ */
-+static const unsigned char *
-+find_eol(const unsigned char *beg, const unsigned char *end)
-+{
-+ const unsigned char *p;
-+ if ( (p = memchr(beg, '\n', end - beg)) != NULL)
-+ return p;
-+ else
-+ return end;
-+}
-+
- /* This routine returns the 1 + position of first match of key in str.
- key is modified to match the case of str. */
- /* We should try to optimize this routine */
- /* searches from beg up to but not including end */
-
--static unsigned char *forw_search_region(unsigned char *beg,
-- unsigned char *end,
-- unsigned char *key)
-+static const unsigned char *
-+forw_search_region(const unsigned char *beg,
-+ const unsigned char *end,
-+ const unsigned char *key)
- {
- #if defined(HAVE_V8_REGCOMP) || defined(SLANG_REGEXP)
- /*
-@@ -307,10 +351,11 @@
- * to be broken into lines.
- *
- */
-- unsigned char *p; /* temp pointer */
-- unsigned char *linebeg; /* beginning of working line */
-- unsigned char *copy; /* ptr to upper case copy */
-+ const unsigned char *linebeg; /* beginning of working line */
-+ const unsigned char *lineend; /* end of working line */
-+ const unsigned char *norm_line; /* ptr to normalized line */
- unsigned char *match; /* ptr to matching string */
-+ int anchored_re;
-
- /*
- * Compile "key" into an executable regular expression
-@@ -318,58 +363,35 @@
- if ( do_regcomp(key) == 0 )
- return(Most_Eob);
-
-- /*
-- * For regular expression searches we need to do a line by line
-- * search, so it is necessary to temporarily replace '\n' with '\0'
-- * characters.
-- */
-- p = beg;
-- linebeg = beg;
-+ anchored_re = key[0] == '^';
-
-- while (linebeg < end)
-+ for ( linebeg = beg ; linebeg < end ; linebeg = lineend + 1 )
- {
-- while ((p < end) && (*p != '\n')) p++;
-- if (p == end) break;
-- *p = 0;
-+ size_t length;
-
-- if ( Most_Case_Sensitive == 0 ) /* i.e. case insensitive */
-- {
-- copy = StrUpCaseCopy(linebeg);
-- if ( copy == (unsigned char *)NULL )
-- return(Most_Eob);
-- }
-+ lineend = find_eol(linebeg, end);
-+
-+ length = lineend - linebeg;
-+ if (0 == length) continue; /* Skip empty lines. */
-+
-+ norm_line = StrNormCopy(linebeg, &length);
-+ if ( norm_line == NULL )
-+ return(Most_Eob);
-
- /*
- * Quick sanity check for beginning of line archored tests.
-- * If 1st char of key is "^", then the character before linebeg (which
-- * must be beyond the start of the window), must be a "\n",
-- * otherwise do_regexec() isn't called.
-+ * If 1st char of key is "^", then the character before
-+ * linebeg (which must be within the buffer), must be a "\n".
- */
-- if (
--# if 0
-- ((*key != '^')
-- || (linebeg > Most_Win->beg_pos && linebeg[-1] == '\n'))
-- &&
--#endif
-- (match = do_regexec(Most_Case_Sensitive ? linebeg : copy)))
-+ if ( !(anchored_re && (linebeg <= Most_Beg || linebeg[-1] != '\n'))
-+ && (match = do_regexec(norm_line, length)) )
- {
-- *p = '\n';
-- if ( Most_Case_Sensitive == 0 )
-- {
-- /*
-- * Use offset into "copy" as idx to find point in
-- * real line.
-- */
-- return( GetOrigPtr(linebeg, match - copy) );
-- }
-- else
-- {
-- return( match );
-- }
-+ /*
-+ * Use offset into "norm_line" as idx to find point in
-+ * real line.
-+ */
-+ return( GetOrigPtr(linebeg, match - norm_line, lineend) );
- }
--
-- *p++ = '\n';
-- linebeg = p;
- }
-
- return(Most_Eob);
-@@ -475,23 +497,18 @@
- * pattern "key".
- */
-
--static unsigned char *back_search_region(unsigned char *beg,
-- unsigned char *end,
-- unsigned char *key)
-+static const unsigned char *
-+back_search_region(const unsigned char *beg,
-+ const unsigned char *end,
-+ const unsigned char *key)
- {
- #if defined(HAVE_V8_REGCOMP) || defined(SLANG_REGEXP)
-- register unsigned char *p;
-- unsigned char *endp, /* end of line */
-- *lastmatch, /* last match in line */
-+ const unsigned char *p;
-+ const unsigned char *endp, /* end of line */
-+ *lastmatch, /* last match in line */
- *endprevline, /* end of line before this one */
- *match; /* ptr to matching string */
-- unsigned char savec; /* last char on line */
--
-- /*
-- * Compile "key" into an executable regular expression
-- */
-- if ( do_regcomp(key) == 0 )
-- return(Most_Eob);
-+ int anchored_re;
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+- exit 0 ;;
++ exit ;;
+ 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
+- exit 0 ;;
++ # 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
++ # this is a cross-build.
++ echo i586-pc-msdosdjgpp
++ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+- exit 0 ;;
++ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+- exit 0 ;;
++ 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
+ 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 ;;
++ exit ;;
+ M68*:*:R3V[5678]*:*)
+- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
++ 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 ;;
++ && { 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`
+@@ -1126,73 +1132,94 @@
+ else
+ echo ns32k-sni-sysv
+ fi
+- exit 0 ;;
++ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+- exit 0 ;;
++ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # 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 0 ;;
++ 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}
+ else
+ 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 ;;
+ 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:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+- *86) UNAME_PROCESSOR=i686 ;;
++ i386)
++ eval $set_cc_for_build
++ 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
++ UNAME_PROCESSOR="x86_64"
++ fi
++ fi ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+@@ -1200,25 +1227,25 @@
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+- exit 0 ;;
++ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+- exit 0 ;;
++ 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
+@@ -1229,41 +1256,50 @@
+ 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 0 ;;
++ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+- exit 0 ;;
++ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+- A*) echo alpha-dec-vms && exit 0 ;;
+- I*) echo ia64-dec-vms && exit 0 ;;
+- V*) echo vax-dec-vms && exit 0 ;;
++ 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 0 ;;
++ 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 ;;
+ esac
+
+ #echo '(No uname command or uname output not recognized.)' 1>&2
+@@ -1295,7 +1331,7 @@
+ #endif
- /*
- * Starting from the end of the buffer, break the buffer into lines
-@@ -501,84 +518,60 @@
- * and isn't that what we want to do in a reverse search.
- */
- endp = end;
-- lastmatch = Most_Eob;
-- while ( 1 ) /* forever loop */
-- {
-- if ( (endp < beg) )
-- return(Most_Eob); /* Reach start of buffer, no match */
-+ endprevline = end;
-+ match = Most_Eob;
+ #if defined (__arm) && defined (__acorn) && defined (__unix)
+- printf ("arm-acorn-riscix"); exit (0);
++ printf ("arm-acorn-riscix\n"); exit (0);
+ #endif
-- /* Find the real end of current line */
-- if ( (p = (unsigned char *)strchr((char *)endp, '\n')) != NULL )
-- endp = p;
+ #if defined (hp300) && !defined (hpux)
+@@ -1384,11 +1420,12 @@
+ }
+ EOF
+
+-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
++$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 0; }
++test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+ # Convex versions that predate uname can use getsysinfo(1)
+
+@@ -1397,22 +1434,22 @@
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+- exit 0 ;;
++ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+- exit 0 ;;
++ exit ;;
+ c34*)
+ echo c34-convex-bsd
+- exit 0 ;;
++ exit ;;
+ c38*)
+ echo c38-convex-bsd
+- exit 0 ;;
++ exit ;;
+ c4*)
+ echo c4-convex-bsd
+- exit 0 ;;
++ exit ;;
+ esac
+ fi
+
+@@ -1423,9 +1460,9 @@
+ the operating system you are using. It is advised that you
+ download the most up to date version of the config scripts from
+
+- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+ and
+- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+ If the version you run ($0) is already up to date, please
+ send the following data and any information you think might be
+--- most-5.0.0a.orig/autoconf/config.sub
++++ most-5.0.0a/autoconf/config.sub
+@@ -1,9 +1,10 @@
+ #! /bin/sh
+ # Configuration validation subroutine script.
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
++# Free Software Foundation, Inc.
+
+-timestamp='2005-04-22'
++timestamp='2010-01-22'
+
+ # This file is (in principle) common to ALL GNU software.
+ # The presence of a machine in this file suggests that SOME GNU software
+@@ -21,22 +22,26 @@
+ #
+ # 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.
-
-- savec = *endp;
-- *endp = '\0'; /* terminate line with NULL */
-+ /* Find out whether the regexp attempts to match a line boundary.
-+ * In this case, only a match on the full line should be attempted.
-+ */
-+ anchored_re = key[strlen((const char *) key)-1] == '$';
++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
++# 02110-1301, USA.
++#
+ # 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.
-+ while ( endp > beg )
-+ {
- /* Find the beginning of line */
- for ( p = endp - 1 ; (p >= beg) && (*p != '\n') ; p-- )
- {
- }
-
-+ if ( p < beg )
-+ break;
+
- endprevline = p;
-
-- p++; /* point to 1st char after newline */
-+ /*
-+ * Quick sanity check for end of line archored tests. If last
-+ * char of key is "$", then the character after endp (which
-+ * must be within the buffer), must be a "\n".
-+ */
-+ if ( anchored_re && endp < Most_Eob && endp[0] != '\n' )
-+ {
-+ endp = p;
-+ continue;
-+ }
-
- /*
- * Keep searching forward in this line till no more matches
- */
-- if ( Most_Case_Sensitive == 0 ) /* i.e. case insensitive */
-+ do
- {
-- unsigned char *copy; /* ptr to upper case copy */
-- unsigned char *savecopy; /* copy of "copy" */
--
-- copy = StrUpCaseCopy(p);
-- if ( copy == (unsigned char *)NULL )
-- return(Most_Eob);
-+ lastmatch = match;
-
-- savecopy = copy;
--
-- /*
-- * Quick sanity check for beginning of line archored tests.
-- * Must be at start of line.
-- */
-- while ( ((*key != '^') || (copy == savecopy))
-- && (match = do_regexec(copy)) )
-- {
-- if ( GetOrigPtr(p, match - savecopy) > end )
-- break;
-- lastmatch = match;
-- if ( *lastmatch == '\0' ) /* key must be "$" or "^" */
-- break;
-- copy = lastmatch + 1; /* character after match */
-- }
-+ if (Most_UTF8_Mode)
-+ p = SLutf8_skip_char((unsigned char*) p, (unsigned char*) endp);
-+ else
-+ p++;
-
-- if ( lastmatch != Most_Eob ) /* found a match */
-- lastmatch = GetOrigPtr(p, lastmatch - savecopy);
-- }
-- else
-- {
-- /*
-- * Quick sanity check for beginning of line archored tests.
-- * Must be at start of buffer or start of line
-- */
-- while ( ( (*key != '^') || (p == endprevline + 1) )
-- && (match = do_regexec(p)) )
-- {
-- if ( match > end )
-- break;
-- lastmatch = match;
-- if ( *lastmatch == '\0' ) /* key must be "$" or "^" */
-- break;
-- p = lastmatch + 1; /* character after match */
-- }
-+ match = forw_search_region(p, endp, key);
- }
-+ while ( match <= endp );
-
-- *endp = savec;
- if ( lastmatch != Most_Eob ) /* found a match */
- return(lastmatch);
-
- endp = endprevline;
- }
+ # Please send patches to <config-patches@gnu.org>. Submit a context
+-# diff and a properly formatted ChangeLog entry.
++# diff and a properly formatted GNU ChangeLog entry.
+ #
+ # 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
+
-+ return(Most_Eob); /* Reached start of buffer, no match */
- #else
- char ch, char1, work[256];
- unsigned char *pos;
-@@ -670,15 +663,15 @@
- #endif /* HAVE_V8_REGCOMP || SLANG_REGEXP */
- }
-
--int most_search(unsigned char *from, int repeat, int *col)
-+long long most_search(const unsigned char *from, int repeat, long long *col)
- {
- /* return the line match was found as well as line number,
- * search from i on; assume that line_array match the i so we need
- * no initial lookup */
-
-- int test, save_line, the_col, row, s_len;
-+ long long test, save_line, the_col, row, s_len;
- char string[300];
-- unsigned char *pos;
-+ const unsigned char *pos;
- unsigned int save_ofs;
- unsigned int found_ofs;
-
-@@ -687,7 +680,10 @@
- save_line = Most_C_Line;
- found_ofs = Most_Eob - Most_Beg;
- *col = 0;
-- s_len = strlen (Most_Search_Str);
-+ if (Most_UTF8_Mode)
-+ s_len = SLutf8_strlen (Most_Search_Str, 0);
-+ else
-+ s_len = strlen ((char *) Most_Search_Str);
- pos = from;
-
- if (*Most_Search_Str)
---- most-4.10.2.orig/src/search.h
-+++ most-4.10.2/src/search.h
-@@ -6,7 +6,7 @@
- extern int Most_Case_Sensitive;
- extern int Most_Search_Dir;
- #define MOST_SEARCH_BUF_LEN 256
--extern char Most_Search_Str[MOST_SEARCH_BUF_LEN];
--extern int most_search(unsigned char *, int, int *);
-+extern unsigned char Most_Search_Str[MOST_SEARCH_BUF_LEN];
-+extern long long most_search(const unsigned char *, int, long long *);
- #endif
-
---- most-4.10.2.orig/src/window.c
-+++ most-4.10.2/src/window.c
-@@ -48,10 +48,11 @@
-
- Most_Window_Type *Most_Win;
- Most_Window_Type *Most_Top_Win;
--int Most_Top_Line; /* row number of top window */
--int Most_Curs_Row;
--int Most_Curs_Col;
--int Most_Column = 1;
-+long long Most_Top_Line; /* row number of top window */
-+long long Most_Curs_Row;
-+long long Most_Curs_Col;
-+/* The leftmost visible column. */
-+long long Most_Column = 1;
- int Most_Restore_Width_To = 0;
- char Most_Mini_Buf[256];
- unsigned long Most_Curs_Offset;
-@@ -156,7 +157,7 @@
- SLsmg_write_nchars (buf + point, len - point);
- if (col < SLtt_Screen_Cols)
- break;
-- buf++; point--; len--; /* FIXME for UTF-8 */
-+ buf++; point--; len--;
- }
- SLsmg_erase_eol ();
- SLsmg_gotorc (SLtt_Screen_Rows - 1, col);
-@@ -227,6 +228,8 @@
- {
- SLang_RLine_Info_Type *rli;
- unsigned int flags = SL_RLINE_BLINK_MATCH;
-+ if (Most_UTF8_Mode)
-+ flags |= SL_RLINE_UTF8_MODE;
-
- if (NULL == (rli = SLrline_open (SLtt_Screen_Cols, flags)))
- return NULL;
-@@ -258,7 +261,7 @@
-
- /* do not use default. The up arrow can always get it back. */
- if ((what != NULL)
-- && (*what) && (what != Most_Search_Str))
-+ && (*what) && (what != (char *) Most_Search_Str))
- {
- if (-1 == SLrline_set_line (Most_RLI, what))
- return -1;
-@@ -593,7 +596,8 @@
- unsigned int num_chars;
- unsigned int field_width, info_len;
- unsigned char *eob;
-- int r, x;
-+ int r;
-+ long long x;
-
- eob = Most_Eob;
- #if MOST_HAS_MMAP
-@@ -601,20 +605,20 @@
- eob = Most_Beg + Most_Buf->mmap_size;
- #endif
-
-- if (eob == Most_Beg) x = 100;
-+ if (eob == Most_Beg) x = 100LL;
- else
- {
-- x = Most_C_Offset * 100;
-+ x = Most_C_Offset * 100LL;
- x = x / (eob - Most_Beg);
- }
-
- if (Most_C_Line + (Most_Win->bot - Most_Win->top + 1) >= Most_Num_Lines)
-- x = 100;
-+ x = 100LL;
-
- /* for files with end of file above the bottom row (due to window manipulations) */
-- if (x > 100) x = 100;
-+ if (x > 100LL) x = 100LL;
-
-- sprintf (info, "(%d,%d) %d%%", Most_C_Line, Most_Column, x);
-+ sprintf (info, "(%lld,%lld) %d%%", Most_C_Line, Most_Column, (int)x);
-
- r = Most_Win->bot + 1;
- most_goto_rc (r,1);
---- most-4.10.2.orig/src/window.h
-+++ most-4.10.2/src/window.h
-@@ -5,11 +5,11 @@
- typedef struct _Most_Window_Type
- {
- unsigned long top_offset; /* offset of top line of window from bob */
-- int beg_line; /* line number of top */
-- int curs_line; /* line number of curs pos */
-- int curs_col; /* column number of curs pos */
-+ long long beg_line; /* line number of top */
-+ long long curs_line; /* line number of curs pos */
-+ long long curs_col; /* column number of curs pos */
- unsigned long curs_offset; /* pos of cursor from bob*/
-- int col; /* column offset */
-+ long long col; /* column offset */
- int n_lines; /* number of lines of buffer (mode dependent) */
- int top; /* screen location of top */
- int bot; /* screen location of bot */
-@@ -29,9 +29,9 @@
- extern Most_Window_Type *Most_Win;
- extern Most_Window_Type *Most_Top_Win;
- extern unsigned long Most_Curs_Offset;
--extern int Most_Column;
--extern int Most_Curs_Row;
--extern int Most_Curs_Col;
-+extern long long Most_Column;
-+extern long long Most_Curs_Row;
-+extern long long Most_Curs_Col;
- #define MOST_MINI_BUF_LEN 256
- extern char Most_Mini_Buf[MOST_MINI_BUF_LEN];
- extern int Most_Selective_Display;
+ # 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 +75,9 @@
+ version="\
+ GNU config.sub ($timestamp)
+
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+-Free Software Foundation, Inc.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 +89,11 @@
+ 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 +105,7 @@
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+- exit 0;;
++ exit ;;
+
+ * )
+ break ;;
+@@ -118,8 +124,10 @@
+ # 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-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
++ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | 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/'`
+ ;;
+@@ -145,10 +153,13 @@
+ -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)
++ -apple | -axis | -knuth | -cray | -microblaze)
+ os=
+ basic_machine=$1
+ ;;
++ -bluegene*)
++ os=-cnk
++ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+@@ -170,6 +181,10 @@
+ -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/'`
+@@ -186,6 +201,10 @@
+ # 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/'`
+@@ -230,23 +249,28 @@
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+- | fr30 | frv \
++ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
++ | lm32 \
++ | m32c | m32r | m32rle | m68000 | m68k | m88k \
++ | maxq | mb | microblaze | 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 \
+ | mipsisa64 | mipsisa64el \
+@@ -255,31 +279,40 @@
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
++ | moxie \
++ | mt \
+ | msp430 \
++ | nios | nios2 \
+ | ns16k | ns32k \
+- | openrisc | or32 \
++ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
++ | 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 | sparc86x | sparclet | sparclite \
+- | sparcv8 | sparcv9 | sparcv9b \
+- | strongarm \
++ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
++ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
++ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
++ | ubicom32 \
+ | v850 | v850e \
+ | we32k \
+- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+- | z8k)
++ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
++ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+- m6811 | m68hc11 | m6812 | m68hc12)
++ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
++ ms1)
++ basic_machine=mt-unknown
++ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+@@ -299,28 +332,32 @@
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+- | avr-* \
++ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | 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-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+- | m32r-* | m32rle-* \
++ | lm32-* \
++ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+- | m88110-* | m88k-* | maxq-* | mcore-* \
++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | 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-* \
+ | mipsisa64-* | mipsisa64el-* \
+@@ -329,27 +366,35 @@
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
++ | mt-* \
+ | msp430-* \
++ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+- | romp-* | rs6000-* \
+- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
++ | 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-* | sparc86x-* | sparclet-* \
++ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
++ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
++ | tile-* | tilegx-* \
+ | tron-* \
++ | ubicom32-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+- | xstormy16-* | xtensa-* \
++ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
++ | 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.
+@@ -413,6 +458,10 @@
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
++ aros)
++ basic_machine=i386-pc
++ os=-aros
++ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+@@ -421,10 +470,26 @@
+ 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
++ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
++ cegcc)
++ basic_machine=arm-unknown
++ os=-cegcc
++ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+@@ -453,8 +518,8 @@
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+- cr16c)
+- basic_machine=cr16c-unknown
++ cr16)
++ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+@@ -492,6 +557,10 @@
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
++ dicos)
++ basic_machine=i686-pc
++ os=-dicos
++ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+@@ -646,6 +715,14 @@
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
++ m68knommu)
++ basic_machine=m68k-unknown
++ os=-linux
++ ;;
++ m68knommu-*)
++ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
++ os=-linux
++ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+@@ -657,10 +734,17 @@
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
++ microblaze)
++ basic_machine=microblaze-xilinx
++ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
++ mingw32ce)
++ basic_machine=arm-unknown
++ os=-mingw32ce
++ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+@@ -686,6 +770,9 @@
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
++ ms1-*)
++ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
++ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+@@ -761,9 +848,8 @@
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+- or32 | or32-*)
++ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+- os=-coff
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+@@ -785,6 +871,14 @@
+ 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
+ ;;
+@@ -794,6 +888,12 @@
+ 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
+ ;;
+@@ -850,6 +950,10 @@
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
++ rdos)
++ basic_machine=i386-pc
++ os=-rdos
++ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+@@ -876,6 +980,10 @@
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
++ sde)
++ basic_machine=mipsisa32-sde
++ os=-elf
++ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+@@ -887,6 +995,9 @@
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
++ sh5el)
++ basic_machine=sh5le-unknown
++ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+@@ -976,6 +1087,15 @@
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
++ # This must be matched before tile*.
++ tilegx*)
++ basic_machine=tilegx-unknown
++ os=-linux-gnu
++ ;;
++ tile*)
++ basic_machine=tile-unknown
++ os=-linux-gnu
++ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+@@ -1051,6 +1171,10 @@
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
++ z80-*-coff)
++ basic_machine=z80-unknown
++ os=-sim
++ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+@@ -1089,13 +1213,10 @@
+ we32k)
+ basic_machine=we32k-att
+ ;;
+- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
++ 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 | sparcv8 | sparcv9 | sparcv9b)
++ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+@@ -1142,6 +1263,9 @@
+ # 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|'`
+ ;;
+@@ -1162,26 +1286,30 @@
+ # 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* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+- | -aos* \
++ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
++ | -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* \
++ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
++ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
++ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -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*)
++ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+@@ -1199,7 +1327,7 @@
+ 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*)
+@@ -1311,6 +1439,11 @@
+ -zvmoe)
+ os=-zvmoe
+ ;;
++ -dicos*)
++ os=-dicos
++ ;;
++ -nacl*)
++ ;;
+ -none)
+ ;;
+ *)
+@@ -1333,6 +1466,12 @@
+ # system, and we'll never get to this point.
+
+ case $basic_machine in
++ score-*)
++ os=-elf
++ ;;
++ spu-*)
++ os=-elf
++ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+@@ -1342,9 +1481,9 @@
+ arm*-semi)
+ os=-aout
+ ;;
+- c4x-* | tic4x-*)
+- os=-coff
+- ;;
++ c4x-* | tic4x-*)
++ os=-coff
++ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+@@ -1370,6 +1509,9 @@
+ m68*-cisco)
+ os=-aout
+ ;;
++ mep-*)
++ os=-elf
++ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+@@ -1388,6 +1530,9 @@
+ *-be)
+ os=-beos
+ ;;
++ *-haiku)
++ os=-haiku
++ ;;
+ *-ibm)
+ os=-aix
+ ;;
+@@ -1496,7 +1641,7 @@
+ -sunos*)
+ vendor=sun
+ ;;
+- -aix*)
++ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+@@ -1559,7 +1704,7 @@
+ esac
+
+ echo $basic_machine$os
+-exit 0
++exit
+
+ # Local variables:
+ # eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/abs/extra/most/most-leak-fd.patch b/abs/extra/most/most-leak-fd.patch
new file mode 100644
index 0000000..c8cd2af
--- /dev/null
+++ b/abs/extra/most/most-leak-fd.patch
@@ -0,0 +1,14 @@
+--- most-5.0.0a.orig/src/most.c 2007-06-03 00:03:59.000000000 -0400
++++ most-5.0.0a/src/most.c 2010-12-31 04:42:08.000000000 -0500
+@@ -321,9 +321,11 @@
+ {
+ fprintf (stderr, "fwrite returned %d, errno = %d\n",
+ m, errno);
++ (void) fclose (fp);
+ exit (1);
+ }
+ }
++ (void) fclose (fp);
+ }
+
+ void most_initialize_most (void)