im porting c code to windows 32 bit using visual studio express
now i have 3 functions that i can't find any alternatives in windows
they are:
alarm
bzero
bcopy
what are the equivalent methods in C win32 ?
alarm you are going to need to dig for the other two are:
#define bzero(b,len) (memset((b), '\0', (len)), (void) 0)
#define bcopy(b1,b2,len) (memmove((b2), (b1), (len)), (void) 0)
From which platform are you porting to windows? Anyhow bzero
and bcopy
are depreciated since quite a while.
for bzero:
This function is deprecated (marked as LEGACY in POSIX.1-2001): use memset(3) in new programs. POSIX.1-2008 removes the specifica- tion of bzero().
for bcopy:
This function is deprecated (marked as LEGACY in POSIX.1-2001): use memcpy(3) or memmove(3) in new programs. Note that the first two arguments are interchanged for memcpy(3) and memmove(3). POSIX.1-2008 removes the specification of bcopy().
So just fix your code and use the proposed replacements.
memcpy (output, input, size * sizeof (input[0]));
instead of
bcopy (input, output, size * sizeof (input[0]));
And
memset(m, 0, n * sizeof (gfloat));
instead of
bzero (m, n * sizeof (gfloat));
for alarm have a look at Win32-API function SetTimer()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With