static char rcsid[] = "@(#)$Id: alias_screen.c,v 1.6 2006/04/09 07:37:42 hurtta Exp $";
/******************************************************************************
* The Elm (ME+) Mail System - $Revision: 1.6 $ $State: Exp $
*
* Author: Kari Hurtta <hurtta+elm@posti.FMI.FI>
******************************************************************************
* Inludes code from screen.c which have following copyright:
*
* The Elm Mail System
*
* Copyright (c) 1988-1992 USENET Community Trust
* Copyright (c) 1986,1987 Dave Taylor
*****************************************************************************/
#include "def_mcommon.h"
static void print_alias_line P_((struct alias_rec *entry,
int message_number, int selected,
struct menu_context *page));
void mc_screen_print_alias_line(u,idx, page)
union mcommon_union *u;
int idx;
struct menu_context *page;
{
struct AliasView *aview = u->alias.aw;
/* from function show_headers() */
int current = get_alias_current(aview);
struct alias_rec * a = give_alias(aview,idx);
if (a) {
if (idx == current-1)
print_alias_line(a, idx+1,TRUE,page);
else
print_alias_line(a, idx+1,FALSE, page);
} else {
/* SHould there be print dummy line? */
}
}
static void print_alias_line(entry,message_number,selected,page)
struct alias_rec *entry;
int message_number;
int selected;
struct menu_context *page;
{
struct string * buffer = build_alias_line(entry,message_number,selected,
page);
if (selected && has_highlighting && ! arrow_cursor) {
menu_StartXX(page,pg_INVERSE);
menu_Write_to_screen(page,FRM("%S\n\r"), buffer); /* avoid '%' probs */
menu_EndXX(page,pg_INVERSE);
} else
menu_Write_to_screen(page,FRM("%S\n\r"), buffer); /* avoid '%' probs */
free_string(&buffer);
}
/*
* Local Variables:
* mode:c
* c-basic-offset:4
* buffer-file-coding-system: iso-8859-1
* End:
*/
syntax highlighted by Code2HTML, v. 0.9.1