Subversion Repositories SvarDOS

Rev

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

Rev 1541 Rev 1543
Line 647... Line 647...
647
  /* start by adding an empty line */
647
  /* start by adding an empty line */
648
  if (line_add(db, NULL, 0) != 0) return(2);
648
  if (line_add(db, NULL, 0) != 0) return(2);
649
 
649
 
650
  if (fname == NULL) goto SKIPLOADING;
650
  if (fname == NULL) goto SKIPLOADING;
651
 
651
 
652
  /* make the filename canonical if DOS 3+ detected */
652
  /* make the filename canonical (DOS 3+ only, on earlier versions it just copies the filename) */
653
  if (_osmajor >= 3) {
-
 
654
    mdr_dos_truename(db->fname, fname);
653
  mdr_dos_truename(db->fname, fname);
655
  } else { /* copy the string as-is (DOS TRUENAME is not available on DOS 2.x) */
-
 
656
    /* I could just as well call strcpy() here, but pulling strcpy() in makes
-
 
657
     * the upxed sved executable grow over 7K in size, so I use a cheaper
-
 
658
     * approach instead */
-
 
659
    _fmemmove(db->fname, fname, strlen(fname) + 1); /* _fmemmove() to avoid pulling in memmove() */
-
 
660
  }
-
 
661
 
654
 
662
  err = _dos_open(fname, O_RDONLY, &fd);
655
  err = _dos_open(fname, O_RDONLY, &fd);
663
  if (err != 0) goto SKIPLOADING;
656
  if (err != 0) goto SKIPLOADING;
664
 
657
 
665
  db->lfonly = 1;
658
  db->lfonly = 1;