* dir.cc (readdir_worker): Minor code cleanup.

* fhandler_console.cc (beep): Use a more Windows-generic wav file if the beep
is missing.  Use a more foolproof way to find out whether we should be
recreating the missing key.
* registry.h (reg_key::_disposition): New field.
(reg_key::created): New function.
* registry.cc (reg_key::reg_key): Set _disposition to zero by default.
(reg_key::build_key): Fill in _disposition field.
This commit is contained in:
Christopher Faylor
2006-01-03 17:44:26 +00:00
parent 825d0b9385
commit adcff8d159
5 changed files with 85 additions and 62 deletions

View File

@ -1,6 +1,6 @@
/* registry.h: shared info for cygwin
Copyright 2000, 2001 Red Hat, Inc.
Copyright 2000, 2001, 2004, 2006 Red Hat, Inc.
This file is part of Cygwin.
@ -14,6 +14,7 @@ private:
HKEY key;
LONG key_is_invalid;
DWORD _disposition;
public:
@ -33,6 +34,7 @@ public:
int get_string (const char *, char *buf, size_t len, const char *def);
int set_string (const char *,const char *);
int set_int (const char *, int val);
bool created () const {return _disposition & REG_CREATED_NEW_KEY;}
~reg_key ();
};