File: kbsid_.c

package info (click to toggle)
blacs-mpi 1.1-28.2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,320 kB
  • ctags: 2,031
  • sloc: fortran: 14,968; ansic: 12,353; makefile: 531; sh: 1
file content (29 lines) | stat: -rw-r--r-- 528 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "Bdef.h"

#if (INTFACE == C_CALL)
int Ckbsid(int ConTxt, char *scope)
#else
F_INT_FUNC kbsid_(int *ConTxt, F_CHAR scope)
#endif
{
   char tmpscope;
   int msgid;
   BLACSCONTEXT *ctxt;

   MGetConTxt(Mpval(ConTxt), ctxt);
   tmpscope = Mlowcase(F2C_CharTrans(scope));
   switch(tmpscope)
   {
   case 'c' :
      ctxt->scp = &ctxt->cscp;
      break;
   case 'r' :
      ctxt->scp = &ctxt->rscp;
      break;
   case 'a' :
      ctxt->scp = &ctxt->ascp;
      break;
   }
   msgid = Mscopeid(ctxt);
   return(msgid);
}