Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > problem with strcat function

Reply
Thread Tools

problem with strcat function

 
 
ramubdvt@gmail.com
Guest
Posts: n/a
 
      03-23-2006
hi,
i have written this strcat but sometime it is giving problem, while
handeling some strings containing
binary and if string containing zero ,
funtion which takes string 1 and its length string2 and its length as
arguments

please tell the correction ,

here iam using
typedef char SINT8;
typedef unsigned char UINT8;
typedef short SINT16;
typedef unsigned short UINT16;
typedef int SINT32;
typedef unsigned int UINT32;
typedef long long UINT64;

UINT8 *
Stringcat (UINT8 *str1
, UINT32 str1len
, UINT8 *str2
, UINT32 str2len )
{
UINT8 *str3, *temp;
temp = str3 = (char *) calloc (( str1len + str2len) + 1) ,1 );
while ( ( *str3++ = *str1++) );
str3--;
while ( ( *str3++ = *str2++ ) );
return temp;
}


regards
ramaswamy BM
banglore

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with strcat function ramubdvt@gmail.com C Programming 20 03-25-2006 07:50 AM
Problem with strcat, strcpy,sprintf diego.arias.vel@gmail.com C Programming 24 10-30-2005 11:16 PM
strcpy and strcat problem JC C Programming 23 09-29-2003 04:27 PM
strcat problem again Ian Stanley C Programming 18 09-22-2003 06:06 AM
strcat problem Ian Stanley C Programming 5 09-13-2003 02:03 PM



Advertisments