Subversion Repositories SvarDOS

Rev

Rev 1001 | Rev 1044 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1001 Rev 1043
Line 727... Line 727...
727
  unsigned short pathlen;
727
  unsigned short pathlen;
728
 
728
 
729
  /* fetch %DOSDIR% */
729
  /* fetch %DOSDIR% */
730
  pathlen = env_lookup_valcopy(fname, 128, env_seg, "DOSDIR");
730
  pathlen = env_lookup_valcopy(fname, 128, env_seg, "DOSDIR");
731
  if (pathlen == 0) {
731
  if (pathlen == 0) {
732
    outputnl("%DOSDIR% not defined");
732
    nls_outputnl(29,5); /* "%DOSDIR% not defined" */
733
    return(-1);
733
    return(-1);
734
  }
734
  }
735
 
735
 
736
  /* prep filename: %DOSDIR%\LINKS\PKG.LNK */
736
  /* prep filename: %DOSDIR%\LINKS\PKG.LNK */
737
  if (fname[pathlen - 1] == '\\') pathlen--;
737
  if (fname[pathlen - 1] == '\\') pathlen--;
-
 
738
  pathlen += sprintf(fname + pathlen, "\\LINKS");
-
 
739
  /* quit early if dir does not exist */
-
 
740
  if (file_getattr(fname) != DOS_ATTR_DIR) {
-
 
741
    output(fname);
-
 
742
    output(" - ");
-
 
743
    nls_outputnl(255,3); /* path not found */
-
 
744
    return(-1);
-
 
745
  }
738
  sprintf(fname + pathlen, "\\LINKS\\%s.LNK", linkname);
746
  sprintf(fname + pathlen, "\\%s.LNK", linkname);
739
 
747
 
740
  return(0);
748
  return(0);
741
}
749
}