Lines Matching full:name

24   PetscGetHostName - Returns the name of the host. This attempts to
25 return the entire Internet name. It may not return the same name
31 . nlen - length of name
34 . name - contains host name. Must be long enough to hold the name
35 This is the fully qualified name, including the domain.
41 character*(128) name
42 call PetscGetHostName(name,ierr)
47 PetscErrorCode PetscGetHostName(char name[], size_t nlen) in PetscGetHostName() argument
59 GetComputerName((LPTSTR)name, (LPDWORD)(&nnlen)); in PetscGetHostName()
65 PetscCall(PetscStrncpy(name, utname.nodename, nlen)); in PetscGetHostName()
67 …PetscCheck(!gethostname(name, nlen), PETSC_COMM_SELF, PETSC_ERR_SYS, "gethostname() due to \"%s\""… in PetscGetHostName()
69 /* if there was not enough room then system call will not null terminate name */ in PetscGetHostName()
70 name[nlen - 1] = 0; in PetscGetHostName()
72 /* See if this name includes the domain */ in PetscGetHostName()
73 PetscCall(PetscStrchr(name, '.', &domain)); in PetscGetHostName()
77 PetscCall(PetscStrlen(name, &l)); in PetscGetHostName()
79 name[l++] = '.'; in PetscGetHostName()
80 name[l] = 0; in PetscGetHostName()
82 …PetscCheck(!getdomainname(name + l, (int)(nlen - l)), PETSC_COMM_SELF, PETSC_ERR_SYS, "getdomainna… in PetscGetHostName()
84 /* check if domain name is not a dnsdomainname and nuke it */ in PetscGetHostName()
85 PetscCall(PetscStrlen(name, &ll)); in PetscGetHostName()
90 PetscCall(PetscStrendswithwhich(name, suffixes, &index)); in PetscGetHostName()
92 PetscCall(PetscInfo(NULL, "Rejecting domainname, likely is NIS %s\n", name)); in PetscGetHostName()
93 name[l - 1] = 0; in PetscGetHostName()