comparison src/protocols/oscar/oscar.c @ 9126:cefe59828f90

[gaim-migrate @ 9903] gcc 2.95 or something doesn't have %z, or something committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 30 May 2004 17:05:21 +0000
parents f13172eed3ad
children e67b8cd33c6c
comparison
equal deleted inserted replaced
9125:668ffb8fec00 9126:cefe59828f90
1203 id = g_datalist_get_data(&attribs, "id"); 1203 id = g_datalist_get_data(&attribs, "id");
1204 1204
1205 /* ... if it refers to a valid gaim image ... */ 1205 /* ... if it refers to a valid gaim image ... */
1206 if (id && (image = gaim_imgstore_get(atoi(id)))) { 1206 if (id && (image = gaim_imgstore_get(atoi(id)))) {
1207 /* ... append the message from start to the tag ... */ 1207 /* ... append the message from start to the tag ... */
1208 size_t size = gaim_imgstore_get_size(image); 1208 unsigned long size = gaim_imgstore_get_size(image);
1209 const char *filename = gaim_imgstore_get_filename(image); 1209 const char *filename = gaim_imgstore_get_filename(image);
1210 gpointer imgdata = gaim_imgstore_get_data(image); 1210 gpointer imgdata = gaim_imgstore_get_data(image);
1211 1211
1212 oscar_id++; 1212 oscar_id++;
1213 1213
1214 /* ... insert a new img tag with the oscar id ... */ 1214 /* ... insert a new img tag with the oscar id ... */
1215 if (filename) 1215 if (filename)
1216 g_string_append_printf(msg, 1216 g_string_append_printf(msg,
1217 "<IMG SRC=\"%s\" ID=\"%d\" DATASIZE=\"%zu\">", 1217 "<IMG SRC=\"%s\" ID=\"%d\" DATASIZE=\"%lu\">",
1218 filename, oscar_id, size); 1218 filename, oscar_id, size);
1219 else 1219 else
1220 g_string_append_printf(msg, 1220 g_string_append_printf(msg,
1221 "<IMG ID=\"%d\" DATASIZE=\"%zu\">", 1221 "<IMG ID=\"%d\" DATASIZE=\"%lu\">",
1222 oscar_id, size); 1222 oscar_id, size);
1223 1223
1224 /* ... and append the data to the binary section ... */ 1224 /* ... and append the data to the binary section ... */
1225 g_string_append_printf(data, "<DATA ID=\"%d\" SIZE=\"%zu\">", 1225 g_string_append_printf(data, "<DATA ID=\"%d\" SIZE=\"%lu\">",
1226 oscar_id, size); 1226 oscar_id, size);
1227 data = g_string_append_len(data, imgdata, size); 1227 data = g_string_append_len(data, imgdata, size);
1228 data = g_string_append(data, "</DATA>"); 1228 data = g_string_append(data, "</DATA>");
1229 } 1229 }
1230 /* If the tag is invalid, skip it, thus no else here */ 1230 /* If the tag is invalid, skip it, thus no else here */