backing out dveditz's changes (seems to be breaking mac)

This commit is contained in:
leaf%mozilla.org 1999-05-18 18:55:34 +00:00
Родитель d74cbdd300
Коммит e47f66c661
2 изменённых файлов: 10 добавлений и 26 удалений

Просмотреть файл

@ -165,9 +165,6 @@ VR_INTERFACE(REGERR) NR_RegClose(
*
* Parameters:
* hReg - handle of open registry to query
* Returns:
* REGERR_OK if writable, REGERR_READONLY if not, possibly
* other errors for an invalid hReg
* ---------------------------------------------------------------------
*/
VR_INTERFACE(REGERR) NR_RegIsWritable(

Просмотреть файл

@ -1449,7 +1449,7 @@ static REGERR nr_RemoveName(char *path)
* --------------------------------------------------------------------
*/
static REGERR nr_Find(REGFILE *reg, REGOFF offParent, char *pPath,
REGDESC *pDesc, REGOFF *pPrev, REGOFF *pParent, XP_Bool raw);
REGDESC *pDesc, REGOFF *pPrev, REGOFF *pParent, Bool raw);
static REGERR nr_FindAtLevel(REGFILE *reg, REGOFF offFirst, char *pName,
REGDESC *pDesc, REGOFF *pOffPrev);
@ -1469,7 +1469,7 @@ static REGERR nr_Find(REGFILE *reg,
REGDESC *pDesc,
REGOFF *pPrev,
REGOFF *pParent,
XP_Bool raw)
Bool raw)
{
REGERR err;
@ -2237,43 +2237,30 @@ static REGERR nr_RegClose( HREG hReg )
{
REGERR err = REGERR_OK;
REGHANDLE* reghnd = (REGHANDLE*)hReg;
REGFILE* reg;
XP_Bool needDelete = FALSE;
XP_ASSERT( regStartCount > 0 );
/* verify handle */
err = VERIFY_HREG( hReg );
if ( err != REGERR_OK )
return err;
reg = reghnd->pReg;
err = nr_Lock( reg );
if ( err == REGERR_OK )
{
XP_ASSERT( VALID_FILEHANDLE(reg->fh) );
XP_ASSERT( VALID_FILEHANDLE(reghnd->pReg->fh) );
/* lower REGFILE user count */
reg->refCount--;
reghnd->pReg->refCount--;
/* if registry is no longer in use */
if ( reg->refCount < 1 )
{
if ( reghnd->pReg->refCount < 1 ) {
/* ...then close the file */
if ( reg->hdrDirty ) {
nr_WriteHdr( reg );
if ( reghnd->pReg->hdrDirty ) {
nr_WriteHdr( reghnd->pReg );
}
nr_CloseFile( &(reg->fh) );
needDelete = TRUE;
nr_CloseFile( &(reghnd->pReg->fh) );
/* ...and delete REGFILE node from list */
nr_DeleteNode( reghnd->pReg );
}
reghnd->magic = 0; /* prevent accidental re-use */
nr_Unlock( reg );
if ( needDelete )
nr_DeleteNode( reg );
XP_FREE( reghnd );
}