+
+ /*
+ * init extra_column and extra alternative
+ */
+
+ if(e_column_str && *e_column_str) {
+ for(i = 0; i < ITEM_FIELDS; i++) {
+ if(!strcasecmp(e_column_str, abook_fields[i].key)) {
+ extra_column = i;
+ break;
+ }
+ }
+ if(extra_column < MIN_EXTRA_COLUMN ||
+ extra_column > MAX_EXTRA_COLUMN) {
+ extra_column = -1;
+ }
+ }
+
+ if(e_alternative_str && *e_alternative_str) {
+ for(i = 0; i < ITEM_FIELDS; i++) {
+ if(!strcasecmp(e_alternative_str,
+ abook_fields[i].key)) {
+ extra_alternative = i;
+ break;
+ }
+ }
+ if(extra_alternative < MIN_EXTRA_COLUMN ||
+ extra_alternative > MAX_EXTRA_COLUMN) {
+ extra_alternative = -1;
+ }
+ }
+