diff options
author | Camil Staps | 2015-08-12 13:59:08 +0200 |
---|---|---|
committer | Camil Staps | 2015-08-12 13:59:08 +0200 |
commit | b5e3f8cb0a19ec0672cd27c8df0f3393643aaf42 (patch) | |
tree | 245b461bf015353b41d3df72cfd1868e110d5d23 /Linux_C_12/cCrossCallPrinter_121.c | |
parent | Fixed crashes with windows (diff) |
Get rid of all the tabs. So annoying.
Diffstat (limited to 'Linux_C_12/cCrossCallPrinter_121.c')
-rw-r--r-- | Linux_C_12/cCrossCallPrinter_121.c | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/Linux_C_12/cCrossCallPrinter_121.c b/Linux_C_12/cCrossCallPrinter_121.c index 593d736..c015036 100644 --- a/Linux_C_12/cCrossCallPrinter_121.c +++ b/Linux_C_12/cCrossCallPrinter_121.c @@ -1,12 +1,12 @@ /********************************************************************************************
- Clean OS Windows library module version 1.2.1.
- This module is part of the Clean Object I/O library, version 1.2.1,
- for the Windows platform.
+ Clean OS Windows library module version 1.2.1.
+ This module is part of the Clean Object I/O library, version 1.2.1,
+ for the Windows platform.
********************************************************************************************/
/********************************************************************************************
- About this module:
- Routines related to printer handling.
+ About this module:
+ Routines related to printer handling.
********************************************************************************************/
#include "cCrossCallPrinter_121.h"
@@ -22,77 +22,77 @@ extern HWND hwndText; /* MW: hwndText is the handle of the page count text in /* Cross call procedure implementations.
- Eval<nr> corresponds with a CrossCallEntry generated by NewCrossCallEntry (nr,Eval<nr>).
+ Eval<nr> corresponds with a CrossCallEntry generated by NewCrossCallEntry (nr,Eval<nr>).
*/
void EvalCcRqDO_PRINT_SETUP (CrossCallInfo *pcci)
{ int ok;
- PRINTDLG *pdPtr;
- printSetup(0, pcci->p1,
- (char*) pcci->p2, (char*) pcci->p3, (char*) pcci->p4, (char*) pcci->p5,
- &ok, &pdPtr);
- MakeReturn2Cci (pcci, ok, (int) pdPtr);
+ PRINTDLG *pdPtr;
+ printSetup(0, pcci->p1,
+ (char*) pcci->p2, (char*) pcci->p3, (char*) pcci->p4, (char*) pcci->p5,
+ &ok, &pdPtr);
+ MakeReturn2Cci (pcci, ok, (int) pdPtr);
}
void EvalCcRqGET_PRINTER_DC (CrossCallInfo *pcci)
{ int doDialog,emulateScreenRes,
- err,first,last,copies,pPrintDlg,deviceContext;
+ err,first,last,copies,pPrintDlg,deviceContext;
- // unpack doDialog and emulateScreenRes
- doDialog = (pcci->p1) & 1;
- emulateScreenRes = (pcci->p1) & 2;
+ // unpack doDialog and emulateScreenRes
+ doDialog = (pcci->p1) & 1;
+ emulateScreenRes = (pcci->p1) & 2;
- getDC( doDialog,emulateScreenRes,FALSE,pcci->p2,
- (char*) pcci->p3,(char*) pcci->p4,(char*) pcci->p5,(char*) pcci->p6,
- &err,&first,&last,&copies,(PRINTDLG**)&pPrintDlg,&deviceContext);
- MakeReturn6Cci (pcci,err,first,last,copies,pPrintDlg,deviceContext);
+ getDC( doDialog,emulateScreenRes,FALSE,pcci->p2,
+ (char*) pcci->p3,(char*) pcci->p4,(char*) pcci->p5,(char*) pcci->p6,
+ &err,&first,&last,&copies,(PRINTDLG**)&pPrintDlg,&deviceContext);
+ MakeReturn6Cci (pcci,err,first,last,copies,pPrintDlg,deviceContext);
}
void EvalCcRqSTARTDOC (CrossCallInfo *pcci)
{
- HDC hdc = (HDC) pcci->p1;
- int err;
-
- EnableWindow (ghMainWindow, FALSE) ;
- hDlgPrint = CreateCancelDialog ();
- SetAbortProc (hdc, AbortProc) ;
- err = startDoc((int) hdc);
- if (err<=0 && ghMainWindow!=NULL && !bUserAbort)
- {
- EnableWindow (ghMainWindow, TRUE) ;
- DestroyWindow (hDlgPrint) ;
- };
- MakeReturn1Cci (pcci,err);
+ HDC hdc = (HDC) pcci->p1;
+ int err;
+
+ EnableWindow (ghMainWindow, FALSE) ;
+ hDlgPrint = CreateCancelDialog ();
+ SetAbortProc (hdc, AbortProc) ;
+ err = startDoc((int) hdc);
+ if (err<=0 && ghMainWindow!=NULL && !bUserAbort)
+ {
+ EnableWindow (ghMainWindow, TRUE) ;
+ DestroyWindow (hDlgPrint) ;
+ };
+ MakeReturn1Cci (pcci,err);
}
void EvalCcRqENDDOC (CrossCallInfo *pcci)
{
- HDC hdc = (HDC) pcci->p1;
-
- endDoc((int) hdc);
- if (ghMainWindow!=NULL && !bUserAbort)
- {
- EnableWindow (ghMainWindow, TRUE) ;
- DestroyWindow (hDlgPrint) ;
- };
- MakeReturn0Cci (pcci);
+ HDC hdc = (HDC) pcci->p1;
+
+ endDoc((int) hdc);
+ if (ghMainWindow!=NULL && !bUserAbort)
+ {
+ EnableWindow (ghMainWindow, TRUE) ;
+ DestroyWindow (hDlgPrint) ;
+ };
+ MakeReturn0Cci (pcci);
}
void EvalCcRqDISPATCH_MESSAGES_WHILE_PRINTING (CrossCallInfo *pcci)
{
- MSG msg ;
- char *pageMessage= (char *) (pcci->p1);
-
- SetWindowText(hwndText,pageMessage);
-
- while (!bUserAbort && PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
- {
- if (!hDlgPrint || !IsDialogMessage (hDlgPrint, &msg))
- {
- TranslateMessage (&msg) ;
- DispatchMessage (&msg) ;
- }
- }
- MakeReturn0Cci (pcci);
+ MSG msg ;
+ char *pageMessage= (char *) (pcci->p1);
+
+ SetWindowText(hwndText,pageMessage);
+
+ while (!bUserAbort && PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
+ {
+ if (!hDlgPrint || !IsDialogMessage (hDlgPrint, &msg))
+ {
+ TranslateMessage (&msg) ;
+ DispatchMessage (&msg) ;
+ }
+ }
+ MakeReturn0Cci (pcci);
}
@@ -100,15 +100,15 @@ void EvalCcRqDISPATCH_MESSAGES_WHILE_PRINTING (CrossCallInfo *pcci) */
void InstallCrossCallPrinter ()
{
- CrossCallProcedureTable newTable;
-
- newTable = EmptyCrossCallProcedureTable ();
- AddCrossCallEntry (newTable, CcRqDO_PRINT_SETUP, EvalCcRqDO_PRINT_SETUP);
- AddCrossCallEntry (newTable, CcRqGET_PRINTER_DC, EvalCcRqGET_PRINTER_DC);
- AddCrossCallEntry (newTable, CcRqSTARTDOC, EvalCcRqSTARTDOC);
- AddCrossCallEntry (newTable, CcRqENDDOC, EvalCcRqENDDOC);
- AddCrossCallEntry (newTable, CcRqDISPATCH_MESSAGES_WHILE_PRINTING, EvalCcRqDISPATCH_MESSAGES_WHILE_PRINTING);
- AddCrossCallEntries (gCrossCallProcedureTable, newTable);
+ CrossCallProcedureTable newTable;
+
+ newTable = EmptyCrossCallProcedureTable ();
+ AddCrossCallEntry (newTable, CcRqDO_PRINT_SETUP, EvalCcRqDO_PRINT_SETUP);
+ AddCrossCallEntry (newTable, CcRqGET_PRINTER_DC, EvalCcRqGET_PRINTER_DC);
+ AddCrossCallEntry (newTable, CcRqSTARTDOC, EvalCcRqSTARTDOC);
+ AddCrossCallEntry (newTable, CcRqENDDOC, EvalCcRqENDDOC);
+ AddCrossCallEntry (newTable, CcRqDISPATCH_MESSAGES_WHILE_PRINTING, EvalCcRqDISPATCH_MESSAGES_WHILE_PRINTING);
+ AddCrossCallEntries (gCrossCallProcedureTable, newTable);
}
#else
|