int _i,_j,_k,len; \
memset(&emails, 0, sizeof(emails) ); \
len = strlen(database[item][EMAIL]); \
- for( _i=0,_j=0, _k=0; _i < len && _j < 4; _i++ ) { \
+ for( _i=0,_j=0, _k=0; _i < len && _j < MAX_EMAILS; _i++ ) { \
if( database[item][EMAIL][_i] ==',' ) { \
_j++; \
_k = 0; \
edit_emails(char c, int item)
{
char *field = NULL;
- char emails[4][MAX_EMAIL_LEN];
+ char emails[MAX_EMAILS][MAX_EMAIL_LEN];
char tmp[MAX_EMAILSTR_LEN] = "";
int i, len;
my_free(database[item][EMAIL]);
- for(i=0; i<4; i++) {
+ for(i=0; i<MAX_EMAILS; i++) {
if( *emails[i] ) {
strcat(tmp, emails[i]);
strcat(tmp, ",");