my tool works fine in gentoo, ubuntu now im trying to port it to windows but bzero/bcopy I read aren't working on windows and for better portability I should of use memset() so im trying to translate
in
to memset so I did,
and im getting "Error unrecognised command" when it reach the smtp...
Sirs,
I am new to socket programming.I have to do bzero and bcopy in my programs what is the use of it.
It will be very usefull for me to know it.
thanks,
arunkumar (1 Reply)
Dear all,
In my code,i am planning to use memset function to re-initialise an array before populating it everytime. Will using memset function be an overload to the program? (3 Replies)
HI all ,
please find the piece of code below
char *t;
char *f;
char buf;
memset(buf,0,50);
after that i am assigning memory
for (i=0; i<100; i++)
{
t = buf+(i*6);
f = "ARUN";
}
my question ..
1) i have run this it is... (7 Replies)
Hi,
I have a shell scripting. This will take 7 digit number in each line and add 7 digit number with next subsequent lines ( normal addition ).
Eg:
0000001
0000220
0001235
0000022
0000023
...........
.........
........
Like this i am having around 1500000 records. After adding... (23 Replies)
Hi All,
we have an application that is written in 'C' programming to connects to various servers in the organization.
The bellow code establish a TCP connection to connect to the remote servers. the application works perfectly ok, but, after some time the entire process get's crashed and... (2 Replies)
In LINUX(CentOS, RedHat) is there a way to have the banner statement appear before the logon instead of after the logon? In UNIX and Windows the banner appears before a person actually logs on, what I'm seeing in LINUX is that it appears after the login(ftp, telnet, SSH).
Thanks (0 Replies)
Hello everyone, I'm in need of some assistance. I'm currently enrolled in an introductory UNIX shell programming course and, well halfway through the semester, we are receiving our first actual assignment. I've somewhat realized now that I've fallen behind, and I'm working to get caught up, but for... (1 Reply)
Hi All,
I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command.
The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Hi,
memset call is failing on solaris for me. I wrote below code and that also fails. Any hints?
void *memset(void *dst, int c, size_t n)
{
if (n) {
char *d = dst;
do {
*d++ = c;
} while (--n);
}
return dst;
} (2 Replies)
Discussion started by: skyineyes
2 Replies
LEARN ABOUT OPENSOLARIS
bcopy
bstring(3C) Standard C Library Functions bstring(3C)NAME
bstring, bcopy, bcmp, bzero - memory operations
SYNOPSIS
#include <strings.h>
void bcopy(const void *s1, void *s2, size_t n);
int bcmp(const void *s1, const void *s2, size_t n);
void bzero(void *s, size_t n);
DESCRIPTION
The bcopy(), bcmp(), and bzero() functions operate as efficiently as possible on memory areas (arrays of bytes bounded by a count, not
terminated by a null character). They do not check for the overflow of any receiving memory area. These functions are similar to the
memcpy(), memcmp(), and memset() functions described on the memory(3C) manual page.
The bcopy() function copies n bytes from memory area s1 to s2. Copying between objects that overlap will take place correctly.
The bcmp() function compares the first n bytes of its arguments, returning 0 if they are identical and 1 otherwise. The bcmp() function
always returns 0 when n is 0.
The bzero() function sets the first n bytes in memory area s to 0.
WARNINGS
The bcopy() function takes parameters backwards from memcmp(). See memory(3C).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO memory(3C), attributes(5), standards(5)SunOS 5.11 15 Apr 2002 bstring(3C)