Read History for Changes

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@29 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Jim Tabor 2000-06-01 06:37:38 +00:00
parent c54d6d8988
commit a6fa916054
8 changed files with 129 additions and 19 deletions

View File

@ -1,3 +1,18 @@
2000 Jun 01 - Build 2021
-------- James Tabor (jimtabor@infohwy.com)
+ Clean Removed test prinf statements in source.
* Thanks to Lixing Yuan for pointing out an copy to root error.
2000 May 31 - Build 2021
-------- James Tabor (jimtabor@infohwy.com)
+ Patch Lixing Yuan (yuanlixg@china.com) Patch for parsing bug in
FindFirst with wildcards -> ParseDosName (dosnames.c).
2000 May 28 - Build 2021
-------- James Tabor (jimtabor@infohwy.com)
+ Added Open/Close/Media check to dsk.c and io.asm.
+ Fixed Device checking in truename. Truename needs to be rewriten.
2000 May 26 - Build 2020
-------- James Tabor (jimtabor@infohwy.com)
Code Clean up and Now the Release.
@ -44,7 +59,7 @@
2000 May 08 - Build 2020
-------- James Tabor (jimtabor@infohwy.com)
+ Update Started Update to the New CVS at Sourceforge.net. Seting source
+ Update Started Update to the New CVS at Sourceforge.net. Setting source
from 2018 to 2020.
2000 May 06
@ -54,7 +69,7 @@
2000 Apr 28 - Build 2020
-------- James Tabor (jimtabor@infohwy.com)
+ Added Dos Function calls 0x69, and 0x6C. IOCTL support in disk driver.
New funtions not yet fully implemented.
New functions not yet fully implemented.
Clean up DSK.C, IOCTL.C and FCBFNS.C. Removed old blk_device
pointers.

View File

@ -43,4 +43,4 @@ static BYTE *date_hRcsId = "$Id$";
#define REVISION_MAJOR 1
#define REVISION_MINOR 1
#define REVISION_SEQ 20
#define BUILD 2020
#define BUILD 2021

View File

@ -34,6 +34,9 @@ static BYTE *dosfnsRcsId = "$Id$";
/*
* $Log$
* Revision 1.6 2000/06/01 06:37:38 jimtabor
* Read History for Changes
*
* Revision 1.5 2000/05/26 19:25:19 jimtabor
* Read History file for Change info
*
@ -1196,7 +1199,6 @@ COUNT DosSetFattr(BYTE FAR * name, UWORD FAR * attrp)
BYTE FAR *p;
if (IsDevice(name) ) {
printf("SetAtt\n");
return DE_PATHNOTFND;
}

View File

@ -36,6 +36,9 @@ static BYTE *dosnamesRcsId = "$Id$";
/*
* $Log$
* Revision 1.5 2000/06/01 06:37:38 jimtabor
* Read History for Changes
*
* Revision 1.4 2000/05/26 19:25:19 jimtabor
* Read History file for Change info
*
@ -192,7 +195,6 @@ COUNT ParseDosName(BYTE FAR * lpszFileName,
++lpszFileName;
}
nDirCnt = lpszLclFile - lpszLclDir;
/* Parse out the file name portion. */
lpszFileName = lpszLclFile;
while (bAllowWildcards ? WildChar(*lpszFileName) : NameChar(*lpszFileName))
@ -200,9 +202,45 @@ COUNT ParseDosName(BYTE FAR * lpszFileName,
++nFileCnt;
++lpszFileName;
}
if (nFileCnt == 0)
/* Lixing Yuan Patch */
if (bAllowWildcards) /* for find first */
{
if (*lpszFileName == '.')
lpszFileName++;
if (*lpszFileName == '.')
lpszFileName++;
if (*lpszFileName != '\0')
return DE_FILENOTFND;
if (pszDir)
{
if ((lpszFileName - lpszLclFile) == 2) /* for tail DotDot */
nDirCnt += 2;
if (nDirCnt > PARSE_MAX)
nDirCnt = PARSE_MAX;
fbcopy(lpszLclDir, (BYTE FAR *) pszDir, nDirCnt);
if (((lpszFileName - lpszLclFile) == 2) && (nDirCnt < PARSE_MAX))
pszDir[nDirCnt++] = '\\'; /* make DosTrimPath() enjoy, for tail DotDot */
pszDir[nDirCnt] = '\0';
DosTrimPath(pszDir);
}
if (pszFile)
{
*pszFile++ = '*';
*pszFile = '\0';
}
if (pszExt)
{
*pszExt++ = '*';
*pszExt = '\0';
}
return SUCCESS;
}
else
return DE_FILENOTFND;
/* Now we have pointers set to the directory portion and the */
/* file portion. Now determine the existance of an extension. */
lpszLclExt = lpszFileName;
@ -253,6 +291,7 @@ COUNT ParseDosName(BYTE FAR * lpszFileName,
if (pszDir)
DosTrimPath(pszDir);
return SUCCESS;
}

View File

@ -33,6 +33,9 @@ static BYTE *dskRcsId = "$Id$";
/*
* $Log$
* Revision 1.7 2000/06/01 06:37:38 jimtabor
* Read History for Changes
*
* Revision 1.6 2000/05/26 19:25:19 jimtabor
* Read History file for Change info
*
@ -154,6 +157,7 @@ static struct media_info
ULONG mi_offset; /* relative partition offset */
BYTE mi_drive; /* BIOS drive number */
COUNT mi_partidx; /* Index to partition array */
ULONG mi_FileOC; /* Count of Open files on Drv */
};
static struct FS_info
@ -211,6 +215,9 @@ WORD init(rqptr),
blockio(rqptr),
IoctlQueblk(rqptr),
Genblkdev(rqptr),
blk_Open(rqptr),
blk_Close(rqptr),
blk_Media(rqptr),
blk_error(rqptr);
COUNT ltop(WORD *, WORD *, WORD *, COUNT, COUNT, LONG, byteptr);
WORD dskerr(COUNT);
@ -220,6 +227,11 @@ WORD init(),
mediachk(),
bldbpb(),
blockio(),
IoctlQueblk(),
Genblkdev(),
blk_Open(),
blk_Close(),
blk_Media(),
blk_error();
WORD dskerr();
COUNT processtable();
@ -248,9 +260,9 @@ static WORD(*dispatch[NENTRY]) () =
blk_error, /* Output Status */
blk_error, /* Output Flush */
blk_error, /* Ioctl Out */
blk_error, /* Device Open */
blk_error, /* Device Close */
blk_error, /* Removable Media */
blk_Open, /* Device Open */
blk_Close, /* Device Close */
blk_Media, /* Removable Media */
blk_error, /* Output till busy */
blk_error, /* undefined */
blk_error, /* undefined */
@ -523,6 +535,28 @@ static WORD RWzero(rqptr rp, WORD t)
return ret;
}
static WORD blk_Open(rqptr rp)
{
miarray[rp->r_unit].mi_FileOC++;
return S_DONE;
}
static WORD blk_Close(rqptr rp)
{
miarray[rp->r_unit].mi_FileOC--;
return S_DONE;
}
static WORD blk_Media(rqptr rp)
{
COUNT drive = miarray[rp->r_unit].mi_drive;
if (hd(drive))
return S_BUSY|S_DONE; /* Hard Drive */
else
return S_DONE; /* Floppy */
}
static WORD bldbpb(rqptr rp)
{
ULONG count, i;

View File

@ -36,6 +36,9 @@ static BYTE *fatdirRcsId = "$Id$";
/*
* $Log$
* Revision 1.6 2000/06/01 06:37:38 jimtabor
* Read History for Changes
*
* Revision 1.5 2000/05/26 19:25:19 jimtabor
* Read History file for Change info
*
@ -568,7 +571,11 @@ COUNT dos_findfirst(UCOUNT attr, BYTE FAR * name)
BYTE FAR *ptr;
static BYTE local_name[FNAME_SIZE + 1],
local_ext[FEXT_SIZE + 1];
local_ext[FEXT_SIZE + 1],
Tname[65];
fscopy(name, (BYTE FAR *)&Tname);
printf("ff %s", Tname);
/* The findfirst/findnext calls are probably the worst of the */
/* DOS calls. They must work somewhat on the fly (i.e. - open */
@ -585,10 +592,13 @@ COUNT dos_findfirst(UCOUNT attr, BYTE FAR * name)
dmp->dm_attr_srch = attr | D_RDONLY | D_ARCHIVE;
/* Parse out the drive, file name and file extension. */
i = ParseDosName(name, &nDrive, &LocalPath[2], local_name, local_ext, TRUE);
i = ParseDosName((BYTE FAR *)&Tname, &nDrive, &LocalPath[2], local_name, local_ext, TRUE);
if (i != SUCCESS)
return i;
printf("\nff %s", Tname);
printf("ff %s", local_name);
printf("ff %s\n", local_ext);
if (nDrive >= 0)
{
dmp->dm_drive = nDrive;
@ -602,13 +612,6 @@ COUNT dos_findfirst(UCOUNT attr, BYTE FAR * name)
current_ldt = &CDSp->cds_table[nDrive];
SAttr = (BYTE) attr;
if (current_ldt->cdsFlags & CDSNETWDRV)
{
if (Remote_find(REM_FINDFIRST, attr, name, dmp) != 0)
return DE_FILENOTFND;
return SUCCESS;
}
/* Now build a directory. */
if (!LocalPath[2])
strcpy(&LocalPath[2], ".");
@ -647,6 +650,14 @@ COUNT dos_findfirst(UCOUNT attr, BYTE FAR * name)
fbcopy((BYTE FAR *) SearchDir.dir_name, dmp->dm_name_pat,
FNAME_SIZE + FEXT_SIZE);
if (current_ldt->cdsFlags & CDSNETWDRV)
{
if (Remote_find(REM_FINDFIRST, attr, name, dmp) != 0)
return DE_FILENOTFND;
return SUCCESS;
}
/* Now search through the directory to find the entry... */
/* Special handling - the volume id is only in the root */
/* directory and only searched for once. So we need to open */

View File

@ -28,6 +28,9 @@
; $Header$
;
; $Log$
; Revision 1.5 2000/06/01 06:37:38 jimtabor
; Read History for Changes
;
; Revision 1.4 2000/05/26 19:25:19 jimtabor
; Read History file for Change info
;
@ -193,7 +196,7 @@ _clk_dev equ $
global _blk_dev
_blk_dev equ $
dd -1
dw 00c2h ; block device with ioctl
dw 08c2h ; block device with ioctl
dw GenStrategy
dw blk_entry
global _nblk_rel

View File

@ -31,6 +31,9 @@ static BYTE *mainRcsId = "$Id$";
/*
* $Log$
* Revision 1.6 2000/06/01 06:37:38 jimtabor
* Read History for Changes
*
* Revision 1.5 2000/05/26 19:25:19 jimtabor
* Read History file for Change info
*
@ -279,8 +282,11 @@ COUNT truename(char FAR * src, char FAR * dest, COUNT t)
if (fnmatch((BYTE FAR *) &Name, (BYTE FAR *) dhp->dh_name, FNAME_SIZE, FALSE))
{
buf[2] ='/';
for (d = 0; d < FNAME_SIZE || Name[d] == ' '; d++)
for (d = 0; d < FNAME_SIZE; d++){
if(Name[d] == 0x20)
goto exit_tn;
*bufp++ = Name[d];
}
goto exit_tn;
}
}