comparison src/util.c @ 3802:9bcb42faccc0

[gaim-migrate @ 3945] Rewrote show_im_dialog and show_info_dialog. Ported to gtkspell2. Gtkspell2 is a library available from gtkspell.sf.net. It requires the pspell library. If you want the "highlight misspelled words" feature to work, you must have this library installed. If installed, configure will detect it and link against it. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sat, 26 Oct 2002 06:41:13 +0000
parents 12b29552f1d7
children b7a6aa99ee7c
comparison
equal deleted inserted replaced
3801:8cc3d7526043 3802:9bcb42faccc0
43 #include <iconv.h> 43 #include <iconv.h>
44 #endif 44 #endif
45 #include <math.h> 45 #include <math.h>
46 #include "gaim.h" 46 #include "gaim.h"
47 #include "prpl.h" 47 #include "prpl.h"
48 #include "gtkspell.h"
49 48
50 #ifdef _WIN32 49 #ifdef _WIN32
51 #include "win32dep.h" 50 #include "win32dep.h"
52 #endif 51 #endif
53 52
639 static char date[80]; 638 static char date[80];
640 time_t tme; 639 time_t tme;
641 time(&tme); 640 time(&tme);
642 strftime(date, sizeof(date), "%H:%M:%S", localtime(&tme)); 641 strftime(date, sizeof(date), "%H:%M:%S", localtime(&tme));
643 return date; 642 return date;
644 }
645
646
647 void clean_pid(void)
648 {
649 #ifndef _WIN32
650 int status;
651 pid_t pid, spell_pid;
652
653 while((pid = waitpid(-1, &status, WNOHANG)) > 0) {
654 if((spell_pid = gtkspell_running()) != 0 && pid == spell_pid) {
655 gtkspell_notrunning();
656 }
657 }
658 if(pid < 0 && errno != ECHILD) {
659 char errmsg[BUFSIZ];
660 sprintf(errmsg, "Warning: waitpid() returned %d", pid);
661 perror(errmsg);
662 }
663 #endif
664 } 643 }
665 644
666 struct aim_user *find_user(const char *name, int protocol) 645 struct aim_user *find_user(const char *name, int protocol)
667 { 646 {
668 char *who = g_strdup(normalize(name)); 647 char *who = g_strdup(normalize(name));