int paranoid;
int quiet;
+char *default_search_field = "p";
/********************************************************************/
/*********************************************************************/
-void init_condition(struct search_condition *condition, char *string) {
+void init_condition(struct search_condition *condition, char *full_string) {
char full_search_field[TOKEN_BUFFER_SIZE], *search_field;
int m;
+ char *string;
- string = parse_token(full_search_field, TOKEN_BUFFER_SIZE, ' ', string);
+ string = parse_token(full_search_field, TOKEN_BUFFER_SIZE, ' ', full_string);
search_field = full_search_field;
if(search_field[0] == '!') {
}
}
+ if(condition->field_id == -1) {
+ if(default_search_field) {
+ for(m = 0; (m < MAX_ID) && condition->field_id == -1; m++) {
+ if(strncmp(field_names[m],
+ default_search_field, strlen(default_search_field)) == 0) {
+ condition->field_id = m;
+ }
+ }
+ string = full_string;
+ }
+ }
+
if(condition->field_id == -1) {
fprintf(stderr,
"mymail: Syntax error in field name \"%s\".\n",