Sponsored Content
Full Discussion: C++ to C
Top Forums Programming C++ to C Post 302397321 by Peevish on Sunday 21st of February 2010 08:38:10 PM
Old 02-21-2010
thanks, that solved the problem of uint16, but I'm still not sure how to pass my structure to CRC

e.g.

typedef struct header
{

unsigned short s;
unsigned short d;
unsigned int sq;
unsigned int a;
char hdr;
char rs;
char flg;
unsigned short w;
unsigned short cksum;


} header;


typedef struct Message {
struct header hdr;
char data[1024];
}Message;

=================

I need to pass these parameters and find the total CRC then save it in cksum,
no syntax error for my code but I'm getting a segmentation error!
 
RUNKIT_FUNCTION_REDEFINE(3)						 1					       RUNKIT_FUNCTION_REDEFINE(3)

runkit_function_redefine - Replace a function definition with a new implementation

SYNOPSIS
bool runkit_function_redefine (string $funcname, string $arglist, string $code) DESCRIPTION
Note By default, only userspace functions may be removed, renamed, or modified. In order to override internal functions, you must enable the runkit.internal_override setting in php.ini. PARAMETERS
o $funcname - Name of function to redefine o $arglist - New list of arguments to be accepted by function o $code - New code implementation RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 A runkit_function_redefine(3) example <?php function testme() { echo "Original Testme Implementation "; } testme(); runkit_function_redefine('testme','','echo "New Testme Implementation ";'); testme(); ?> The above example will output: Original Testme Implementation New Testme Implementation SEE ALSO
runkit_function_add(3), runkit_function_copy(3), runkit_function_rename(3), runkit_function_remove(3). PHP Documentation Group RUNKIT_FUNCTION_REDEFINE(3)
All times are GMT -4. The time now is 09:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy