Field Command Line Options
Field Command Line Options
Parse command line options for each field.
- Insert user message text
-
Text insertion
- Segment Source
-
242: POS is F[.C][OPTS], where F is the field number and C the character\n\
243: position in the field, both counted from zero. OPTS is made up of one\n\
244: or more of Mbdfinr, this effectively disable global -Mbdfinr settings\n\
245: for that key. If no key given, use the entire line as key. With no\n\
- Define set_ordering()
-
Function definition
- Segment Source
-
1660: /* Set the ordering options for KEY specified in S.
1661: Return the address of the first character in S that
1662: is not a valid ordering option.
1663: BLANKTYPE is the kind of blanks that 'b' should skip. */
1664:
1665: static char *
1666: set_ordering (register const char *s, struct keyfield *key,
1667: enum blanktype blanktype)
1668: {
1669: while (*s)
1670: {
1671: switch (*s)
1672: {
1673: case 'b':
1674: if (blanktype == bl_start || blanktype == bl_both)
1675: key->skipsblanks = 1;
1676: if (blanktype == bl_end || blanktype == bl_both)
1677: key->skipeblanks = 1;
1678: break;
1679: case 'd':
1680: key->ignore = nondictionary;
1681: break;
1682: case 'f':
1683: key->translate = fold_toupper;
1684: break;
1685: case 'g':
1686: key->general_numeric = 1;
1687: break;
1688: case 'i':
1689: key->ignore = nonprinting;
1690: break;
1691: case 'M':
1692: key->month = 1;
1693: break;
1694: case 'n':
1695: key->numeric = 1;
1696: break;
1697: case 'r':
1698: key->reverse = 1;
1699: break;
1700: default:
1701: return (char *) s;
1702: }
1703: ++s;
1704: }
1705: return (char *) s;
1706: }
1707:
- Insert field options support
-
Code insertion
- Segment Source
-
1802: s = set_ordering (s, key, bl_start);
- Insert field options support
-
Code insertion
- Segment Source
-
1826: s = set_ordering (s, key, bl_end);
- Insert field options support
-
Code insertion
- Segment Source
-
1835: s = set_ordering (s, &gkey, bl_both);
- Insert field options support
-
Code insertion
- Segment Source
-
1900: s = set_ordering (s, key, bl_start);
- Insert field options support
-
Code insertion
- Segment Source
-
1950: s = set_ordering (s, key, bl_end);