{ "\0", NULL, NULL }
};
+struct abook_output_item_filter u_filters[] = {
+ { "\0", NULL }
+};
+
/*
* common functions
*/
gettext(e_filters[i].desc));
putchar('\n');
+
+ puts(_("output (with query):"));
+ for(i=0; *u_filters[i].filtname ; i++)
+ printf("\t%s\t%s\n", u_filters[i].filtname,
+ gettext(u_filters[i].desc));
+
+ putchar('\n');
}
static int
return 0;
}
+struct abook_output_item_filter select_output_item_filter(char filtname[FILTNAME_LEN]) {
+ int i;
+ for(i=0;; i++) {
+ if(!strncasecmp(u_filters[i].filtname, filtname, FILTNAME_LEN))
+ break;
+ if(!*u_filters[i].filtname) {
+ i = -1;
+ break;
+ }
+ }
+ return u_filters[i];
+}
+
+void
+e_write_item(FILE *out, int item, void (*func) (FILE *in, int item))
+{
+ (*func) (out, item);
+}
+
static int
e_write_file(char *filename, int (*func) (FILE *in, struct db_enumerator e),
int mode)
int (*func) (FILE *handle, struct db_enumerator e);
};
+struct abook_output_item_filter {
+ char filtname[FILTNAME_LEN];
+ char *desc;
+ void (*func) (FILE *handle, int item);
+};
+
struct abook_input_filter {
char filtname[FILTNAME_LEN];
char *desc;
int export_database();
int export_file(char filtname[FILTNAME_LEN], char *filename);
+
+struct abook_output_item_filter
+ select_output_item_filter(char filtname[FILTNAME_LEN]);
+
+void e_write_item(FILE *out, int item, void (*func) (FILE *in, int item));
+
int fexport(char filtname[FILTNAME_LEN], FILE *handle,
int enum_mode);