strcpy(Name,filename);  #ifdef NOT_USED  if (HTVMS_checkDecnet(Name)) {  info->st_dev = NULL; info->st_ino[0] = 0; info->st_ino[1] = 0; info->st_ino[2] = 0; info->st_mode = S_IFREG | S_IREAD;	 info->st_nlink = NULL; info->st_uid = 0; info->st_gid = 0; info->st_rdev = 0; info->st_size = 0; info->st_atime = time(NULL); info->st_mtime = time(NULL); info->st_ctime = time(NULL);  return(0); } #endif
StrAllocCopy(Name,filename);
PUBLIC int HTStat ARGS2(	CONST char *, filename,	struct stat *, info){   /*      the following stuff does not work in VMS with a normal stat...      -->   /disk$user/duns/www if www is a directory		is statted like: 	/disk$user/duns/www.dir		after a normal stat has failed      -->   /disk$user/duns	if duns is a toplevel directory		is statted like:	/disk$user/000000/duns.dir      -->   /disk$user since disk$user is a device		is statted like:	/disk$user/000000/000000.dir      -->   /		searches all devices, no solution yet...      -->   /vxcern!/disk$cr/wwwteam/login.com		is not statted but granted with fake information...   */int Result;int Len;char *Ptr, *Ptr2;char Name[256];   /* try normal stat... */   Result = stat((char *)filename,info);   if (Result == 0)      return(Result);   /* make local copy */   strcpy(Name,filename);#ifdef NOT_USED   /* if filename contains a node specification (! or ::), we will try to access      the file via DECNET, but we do not stat it..., just return success      with some fake information... */   if (HTVMS_checkDecnet(Name))   {      /* set up fake info, only the one we use... */      info->st_dev = NULL;      info->st_ino[0] = 0;      info->st_ino[1] = 0;      info->st_ino[2] = 0;      info->st_mode = S_IFREG | S_IREAD;	/* assume it is a regular Readable file */      info->st_nlink = NULL;      info->st_uid = 0;      info->st_gid = 0;      info->st_rdev = 0;      info->st_size = 0;      info->st_atime = time(NULL);      info->st_mtime = time(NULL);      info->st_ctime = time(NULL);      return(0);   }#endif /* NOT_USED */   /* failed,so do device search in case root is requested */   if (!strcmp(Name,"/"))   {  /* root requested */      return(-1);   }   /* failed so this might be a directory, add '.dir' */   Len = strlen(Name);   if (Name[Len-1] == '/')      Name[Len-1] = '\0';   /* fail in case of device */   Ptr = strchr(Name+1,'/');   if ((Ptr == NULL) && (Name[0] == '/'))   {  /* device only... */      strcat(Name,"/000000/000000");   }   if (Ptr != NULL)   {  /* correct filename in case of toplevel dir */      Ptr2 = strchr(Ptr+1,'/');      if ((Ptr2 == NULL) && (Name[0] == '/'))      {         char End[256];         strcpy(End,Ptr);         *(Ptr+1) = '\0';         strcat(Name,"000000");         strcat(Name,End);      }   }   /* try in case a file on toplevel directory or .DIR was alreadyt specified */   Result = stat(Name,info);   if (Result == 0)      return(Result);   /* add .DIR and try again */   strcat(Name,".dir");   Result = stat(Name,info);   return(Result);}