Mercurial > pidgin
comparison src/conversation.c @ 4201:511c2b63caa4
[gaim-migrate @ 4432]
Some code cleanups to remove warnings and fix up indenting a little.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Sat, 04 Jan 2003 21:01:32 +0000 |
| parents | af2eeb7f7cf8 |
| children | da30c4977c43 |
comparison
equal
deleted
inserted
replaced
| 4200:c8fb43808a4b | 4201:511c2b63caa4 |
|---|---|
| 1201 char *filename; | 1201 char *filename; |
| 1202 struct stat st; | 1202 struct stat st; |
| 1203 char imgtag[1024]; | 1203 char imgtag[1024]; |
| 1204 | 1204 |
| 1205 if (stat(tmplist->data, &st) != 0) { | 1205 if (stat(tmplist->data, &st) != 0) { |
| 1206 debug_printf("Could not stat %s\n", tmplist->data); | 1206 debug_printf("Could not stat %s\n", (char *)tmplist->data); |
| 1207 tmplist = tmplist->next; | 1207 tmplist = tmplist->next; |
| 1208 continue; | 1208 continue; |
| 1209 } | 1209 } |
| 1210 | 1210 |
| 1211 /* Here we check to make sure the user still wants to send the | 1211 /* Here we check to make sure the user still wants to send the |
| 1217 g_snprintf(imgtag, sizeof(imgtag), | 1217 g_snprintf(imgtag, sizeof(imgtag), |
| 1218 "<IMG SRC=\"file://%s\" ID=\"%d\" DATASIZE=\"%d\">", | 1218 "<IMG SRC=\"file://%s\" ID=\"%d\" DATASIZE=\"%d\">", |
| 1219 filename, id, (int)st.st_size); | 1219 filename, id, (int)st.st_size); |
| 1220 | 1220 |
| 1221 if (strstr(buffy, imgtag) == 0) { | 1221 if (strstr(buffy, imgtag) == 0) { |
| 1222 debug_printf("Not sending image: %s\n", tmplist->data); | 1222 debug_printf("Not sending image: %s\n", (char *)tmplist->data); |
| 1223 tmplist = tmplist->next; | 1223 tmplist = tmplist->next; |
| 1224 continue; | 1224 continue; |
| 1225 } | 1225 } |
| 1226 if (!binary) { | 1226 if (!binary) { |
| 1227 length = strlen(buffy) + strlen("<BINARY></BINARY>"); | 1227 length = strlen(buffy) + strlen("<BINARY></BINARY>"); |
| 1236 id, (int)st.st_size); | 1236 id, (int)st.st_size); |
| 1237 | 1237 |
| 1238 length = length + strlen(imgtag) + st.st_size + strlen("</DATA>");; | 1238 length = length + strlen(imgtag) + st.st_size + strlen("</DATA>");; |
| 1239 bigbuf = g_realloc(bigbuf, length + 1); | 1239 bigbuf = g_realloc(bigbuf, length + 1); |
| 1240 if (!(imgfile = fopen(tmplist->data, "r"))) { | 1240 if (!(imgfile = fopen(tmplist->data, "r"))) { |
| 1241 debug_printf("Could not open %s\n", tmplist->data); | 1241 debug_printf("Could not open %s\n", (char *)tmplist->data); |
| 1242 tmplist = tmplist->next; | 1242 tmplist = tmplist->next; |
| 1243 continue; | 1243 continue; |
| 1244 } | 1244 } |
| 1245 g_snprintf(bigbuf + offset, strlen(imgtag) + 1, "%s", imgtag); | 1245 g_snprintf(bigbuf + offset, strlen(imgtag) + 1, "%s", imgtag); |
| 1246 offset = offset + strlen(imgtag); | 1246 offset = offset + strlen(imgtag); |
