File: Pvmfaddhost.c

package info (click to toggle)
pvm 3.4.6-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,284 kB
  • sloc: ansic: 72,074; makefile: 1,198; fortran: 631; sh: 285; csh: 74; asm: 37
file content (44 lines) | stat: -rw-r--r-- 757 bytes parent folder | download | duplicates (12)
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

/* $Id: Pvmfaddhost.c,v 1.2 1998/09/21 20:25:27 pvmsrc Exp $ */

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

#ifdef IMA_WIN32_WATCOM
#include "watforstr.h"

pvmfaddhost (host_str,info)
WatcomFortranStr* host_str;
int *info;
{
char *host_ptr=host_str->strP;
int host_len=host_str->len;
#else
void __fortran
PVMFADDHOST (host_ptr, info, host_len)
char * host_ptr; int host_len;
int *info;
{
#endif

	int  dtid;
	char thost[MAX_HOST_NAME + 1];
	char *ptr = thost;

	/*
	 * 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_addhosts(&ptr, 1, &dtid);
	if (*info >= 0)
		*info = dtid;
}