Mercurial > pidgin
comparison src/rvous.c @ 411:a330017b3aa4
[gaim-migrate @ 421]
Trying to make things compile cleanly
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 15 Jun 2000 05:27:25 +0000 |
parents | fd3cc0a28d5d |
children | f03f041c1aa9 |
comparison
equal
deleted
inserted
replaced
410:9e8c02ed5d06 | 411:a330017b3aa4 |
---|---|
210 char buf[BUF_LONG]; | 210 char buf[BUF_LONG]; |
211 char *buf2; | 211 char *buf2; |
212 struct file_header header; | 212 struct file_header header; |
213 int read_rv; | 213 int read_rv; |
214 guint32 rcv; | 214 guint32 rcv; |
215 char *c; | |
216 int cont = 1; | 215 int cont = 1; |
217 GtkWidget *fw = NULL, *fbar = NULL, *label = NULL; | 216 GtkWidget *fw = NULL, *fbar = NULL, *label = NULL; |
218 GtkWidget *button = NULL, *pct = NULL; | 217 GtkWidget *button = NULL, *pct = NULL; |
219 | 218 |
220 if (!(ft->f = fopen(file,"w"))) { | 219 if (!(ft->f = fopen(file,"w"))) { |
419 gtk_window_set_title(GTK_WINDOW(fw), _("Gaim - File Transfer")); | 418 gtk_window_set_title(GTK_WINDOW(fw), _("Gaim - File Transfer")); |
420 gtk_widget_realize(fw); | 419 gtk_widget_realize(fw); |
421 aol_icon(fw->window); | 420 aol_icon(fw->window); |
422 gtk_widget_show(fw); | 421 gtk_widget_show(fw); |
423 | 422 |
424 sprintf(debug_buff, "Sending %s to %s (%d bytes)\n", fhdr.name, | 423 sprintf(debug_buff, "Sending %s to %s (%ld bytes)\n", fhdr.name, |
425 ft->user, fhdr.totsize); | 424 ft->user, fhdr.totsize); |
426 debug_print(debug_buff); | 425 debug_print(debug_buff); |
427 | 426 |
428 rcv = 0; cont = 1; | 427 rcv = 0; cont = 1; |
429 while (rcv != ntohl(fhdr.totsize) && cont) { | 428 while (rcv != ntohl(fhdr.totsize) && cont) { |
476 char *file = g_strdup(gtk_file_selection_get_filename(GTK_FILE_SELECTION(ft->window))); | 475 char *file = g_strdup(gtk_file_selection_get_filename(GTK_FILE_SELECTION(ft->window))); |
477 char buf[BUF_LONG]; | 476 char buf[BUF_LONG]; |
478 char *buf2; | 477 char *buf2; |
479 int read_rv; | 478 int read_rv; |
480 struct file_header fhdr; | 479 struct file_header fhdr; |
481 struct sockaddr_in sin; | 480 guint32 rcv = 0; |
482 guint32 rcv; | |
483 int cont; | |
484 char *c; | 481 char *c; |
485 struct stat st; | 482 struct stat st; |
486 struct tm *fortime; | 483 struct tm *fortime; |
487 | 484 |
488 stat(file, &st); | 485 stat(file, &st); |
588 fortime = localtime(&st.st_ctime); | 585 fortime = localtime(&st.st_ctime); |
589 snprintf(buf, ntohl(fhdr.size) + 1, "%2d/%2d/%4d %2d:%2d %8ld %s\r\n", | 586 snprintf(buf, ntohl(fhdr.size) + 1, "%2d/%2d/%4d %2d:%2d %8ld %s\r\n", |
590 fortime->tm_mon + 1, fortime->tm_mday, fortime->tm_year + 1900, | 587 fortime->tm_mon + 1, fortime->tm_mday, fortime->tm_year + 1900, |
591 fortime->tm_hour + 1, fortime->tm_min + 1, | 588 fortime->tm_hour + 1, fortime->tm_min + 1, |
592 st.st_size, c); | 589 st.st_size, c); |
593 sprintf(debug_buff, "Sending listing.txt (%ld bytes) to %s\n", | 590 sprintf(debug_buff, "Sending listing.txt (%d bytes) to %s\n", |
594 ntohl(fhdr.size) + 1, ft->user); | 591 ntohl(fhdr.size) + 1, ft->user); |
595 debug_print(debug_buff); | 592 debug_print(debug_buff); |
596 | 593 |
597 read_rv = write(ft->fd, buf, ntohl(fhdr.size)); | 594 read_rv = write(ft->fd, buf, ntohl(fhdr.size)); |
598 if (read_rv <= -1) { | 595 if (read_rv <= -1) { |