Sorry I should of been clearer, I "currently" running the codes on a gentoo machine... I wanted to translate the bzero() bcopy() before attempting to port it to windows. Now I am on a Gentoo machine and with bzero/bcopy instead of memset it works fine... whenever i switch bzero(buffer, 256); to memset(buffer, '\0' , 256); SMTP server replies "Error: Unrecognized command" for all commands sent to the SMTP with memset() replacing bzero()
---------- Post updated at 06:21 AM ---------- Previous update was at 04:41 AM ----------
God... I can't believe I did that read the man too fast i guess... lol I fixed it it wasn't in
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 PLAN9
bstring
BSTRING(3) Linux Programmer's Manual BSTRING(3)NAME
bcmp, bcopy, bzero, memccpy, memchr, memcmp, memcpy, memfrob, memmem, memmove, memset - byte string operations
SYNOPSIS
#include <string.h>
int bcmp(const void *s1, const void *s2, size_t n);
void bcopy(const void *src, void *dest, size_t n);
void bzero(void *s, size_t n);
void *memccpy(void *dest, const void *src, int c, size_t n);
void *memchr(const void *s, int c, size_t n);
int memcmp(const void *s1, const void *s2, size_t n);
void *memcpy(void *dest, const void *src, size_t n);
void *memfrob(void *s, size_t n);
void *memmem(const void *needle, size_t needlelen,
const void *haystack, size_t haystacklen);
void *memmove(void *dest, const void *src, size_t n);
void *memset(void *s, int c, size_t n);
DESCRIPTION
The byte string functions perform operations on strings (byte arrays) that are not necessarily null-terminated. See the individual man
pages for descriptions of each function.
NOTES
The functions bcmp(), bcopy() and bzero() are obsolete. Use memcmp(), memcpy() and memset() instead.
SEE ALSO bcmp(3), bcopy(3), bzero(3), memccpy(3), memchr(3), memcmp(3), memcpy(3), memfrob(3), memmem(3), memmove(3), memset(3)COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
2014-05-28 BSTRING(3)