View | Details | Raw Unified | Return to bug 9993
Collapse All | Expand All

(-)gnokii-0.6.14.orig/common/ldif.c (-2 / +8 lines)
Lines 90-97 Link Here
90
90
91
	aux = strrchr(entry->name, ' ');
91
	aux = strrchr(entry->name, ' ');
92
	if (aux) *aux = 0;
92
	if (aux) *aux = 0;
93
	ldif_entry_write(f, "givenName", entry->name, 1);
93
	if (strlen(entry->firstname) > 0) ldif_entry_write(f, "givenName", entry->firstname, 1);
94
	if (aux) ldif_entry_write(f, "sn", aux + 1, 1);
94
		else if (strlen(entry->lastname) == 0) ldif_entry_write(f, "givenName", entry->name, 1);
95
	if (strlen(entry->lastname) > 0) ldif_entry_write(f, "sn", entry->lastname, 1);
96
		else if (aux) ldif_entry_write(f, "sn", aux + 1, 1); 
95
	if (aux) *aux = ' ';
97
	if (aux) *aux = ' ';
96
	ldif_entry_write(f, "cn", entry->name, 1);
98
	ldif_entry_write(f, "cn", entry->name, 1);
97
	if (entry->caller_group) {
99
	if (entry->caller_group) {
Lines 189-194 Link Here
189
		}
191
		}
190
		STORE("cn: ", entry->name);
192
		STORE("cn: ", entry->name);
191
		STORE_BASE64("cn:: ", entry->name);
193
		STORE_BASE64("cn:: ", entry->name);
194
		STORE("givenName: ", entry->firstname);
195
		STORE_BASE64("givenName:: ", entry->firstname);
196
		STORE("sn: ", entry->lastname);
197
		STORE_BASE64("sn:: ", entry->lastname);
192
198
193
		STORESUB("homeurl: ", GN_PHONEBOOK_ENTRY_URL);
199
		STORESUB("homeurl: ", GN_PHONEBOOK_ENTRY_URL);
194
		STORESUB_BASE64("homeurl:: ", GN_PHONEBOOK_ENTRY_URL);
200
		STORESUB_BASE64("homeurl:: ", GN_PHONEBOOK_ENTRY_URL);
(-)gnokii-0.6.14.orig/common/nokia-decoding.c (+10 lines)
Lines 60-65 Link Here
60
		    blockstart[0] != GN_PHONEBOOK_ENTRY_Group &&
60
		    blockstart[0] != GN_PHONEBOOK_ENTRY_Group &&
61
		    blockstart[0] != GN_PHONEBOOK_ENTRY_Pointer &&
61
		    blockstart[0] != GN_PHONEBOOK_ENTRY_Pointer &&
62
		    blockstart[0] != GN_PHONEBOOK_ENTRY_RingtoneAdv &&
62
		    blockstart[0] != GN_PHONEBOOK_ENTRY_RingtoneAdv &&
63
		    blockstart[0] != GN_PHONEBOOK_ENTRY_Firstname &&
64
		    blockstart[0] != GN_PHONEBOOK_ENTRY_Lastname &&
63
		    /* the last one can be the case of the bitmap name -- we
65
		    /* the last one can be the case of the bitmap name -- we
64
		     * don't have phonebook entry allocated then, but a bitmap;
66
		     * don't have phonebook entry allocated then, but a bitmap;
65
		     * we handle this later on
67
		     * we handle this later on
Lines 104-109 Link Here
104
				break;
106
				break;
105
			}
107
			}
106
			break;
108
			break;
109
		case GN_PHONEBOOK_ENTRY_Firstname:	/* Firstname */
110
			char_unicode_decode(data->phonebook_entry->firstname, (blockstart + 6), blockstart[5]);
111
			dprintf("   Firstname: %s\n", data->phonebook_entry->firstname);
112
			break;
113
		case GN_PHONEBOOK_ENTRY_Lastname:	/* Lastname */
114
			char_unicode_decode(data->phonebook_entry->lastname, (blockstart + 6), blockstart[5]);
115
			dprintf("   Lastname: %s\n", data->phonebook_entry->lastname);
116
			break;
107
		case GN_PHONEBOOK_ENTRY_Name:	/* Name */
117
		case GN_PHONEBOOK_ENTRY_Name:	/* Name */
108
			if (data->bitmap) {
118
			if (data->bitmap) {
109
				char_unicode_decode(data->bitmap->text, (blockstart + 6), blockstart[5]);
119
				char_unicode_decode(data->bitmap->text, (blockstart + 6), blockstart[5]);
(-)gnokii-0.6.14.orig/common/phones/nk6510.c (+15 lines)
Lines 2055-2060 Link Here
2055
			data->phonebook_entry->empty = true;
2055
			data->phonebook_entry->empty = true;
2056
			data->phonebook_entry->caller_group = 5; /* no group */
2056
			data->phonebook_entry->caller_group = 5; /* no group */
2057
			data->phonebook_entry->name[0] = '\0';
2057
			data->phonebook_entry->name[0] = '\0';
2058
			data->phonebook_entry->firstname[0] = '\0';
2059
			data->phonebook_entry->lastname[0] = '\0';
2058
			data->phonebook_entry->number[0] = '\0';
2060
			data->phonebook_entry->number[0] = '\0';
2059
			data->phonebook_entry->subentries_count = 0;
2061
			data->phonebook_entry->subentries_count = 0;
2060
			data->phonebook_entry->date.year = 0;
2062
			data->phonebook_entry->date.year = 0;
Lines 2348-2353 Link Here
2348
		j = char_unicode_encode((string + 1), entry->name, strlen(entry->name));
2350
		j = char_unicode_encode((string + 1), entry->name, strlen(entry->name));
2349
		string[0] = j;
2351
		string[0] = j;
2350
		count += PackBlock(0x07, j + 1, block++, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count);
2352
		count += PackBlock(0x07, j + 1, block++, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count);
2353
		dprintf("   surename: %s...\n",entry->lastname);
2354
		if (strlen(entry->lastname) > 0) {
2355
			j = char_unicode_encode((string + 1), entry->lastname, strlen(entry->lastname));
2356
			string[0] = j;
2357
			count += PackBlock(GN_PHONEBOOK_ENTRY_Lastname, j + 1, block++, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count);
2358
		}
2359
2360
		dprintf("   givenname: %s...\n",entry->firstname);
2361
		if (strlen(entry->firstname) > 0) {
2362
			j = char_unicode_encode((string + 1), entry->firstname, strlen(entry->firstname));
2363
			string[0] = j;
2364
			count += PackBlock(GN_PHONEBOOK_ENTRY_Firstname, j + 1, block++, string, req + count, GN_PHONEBOOK_ENTRY_MAX_LENGTH - count);
2365
		}
2351
2366
2352
		/* Group */
2367
		/* Group */
2353
		string[0] = entry->caller_group + 1;
2368
		string[0] = entry->caller_group + 1;
(-)gnokii-0.6.14.orig/common/vcard.c (+6 lines)
Lines 46-51 Link Here
46
	fprintf(f, "VERSION:3.0\n");
46
	fprintf(f, "VERSION:3.0\n");
47
	add_slashes(name, entry->name, sizeof(name), strlen(entry->name));
47
	add_slashes(name, entry->name, sizeof(name), strlen(entry->name));
48
	fprintf(f, "FN:%s\n", name);
48
	fprintf(f, "FN:%s\n", name);
49
	if (strlen(entry->lastname) > 0 || strlen(entry->firstname) > 0) {
50
		add_slashes(name, entry->lastname, sizeof(name), strlen(entry->lastname));
51
		fprintf(f, "N:%s;", name);
52
		add_slashes(name, entry->firstname, sizeof(name), strlen(entry->firstname));
53
		fprintf(f, "%s\n", name);
54
	}
49
	fprintf(f, "TEL;VOICE:%s\n", entry->number);
55
	fprintf(f, "TEL;VOICE:%s\n", entry->number);
50
	fprintf(f, "X_GSM_STORE_AT:%s\n", location);
56
	fprintf(f, "X_GSM_STORE_AT:%s\n", location);
51
	fprintf(f, "X_GSM_CALLERGROUP:%d\n", entry->caller_group);
57
	fprintf(f, "X_GSM_CALLERGROUP:%d\n", entry->caller_group);
(-)gnokii-0.6.14.orig/gnokii/gnokii-phonebook.c (+2 lines)
Lines 172-177 Link Here
172
				break;
172
				break;
173
			default:
173
			default:
174
				fprintf(stdout, _("%d. Name: %s\n"), entry.location, entry.name);
174
				fprintf(stdout, _("%d. Name: %s\n"), entry.location, entry.name);
175
				if (strlen(entry.firstname) > 0) fprintf(stdout, _("Givenname: %s\n"), entry.firstname);
176
				if (strlen(entry.lastname) > 0) fprintf(stdout, _("Surename: %s\n"), entry.lastname);
175
				fprintf(stdout, _("Group: "));
177
				fprintf(stdout, _("Group: "));
176
				switch (entry.caller_group) {
178
				switch (entry.caller_group) {
177
				case GN_PHONEBOOK_GROUP_Family:
179
				case GN_PHONEBOOK_GROUP_Family:
(-)gnokii-0.6.14.orig/include/gnokii/common.h (+4 lines)
Lines 210-215 Link Here
210
	GN_PHONEBOOK_ENTRY_Group      = 0x1e,
210
	GN_PHONEBOOK_ENTRY_Group      = 0x1e,
211
	GN_PHONEBOOK_ENTRY_URL        = 0x2c,
211
	GN_PHONEBOOK_ENTRY_URL        = 0x2c,
212
	GN_PHONEBOOK_ENTRY_RingtoneAdv= 0x37,
212
	GN_PHONEBOOK_ENTRY_RingtoneAdv= 0x37,
213
	GN_PHONEBOOK_ENTRY_Firstname  = 0x46,
214
	GN_PHONEBOOK_ENTRY_Lastname   = 0x47,
213
} gn_phonebook_entry_type;
215
} gn_phonebook_entry_type;
214
216
215
typedef enum {
217
typedef enum {
Lines 237-242 Link Here
237
	int empty;                                       /* Is this entry empty? */
239
	int empty;                                       /* Is this entry empty? */
238
	char name[GN_PHONEBOOK_NAME_MAX_LENGTH + 1];      /* Plus 1 for
240
	char name[GN_PHONEBOOK_NAME_MAX_LENGTH + 1];      /* Plus 1 for
239
							     nullterminator. */
241
							     nullterminator. */
242
	char firstname[GN_PHONEBOOK_NAME_MAX_LENGTH + 1];      
243
	char lastname[GN_PHONEBOOK_NAME_MAX_LENGTH + 1];     
240
	char number[GN_PHONEBOOK_NUMBER_MAX_LENGTH + 1];  /* Number */
244
	char number[GN_PHONEBOOK_NUMBER_MAX_LENGTH + 1];  /* Number */
241
	gn_memory_type memory_type;                       /* Type of memory */
245
	gn_memory_type memory_type;                       /* Type of memory */
242
	int caller_group;          /* Caller group - gn_phonebook_group_type */
246
	int caller_group;          /* Caller group - gn_phonebook_group_type */

Return to bug 9993