Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEarnie Boyd <earnie@users.sf.net>2002-05-28 17:13:45 +0400
committerEarnie Boyd <earnie@users.sf.net>2002-05-28 17:13:45 +0400
commit4ad1e6fedbbdf47ea996f317de13d5cd5c5e206e (patch)
tree7700c41496acb60ac44c5885d954519aa52164cd /winsup/mingw/samples/print
parentad39fa8cb092eb6bb9ba5672f373751c89b1d4ff (diff)
Merging MinGW changes
Diffstat (limited to 'winsup/mingw/samples/print')
-rw-r--r--winsup/mingw/samples/print/jamfile18
-rw-r--r--winsup/mingw/samples/print/prntest.c130
2 files changed, 74 insertions, 74 deletions
diff --git a/winsup/mingw/samples/print/jamfile b/winsup/mingw/samples/print/jamfile
index f5395339d..b77e6d66b 100644
--- a/winsup/mingw/samples/print/jamfile
+++ b/winsup/mingw/samples/print/jamfile
@@ -1,9 +1,9 @@
-#
-# A simple example which prints a message on a selected printer. This won't
-# work right unless you make PRINTDLG a packed structure!
-#
-
-Main prntest.exe : prntest.c ;
-
-Gui prntest.exe ;
-
+#
+# A simple example which prints a message on a selected printer. This won't
+# work right unless you make PRINTDLG a packed structure!
+#
+
+Main prntest.exe : prntest.c ;
+
+Gui prntest.exe ;
+
diff --git a/winsup/mingw/samples/print/prntest.c b/winsup/mingw/samples/print/prntest.c
index 801d1d885..a70e7ed5d 100644
--- a/winsup/mingw/samples/print/prntest.c
+++ b/winsup/mingw/samples/print/prntest.c
@@ -1,65 +1,65 @@
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <windows.h>
-
-main ()
-{
- PRINTDLG pd;
- DOCINFO di;
- char* szMessage;
-
- memset (&pd, 0, sizeof(PRINTDLG));
- memset (&di, 0, sizeof(DOCINFO));
-
- di.cbSize = sizeof(DOCINFO);
- di.lpszDocName = "Test";
-
- pd.lStructSize = sizeof(PRINTDLG);
- pd.Flags = PD_PAGENUMS | PD_RETURNDC;
- pd.nFromPage = 1;
- pd.nToPage = 1;
- pd.nMinPage = 1;
- pd.nMaxPage = 1;
-
- szMessage = 0;
-
- if (PrintDlg (&pd))
- {
- if (pd.hDC)
- {
- if (StartDoc (pd.hDC, &di) != SP_ERROR)
- {
- StartPage (pd.hDC);
-
- TextOut (pd.hDC, 0, 0, "Hello, printer!", 15);
-
- EndPage (pd.hDC);
-
- EndDoc (pd.hDC);
-
- szMessage = "Printed.";
- }
- else
- {
- szMessage = "Could not start document.";
- }
- }
- else
- {
- szMessage = "Could not create device context.";
- }
- }
- else
- {
- szMessage = "Canceled or printer could not be setup.";
- }
-
- if (szMessage)
- {
- MessageBox (NULL, szMessage, "Print Test", MB_OK);
- }
-
- return 0;
-}
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <windows.h>
+
+main ()
+{
+ PRINTDLG pd;
+ DOCINFO di;
+ char* szMessage;
+
+ memset (&pd, 0, sizeof(PRINTDLG));
+ memset (&di, 0, sizeof(DOCINFO));
+
+ di.cbSize = sizeof(DOCINFO);
+ di.lpszDocName = "Test";
+
+ pd.lStructSize = sizeof(PRINTDLG);
+ pd.Flags = PD_PAGENUMS | PD_RETURNDC;
+ pd.nFromPage = 1;
+ pd.nToPage = 1;
+ pd.nMinPage = 1;
+ pd.nMaxPage = 1;
+
+ szMessage = 0;
+
+ if (PrintDlg (&pd))
+ {
+ if (pd.hDC)
+ {
+ if (StartDoc (pd.hDC, &di) != SP_ERROR)
+ {
+ StartPage (pd.hDC);
+
+ TextOut (pd.hDC, 0, 0, "Hello, printer!", 15);
+
+ EndPage (pd.hDC);
+
+ EndDoc (pd.hDC);
+
+ szMessage = "Printed.";
+ }
+ else
+ {
+ szMessage = "Could not start document.";
+ }
+ }
+ else
+ {
+ szMessage = "Could not create device context.";
+ }
+ }
+ else
+ {
+ szMessage = "Canceled or printer could not be setup.";
+ }
+
+ if (szMessage)
+ {
+ MessageBox (NULL, szMessage, "Print Test", MB_OK);
+ }
+
+ return 0;
+}