Mercurial > pidgin.yaz
comparison src/main.c @ 5435:a2f26666de42
[gaim-migrate @ 5817]
Phroggie says windows doesn't have a z modifier, so I'm just going to
change size_t to an int, since it really doesn't matter.
I also changed some sprintf's to snprintf's, I'm not really sure why.
Changed a printf to gaim_debug in oscar.c, I don't know how that got
in there. And I applied a patch that adds an optional callback thing
for when a connection is closed. Gaim doesn't use it, but the guy
that submitted the patch said it was useful to him.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 18 May 2003 19:13:21 +0000 |
parents | af62169c74fd |
children | ad445074d239 |
comparison
equal
deleted
inserted
replaced
5434:3034e83c1a49 | 5435:a2f26666de42 |
---|---|
661 /* Robot101: for some reason things like gdm like to block * | 661 /* Robot101: for some reason things like gdm like to block * |
662 * useful signals like SIGCHLD, so we unblock all the ones we * | 662 * useful signals like SIGCHLD, so we unblock all the ones we * |
663 * declare a handler for. thanks JSeymour and Vann. */ | 663 * declare a handler for. thanks JSeymour and Vann. */ |
664 if (sigemptyset(&sigset)) { | 664 if (sigemptyset(&sigset)) { |
665 char errmsg[BUFSIZ]; | 665 char errmsg[BUFSIZ]; |
666 sprintf(errmsg, "Warning: couldn't initialise empty signal set"); | 666 snprintf(errmsg, BUFSIZ, "Warning: couldn't initialise empty signal set"); |
667 perror(errmsg); | 667 perror(errmsg); |
668 } | 668 } |
669 for(sig_indx = 0; catch_sig_list[sig_indx] != -1; ++sig_indx) { | 669 for(sig_indx = 0; catch_sig_list[sig_indx] != -1; ++sig_indx) { |
670 if((prev_sig_disp = signal(catch_sig_list[sig_indx], sighandler)) == SIG_ERR) { | 670 if((prev_sig_disp = signal(catch_sig_list[sig_indx], sighandler)) == SIG_ERR) { |
671 char errmsg[BUFSIZ]; | 671 char errmsg[BUFSIZ]; |
672 sprintf(errmsg, "Warning: couldn't set signal %d for catching", | 672 snprintf(errmsg, BUFSIZ, "Warning: couldn't set signal %d for catching", |
673 catch_sig_list[sig_indx]); | 673 catch_sig_list[sig_indx]); |
674 perror(errmsg); | 674 perror(errmsg); |
675 } | 675 } |
676 if(sigaddset(&sigset, catch_sig_list[sig_indx])) { | 676 if(sigaddset(&sigset, catch_sig_list[sig_indx])) { |
677 char errmsg[BUFSIZ]; | 677 char errmsg[BUFSIZ]; |
678 sprintf(errmsg, "Warning: couldn't include signal %d for unblocking", | 678 snprintf(errmsg, BUFSIZ, "Warning: couldn't include signal %d for unblocking", |
679 catch_sig_list[sig_indx]); | 679 catch_sig_list[sig_indx]); |
680 perror(errmsg); | 680 perror(errmsg); |
681 } | 681 } |
682 } | 682 } |
683 for(sig_indx = 0; ignore_sig_list[sig_indx] != -1; ++sig_indx) { | 683 for(sig_indx = 0; ignore_sig_list[sig_indx] != -1; ++sig_indx) { |
684 if((prev_sig_disp = signal(ignore_sig_list[sig_indx], SIG_IGN)) == SIG_ERR) { | 684 if((prev_sig_disp = signal(ignore_sig_list[sig_indx], SIG_IGN)) == SIG_ERR) { |
685 char errmsg[BUFSIZ]; | 685 char errmsg[BUFSIZ]; |
686 sprintf(errmsg, "Warning: couldn't set signal %d to ignore", | 686 snprintf(errmsg, BUFSIZ, "Warning: couldn't set signal %d to ignore", |
687 ignore_sig_list[sig_indx]); | 687 ignore_sig_list[sig_indx]); |
688 perror(errmsg); | 688 perror(errmsg); |
689 } | 689 } |
690 } | 690 } |
691 | 691 |
692 if (sigprocmask(SIG_UNBLOCK, &sigset, NULL)) { | 692 if (sigprocmask(SIG_UNBLOCK, &sigset, NULL)) { |
693 char errmsg[BUFSIZ]; | 693 char errmsg[BUFSIZ]; |
694 sprintf(errmsg, "Warning: couldn't unblock signals"); | 694 snprintf(errmsg, BUFSIZ, "Warning: couldn't unblock signals"); |
695 perror(errmsg); | 695 perror(errmsg); |
696 } | 696 } |
697 #endif | 697 #endif |
698 | 698 |
699 for (i = 0; i < argc; i++) { | 699 for (i = 0; i < argc; i++) { |