File: Pvmfdelhost.c

package info (click to toggle)
pvm 3.4beta7-4
  • links: PTS
  • area: main
  • in suites: slink
  • size: 5,256 kB
  • ctags: 5,938
  • sloc: ansic: 66,147; makefile: 1,446; fortran: 631; sh: 424; csh: 70; asm: 37
file content (47 lines) | stat: -rw-r--r-- 846 bytes parent folder | download | duplicates (2)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

/* $Id: Pvmfdelhost.c,v 1.1 1997/06/27 16:22:36 pvmsrc Exp $ */

#ifdef WIN32
#include "..\..\include\pvm3.h"
#include "..\..\src\pvmwin.h"
#else 
#include "pvm3.h"
#endif

#include "pvm_consts.h"

#ifdef __WATCOMC__
#include "watforstr.h"
void __fortran
PVMDELHOST (host_str, info)
WatcomFortranStr* host_str;
int *info;
{
   char* host_ptr = host_str->strP;
   int   host_len = host_str->len;
#else
void __stdcall
PVMDELHOST (host_ptr,host_len, info)
char * host_ptr; int host_len;
int *info;
{
#endif
   
   char thost[MAX_HOST_NAME + 1];
   char *ptr = thost;
   int cc;

   /*
    * Copy the host name to make sure there's
    * a NUL at the end.
    */
   if (ftocstr(thost, sizeof(thost), host_ptr, host_len)) {
      *info = PvmBadParam;
      return;
   }

   *info = pvm_delhosts(&ptr, 1, &cc);
   if (*info >= 0)
      *info = cc;
}