Porting from Linux
| Wed, 2006-04-26 12:10 | |
|
Hi
I m porting C code from Linux to symbian. Can somebody advise me how should i handle CHAR and INT's. Im getting below errors: expression syntax error Char or Int undefined identifier Char ot Int Char example code: char *publickeybuf = NULL; long publickeylength = 0; x = CM_writePublicKeyString(key, &publickeybuf, &publickeylength); Int Example: int row_count = aa_dbResultSetGetRowCount(&rs); if (row_count > 0) { char **ca_list; if ((ca_list = (char **)malloc(row_count * sizeof(char *))) == NULL) { SESSI_LOG("%s \n", "Memory allocation failed" ); return AA_ERR_MEMORY_ALLOCATION_FAILED; } int i; for (i = 0; i < row_count; i++) Thanks Capr |
|






Forum posts: 4
Lines and actual errors:
/*<<< validate the certificate using issuer */
/* Get the public Key */
char *publickeybuf = NULL ------ expression syntax error
long publickeylength = 0; ---- expression syntax error
x = CM_writePublicKeyString(key, &publickeybuf, &publickeylength); --- undefined identifier 'publickeybuf'
Forum posts: 105
Symbian OS has its own method of storing strings..known as Descriptors..it doesn't use char*, char [] and the like...however you can convert from char* to symbian style Descriptors...
first have a look what the Descriptors are??
you should understand the basic traits of Symbian OS in order to port robustly and nicely...
Cheers!!
CodePupilĂ‚Â
Thanks and Regards
CodePupil
__________________________
You are I and I am he .. !!
Forum posts: 4
I have much C code to change...im wondering, is there any other way?
Its also possible to use standard C code.
Your compilation errors are therefore not because char and int aren't supported but for some other reason.