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
issue came from a little higher up with
has just changed bcopy for memcpy not knowing the way it copied bits from which location to where... fixed it by
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 OSX
bstring
BSTRING(3) BSD Library Functions Manual BSTRING(3)NAME
bcmp, bcopy, bzero, memccpy, memchr, memcmp, memcpy, memmove, memset -- byte string operations
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <strings.h>
int
bcmp(const void *s1, const void *s2, size_t n);
void
bcopy(const void *s1, void *s2, size_t n);
void
bzero(void *s, size_t n);
#include <string.h>
void *
memccpy(void *restrict s1, const void *restrict s2, 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 *restrict s1, const void *restrict s2, size_t n);
void *
memmove(void *s1, const void *s2, size_t n);
void *
memset(void *s, int c, size_t n);
DESCRIPTION
These functions operate on variable length strings of bytes. They do not check for terminating null bytes, as the routines listed in
string(3) do.
See the specific manual pages for more information.
LEGACY SYNOPSIS
#include <string.h>
The include file <string.h> is necessary and sufficient for all functions.
SEE ALSO bcmp(3), bcopy(3), bzero(3), memccpy(3), memchr(3), memcmp(3), memcpy(3), memmove(3), memset(3), compat(5)STANDARDS
The functions memchr(), memcmp(), memcpy(), memmove(), and memset() conform to ISO/IEC 9899:1990 (``ISO C90'').
HISTORY
The functions bzero() and memccpy() appeared in 4.3BSD; the functions bcmp(), bcopy(), appeared in 4.2BSD.
BSD June 4, 1993 BSD