Mercurial > pidgin.yaz
comparison src/rvous.c @ 1162:37257f175ed8
[gaim-migrate @ 1172]
why am i committing this? i haven't tested this yet. oh please don't hit :wq
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 28 Nov 2000 16:11:12 +0000 |
parents | c61f9c384413 |
children | 728a90516211 |
comparison
equal
deleted
inserted
replaced
1161:984cbc219724 | 1162:37257f175ed8 |
---|---|
528 char *file = g_strdup(gtk_file_selection_get_filename(GTK_FILE_SELECTION(ft->window))); | 528 char *file = g_strdup(gtk_file_selection_get_filename(GTK_FILE_SELECTION(ft->window))); |
529 char buf[BUF_LONG]; | 529 char buf[BUF_LONG]; |
530 char *buf2; | 530 char *buf2; |
531 char tmp_buf[MSG_LEN]; | 531 char tmp_buf[MSG_LEN]; |
532 int read_rv; | 532 int read_rv; |
533 int at; | |
533 struct file_header fhdr; | 534 struct file_header fhdr; |
534 guint32 rcv = 0; | 535 guint32 rcv = 0; |
535 char *c; | 536 char *c; |
536 struct stat st; | 537 struct stat st; |
537 struct tm *fortime; | 538 struct tm *fortime; |
641 /* mm/dd/yyyy hh:mm sizesize name.ext\r\n */ | 642 /* mm/dd/yyyy hh:mm sizesize name.ext\r\n */ |
642 /* creation date ^ */ | 643 /* creation date ^ */ |
643 sprintf(debug_buff, "Sending file\n"); | 644 sprintf(debug_buff, "Sending file\n"); |
644 debug_print(debug_buff); | 645 debug_print(debug_buff); |
645 fortime = localtime(&st.st_ctime); | 646 fortime = localtime(&st.st_ctime); |
646 snprintf(buf, ntohl(fhdr.size) + 1, "%2d/%2d/%4d %2d:%2d %8ld %s\r\n", | 647 at = g_snprintf(buf, ntohl(fhdr.size) + 1, "%2d/%2d/%4d %2d:%2d %8ld ", |
647 fortime->tm_mon + 1, fortime->tm_mday, fortime->tm_year + 1900, | 648 fortime->tm_mon + 1, fortime->tm_mday, fortime->tm_year + 1900, |
648 fortime->tm_hour + 1, fortime->tm_min + 1, | 649 fortime->tm_hour + 1, fortime->tm_min + 1, |
649 st.st_size, c); | 650 st.st_size); |
651 g_snprintf(buf + at, ntohl(fhdr.size) + 1 - at, "%s\r\n", c); | |
650 sprintf(debug_buff, "Sending listing.txt (%d bytes) to %s\n", | 652 sprintf(debug_buff, "Sending listing.txt (%d bytes) to %s\n", |
651 ntohl(fhdr.size) + 1, ft->user); | 653 ntohl(fhdr.size) + 1, ft->user); |
652 debug_print(debug_buff); | 654 debug_print(debug_buff); |
653 | 655 |
654 read_rv = write(ft->fd, buf, ntohl(fhdr.size)); | 656 read_rv = write(ft->fd, buf, ntohl(fhdr.size)); |