db_185_btree(dbp, pflag);
db_btree(dbp, pflag);
main(argc, argv)	int argc;	char *argv[];{	extern char *optarg;	extern int optind;	DB *dbp;	DBT key, data;	int ch, pflag, rval;	pflag = 0;	while ((ch = getopt(argc, argv, "f:p")) != EOF)		switch (ch) {		case 'f':			if (freopen(optarg, "w", stdout) == NULL)				err(1, "%s", optarg);			break;		case 'p':			pflag = 1;			break;		case '?':		default:			usage();		}	argc -= optind;	argv += optind;	if (argc != 1)		usage();	if ((dbp = dbopen(argv[0], O_RDONLY, 0, DB_BTREE, NULL)) == NULL) {		if ((dbp = dbopen(argv[0], O_RDONLY, 0, DB_HASH, NULL)) == NULL)			err(1, "%s", argv[0]);		db_185_hash(dbp, pflag);	} else		db_185_btree(dbp, pflag);	/*	 * !!!	 * DB 1.85 DBTs are a subset of DB 2.0 DBTs, so we just use the	 * new dump/print routines.	 */	if (pflag)		while (!(rval = dbp->seq(dbp, &key, &data, R_NEXT))) {			dbt_print(&key);			dbt_print(&data);		}	else		while (!(rval = dbp->seq(dbp, &key, &data, R_NEXT))) {			dbt_dump(&key);			dbt_dump(&data);		}	if (rval == -1)		err(1, "seq");	return (0);}