/**********************************************************************
 * luc_flgstr.c -- translate flags into user-readable string
 *
 * $Author: brlewis $
 * $Source: /afs/athena.mit.edu/astaff/project/lucydev/src/lib/RCS/luc_flgstr.c,v $
 * $Header: /afs/athena.mit.edu/astaff/project/lucydev/src/lib/RCS/luc_flgstr.c,v 1.1 91/08/01 14:30:29 brlewis Exp Locker: brlewis $
 *
 * Copyright 1991 by the Massachusetts Institute of Technology.
 *
 * For copying and distribution information, please see the file
 * <mit-copyright.h>.
 **********************************************************************/
#include <mit-copyright.h>

#ifndef lint
static char rcsid_luc_flgstr_c[] = "$Header: /afs/athena.mit.edu/astaff/project/lucydev/src/lib/RCS/luc_flgstr.c,v 1.1 91/08/01 14:30:29 brlewis Exp Locker: brlewis $";
#endif /* lint */

#include <strings.h>
#include <lucy/lucy.h>

/**********************************************************************
 * luc_flgstr(int flag)
 *	caller sets flag
 *
 * - returns static char *(user-readable string)
 **********************************************************************/

char *
luc_flgstr(flag)
     register int flag;
{
  static char string[5];
  register char *s;

  s = string;
  strcpy(s, "----");
  if (flag & LUCY_FORWARDED) *s = 'F';
  else if (flag & LUCY_WANT_FORWARD) *s = 'f';
  s++;
  if (flag & LUCY_ANSWERED) *s = 'A';
  else if (flag & LUCY_WANT_ANSWER) *s = 'a';
  s++;
  if (flag & LUCY_POSTED) *s = 'P';
  else if (flag & LUCY_WANT_POST) *s = 'p';
  s++;
  if (flag & LUCY_REPLIED) *s = 'R';
  else if (flag & LUCY_WANT_REPLY) *s = 'r';
  return(string);
}
