aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/print_win32.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2009-03-10 17:34:06 +0000
committerBill Meier <wmeier@newsguy.com>2009-03-10 17:34:06 +0000
commit71404bd6557842e8aa5e0da65997d5c3b7a6d191 (patch)
tree2d37c50ed0cee23c1f4a02bcd3156a3caace27a6 /gtk/print_win32.c
parent0b7885e04d17286d373be5a4036916d835ab94a9 (diff)
Replace use of perror; Also: define various fcns as static
svn path=/trunk/; revision=27689
Diffstat (limited to 'gtk/print_win32.c')
-rw-r--r--gtk/print_win32.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gtk/print_win32.c b/gtk/print_win32.c
index bcef8e9633..b82166f482 100644
--- a/gtk/print_win32.c
+++ b/gtk/print_win32.c
@@ -36,8 +36,7 @@
#include <winspool.h>
#include "gtk/print_win32.h"
-#include <wsutil/file_util.h>
-
+#include "wsutil/file_util.h"
/*
Some thoughts about a GTK win32 printer dialog:
@@ -54,10 +53,10 @@ See
for information on printer APIs.
*/
-BOOL CALLBACK abort_proc( HDC hDC, int Error );
-HDC get_printer_dc(void);
-void init_doc_struct( DOCINFO* di, char* docname);
-void print_file( char* file_name, HDC hdc);
+static BOOL CALLBACK abort_proc( HDC hDC, int Error );
+static HDC get_printer_dc(void);
+static void init_doc_struct( DOCINFO* di, char* docname);
+static void print_file( char* file_name, HDC hdc);
void print_mswin(char *file_name)
@@ -80,7 +79,7 @@ void print_mswin(char *file_name)
if( SetAbortProc( hDC, abort_proc ) == SP_ERROR )
{
MessageBox( NULL, "Error setting up AbortProc",
- "Error", MB_APPLMODAL | MB_OK);
+ "Error", MB_APPLMODAL | MB_OK);
return;
}
@@ -103,7 +102,7 @@ void print_mswin(char *file_name)
/*===============================*/
/* Obtain printer device context */
/* ==============================*/
- HDC get_printer_dc(void)
+ static HDC get_printer_dc(void)
{
PRINTDLG pdlg;
@@ -143,7 +142,7 @@ void print_mswin(char *file_name)
/*===============================*/
/* The Abort Procudure */
/* ==============================*/
- BOOL CALLBACK abort_proc( HDC hDC, int Error )
+ static BOOL CALLBACK abort_proc( HDC hDC, int Error )
{
MSG msg;
while( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
@@ -157,7 +156,7 @@ void print_mswin(char *file_name)
/*===============================*/
/* Initialize DOCINFO structure */
/* ==============================*/
- void init_doc_struct( DOCINFO* di, char* docname)
+ static void init_doc_struct( DOCINFO* di, char* docname)
{
/* Always zero it before using it. */
memset( di, 0, sizeof( DOCINFO ) );
@@ -169,7 +168,7 @@ void print_mswin(char *file_name)
/*===============================*/
/* Drawing on the DC */
/* ==============================*/
-void print_file( char *file_name, HDC hdc) {
+static void print_file( char *file_name, HDC hdc) {
#define max_buf_size 1024
#define max_lines 66
@@ -188,7 +187,8 @@ void print_file( char *file_name, HDC hdc) {
fh1 = ws_fopen( file_name, "r" );
if( !fh1 ) {
- perror( "open failed on input file" );
+ MessageBox( NULL, "Open failed on input file",
+ "Error", MB_APPLMODAL | MB_OK);
return;
}