comparison src/print.c @ 673:fbebf5cf4a55

Do not use printf() directly but use new wrapper function log_printf() instead.
author zas_
date Fri, 16 May 2008 12:16:49 +0000
parents 8268cbe682f1
children cca86176bf81
comparison
equal deleted inserted replaced
672:913eb0ba99a6 673:fbebf5cf4a55
965 struct sigaction new_action; 965 struct sigaction new_action;
966 PipeError *pe; 966 PipeError *pe;
967 967
968 if (pipe_handler_data) 968 if (pipe_handler_data)
969 { 969 {
970 printf("warning SIGPIPE handler already in use\n"); 970 log_printf("warning SIGPIPE handler already in use\n");
971 return NULL; 971 return NULL;
972 } 972 }
973 973
974 pe = g_new0(PipeError, 1); 974 pe = g_new0(PipeError, 1);
975 975
988 } 988 }
989 989
990 static void pipe_handler_free(PipeError *pe) 990 static void pipe_handler_free(PipeError *pe)
991 { 991 {
992 if (!pe) return; 992 if (!pe) return;
993 if (pe != pipe_handler_data) printf("warning SIGPIPE handler not closing same data\n"); 993 if (pe != pipe_handler_data) log_printf("warning SIGPIPE handler not closing same data\n");
994 994
995 /* restore the original signal handler */ 995 /* restore the original signal handler */
996 sigaction(SIGPIPE, &pe->old_action, NULL); 996 sigaction(SIGPIPE, &pe->old_action, NULL);
997 997
998 pipe_handler_data = NULL; 998 pipe_handler_data = NULL;
1620 1620
1621 if (!warned) 1621 if (!warned)
1622 { 1622 {
1623 if (dpi == 0.0) 1623 if (dpi == 0.0)
1624 { 1624 {
1625 printf("pango dpi unknown, assuming %.0f\n", fallback_dpi); 1625 log_printf("pango dpi unknown, assuming %.0f\n", fallback_dpi);
1626 } 1626 }
1627 else 1627 else
1628 { 1628 {
1629 printf("pango dpi reported as %.0f ignored, assuming %.0f\n", dpi, fallback_dpi); 1629 log_printf("pango dpi reported as %.0f ignored, assuming %.0f\n", dpi, fallback_dpi);
1630 } 1630 }
1631 warned = TRUE; 1631 warned = TRUE;
1632 } 1632 }
1633 1633
1634 dpi = fallback_dpi; 1634 dpi = fallback_dpi;