Track changes to DataSource API in NufxLib.

This commit is contained in:
Andy McFadden 2003-02-09 01:56:05 +00:00
parent 18775bbf04
commit 102af95bdd
4 changed files with 27 additions and 2 deletions

View File

@ -1,3 +1,16 @@
2003/02/08 fadden
- Upped version to v2.0.0.
- Many fixes to pathname handling:
- Correctly handle '%' when preservation is OFF.
- Accept 4-char extensions in '-ee' without risk of buffer overflow.
- Fixed broken assert when converting long %xx names.
- Store "AUX" as "%00AUX" when preserving Win32 names (vs. "_AUX").
- Always store files with ':' as path separator.
- Recognize that some Win32 variants (Win2K and later at the least)
will accept both '/' and '\' as pathname separators.
- Correctly convert ".//foo" to "foo" instead of "/foo".
- Tracked changes to NufxLib DataSource API.
2003/01/10 fadden
- Check NufxLib "compiled" version against "linked" version.

View File

@ -108,3 +108,14 @@ Free(void* ptr)
}
#endif
/*
* This gets called when a buffer DataSource is no longer needed.
*/
NuResult
FreeCallback(NuArchive* pArchive, void* args)
{
DBUG(("+++ free callback 0x%08lx\n", (long) args));
Free(args);
return kNuOK;
}

View File

@ -97,6 +97,7 @@ void* Calloc(size_t size);
void* Realloc(void* ptr, size_t size);
void Free(void* ptr);
#endif
NuResult FreeCallback(NuArchive* pArchive, void* args);
/* SysUtils.c */
NuError NormalizeFileName(NulibState* pState, const char* srcp, long srcLen,

View File

@ -660,8 +660,8 @@ DoAddFile(NulibState* pState, NuArchive* pArchive, const char* pathname,
NuDataSource* pDataSource;
err = NuCreateDataSourceForBuffer(kNuThreadFormatUncompressed,
true, kDefaultCommentLen, (unsigned char*)comment, 0,
strlen(comment), &pDataSource);
kDefaultCommentLen, (unsigned char*)comment, 0,
strlen(comment), FreeCallback, &pDataSource);
if (err != kNuErrNone) {
ReportError(err, "comment buffer create failed");
Free(comment);