#include "Bdef.h"

#if (INTFACE == C_CALL)
int Ckbrid(ConTxt, scope, rsrc, csrc)
int  ConTxt;
char  *scope;
int  rsrc;
int  csrc;
#else
int kbrid_(ConTxt, scope, rsrc, csrc)
int  *ConTxt;
char  *scope;
int  *rsrc;
int  *csrc;
#endif
{
   int msgid;
   char tmpscope;
   BLACSCONTEXT *ctxt;

   MGetConTxt(Mpval(ConTxt), ctxt);
   tmpscope = Mlowcase(*scope);
   switch(tmpscope)
   {
   case 'c' :
      msgid = Mcid(ctxt);
      break;
   case 'r' :
      msgid = Mrid(ctxt);
      break;
   case 'a' :
      msgid = Maid(ctxt);
      break;
   }
   return (msgid);
}
