apps/app_selective.c
static char *handle_show_profiles(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
#define FORMAT  "%-20s %20s\n"
#define FORMAT2 "%-20s %20d\n"
	struct selective_proc *f;

	switch(cmd) {
	case CLI_INIT:
		e->command = "selective show profiles";
		e->usage =
			"Usage: selective show profiles\n"
			"       Lists all selective feature profiles.\n";
		return NULL;
	case CLI_GENERATE:
		return NULL;
	}

	ast_cli(a->fd, FORMAT, "Name", "# Interactions");
	ast_cli(a->fd, FORMAT, "--------------------", "--------------");
	AST_RWLIST_RDLOCK(&features);
	AST_LIST_TRAVERSE(&features, f, entry) {
		ast_cli(a->fd, FORMAT2, f->name, f->total);
	}
	AST_RWLIST_UNLOCK(&features);

	return CLI_SUCCESS;
#undef FORMAT
#undef FORMAT2
}
/*! \brief CLI command to list feature processing profiles */
\brief CLI command to list feature processing profiles
\ brief CLI command to list feature processing profiles
static char *handle_show_profiles(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
#define FORMAT  "%-20s %20s\n"
#define FORMAT2 "%-20s %20d\n"
	struct selective_proc *f;
	switch(cmd) {
	case CLI_INIT:
		e->command = "selective show profiles";
		e->usage =
			"Usage: selective show profiles\n"
			"       Lists all selective feature profiles.\n";
		return NULL;
	case CLI_GENERATE:
		return NULL;
	}
	ast_cli(a->fd, FORMAT, "Name", "# Interactions");
	ast_cli(a->fd, FORMAT, "--------------------", "--------------");
	AST_RWLIST_RDLOCK(&features);
	AST_LIST_TRAVERSE(&features, f, entry) {
		ast_cli(a->fd, FORMAT2, f->name, f->total);
	}
	AST_RWLIST_UNLOCK(&features);
	return CLI_SUCCESS;
#undef FORMAT
#undef FORMAT2
}
static char * handle_show_profiles ( struct ast_cli_entry * e , int cmd , struct ast_cli_args * a ) { #define FORMAT   "%-20s %20s\n" #define FORMAT2  "%-20s %20d\n" struct selective_proc * f ; switch ( cmd ) { case CLI_INIT : e -> command = " " ; e -> usage = " \n " " \n " ; return NULL ; case CLI_GENERATE : return NULL ; } ast_cli ( a -> fd , FORMAT , " " , " " ) ; ast_cli ( a -> fd , FORMAT , " " , " " ) ; AST_RWLIST_RDLOCK ( & features ) ; AST_LIST_TRAVERSE ( & features , f , entry ) { ast_cli ( a -> fd , FORMAT2 , f -> name , f -> total ) ; } AST_RWLIST_UNLOCK ( & features ) ; return CLI_SUCCESS ; #undef  FORMAT #undef  FORMAT2 }
\brief CLI command to list feature processing profiles
\ brief CLI command to list feature processing profiles