Global Sort Order
Define global sorting options.
- Insert user message text
-
Text insertion
- Segment Source
-
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\
- Declare gkey
- Variable declaration
- Segment Source
-
1718: struct keyfield *key = NULL, gkey;
- Initialize gkey
- Code insertion
- Segment Source
-
1770: gkey.sword = gkey.eword = -1;
1771: gkey.ignore = NULL;
1772: gkey.translate = NULL;
1773: gkey.numeric = gkey.general_numeric = gkey.month = gkey.reverse = 0;
1774: gkey.skipsblanks = gkey.skipeblanks = 0;
1775:
- Parse global key options
-
Code insertion
- Segment Source
-
1835: s = set_ordering (s, &gkey, bl_both);
- Propogate global options
-
Code insertion
- Segment Source
-
2029: /* Inheritance of global options to individual keys. */
2030: for (key = keyhead.next; key; key = key->next)
2031: if (!key->ignore && !key->translate && !key->skipsblanks && !key->reverse
2032: && !key->skipeblanks && !key->month && !key->numeric
2033: && !key->general_numeric)
2034: {
2035: key->ignore = gkey.ignore;
2036: key->translate = gkey.translate;
2037: key->skipsblanks = gkey.skipsblanks;
2038: key->skipeblanks = gkey.skipeblanks;
2039: key->month = gkey.month;
2040: key->numeric = gkey.numeric;
2041: key->general_numeric = gkey.general_numeric;
2042: key->reverse = gkey.reverse;
2043: }
2044:
- Global field definition
-
Code insertion
- Segment Source
-
2045: if (!keyhead.next && (gkey.ignore || gkey.translate || gkey.skipsblanks
2046: || gkey.skipeblanks || gkey.month || gkey.numeric
2047: || gkey.general_numeric))
2048: insertkey (&gkey);