Bad Field Message
Report an invalid field specification.
- Declare badfieldspec()
-
Function definition
- Segment Source
- 1635: static void
1636: badfieldspec (const char *s)
1637: {
1638: error (SORT_FAILURE, 0, _("invalid field specification `%s'"), s);
1639: }
1640:
- Check field specification syntax
-
Code insertion
- Segment Source
-
1787: if (! (ISDIGIT (*s) || (*s == '.' && ISDIGIT (s[1]))))
1788: badfieldspec (argv[i]);
- Check field specification syntax
-
Code insertion
- Segment Source
-
1803: if (*s)
1804: badfieldspec (argv[i]);
- Check field specification syntax
-
Code insertion
- Segment Source
-
1827: if (*s)
1828: badfieldspec (argv[i]);
- Check field specification syntax
-
Code insertion
- Segment Source
-
1860: if (!ISDIGIT (*s))
1861: badfieldspec (argv[i]);
- Check field specification syntax
-
Code insertion
- Segment Source
-
1864: if (t == 0)
1865: {
1866: /* Provoke with `sort -k0' */
1867: error (0, 0, _("the starting field number argument \
1868: to the `-k' option must be positive"));
1869: badfieldspec (argv[i]);
1870: }
- Check field specification syntax
-
Code insertion
- Segment Source
-
1875: if (!ISDIGIT (s[1]))
1876: {
1877: /* Provoke with `sort -k1.' */
1878: error (0, 0, _("starting field spec has `.' but \
1879: lacks following character offset"));
1880: badfieldspec (argv[i]);
1881: }
- Check field specification syntax
-
Code insertion
- Segment Source
-
1884: if (t2 == 0)
1885: {
1886: /* Provoke with `sort -k1.0' */
1887: error (0, 0, _("starting field character offset \
1888: argument to the `-k' option\nmust be positive"));
1889: badfieldspec (argv[i]);
1890: }
- Check field specification syntax
-
Code insertion
- Segment Source
-
1906: else if (*s != ',')
1907: badfieldspec (argv[i]);
- Check field specification syntax
-
Code insertion
- Segment Source
-
1912: if (*s == 0)
1913: {
1914: /* Provoke with `sort -k1,' */
1915: error (0, 0, _("field specification has `,' but \
1916: lacks following field spec"));
1917: badfieldspec (argv[i]);
1918: }
- Check field specification syntax
-
Code insertion
- Segment Source
-
1922: if (t == 0)
1923: {
1924: /* Provoke with `sort -k1,0' */
1925: error (0, 0, _("ending field number argument \
1926: to the `-k' option must be positive"));
1927: badfieldspec (argv[i]);
1928: }
- Check field specification syntax
-
Code insertion
- Segment Source
-
1933: if (!ISDIGIT (s[1]))
1934: {
1935: /* Provoke with `sort -k1,1.' */
1936: error (0, 0, _("ending field spec has `.' \
1937: but lacks following character offset"));
1938: badfieldspec (argv[i]);
1939: }
- Check field specification syntax
-
Code insertion
- Segment Source
-
1951: if (*s)
1952: badfieldspec (argv[i]);