Supports the old [+
1781: {
1782: if (key)
1783: insertkey (key);
1784: key = (struct keyfield *) xmalloc (sizeof (struct keyfield));
1785: key_init (key);
1786: s = argv[i] + 1;
1787: if (! (ISDIGIT (*s) || (*s == '.' && ISDIGIT (s[1]))))
1788: badfieldspec (argv[i]);
1789: for (t = 0; ISDIGIT (*s); ++s)
1790: t = 10 * t + *s - '0';
1791: t2 = 0;
1792: if (*s == '.')
1793: for (++s; ISDIGIT (*s); ++s)
1794: t2 = 10 * t2 + *s - '0';
1795: if (t2 || t)
1796: {
1797: key->sword = t;
1798: key->schar = t2;
1799: }
1800: else
1801: key->sword = -1;
1802: s = set_ordering (s, key, bl_start);
1803: if (*s)
1804: badfieldspec (argv[i]);
1805: }
1810: {
1811: if (!key)
1812: {
1813: /* Provoke with `sort -9'. */
1814: error (0, 0, _("when using the old-style +POS and -POS \
1815: key specifiers,\nthe +POS specifier must come first"));
1816: usage (SORT_FAILURE);
1817: }
1818: for (t = 0; ISDIGIT (*s); ++s)
1819: t = t * 10 + *s - '0';
1820: t2 = 0;
1821: if (*s == '.')
1822: for (++s; ISDIGIT (*s); ++s)
1823: t2 = t2 * 10 + *s - '0';
1824: key->eword = t;
1825: key->echar = t2;
1826: s = set_ordering (s, key, bl_end);
1827: if (*s)
1828: badfieldspec (argv[i]);
1829: insertkey (key);
1830: key = NULL;
1831: }
1832: else