Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

bcopy(9r) [osf1 man page]

bcopy(9r)																 bcopy(9r)

NAME
bcopy - General: Copies a series of bytes with a specified limit SYNOPSIS
void bcopy( char *b1, char *b2, int n ); ARGUMENTS
Specifies a pointer to a byte string (array of characters). This pointer can reside in kernel address space or in user address space. Specifies a pointer to a buffer of at least n bytes. This pointer can reside in kernel address space or in user address space. Specifies the number of bytes to be copied. DESCRIPTION
The bcopy routine copies n bytes from string b1 to buffer b2. No check is made for null bytes. The copy is nondestructive, that is, the address ranges of b1 and b2 can overlap. RETURN VALUES
None EXAMPLES
The following code fragment shows a call to bcopy: . . . struct tc_slot tc_slot[TC_IOSLOTS]; . . . char *cp; . . . bcopy(tc_slot[index].modulename, cp, TC_ROMNAMLEN + 1); . . . SEE ALSO
Routines: blkclr(9r), copystr(9r), ovbcopy(9r), strcpy(9r), strncpy(9r) bcopy(9r)

Check Out this Related Man Page

strncpy(9r)															       strncpy(9r)

NAME
strncpy - General: Copies a null-terminated character string with a specified limit SYNOPSIS
char * strncpy( char *s1, char *s2, int n ); ARGUMENTS
Specifies a pointer to a buffer of at least n bytes. Specifies a pointer to a string (an array of characters terminated by a null charac- ter). Specifies the number of characters to be copied. DESCRIPTION
The strncpy routine copies string s2 to buffer s1. The routine stops copying after it copies a null character or n characters, whichever comes first. If the length of s2 as determined by the null character is less than n, the routine pads s1 with null characters. RETURN VALUES
The strncpy routine returns a pointer to /NULL at the end of the first string (or to the location following the last copied character if there is no NULL). The copied string will not be null terminated if the length of s2 is n characters or more. SEE ALSO
Routines: bcopy(9r), blkclr(9r), copystr(9r), ovbcopy(9r), strcpy(9r) strncpy(9r)
Man Page

5 More Discussions You Might Find Interesting

1. Programming

appending space in binary data in c

Hi ... I am having a string in the buffer .. It is binary data it may contain space . When i try to append a space in using strcpy it is taking the inbetween \n as the end and appending space .. How to append space in the binary data in C ?? please let me know Thanks in advance, Arun. (2 Replies)
Discussion started by: arunkumar_mca
2 Replies

2. Shell Programming and Scripting

how to check if a file has zero records

I want to do conditional logic on whether a file has 0 bytes or more than 0 bytes. what is the easiest way to do this? (2 Replies)
Discussion started by: guessingo
2 Replies

3. Programming

Binary conversion function

Is/are there any function(s) in C that convert(s) character/ASCII/Decimal to binary and vice versa? what about bcopy and strcpy? (1 Reply)
Discussion started by: Peevish
1 Replies

4. UNIX for Dummies Questions & Answers

Printing pointer address

How can I print the memory address of a pointer using printf (or any other STDOUT functions?). I see in Linux its %p but not in unix, help? thanks (5 Replies)
Discussion started by: perleo
5 Replies

5. Shell Programming and Scripting

help with awk for file combination

1)file1: | *Local Communication Bandwidths (MB/Sec) | Memory copy (bcopy) | | ^ | mmap_bandwidth | | ^ | mmap_read bandwidth | | ^ | memory write bandwidth | | Local Communication Latencies | Pipe Latency | 2)file2 422.6903 1948.9000 ... (9 Replies)
Discussion started by: yanglei_fage
9 Replies