#include "Bdef.h"

#if (INTFACE == C_CALL)
int Ckbsid(ConTxt, scope)
int  ConTxt;
char  *scope;
#else
int kbsid_(ConTxt, scope)
int  *ConTxt;
char  *scope;
#endif
{
   char tmpscope;
   int msgid;
   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);
}
