Subversion Repositories SvarDOS

Compare Revisions

Ignore whitespace Rev 1042 → Rev 1043

/svarcom/trunk/cmd/ln.c
48,7 → 48,7
return(CMD_FAIL);
}
 
/* open DOSDIR\CFG\LINKS.DB and write realdirname to */
/* compute the filename of the link file */
if (link_computefname(buff, linkname, env_seg) != 0) return(CMD_FAIL);
 
realdirnamelen = strlen(realdirname);
159,18 → 159,13
linkname = "*";
}
 
/* fetch %DOSDIR% */
pathlen = env_lookup_valcopy(buff, 128, env_seg, "DOSDIR");
if (pathlen == 0) {
nls_outputnl(29,5); /* "%DOSDIR% not defined" */
return(CMD_FAIL);
}
 
/* prep DOSDIR\LINKS\pattern */
if (buff[pathlen - 1] == '\\') pathlen--;
pathlen += sprintf(buff + pathlen, "\\LINKS\\");
sprintf(buff + pathlen, "%s.LNK", linkname);
if (link_computefname(buff, linkname, env_seg) != 0) return(CMD_FAIL);
 
/* set pathlen to end of path (char after last backslash) */
pathlen = 0;
for (i = 0; buff[i] != 0; i++) if (buff[i] == '\\') pathlen = i + 1;
 
if (findfirst(dta, buff, DOS_ATTR_RO | DOS_ATTR_ARC) != 0) return(CMD_OK);
 
do {
/svarcom/trunk/helpers.c
729,13 → 729,21
/* fetch %DOSDIR% */
pathlen = env_lookup_valcopy(fname, 128, env_seg, "DOSDIR");
if (pathlen == 0) {
outputnl("%DOSDIR% not defined");
nls_outputnl(29,5); /* "%DOSDIR% not defined" */
return(-1);
}
 
/* prep filename: %DOSDIR%\LINKS\PKG.LNK */
if (fname[pathlen - 1] == '\\') pathlen--;
sprintf(fname + pathlen, "\\LINKS\\%s.LNK", linkname);
pathlen += sprintf(fname + pathlen, "\\LINKS");
/* quit early if dir does not exist */
if (file_getattr(fname) != DOS_ATTR_DIR) {
output(fname);
output(" - ");
nls_outputnl(255,3); /* path not found */
return(-1);
}
sprintf(fname + pathlen, "\\%s.LNK", linkname);
 
return(0);
}
/svarcom/trunk/history.txt
6,6 → 6,7
=== ver 2022.3 (xx.xx.xxxx) ==================================================
 
- fixed stdin redirection handling (was broken since 2022.1)
- ln warns about non-existing %DOSDIR%\LINKS directory
- added German translations, courtesy of Robert Riebisch (bttr)
- added French translations, kindly contributed by Berki Yenigün (thraex)