* pwdgrp.h (pwdgrp_read::pwdgrp_read): Remove.
(pwdgrp_read::~pwdgrp_read): Ditto. (pwdgrp_read::open): Reset fh to NULL instead of INVALID_HANDLE_VALUE. (pwdgrp_read::close): Ditto.
This commit is contained in:
parent
c060edba34
commit
34f7289475
|
@ -1,3 +1,10 @@
|
||||||
|
2002-08-19 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* pwdgrp.h (pwdgrp_read::pwdgrp_read): Remove.
|
||||||
|
(pwdgrp_read::~pwdgrp_read): Ditto.
|
||||||
|
(pwdgrp_read::open): Reset fh to NULL instead of INVALID_HANDLE_VALUE.
|
||||||
|
(pwdgrp_read::close): Ditto.
|
||||||
|
|
||||||
2002-08-19 Christopher Faylor <cgf@redhat.com>
|
2002-08-19 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* fhandler.h (fhandler_console::send_winch_maybe): New method.
|
* fhandler.h (fhandler_console::send_winch_maybe): New method.
|
||||||
|
|
|
@ -59,16 +59,6 @@ class pwdgrp_read {
|
||||||
char *lptr, *eptr;
|
char *lptr, *eptr;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
pwdgrp_read ()
|
|
||||||
: fh (INVALID_HANDLE_VALUE), buf (NULL), lptr (NULL), eptr (NULL) {}
|
|
||||||
virtual ~pwdgrp_read ()
|
|
||||||
{
|
|
||||||
if (fh != INVALID_HANDLE_VALUE)
|
|
||||||
CloseHandle (fh);
|
|
||||||
if (buf)
|
|
||||||
free (buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool open (const char *posix_fname)
|
bool open (const char *posix_fname)
|
||||||
{
|
{
|
||||||
if (buf)
|
if (buf)
|
||||||
|
@ -91,7 +81,7 @@ public:
|
||||||
free (buf);
|
free (buf);
|
||||||
buf = NULL;
|
buf = NULL;
|
||||||
CloseHandle (fh);
|
CloseHandle (fh);
|
||||||
fh = INVALID_HANDLE_VALUE;
|
fh = NULL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
buf[read_bytes] = '\0';
|
buf[read_bytes] = '\0';
|
||||||
|
@ -118,8 +108,8 @@ public:
|
||||||
inline const char *get_fname () { return pc; }
|
inline const char *get_fname () { return pc; }
|
||||||
void close ()
|
void close ()
|
||||||
{
|
{
|
||||||
if (fh != INVALID_HANDLE_VALUE)
|
if (fh)
|
||||||
CloseHandle (fh);
|
CloseHandle (fh);
|
||||||
fh = INVALID_HANDLE_VALUE;
|
fh = NULL;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue