summaryrefslogtreecommitdiff
path: root/mysys/my_conio.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_conio.c')
-rw-r--r--mysys/my_conio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mysys/my_conio.c b/mysys/my_conio.c
index 23b0c55e7a9..d03f63a11a9 100644
--- a/mysys/my_conio.c
+++ b/mysys/my_conio.c
@@ -29,10 +29,10 @@ static HANDLE my_coninpfh= 0; /* console input */
if found useful they are to be exported in mysys
*/
+
/*
int my_pthread_auto_mutex_lock(HANDLE* ph, const char* name,
int id, int time)
-
NOTES
creates a mutex with given name and tries to lock it time msec.
mutex name is appended with id to allow system wide or process wide
@@ -41,8 +41,8 @@ static HANDLE my_coninpfh= 0; /* console input */
RETURN
0 thread owns mutex
<>0 error
-
*/
+
static
int my_pthread_auto_mutex_lock(HANDLE* ph, const char* name, int id, int time)
{
@@ -69,7 +69,6 @@ int my_pthread_auto_mutex_lock(HANDLE* ph, const char* name, int id, int time)
/*
int my_pthread_auto_mutex_free(HANDLE* ph)
-
NOTES
releases a mutex.
@@ -103,7 +102,7 @@ int my_pthread_auto_mutex_free(HANDLE* ph)
/*
- char* my_cgets(char *string, unsigned long clen, unsigned long* plen)
+ char* my_cgets()
NOTES
Replaces _cgets from libc to support input of more than 255 chars.
@@ -121,7 +120,8 @@ int my_pthread_auto_mutex_free(HANDLE* ph)
NULL Error
*/
-char* my_cgets(char *buffer, unsigned long clen, unsigned long* plen)
+
+char* my_cgets(char *buffer, size_t clen, size_t* plen)
{
ULONG state;
char *result;
@@ -170,7 +170,7 @@ char* my_cgets(char *buffer, unsigned long clen, unsigned long* plen)
clen= min(clen, 65535);
do
{
- clen= min(clen, (unsigned long)csbi.dwSize.X*csbi.dwSize.Y);
+ clen= min(clen, (size_t) csbi.dwSize.X*csbi.dwSize.Y);
if (!ReadConsole((HANDLE)my_coninpfh, (LPVOID)buffer, clen - 1, plen, NULL))
{
result= NULL;