Jump to content

Printer Device Driver Reference for OS/2: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
By [[IBM]]
{{PrintDDRef}}
{{IBM-Reprint}}
===EDM/2 preamble===
This is the ''Printer Device Driver Reference for OS/2'' as last published by IBM in 1998. It is republished here with explicit permission from the company (Copyright Permission #21953) and you should keep in mind that it is an intellectual property of International Business Machines Corp. that cannot be changed or reused without their permission and is not governed by the [[Attribution-Share Alike 3.0]] licence like the rest of the EDM/2 Wiki.


=== About This Book ===
The content of the documentation is unchanged apart from the following:
* The original document was an INF file split into thousands of different small sections, these have been consolidated into chapters, and restructured to fit [[HTML]] formatting, mimicking the original [[GML]] format as much as possible.
* Sales, technical help, download and contact information has been removed. The PDDR/2 and the related SDK's are no longer for sale, nor is support available from IBM. Some of the INF viewer related help has been removed as well as it is superfluous after the format change and might be misleading, and the Glossary and Notices section was merged with other DDK/SDK glossary sections as they are all identical.
* Miniscule changes have been made to the text, spelling errors, formatting errors and possible copy and paste errors have been fixed and/or noted.
 
Outside of formatting changes, adding Wikilinks and graphic improvements, the document shall be left as it is. It should be noted that the some of the driver models and data formats described in the documentation are have been replaced or extended by both IBM and third parties, but that does not mean that this document should be changed, but it is acceptable that a link is created to an internal or external article that explains the newer models and formats.
 
==About This Book==
The ''Printer Device Driver Reference for OS/2'' describes the printer and plotter presentation drivers as well as test tools that correspond to the source code that is supplied with the IBM Developer Connection Device Driver Kit for OS/2.
The ''Printer Device Driver Reference for OS/2'' describes the printer and plotter presentation drivers as well as test tools that correspond to the source code that is supplied with the IBM Developer Connection Device Driver Kit for OS/2.


This reference also provides a roadmap to the drivers and briefly describes their functions and modules. It is intended to be used in conjunction with the ''Presentation Driver Reference''. For additional information about graphics-engine functions and presentation drivers, see the ''Presentation Driver Reference''.
This reference also provides a roadmap to the drivers and briefly describes their functions and modules. It is intended to be used in conjunction with the ''Presentation Driver Reference''. For additional information about graphics-engine functions and presentation drivers, see the ''Presentation Driver Reference''.


Programmers can use the information found in this book to create printer drivers and tests as well as to test their drivers. Knowledge of C and Assembler programming languages is necessary. The programmer must be familiar with the the OS/2 operating system, the Presentation Manager interface, and 80X86 architecture. The programming concepts that should be understood before developing applications to run on the OS/2 system can be found in the ''Application Design Guide''.
Programmers can use the information found in this book to create printer drivers and tests as well as to test their drivers. Knowledge of C and Assembler programming languages is necessary. The programmer must be familiar with the OS/2 operating system, the Presentation Manager interface, and 80X86 architecture. The programming concepts that should be understood before developing applications to run on the OS/2 system can be found in the ''Application Design Guide''.


=== How This Book is Organized ===
===How This Book is Organized===
*[[Generic Printer Library]], describes a set of subroutine packages that can be used in the development of 32-bit hardcopy presentation drivers.
*[[Generic Printer Library]], describes a set of subroutine packages that can be used in the development of 32-bit hardcopy presentation drivers.


Line 22: Line 32:


*[[Font Test 32-Bit Printing Utility]], describes Font Test.
*[[Font Test 32-Bit Printing Utility]], describes Font Test.
 
:Font Test is a 32-bit Presentation Manager application that allows users to browse through and print text files as well as to query presentation drivers for device, font, and hardcopy information. Font Test is very useful for testing presentation drivers. All the functions used by Font Test are listed and described, and a description of how to add a test to Font Test is included.
Font Test is a 32-bit Presentation Manager application that allows users to browse through and print text files as well as to query presentation drivers for device, font, and hardcopy information. Font Test is very useful for testing presentation drivers. All the functions used by Font Test are listed and described, and a description of how to add a test to Font Test is included.


*[[Printer Test Tool (PTT)]], describes the Printer Test Tool (PTT) and how to run test cases. It also contains information about PTT commands and PTT command-line options. The PTT's tests are detailed, and the GPI functions called by the tests in the PTT are listed with any necessary configuration settings.
*[[Printer Test Tool (PTT)]], describes the Printer Test Tool (PTT) and how to run test cases. It also contains information about PTT commands and PTT command-line options. The PTT's tests are detailed, and the GPI functions called by the tests in the PTT are listed with any necessary configuration settings.
Line 30: Line 39:
*The ''[[IBM SDK/DDK Glossary|Glossary]]'' defines terms commonly used in the IBM Device Driver Source Kit for OS/2.
*The ''[[IBM SDK/DDK Glossary|Glossary]]'' defines terms commonly used in the IBM Device Driver Source Kit for OS/2.


=== What's New ===
==OS/2 Version Compatibility Considerations==
The following update has been added to this release of the ''Printer Device Driver Reference for OS/2'':
 
A new section, [[Sample Bidirectional Parallel Port Driver]] which describes the code/functions associated with the port driver.
 
For information on items discussed in this reference that have been added to OS/2 (beginning with Warp) and their compatibility with different versions of OS/2, see [[OS/2 Version Compatibility Considerations]].
 
=== Assistance ===
Technical support for device driver development is provided by the IBM Driver Development Support Center (DDSC) through a bulletin board system (BBS). You are encouraged to use the DDSC to obtain support by sending in your questions and reviewing the question and answer database which can be downloaded for off-line review.
 
To access the DDSC BBS, dial 512-838-9717 (using a modem) to register and access the support system. For voice support in the United States, call 512 -838-9493.
 
Additional assistance is available through the IBM Solution Developer Program. For membership information:
:Internet: ibmsdp@vnet.ibm.com
:US/Canada: 800-627-8363
:International: 770-835-9902
:International Fax: 770-835-9444
 
=== Ordering Information ===
In addition to the actual tools and source code available on The IBM Developer Connection Device Driver Kit for OS/2, it CD-ROM also includes the following DDK reference books in online format.
 
*The Physical Device Driver Reference
*The Storage Device Driver Reference
*The Input/Output Device Driver Reference
*The Pen for OS/2 Device Driver Reference
*The Virtual Device Driver Reference
*The Presentation Device Driver Reference
*The Display Device Driver Reference
*The Printer Device Driver Reference
*The Graphics Adapter Device Driver Reference
*The MMPM/2 Device Driver Reference (Multimedia)
 
To order the DDK call:
<pre class="western">/----------------------------------------------------------------\
|U.S.A.:            |1-800-633-8266      |                    |
|--------------------+---------------------+---------------------|
|Canada:            |1-800-561-5293      |                    |
|--------------------+---------------------+---------------------|
|When calling from  |* English            |(+45) 48101500      |
|Europe, the Middle  |* French            |(+45) 48101200      |
|East, or Africa, the|* Italian            |(+45) 48101600      |
|number depends on  |* German            |(+45) 48101000      |
|the language you use|* Spanish            |(+45) 48101100      |
|to place the order: |* Dutch              |(+45) 48101400      |
|                    |* Danish            |(+45) 48101300      |
|                    |* Finish            |(+45) 48101650      |
|                    |* Swedish            |(+45) 48101150      |
|                    |* Norwegian          |(+45) 48101250      |
|                    |* FAX                |(+45) 48142207      |
|--------------------+---------------------+---------------------|
|When ordering from  |* Bolivia            |    02-35 1840      |
|Latin America or    |* Columbia          |  01-257-0111      |
|South America, the  |* Dominican Republic |      566-5161      |
|number depends on  |* El Salvador        |    02-98 5011      |
|the country from    |* Honduras          |      32-2319      |
|which you are      |* Paraguay          |  021-444 094      |
|calling:            |* Urugruay          |    02-923 617      |
|                    |* Chile              |  02-633-4400      |
|                    |* Costa Rica        |      223-6222      |
|                    |* Ecuador            |    02-56 5100      |
|                    |* Guatemala          |    02-31 5859      |
|                    |* Panama            |    02-639 977      |
|                    |* Peru              |  014-36 6345      |
|                    |* Venezuela          |  02-908-8901      |
|                    |* Argentina          |  01-313-0014      |
|--------------------+---------------------+---------------------|
|To order from Asia/ |* All except Japan  |(61) 2-354-7684      |
|Pacific:            |* Japan              |(81) 3-3495-2045(Fax)|
|                    |                    |Fax request to:      |
|                    |                    |DAP-J, IBM Japan    |
|--------------------+---------------------+---------------------|
|To order from SE    |(021) 800-6120(Voice)|                    |
|Brazil:            |(021) 800-6936(Fax)  |                    |
|--------------------+---------------------+---------------------|
|To order from      |* Mexico City        |627-2444            |
|Mexico:            |* Country            |91-800-00639        |
\----------------------------------------------------------------/</pre>
 
=== Generic Printer Library ===
The Generic Printer Library (GenPLib) is a set of subroutine components that can be used in the development of 32-bit hardcopy presentation drivers.
 
Presentation-driver developers often write similar sets of code to implement functions commonly required by hardcopy devices. Heap creation, output buffering, and banding raster data are examples. The GenPLib simplifies development and decreases the development time of 32-bit OS/2 printer presentation drivers because it provides these necessary functional components.
 
The GenPLib consists of function packages that implement some of the more difficult code that is needed to create a printer driver. The library format is a way to realize software reuse so that other developers can benefit from code that can be made completely independent of any driver.
 
GenPLib appears in the IBM Developer Connection Device Driver Kit for OS/2 (DDK) as a static library that is linked to OS/2 driver code. The GenPLib code is still in its early versions; updates to the functions and header files can occur with each release of the DDK. Eventually, the GenPLib may become a system DLL; but for now, you can use any static version of GenPLib . By convention, all functions exported from GenPLib begin with the ''Gpl'' prefix.
 
Because of the design of the modules of the GenPLib, some functions can also be used for development in areas other than OS/2 printer drivers.
 
Following are some reasons to use the GenPLib:
 
*Allows developers to quickly, easily, and incrementally add function packages to their printer drivers.
*Written in portable C source code that can be recompiled for other processors.
*Provides 32-bit functions for new 32-bit operating-system environments, such as OS/2 2.0+SP and up-including OS/2 Warp.
*Available in Intel, PowerPC, debug, and non-debug versions. The current 16 -bit drivers cannot run in these environments.
*Provides a single, consistent source code for common functions.
*Packages are designed using data abstraction.
*Makes printer presentation-driver code more readable and maintainable.
*Produces extensive debugging and logging information for developers and service personnel.
*Implemented with the newest, most appropriate OS/2 system APIs, tailored to the underlying hardware and operating system version on which it is running (that is, system memory, paging behavior, CPU detection, etc.).
 
'''Note:''' The GenPLib has no 16-bit routines.
 
=== GenPLib Functional Packages ===
The GenPLib currently contains the following function packages:
 
[[Error Assertion]] Provides a consistent way of checking for errors in driver code and reporting and logging useful information for developers and field support.
 
[[Banding]] Simplifies the use of journaling that assists in banding pages of raster output data to printers.
 
[[Color Dithering]] Provides color-dithering support.
 
[[Gamma Correction]]Provides gamma-correction support.
 
[[Compression]]Provides commonly used compression routines recognized by printers.
 
[[Exception Management]]Provides ways of setting errors with WinSetErrorInfo and logging appropriate warnings, exceptions, and error codes.
 
[[Memory Management]]Provides a simple way of managing global and process memory needed by presentation drivers.
 
[[Pattern Creation]]Provides functionality to create bitmap patterns.
 
[[Output-Thread Management]]Provides multi-threaded output and buffer management to printer devices for improved performance.
 
[[00077.htm|Semaphores]]Helps drivers protect their data in multitasking environments. The implementation detects the current CPU level and implements semaphores based on the smallest possible set of assembly instructions.
 
[[00086.htm|String Management]]Provides a way to sort text strings that are being drawn to a printer output page so that they can be processed in many page orders when needed.
 
 
 
 
 
=== GenPLib Architecture ===
 
The GenPLib is a 32-bit static linking library, GENPLIB.LIB. Developers use LINK386.EXE to link the GPL with their 32-bit printer drivers.
 
Several C language include files (*.H) are associated with GENPLIB.LIB and define the function names and prototypes in the library. The main include file is GENPLIB.H.
 
GENPLIB.H includes other relevant library H files based on symbolics (INCLs ) defined to the compiler. For example, the following symbolics have a special meaning to the operation of GENPLIB.H when included by a C program:
 
<pre class="western">INCL_GENPLIB_ASSERT
INCL_GENPLIB_ERROR
INCL_GENPLIB_HANDLER
INCL_GENPLIB_JOURNAL
INCL_GENPLIB_MEMORY
INCL_GENPLIB_SEMAPHORES
INCL_GENPLIB_STRINGSORT
INCL_GENPLIB_THREAD
INCL_GENPLIB_UTIL
INCL_GENPLIB_PATTERNS</pre>
 
 
To include all functions, use:
 
<pre class="western">INCL_GENPLIB_ALL</pre>
 
 
When a developer uses GenPLib memory-management routines, the C source file that requires GenPLib memory management would include a set of code resembling the following:
 
<pre class="western">#define INCL_GENPLIB_MEMORY
#include &lt;genplib.h&gt;</pre>
 
 
This code is included before any GenPLib memory-management functions or structures are referenced. The compiler automatically includes GPLMEM.H within GENPLIB.H.
 
 
 
 
 
=== Components of the Generic Print Library ===
 
The following sections describe the components and functions of the GenPLib .
 
 
 
 
 
=== Error Assertion ===
 
To use the GenPLib Error-Assertion package, you must include:
 
<pre class="western">INCL_GENPLIB_ASSERT</pre>
 
 
The error-assertion package of the GenPLib consists of six APIs. Four are macros:
 
*[[00010.htm|ASSERTT () and ASSERTF ()]]<br />*[[00011.htm|DBPRINTF (()) and DBPRINTIF (())]]
 
The remaining two are functions:
 
*[[00012.htm|PMAssert]]<br />*[[00013.htm|BaseAssert]]
 
[[00012.htm|PMAssert]]Validates the return code from OS/2 Presentation Manager (PM) APIs that display the WinGetLastError() result and a supplied text string in a message box.
 
[[00013.htm|BaseAssert]]Validates OS/2 APIs that use the APIRET return code.
 
[[00010.htm|ASSERTT () and ASSERTF ()]]ASSERTT causes an error assertion if the supplied test evaluates to TRUE. ASSERTF causes an error assertion if the supplied test evaluates to FALSE. An assertion is an INT3 with kernel debug information displaying the failed test, file name, and line number of the location from which the assertion was called.
 
[[00011.htm|DBPRINTF (()) and DBPRINTIF (())]]DBPRINTF outputs the supplied text string to the kernel debugger. DBPRINTIF outputs the supplied text string to the kernel debugger if the supplied condition is TRUE.
 
 
 
 
 
=== ASSERTT () and ASSERTF () ===
 
The ASSERTT and ASSERTF macros are very useful to precisely locate errors in code. Each is simply a test. If the test fails, the system generates a sound, stops the program, and displays a message. The more often an ASSERTT or ASSERTF macro is used, the better the chance that the first point of failure will be captured for analysis.
 
'''Use ASSERTT or ASSERTF prior to:'''
 
Pointers Assert that pointers are nonzero. <br />Divisors Assert that divisors are nonzero. <br />Strings Assert that strings are valid. <br />Copying Assert that enough space is present before copying.
 
'''Use ASSERTT or ASSERTF after:'''
 
OS/2 APIs and internal functions Assert result codes of OS/2 APIs and your internal functions.
 
Pointers Assert pointers after allocation.
 
Switch statements Use ASSERTT (TRUE) in the default case of switch statements
 
'''Do not use ASSERTT or ASSERTF in:'''
 
Essential Code These macros are not included in the retail build of the product. For example, ASSERTT (0 != DosRequestMutexSem (hsem))
 
The following is sample output on the kernel debugger:
 
<pre class="western">Assertion failed on line 41 of file code.c
'rc == 0'
eax=XXXXXXXX ebx=XXXXXXXX etc=XXXXXXXX edx=XXXXXXXX esi=XXXXXXXX edi=XXXXXXXX
eip=XXXXXXXX esp=XXXXXXXX ebp=XXXXXXXX iopl=2 -- -- -- xx xx xx xx xx xx xx xx
cs=XXXX ss=XXXX ds=XXXX es=XXXX fs=XXXX gs=XXXX  cr2=XXXXXXXX cr3=XXXXXXXX
program:CODE32:BREAKPOINT
XXXX:XXXXXXXX cc                int    3
##</pre>
Use ASSERTT and ASSERTF under the following conditions:
 
'''ASSERTT (z);'''where ''z''is a Boolean expression that should evaluate to zero or FALSE on success.
 
'''ASSERTF (nz);'''where ''nz''is a Boolean expression that should evaluate to nonzero or TRUE on success.
 
The following example shows how to use ASSERTT and ASSERTF:
 
<pre class="western">pointer = NULL;
rc = DosAllocMem( &amp;pointer, size, PAG_EXECUTE | PAG_READ | PAG_WRITE );
ASSERTT (rc);      // Return code should be zero (success)
ASSERTF (pointer);  // Pointer should be nonzero</pre>
 
 
 
 
 
 
=== DBPRINTF (()) and DBPRINTIF (()) ===
 
DBPRINTF uses the printf functionally of ANSI C to write messages to the kernel debugger screen. DBPRINTF is a macro; but because it can have a variable number of parameters, it must have an extra set of parentheses.
 
The following is the structure of DBPRINTF:
 
<pre class="western">DBPRINTF(                // Outputs a text string to debug terminal (like C printf command)
  PSZ pszFormatString,  // String with same format options as printf command
  (...) );              // Parameter list of values to be placed in format string</pre>
The following is the structure of DBPRINTIF:
 
<pre class="western">DBPRINTIF(                // A conditional DBPRINTF command
  BOOL bDoit,            // Outputs format string if this parameter evaluates to TRUE
  PSZ pszFormatString,  // String with same format options as printf command
  (...) );              // Parameter list of values to be placed in format string</pre>
'''ASSERTT, ASSERTF, DBPRINTF, and DBPRINTIF Notes:'''
 
ASSERTT and ASSERTF as well as DBPRINTF and DBPRINTIF are macros. They are built for the debug-level build and disappear for the retail-level build.
 
These macros rely on the PMDD device driver to be activated. To activate the PMDD device driver, add a /Cx parameter to the following statement (where x is the COM port number):
 
<pre class="western">DEVICE=C:\OS2\PMDD.SYS /Cx</pre>
 
=== PMAssert ===
 
'''Description'''
 
This function is similar to ASSERTT and ASSERTF, but it displays a message box if an error condition occurs. In addition to displaying a user-provided error message, the message box also displays the results of WinGetLastError (), the Presentation Manager error code. Use this function to assert OS/2 Presentation Manager APIs.
 
'''Format'''
 
<pre class="western">PMAssert(                // Display a message box with pszString, and show WinGetLastError()
    BOOL  bDoit,        // Display message box only if this expression evaluates to TRUE
    HAB  habErr,        // Anchor block handle of thread checking for a PM error
    PSZ  pszString );  // Message to display on message box with PM error code</pre>
'''Parameters'''
 
'''bDoit'''(''BOOL'') Boolean value. If TRUE, then a message box is displayed. <br />'''habErr'''(''HAB'') Anchor block of program. <br />'''pszString'''(''PSZ'') Message string.
 
'''Returns'''
 
TRUE Evaluated to TRUE <br />FALSE Evaluated to FALSE
 
'''Example Code'''
 
<pre class="western">BOOL rc;
rc = GpiDestroyPS( hps );
PMAssert( rc == FALSE,
          hab,
          &quot;GpiDestroyPS failed!&quot; );</pre>
 
=== BaseAssert ===
 
'''Description'''
 
This function is similar to ASSERTT and ASSERTF, but it displays a message box if an error condition occurs. Use this function to assert return codes from those OS/2 APIs that use DOS Error-type return codes.
 
'''Format'''
 
<pre class="western">BaseAssert(                // Display message box if a base error (DOS) is passed in (ulError)
      ULONG  ulError,      // Value of base error as defined in BSEERR.H header file
      PSZ    pszString );  // String to print out with base error code</pre>
'''Parameters'''
 
'''ulError'''(''ULONG'') Return code from OS/2 BaseAPI, either NO_ERROR (0) or one of the ERROR_xxx DOS Error codes. If ulError is not equal to NO_ERROR, a message box is displayed.
 
'''pszString'''(''PSZ'') Message string.
 
'''Returns'''
 
TRUE Evaluated to TRUE <br />FALSE Evaluated to FALSE
 
'''Example Code'''
 
<pre class="western">APIRET apirc;
  apirc = DosAllocMem( pbuf, 1024h, PAG_READ | PAG_WRITE );
  BaseAssert( &quot;DosAllocMem failed&quot;, apirc );</pre>
 
=== Banding ===
This component controls all aspects of managing a journal file and banding such as:
 
*Calculating the band size-determines if banding is necessary based on the input parameters (resolution, bits/pel, page size, etc.).
 
*Creating a journal file, and managing COM_DRAW flags.
 
*Playing back either a full page or bands within a page, and managing the DC offset for each band.
 
*Offering many different play options.
 
*Handling destructive and non-destructive plays (if it is necessary to play more than once).
 
*Handling portrait and landscape cases.
 
*Playing bands from top-to-bottom or bottom-to-top.
 
To use the GenPLib Banding package, you must include:
 
<pre class="western">INCL_GENPLIB_JOURNAL</pre>
 
=== Journaling Overview ===
A journal file is a record of all the GreXXX function calls that a driver receives between the time that it starts recording a journal file and the time it stops recording a journal file. Typically, recording starts at the beginning of a page and stops at the end of a page. After the recording has stopped, you can replay the journal file as often as necessary.
 
There are many reasons to record the GreXXX calls for a particular handle to a drawing context (HDC). Color sorting and banding are two examples.
 
*For color sorting, printer commands are output for a particular color while the journal file is recorded. Then, the journal file is played back for the remaining colors. Printer commands are output only when the current color is the color with which you are working.
 
*For banding, a portion of the page is defined as a bitmap and only that area is drawn in while the journal file is played back. Then, the DC origin is moved up the size of the band and the journal file is replayed. This must be done for every band on the page.
 
The following functions are used for journaling:
*[[GplQueryPhysicalMem]]
*[[GplJournalCalcBandSize]]
*[[GplJournalCreateInstance]]
*[[GplJournalPlayInstance]]
*[[GplJournalDeleteInstance]]
*[[GplJournalAbortDoc]]
*[[GplJournalResetAbortDoc]]
 
=== Call Flow ===
[[GplQueryPhysicalMem]] is the first function that you can call. It tells you how much physical RAM you have available.
 
[[00018.htm|GplJournalCalcBandSize]]is the second function that you can call. It is an optional helper function that tells you whether or not you need to band given your memory requirements and band size.
 
The next function that you call is [[00019.htm|GplJournalCreateInstance]]. This function initializes an instance or reuses an instance.
 
The next function that you call is [[00020.htm|GplJournalPlayInstance]]. This function replays the journal file either per-page or per-band; it can also preserve or change the attributes of the page.
 
Finally, you call [[00021.htm|GplJournalDeleteInstance]]to clean up the instance data.
 
=== GplQueryPhysicalMem ===
 
'''Description'''
 
This function tells you how much physical RAM is installed on your system.
 
The function ulPhysMem can be used in determining the amount of memory that should be reserved for banding. For the Omni driver, for example:
 
<pre class="western">    if( ulPhysMem &lt;= 4 )
      ulMaxBandMem = 256 * 1024;      // 256K bands
    elseif( ulPhysMem &lt; 12 )
      ulMaxBandMem = 512 * 1024;      // 512K bands
    elseif( ulPhysMem &lt; 20 )
      ulMaxBandMem = 1000 + 1024;    // 1M bands
    elseif( ulPhysMem &gt;=20 )
      ulMaxBandMem = 2000 + 1024;    // 2M bands</pre>
'''Returns'''
 
ulPhysMem Amount of physical RAM installed on system.
 
=== GplJournalCalcBandSize ===
 
'''Description'''
 
This function helps you decide if you need to break the page up into bands. If you do need to journal, then it will set up the band size to be constrained by the memory limit and to be a multiple of the modulus.
 
Based on the page size, number of bits per pel, number of color planes, etc ., the function calculates the number of bytes needed for the page bitmap. If the amount exceeds the memory limit, it calculates the number of bands into which to break the page.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplJournalCalcBandSize(
                  PIJOURNAL  pIJournal,          // Journal data structure
                  USHORT    usBitsPerPel,        // 1, 4, 8, or 24 bits per pel
                  USHORT    usNumPlanes,        // Number of color planes
                  USHORT    usModulus,          // Band size should be a multiple of this
                  USHORT    usDotsPerColumn,    // Resolution
                  ULONG      ulMaxBandMem );      // Maximum memory available for banding</pre>
'''Parameters'''
 
'''pIJournal'''(''PIJOURNAL'') Journal data structure. The following input fields are used:
 
'''usXLength'''Length of page in pels along x axis. <br />'''usYLength'''Length of page in pels along y axis. <br />'''bPortrait'''Orientation of page-portrait or landscape.
 
'''usBitsPerPel'''(''USHORT'') Page bitmap, number of bits per pel.
 
'''usNumPlanes'''(''USHORT'') Page bitmap, number of planes.
 
'''usModulus'''(''USHORT'') The band size must be zero or a multiple of this number. This may be necessary to cause byte, word, or Dword alignment to align band size to match the width of a print head. This functionality may also be helpful if you need to send the bits in a certain column height.
 
'''usDotsPerColumn'''(''USHORT'') Resolution.
 
'''ulMaxBandMem'''(''ULONG'') Maximum memory available for banding.
 
This parameter is the limit to the number of bytes that your band bitmap can exceed.
 
'''Returns'''
 
FALSE Journaling is '''not'''necessary. <br />TRUE Journaling '''is'''necessary. The following is filled in and valid: <br />'''pIJournal'''(''PIJOURNAL'') Journal data structure
 
'''usBandLength'''Band length in pels
 
''pIJournal''is output with ''usBandLength''updated as follows:
 
*x-band length indicates landscape orientation. <br />*y-band length indicates portrait orientation.
 
'''Notes'''
 
This function should be called at COMPLETE_OPEN_DC time; because at this time, job properties have been obtained that may affect how ''pIJournal''is filled in (for example, form size, mono/color selections).
 
=== GplJournalCreateInstance ===
 
'''Description'''
 
This function will create a reusable instance for a particular DC. The opposite of this function is [[00021.htm|GplJournalDeleteInstance]]. Following are the four cases in which this function may be called:
 
Case 1 Ask for the number of bytes to allocate for the handle.
 
Case 2 DEVESC_STARTDOC time is the first (real) time this function is called. hJournal has been allocated. Initialize hJournal's bytes to 0.
 
Case 3 At DEVESC_NEWFRAME time, another page, more processing. After the call to [[00020.htm|GplJournalPlayInstance]]has completed, set it up for the next page.
 
Case 4 At DEVESC_NEWFRAME time, another page, but this time we want the information about the page to change. The call to GplJournalPlayInstance has completed.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplJournalCreateInstance( HJOURNAL  hJournal,    // Journal handle
                                          PIJOURNAL  pIJournal,  // Journal data structure
                                          ULONG      ulFlags );  // Creation flags (defaults)</pre>
'''Parameters'''
 
'''hJournal'''(''HJOURNAL'') Handle to the journal file instance.
 
'''pIJournal'''(''PIJOURNAL'') A pointer to the input structure.
 
'''ulFlags'''(''ULONG'') This function performs different actions based on the ulFlags. The ulFlags is a bit vector (individual bits have different meanings). The options are separated into mutually exclusive groups that must have one member set.
 
'''CREATE_DRAW_WHILE_RECORDING'''Turn on drawing while the journal file is being recorded.
 
'''Returns'''
 
Success TRUE <br />Failure FALSE
 
'''Implementation'''
 
This function will perform different actions based on the input parameters:
 
''Case 1''
 
The function will return the size (in the number of bytes) of a handle. It is the responsibility of the of caller to allocate and free the memory for a journal handle.
 
hJournal NULL. <br />pIJournal NULL.
 
''Case 2''
 
This function creates an engine journal file and starts recording to it. It also starts the accumulation of bounds. Call [[00020.htm|GplJournalPlayInstance]]to stop recording and play the journal file.
 
'''hJournal'''Address of newly allocated memory.
 
'''pIJournal'''Address of the input structure. The structure has following format:
 
'''ulSize'''Size of this structure.
 
'''hModule'''Module handle of the calling program.
 
'''hdc'''Current HDC.
 
'''usXLength'''Page size in pels.
 
'''usYLength'''Page size in pels.
 
'''bPortrait'''Orientation of page. <br />'''TRUE'''-portrait <br />'''FALSE'''-landscape
 
'''usBandLength'''Band height in pels.
 
'''pfunBand'''Pointer to a callback function with the following prototype. This function is only called at the end of each band. (_System *)(PVOID, PRECTL)
 
'''pfunArg'''Any pointer. This will be passed to the first parameter of the previous callback function.
 
'''Flags'''Contains creation flags.
 
''Case 3''
 
The function performs the same functionality as Case 2. However, you can change any of the parameters in the input structure from the previous call to GplJournalCreateInstance.
 
'''hJournal'''Handle to a journal file instance.
 
'''pIJournal'''Address of the input structure. The structure has following format:
 
ulSize Size of this structure.
 
hModule Module handle of the calling program.
 
hdc Current HDC.
 
usXLength Page size in pels.
 
usYLength Page size in pels.
 
bPortrait Orientation of page. <br />'''TRUE'''-portrait <br />'''FALSE'''-landscape
 
''Case 4''
 
For this case, a new page has been sent and you will restart the entire process (Case 2). This function uses the same parameters that were given to the original call to GplJournalCreateInstance.
 
'''hJournal'''Handle to a journal file instance. <br />'''pIJournal'''NULL.
 
=== GplJournalPlayInstance ===
 
'''Description'''
 
This function signifies the end of the recording. If you want to call this function multiple times for a page, then for calls 1..n-1 the flag PLAY_ NONDESTRUCTIVE should be used. On the last call, n, the flag PLAY_ DESTRUCTIVE should be used.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplJournalPlayInstance( HJOURNAL  hJournal,
                                        ULONG    ulFlags );</pre>
'''Parameters'''
 
'''hJournal'''(''HJOURNAL'') Handle to the journal file instance.
 
'''ulFlags'''(''ULONG'') This function will perform different actions based on the ulFlags. The ulFlags is a bit vector (individual bits have different meanings). The options are separated into mutually exclusive groups that must have one member set.
 
'''PLAY_JOURNAL_BAND'''Play all bands at this time. The callback function that was defined at [[00019.htm|GplJournalCreateInstance]]time will be called after each band has been played. <br />or <br />'''PLAY_JOURNAL_PAGE'''Plays the journal file once for this page. <br />'''PLAY_NONDESTRUCTIVE'''The DC state will not be altered after the call has been completed. <br />or <br />'''PLAY_DESTRUCTIVE'''The DC state will now have the final attributes of the page. <br />'''PLAY_TOP_TO_BOTTOM'''Bands are played from the maximum Y value to 0. <br />or <br />'''PLAY_BOTTOM_TO_TOP'''Bands are played from 0 to the maximum Y value.
 
'''Returns'''
 
Success TRUE <br />Failure FALSE
 
=== GplJournalDeleteInstance ===
 
'''Description'''
 
This function is the opposite of [[00019.htm|GplJournalCreateInstance]]. It should be called at DEVESC_ENDDOC or enable subfunction 11 (begin close DC) time. It is responsible for cleaning up all of the resources that it used.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplJournalDeleteInstance( HJOURNAL hJournal );</pre>
'''Parameter'''
 
'''hJournal'''(''HJOURNAL'') Handle to the journal file instance.
 
'''Returns'''
 
Success TRUE <br />Failure FALSE
 
=== GplJournalAbortDoc ===
 
'''Description'''
 
This function is called when a DEVESC_ABORTDOC is received.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplJournalAbortDoc( HJOURNAL  hJournal );</pre>
'''Parameter'''
 
'''hJournal'''(''HJOURNAL'') Handle to the journal file instance.
 
'''Returns'''
 
Success TRUE <br />Failure FALSE
 
=== GplJournalResetAbortDoc ===
 
'''Description'''
 
This function is called when a DEVESC_ENDDOC is received and the job has been aborted.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplJournalResetAbortDoc( HJOURNAL  hJournal );</pre>
'''Parameter'''
 
'''hJournal'''(''HJOURNAL'') Handle to the journal file instance.
 
'''Returns'''
 
Success TRUE <br />Failure FALSE
 
=== Example Code ===
 
'''[[GplQueryPhysicalMem]]Usage'''
 
Following is an example of [[00017.htm|GplQueryPhysicalMem]]usage:
 
<pre class="western">case COMPLETE_OPEN_DC:                            // Final driver enable subfunction
{
  // If we are enabling for a DC where we may need to journal
  if( OD_DIRECT == ulDCType || PM_Q_RAW == ulDataType )
  {
    // Fill in journal information structure
    IJournal.ulSize      = sizeof( pddc-&gt;IJournal );
    IJournal.bPortrait  = ( pddc-&gt;pJobProps-&gt;ulOrientation == PORTRAIT );
    IJournal.hdc        = pddc-&gt;hdc;                        // Handle to DC
    IJournal.hModule    = globals.hModule;            // Driver's module handle
    IJournal.pfunBand    = (PJFUN)NewFrame;            // Callback function
    IJournal.pfunArg    = (PVOID)pddc;                // Arguments to callback function
    IJournal.usXLength  = pddc-&gt;pCurrentForm-&gt;hcInfo.xPels;
    IJournal.usYLength  = pddc-&gt;pCurrentForm-&gt;hcInfo.yPels;
 
    // Find out how much physical RAM is installed on the system
    GplQueryPhysicalMem( &amp;ulPhysMem );
 
    // Omni uses ulPhysMem to determine the maximum memory for banding
    If( ulPhysMem &lt;= 4 )
        ulMaxBandMem = 256 * 1024;      // 256K bands
    elseif( ulPhysMem &lt; 12 )
        ulMaxBandMem = 512 * 1024;      // 512K bands
    elseif( ulPhysMem &lt; 20 )
        ulMaxBandMem = 1000 + 1024;    // 1M bands
    elseif( ulPhysMem &gt;= 20 )
        ulMaxBandMem = 2000 + 1024;    // 2M bands
 
  } /* end if */
} /* end case */</pre>
'''[[00018.htm|GplJournalCalcBandSize]]Usage'''
 
Following is an example of [[00018.htm|GplJournalCalcBandSize]]usage during OS2_PM_DRV_ ENABLE for a dot-matrix printer:
 
<pre class="western">case COMPLETE_OPEN_DC:                            // Final driver enable subfunction
{
    IJournal.ulSize      = sizeof( pddc-&gt;IJournal );
    IJournal.bPortrait  = TRUE;
    IJournal.hdc        = hdc;
    IJournal.hModule    = globals.hModule;
    IJournal.pfunBand    = (PJFUN)NewFrame;
    IJournal.pfunArg    = (PVOID)pddc;
    IJournal.usXLength  = hcInfo.xPels;
    IJournal.usYLength  = hcInfo.yPels;
 
    // NOTE: Modulus should be should be '1' on full-page printers or print-head width
    bBanding = GplJournalCalcBandSize(
                                    &amp;IJournal,      // PIJournal
                                    1,              // Bits per pel
                                    1,              // Planes
                                    40,            // Modulus
                                    64000 );        // Maximum memory available
 
} /* end case */</pre>
'''[[GplJournalCreateInstance]]Usage'''
 
Following is an example of [[00019.htm|GplJournalCreateInstance]]usage to allocate/ create a journal instance handle during processing of the start-document escape. At this point, the port is opened and the output thread is already created.
 
<pre class="western">case DEVESC_STARTDOC:
{
  if( ulDCType == OD_DIRECT || ulDataType == PM_Q_RAW )
  {
    // If we need to band (that implies journaling)
    if( pddc-&gt;fBanding )
    {
      //  First call to size of memory needed for journal handle
      ulSize = GplJournalCreateInstance( NULL, NULL, 0 );
 
      // Allocate memory needed for journal handle (driver's responsibility)
      hJournal = GplMemoryAlloc( hmcbHeap, ulSize );  // User per-DC heap
 
      // Allocate the memory for formal instance
      lrc = GplJournalCreateInstance( hJournal,        // Journal handle
                                      &amp;IJournal ),    // Journal information structure
                                      0 );            // Creation flags (defaults)
    } /* end if */
  } /* end if */
/* end case */</pre>
'''[[00020.htm|GplJournalPlayInstance]]and [[00021.htm|GplJournalDeleteInstance]]Usage'''
 
Following are examples of [[00020.htm|GplJournalPlayInstance]]and [[00021.htm|GplJournalDeleteInstance]]during the processing of the end-document escape:
 
<pre class="western">case DEVESC_ENDDOC:
{
  if( ulDCType == OD_DIRECT || ulDataType == PM_Q_RAW )
  {
    // If we need to band (that implies journaling)
    if( pddc-&gt;fBanding )
    {
      apiret = GplJournalPlayInstance( hJournal,
                                      PLAY_JOURNAL_BAND  |
                                      PLAY_DESTRUCTIVE  |
                                      PLAY_TOP_TO_BOTTOM );
 
      apiret = GplJournalDeleteInstance( hJournal );
 
      // Remember:  Free memory allocated for journal instance handle (hjournal)
 
    } /* end if */
  } /* end if */
} /* end case */</pre>
'''[[00022.htm|GplJournalAbortDoc]]Usage'''
 
Following is an example of [[00022.htm|GplJournalAbortDoc]]usage:
 
<pre class="western">case DEVESC_ABORTDOC:
{
  if( ulDCType == OD_DIRECT &amp;&amp; ulDataType == PM_Q_RAW )
  {
    // If we have a journal file (that is, we are banding)
    if( pddc-&gt;hJournal )
    {
      // Inform journal code that abort condition is in effect
      GplJournalAbortDoc( pddc-&gt;hJournal );
 
    } /* end if */
  } /* end if */
} /* end case */</pre>
'''[[00023.htm|GplJournalResetAbortDoc]]Usage'''
 
Following is an example of [[00023.htm|GplJournalResetAbortDoc]]usage:
 
<pre class="western">case DEVESC_ENDDOC:
{
  if( ulDCType == OD_DIRECT &amp;&amp; ulDataType == PM_Q_RAW )
  {
    // If we have been called with an abort document
    if( pddc-&gt;fAbortDocCalled )
    {
      // Inform journal code that abort condition is over
      GplJournalResetAbortDoc( pddc-&gt;hJournal );
 
    } /* end if */
  } /* end if */
} /* end case */</pre>
 
=== Color Dithering ===
Color dithering is technique of interleaving cyan, magenta, yellow, and optionally black so that the eye perceives another color-such as pink or orange. Color dithering converts picture pels in sizes 2, 4, 8, 16, 24, or 32 bits of RGB/K color to a 3 or 4 bitpel consisting of cyan, magenta, yellow, and optionally K(black). The best dither functions diffuse or spread out colors and also act as a low-pass filter to changes in color. The diffusion of color causes the printing of cyan, magenta, and yellow in the proper density so that from a distance, the eye perceives the correct color.
 
Following are the dithering functions:
 
*[[00026.htm|GplDitherCreateInstance]]<br />*[[00027.htm|GplDitherRGBtoCMYK]]<br />*[[00028.htm|GplDitherRGBtoRGB]]<br />*[[00029.htm|GplDitherDeleteInstance]]
 
Gamma-correction functions are a part of the color-dithering package and are used internally by the dithering code, but they are also available separately. See [[00030.htm|Gamma Correction]].
 
=== GplDitherCreateInstance ===
 
'''Description'''
 
To optimize throughput, a dither handle is initialized when this function is invoked. This includes allocation and initialization of transform tables and parameters.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplDitherCreateInstance(
                        PPVOID        ppdh,    // Returned pointer to dither handle
                                                  // pointer
                        HMCB          hmcb,    // User-specified memory handle
                        PDITHEREQUEST  pReq,    // Pointer to dither-request structure
                        PDITHERESULT  pReply ); // Pointer to dither-reply structure</pre>
'''Parameters'''
 
'''ppdh'''(''PPVOID'') Pointer to the dither handle pointer that was created and returned by [[00026.htm|GplDitherCreateInstance]].
 
'''hmcb'''(''HMCB'') If it is not zero, this parameter must be a handle (pointer to the API heap).
 
'''pReq'''(''PDITHEREQUEST'')
 
bReq (''BYTE'') Set to CMY_ALL or CMYK_ALL.
 
lDitherType (''LONG'') From JobProperties.
 
HT_LEVEL When selected, the following may be ORed with HT_LEVEL:
 
<pre class="western">HT_PARAMETER
HT_MIN_COLOR
HT_PERCENT
HT_FUNCTION</pre>
HT_DITHER_4x4 Use a 4x4 halftone pattern for 16 levels of perceived intensity. Also &quot;snap.pHalftone&quot; must be a pointer to a 16x4x4 byte array of dither patterns.
 
HT_DITHER_8x8 Use a 8x8 halftone pattern for 64 levels of perceived intensity. Also &quot;snap.pHalftone&quot; must be a pointer to a 16x8x8 byte array of dither patterns.
 
HT_MAGIC_SQUARES A tessalated (tiled) dither that populates a dither matrix to guarantee a semi-random color mix yet controls average occurrence of colors (randomized pattern).
 
HT_ORDERED_SQUARES Use recursive tesselated tiles of rectangular threshold arrays. Similar to HT_MAGIC_SQUARES, but uses a different method of populating dither matrix.
 
HT_ERR_DIFFUSION Stucki Error Diffusion-a nice quality filter for photograph-quality images.
 
HT_FAST_DIFFUSION Error diffusion with lower sampling rate, so error propagated less-essentially, a high-pass filter.
 
HT_STEINBERG_DIFFUSION Steinberg Error Diffusion-slightly higher pass than Stucki.
 
SrcOptions (''SRCMODS'') Flags that indicate the state of the buffer information.
 
fStartOfPage (''BOOL'') Set in users NewFrame function; initialized by SYSTEM.
 
fNewColors (''BOOL'') Set if pSrcInfo Color Table changes; initialized by SYSTEM.
 
fModify (''BOOL'') Set if pSrc may be modified for K (Black) when CMY set.
 
fResetErrBuf (''BOOL'') Set between pages or pictures when Err Buffers must be reset.
 
ulResetErrBufs (''ULONG'') 0,1,2,or 3 for Diffusion ONLY.
 
ulValue (''ULONG'') xxx &lt;&lt; 20 value to be set as initialization value.
 
snap (''SNAPIT'') SYSTEM initialized midpoint and function control parameters.
 
pHalftone (''PRGB2'') Pointer to 4x4 8x8 or user-supplied table.
 
ulParm (''ULONG'') User-supplied midpoint or function address.
 
pArray (''PBYTE'') Pointer to 16x16 tables such as paintMixer or OrderSquares.
 
ulResolution (''ULONG'') The larger of x or y resolution.
 
iNumColors ( ''INT'') Set by user (2 ** number bits per pel).
 
iSrcRowPels (''INT'') Number of pels in a source row.
 
iNumDitherRows (''INT'') Number of rows in a band.
 
pSrcInfo (''PBITMAPINFO2'') Pointer to user supplied BITMAPINFO2 structure; requires that cx and cy be set.
 
pbSrc (''PBYTE'') Printer to RGB2 input bitmap (rows are 32bit aligned).
 
iNumSrcRowBytes32 (''INT'') iDWordBytesInCMYKBandRow.
 
iNumDestRowBytes (''INT'') iBytesInSinglePlaneBandRow.
 
delta (''DELTACOLOR'') From JobProperties for tessalated-squares dithering only .
 
lHue (''LONG'') 0..360 <br />lSaturation (''LONG'') 0..100 <br />lValue (''LONG'') 0..100
 
fRemoveBlackColor (''BOOL'') Eliminate coincident black and color after dithering.
 
ulRGamma (''ULONG'') 3 .. 255 true gamma value; actual value times 10.
 
ulRBias (''ULONG'') 0 .. 255 gamma table minimum value.
 
ulGGamma (''ULONG'') 3 .. 255 true gamma value.
 
ulGBias (''ULONG'') 0 .. 255 gamma table minimum value.
 
ulBGamma (''ULONG'') 3 .. 255 true gamma value.
 
ulBBias (''ULONG'') 0 .. 255 gamma table minimum value.
 
'''pReply'''(''PDITHERESULT'') Reply structure is allocated and initialized on return
 
'''Returns'''
 
Success NO_ERROR 0 <br />Failure INVALID_PARAMETER
 
'''Example Code'''
 
Following is an example of filling the dither-request structure and using GplDitherCreateInstance from the Omni driver during start-document processing:
 
<pre class="western">  pHandle-&gt;Req.iSrcRowPels = iBitsInArray;
 
  // Number of bytes in source, dword aligned
  pHandle-&gt;Req.iNumSrcRowBytes32 = iDWordBitsInArray/8;
 
  // Number of bytes in destination, byte aligned
  pHandle-&gt;Req.iNumDestRowBytes = iBitsInArray/8;
 
  // Fill in number of colors (derived from bitcount)
  pHandle-&gt;Req.iNumColors = Power ( 2, pddc-&gt;bmp.cBitCount );
  pHandle-&gt;Req.iNumDitherRows = 1;
 
  if( pddc-&gt;pdb-&gt;pResInfo-&gt;ulXRes &gt;= pddc-&gt;pdb-&gt;pResInfo-&gt;ulYRes )
    pHandle-&gt;Req.ulResolution = pddc-&gt;pdb-&gt;pResInfo-&gt;ulXRes;
  else
    pHandle-&gt;Req.ulResolution = pddc-&gt;pdb-&gt;pResInfo-&gt;ulYRes;</pre>
 
 
<pre class="western">  /*-------------------*/
  /* Color Technology  */
  /*-------------------*/
 
  pHandle-&gt;Req.ulRGamma = (ULONG)( pddc-&gt;pdb-&gt;pDriver-&gt;pGammas-&gt;pSelect+i )-&gt;bRGamma;
  pHandle-&gt;Req.ulGGamma = (ULONG)( pddc-&gt;pdb-&gt;pDriver-&gt;pGammas-&gt;pSelect+i )-&gt;bGGamma;
  pHandle-&gt;Req.ulBGamma = (ULONG)( pddc-&gt;pdb-&gt;pDriver-&gt;pGammas-&gt;pSelect+i )-&gt;bBGamma;
  pHandle-&gt;Req.ulRBias  = (ULONG)( pddc-&gt;pdb-&gt;pDriver-&gt;pGammas-&gt;pSelect+i )-&gt;bBias;
  pHandle-&gt;Req.ulGBias  = (ULONG)( pddc-&gt;pdb-&gt;pDriver-&gt;pGammas-&gt;pSelect+i )-&gt;bBias;
  pHandle-&gt;Req.ulBBias  = (ULONG)( pddc-&gt;pdb-&gt;pDriver-&gt;pGammas-&gt;pSelect+i )-&gt;bBias;
 
  pHandle-&gt;Req.ulRGamma = (ULONG)( (LONG)pHandle-&gt;Req.ulRGamma +  pddc-&gt;pdb-&gt;
                                                      pJobProperties-&gt;lRedGamma );
  pHandle-&gt;Req.ulGGamma = (ULONG)( (LONG)pHandle-&gt;Req.ulGGamma +  pddc-&gt;pdb-&gt;
                                                      pJobProperties-&gt;lGreenGamma );
  pHandle-&gt;Req.ulBGamma = (ULONG)( (LONG)pHandle-&gt;Req.ulBGamma +  pddc-&gt;pdb-&gt;
                                                      pJobProperties-&gt;lBlueGamma );
  pHandle-&gt;Req.ulRBias  = (ULONG)( (LONG)pHandle-&gt;Req.ulRBias  +  pddc-&gt;pdb-&gt;
                                                      pJobProperties-&gt;lRedBias );
  pHandle-&gt;Req.ulGBias  = (ULONG)( (LONG)pHandle-&gt;Req.ulGBias  +  pddc-&gt;pdb-&gt;
                                                      pJobProperties-&gt;lGreenBias );
  pHandle-&gt;Req.ulBBias  = (ULONG)( (LONG)pHandle-&gt;Req.ulBBias  +  pddc-&gt;pdb-&gt;
                                                      pJobProperties-&gt;lBlueBias );</pre>
 
 
<pre class="western">  /*-------------------*/
  /* Color Algorithm  */
  /*-------------------*/
 
  switch ( pddc-&gt;pdb-&gt;pPrintMode-&gt;ulColorTech )
  {
    case COLOR_TECH_CMYK:
      pHandle-&gt;Req.bReq = CMYK_ALL;
      break;
 
    case COLOR_TECH_CMY:
      pHandle-&gt;Req.bReq = CMY_ALL;
      break;
  }</pre>
 
 
<pre class="western">  /*-------------------*/
  /* Color Algorithm  */
  /*-------------------*/
 
  // Need gamma buffers only if printing in color (CMY/CMYK)
 
  if( pddc-&gt;pdb-&gt;pPrintMode-&gt;ulColorTech != COLOR_TECH_K )
  {
    // Init modify flag telling Gamma/HSV that we may replace/change
    // values in the source bitmap.  1,2,4,8 bit pel bitmaps; then
    // if C,M,Y are to be printed, the RGB index will be set to white.
    // If 16, 24 bit bitmaps, then the R,G,B value is replaced with white.
    pHandle-&gt;Req.SrcOptions.fModify  = TRUE;</pre>
 
 
<pre class="western">    /*-------------------*/
    /* HSV              */
    /*-------------------*/
 
    pHandle-&gt;Req.delta.lHue        = pddc-&gt;pdb-&gt;pJobProperties-&gt;lHue;
    pHandle-&gt;Req.delta.lSaturation = pddc-&gt;pdb-&gt;pJobProperties-&gt;lSaturation;
    pHandle-&gt;Req.delta.lValue      = pddc-&gt;pdb-&gt;pJobProperties-&gt;lValue;</pre>
 
 
<pre class="western">    /*-------------------*/
    /* Dither            */
    /*-------------------*/
 
    pHandle-&gt;Req.lDitherType = pddc-&gt;pdb-&gt;pJobProperties-&gt;ulAlgorithm;
 
    GPL_DITHER_SETUP_DEFAULTS( pHandle-&gt;Req,  pddc-&gt;pdb-&gt;pJobProperties-&gt;ulLevel )
  }
 
  // Set printer ' s  physical  head  position  in  our  ddc
    pddc - &gt; ptlPrintHead . x  =  0 ;
 
    if  (  ORIENTATION _ PORTRAIT  = =  pddc - &gt; pdb - &gt; pJobProperties - &gt; ulOrientation  )
      pddc - &gt; ptlPrintHead . y  =  pddc - &gt; pdb - &gt; pFormInfo - &gt; hcInfo . yPels - 1 ;
    else
      pddc - &gt; ptlPrintHead . y  =  pddc - &gt; pdb - &gt; pFormInfo - &gt; hcInfo . xPels - 1 ;
 
 
    GplDitherCreateInstance  (  ( PPVOID ) &amp; pHandle - &gt; pdh ,
                                pddc - &gt; pdb - &gt; hmcbHeap ,
                                ( PDITHEREQUEST ) &amp; pHandle - &gt; Req ,
                                ( PDITHERESULT ) &amp; pHandle - &gt; Reply  ) ; </pre>
 
 
<pre class="western">  /*--------------------------------*/
  /* Init Dither Req struct        */
  /*--------------------------------*/
 
  pCMYReq-&gt;pSrcInfo = pbmi;  // Passed to choose rasterize
 
  LOOP {                          // Each band
 
    // Copy raster bits into our buffer
    pCMYReq-&gt;pbSrc = pbBitMap + iCurrentRow * pHandle-&gt;Req.iNumSrcRowBytes32;
 
    GplDitherRGBtoCMYK ( (PPVOID)&amp;pHandle-&gt;pdh,
                          pCMYReq,
                          (PDITHERESULT)&amp;pHandle-&gt;Reply );</pre>
 
=== GplDitherRGBtoCMYK ===
 
'''Description'''
 
This function performs the dithering.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplDitherRGBtoCMYK( PHDITHER      pdh,
                                    PDITHEREQUEST  pReq
                                    PDITHERESULT  pReply );</pre>
'''Parameters'''
 
'''pdh'''(''PHDITHER'') Pointer to the dither handler that was created by [[00026.htm|GplDitherCreateInstance]].
 
'''pReq'''(''PDITHEREQUEST'') If a diffusion dither algorithm is selected, use the macro GPL_SETUP_DITHER( req, ulLevel ) to set the SrcOptions structure.
 
'''or'''
 
If Magic Squares or Ordered Squares is selected, the following fields must be set:
 
'''lHue'''<br />'''lSaturation'''<br />'''lValue'''Address of the API's pre-stuffed request structure. The following fields must be set by the API:
 
fNewColors Must be set to TRUE at the beginning of the page. This element is set to FALSE on return.
 
If fNewColors equals TRUE, the following two fields must be set:
 
'''ulGamma'''<br />'''lBias'''
 
pSrcInfo Must have the following two fields set:
 
'''cx'''<br />'''cy'''
 
If BitsPerPel is less than 16 and fNewColors equals TRUE, the pbmi array, argbColor[256] must be initialized.
 
pbSrc Pointer to the surface bitmap.
 
'''pReply'''(''PDITHERESULT'') Pointer to the reply structure.
 
'''Returns'''
 
Success NO_ERROR 0 <br />Failure INVALID_PARAMETER
 
'''Example Code'''
 
Following is an example of dithering RGB to CMYK data from the Omni driver' s &quot;render&quot; callback function:
 
<pre class="western">// Change logical height of band bitmap to 1 (this device chooses to dither each scanline)
ulSavedcy = pddc-&gt;pbmi-&gt;cy;
pddc-&gt;pbmi-&gt;cy = 1;
 
// For each row in the current band's bitmap (each scanline)
for( iCurrentRow=ulSavedcy; iCurrentRow &gt; 0; iCurrentRow-- )
{
  // Set pointer to current row in our band's bitmap
  cmykReq.pbSrc = pbBits + iCurrentRow * iDWordBytesInCMYKBandRow;
 
  GplDitherRGBtoCMYK ( &amp;pddc-&gt;pdh, &amp;pddc-&gt;cmykReq, &amp;pddc-&gt;pReply );
 
  // Now our consecutive KCMY buffers contain dithered data to send to printer
 
} /* end for */
 
// Restore bitmap height to TRUE value (no longer 1)
pddc-&gt;pbmi-&gt;cy = ulSavedcy;</pre>
 
=== GplDitherRGBtoRGB ===
 
'''Description'''
 
This function is a shell for [[00027.htm|GplDitherRGBtoCMYK]]. It simply inverts the CMY ''pDest''buffer to RGB for a printer that requires RGB.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplDitherRGBtoRGB( PHDITHER      pdh,
                                  PDITHEREQUEST  pReq
                                  PDITHERESULT  pReply );</pre>
'''Parameters'''
 
'''pdh'''(''PHDITHER'') Pointer to the dither handler that was created by [[00026.htm|GplDitherCreateInstance]].
 
'''pReq'''(''PDITHEREQUEST'') Address of the API's pre-filled request structure.
 
'''pReply'''(''PDITHERESULT'') Address of the reply structure.
 
'''Returns'''
 
Success NO_ERROR
 
=== GplDitherDeleteInstance ===
 
'''Description'''
 
This function must be called at the end of a document so that memory that was allocated in [[00026.htm|GplDitherCreateInstance]]can be freed.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplDitherDeleteInstance( PHDITHER  pdh );</pre>
'''Parameter'''
 
'''pdh'''(''PHDITHER'') Pointer to the dither handler that was created by [[00026.htm|GplDitherCreateInstance]].
 
'''Returns'''
 
Success NO_ERROR
 
'''Example Code'''
 
Following is an example of using GplDitherDeleteInstance:
 
<pre class="western">// Tell the dither function to deallocate all it's buffers
GplDitherDeleteInstance( (HDITHER)pHandle-&gt;pdh );
 
// Reminder:
// Free all buffers our driver allocated on behalf of GENPLIB's dithering code
// This includes error buffers for error-diffusion algorithms
// as well as the destination buffers used for rendering</pre>
 
=== Gamma Correction ===
Printer paper, ink, resolution, and other characteristics can cause the actual printed color to be different from the desired color. This &quot;skew&quot; is non-linear and occurs over the entire color spectrum. A gamma-compensation curve is used for each color to approximate the non-linear skew. Because the reflected frequencies of colors can cause them to appear different than expected, you can modify the gamma of each color. Increasing the gamma will lighten an image that might otherwise look too dark.
 
Following are the gamma functions:
*[[00031.htm|GplGammaCreateTable]]
*[[00032.htm|GplGammaColorTableToGamma2]]
 
=== GplGammaCreateTable ===
 
'''Description'''
 
This function creates an RGB (K) gamma table based on input gammas and bias .
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplGammaCreateTable( PBYTE  pbGamma,
                                    LONG  lRgamma,
                                    LONG  lGgamma,
                                    LONG  lBgamma,
                                    LONG  lbias );</pre>
'''Parameters'''
 
'''pbGamma'''(''PBYTE'') A byte pointer to a 768-byte buffer.
 
pbGamma can be used as a PRGB2 instead of a PBYTE.
 
'''lRgamma'''(''LONG'') Red. Gamma multiplied by 10, with a range of 1 to 99.
 
'''lGgamma'''(''LONG'') Green. Gamma multiplied by 10, with a range of 1 to 99.
 
'''lBgamma'''(''LONG'') Blue. Gamma multiplied by 10, with a range of 1 to 99.
 
'''lbias'''(''LONG'') Offset, normally zero, generally for printers over 600 dpi.
 
'''Returns'''
 
Success 0 <br />Failure INVALID_PARAMETER
 
=== GplGammaColorTableToGamma2 ===
 
'''Description'''
 
For 8-bit pels or less, replaces an RGB color value in the PBITMAPINFO2 argbColor[0..256] structure with a gamma-corrected color value.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplGammaColorTableToGamma2( PBYTE          pbGamma,
                                            PBITMAPINFO2  pbmi );</pre>
'''Parameters'''
 
'''pbGamma'''(''PBYTE'') A byte pointer to a 768-byte buffer.
 
pbGamma can be used as a PRGB2 instead of a PBYTE.
 
'''pbmi'''(''PBITMAPINFO2'') PBITMAPINFO2 is assumed to have a valid RGB2 color table as input. The following PBITMAPINFO2 fields are used:
 
cBitCount Bits per pel.
 
argbColor When cBitCount is 8 or less, this parameter must include values for 2 to the power of cBitCount (2**cBitCount).
 
'''Returns'''
 
Success 0 <br />Failure INVALID_PARAMETER
 
=== Compression ===
The compression package contains routines that compress raster image data using common printer hardware-supported compression routines.
 
Raster printer drivers render on a per-page basis into a raster representation of an output page. As soon as rendering is completed for a given page, that raster data can be compressed into a format that the printer hardware supports. Compressed data is typically smaller than the original uncompressed data and will therefore transmit faster across communication lines to the printer.
 
'''Note:'''The caller of a compression routine should allocate a buffer to hold the compressed data whose size (in bytes) is as large as the the original uncompressed data.
 
To use the GenPLib Compression package, you must include:
 
<pre class="western">INCL_GENPLIB_COMPRESS</pre>
 
 
Following are the GenPLib compression routines:
 
*[[00034.htm|GplCompressRLL]]<br />*[[00035.htm|GplCompressTIFF]]<br />*[[00036.htm|GplCompressDeltaRow]]<br />*[[00037.htm|GplCompressRLLDeltaRow]]<br />*[[00038.htm|GplCompressChooseMode]]<br />*[[00039.htm|GplCompressAscii85]]<br />*[[00040.htm|GplFaxG3EncodeBlock]]<br />*&quot;GplFaxG3StartBlock&quot; <br />*&quot;GplFaxG3EndBlock&quot; <br />*&quot;GplFaxG3EndDoc&quot; <br />*&quot;GplFaxG3NewFrame&quot; <br />*[[00041.htm|GplFaxG4EncodeBlock]]<br />*&quot;GplFaxG4EndBlock&quot; <br />*[[00042.htm|GplFaxTIFF2EncodeBlock]]<br />*&quot;GplFaxTIFF2StartBlock&quot; <br />*&quot;GplFaxTIFF2EndBlock&quot;
 
=== GplCompressRLL ===
 
'''Description'''
 
This function performs run-length limited (RLL) encoding.
 
'''Format'''
 
<pre class="western">LONG APIENTRY GplCompressRLL(
                    PBYTE  pbDataIn,      // Input raster data to compress (page/band)
                    LONG  cbDataIn,      // Length of input data buffer (pbDataIn)
                    PBYTE  pbDataOut,    // Output buffer to which compressed data is written
                    LONG  cbDataOut );  // Length count of compressed data written</pre>
'''Parameters'''
 
'''pbDataIn'''(''PBYTE'') Pointer to input data.
 
'''cbDataIn'''(''LONG'') Count of bytes in, pointed to by pbData.
 
'''pbDataOut'''(''PBYTE'') Pointer to output data.
 
'''cbDataOut'''(''LONG'') Size of buffer in bytes pointed to by pbDataOut.
 
'''Returns'''
 
Signed LONG, which is the length in bytes of the compressed data pointed to by cbDataOut.
 
Success Number of bytes in compressed return string.
 
Failure GPLCOMPRESS_ERROR (-1) <br />The output buffer length has been exceeded.
 
'''Notes'''
 
The input data is encoded with pairs of bytes. The first byte is the replacement count and the second byte is the data. A replacement count of 0 means that the data is not repeated.
 
=== GplCompressTIFF ===
 
'''Description'''
 
This function performs tagged image file format (TIFF) encoding, PackBits encoding algorithm. This function compresses a scanline.
 
Once in a repeated run, this function stops and emits a block if a different byte is encountered.
 
Once in a literal run, this function stops and emits a block if at least four repeated bytes follow. The next block will be a repeat block. Repeats of two or more instances of a byte b are represented by -(n-1) b. Literal runs of different bytes b1 b2 b3 ... bn are represented by (n-1) b1 b2 b3 . .. bn.
 
'''Format'''
 
<pre class="western">LONG APIENTRY GplCompressTIFF(
                    PBYTE  pbDataIn,      // Input raster data to compress (page/band)
                    LONG  cbDataIn,      // Length of input data buffer (pbDataIn)
                    PBYTE  pbDataOut,    // Output buffer to which compressed data is written
                    LONG  cbDataOut );  // Length count of compressed data written</pre>
'''Parameters'''
 
'''pbDataIn'''(''PBYTE'') Pointer to input data.
 
'''cbDataIn'''(''LONG'') Count of bytes in.
 
'''pbDataOut'''(''PBYTE'') Pointer to output data.
 
'''cbDataOut'''(''LONG'') Size of buffer in bytes pointed to by pbDataOut.
 
'''Returns'''
 
Success Count of bytes put in destination. <br />Failure GPLCOMPRESS_ERROR (-1)
 
=== GplCompressDeltaRow ===
 
'''Description'''
 
This function performs delta-row encoding. This method replaces only the bytes in a new row that are different from the preceding (seed) row. Unreplaced bytes are replicated from the seed row. The new row then becomes the seed row after it is printed.
 
'''Format'''
 
<pre class="western">INT APIENTRY GplCompressDeltaRow(
                      INT      usTotalBytes,  // Bytes in the scan line
                      PBYTE    pbData,        // Input raster data to compress
                      PBYTE    pbLastLine,    // Previous scanline's raster data
                      INT      usMaxReturn,    // Length of output buffer
                      PBYTE    pbReturn,      // Output buffer with compressed data
                      PUSHORT  pDeltas );      // Differences indexes-start/end pairs</pre>
'''Parameters'''
 
'''usTotalBytes'''(''INT'') Count of bytes in, pointed to by pbData.
 
'''pbData'''(''PBYTE'') Pointer to bytes of data to compress.
 
'''pbLastLine'''(''PBYTE'') Pointer to previous scanline's raster data.
 
'''usMaxReturn'''(''INT'') Size of output buffer.
 
'''pbReturn'''(''PBYTE'') Pointer to compressed data will be written.
 
'''pDeltas'''(''PUSHORT'') Differences indexes = array of start and end pairs.
 
'''Note:'''This array is returned as the result of calling [[00038.htm|GplCompressChooseMode]]; therefore, you must call GplCompressChooseMode() before calling this function.
 
'''Returns'''
 
0 Current and previous line are identical.
 
&gt;0 Length of data pointed to by pbReturn.
 
-1 GPLCOMPRESS_ERROR <br />usMaxReturn is not large enough for the compressed output.
 
=== GplCompressRLLDeltaRow ===
 
'''Description'''
 
This function performs RLL delta-row encoding. It compresses a string of bytes and returns the compressed string at pbReturn and the new string usLength as its return value. This method replaces only bytes in the current row that are different from the proceeding seed row. Unlike [[00036.htm|GplCompressDeltaRow]], however, the replacement or delta bytes themselves are encoded.
 
'''Format'''
 
<pre class="western">INT APIENTRY GplCompressRLLDeltaRow(
                      INT      usTotalBytes,  // Bytes in the scan line
                      PBYTE    pbData,        // Input raster data to compress
                      PBYTE    pbLastLine,    // Previous scanline's raster data
                      INT      usMaxReturn,    // Length of output buffer
                      PBYTE    pbReturn,      // Output buffer with compressed data
                      PUSHORT  pDeltas );      // Differences indexes-start/end pairs</pre>
'''Parameters'''
 
'''usTotalBytes'''(''INT'') Count of bytes pointed to by pbData and pbLastLine.
 
'''pbData'''(''PBYTE'') Pointer to bytes of data to compress.
 
'''pbLastLine'''(''PBYTE'') Pointer to previous uncompressed data.
 
'''usMaxReturn'''(''INT'') Size of output buffer.
 
'''pbReturn'''(''PBYTE'') Pointer to compressed data will be written.
 
'''pDeltas'''(''PUSHORT'') Differences indexes = array of start and end pairs.
 
'''Returns'''
 
0 Current and previous line are identical.
 
&gt;0 Length of data pointed to by pbReturn.
 
-1 GPLCOMPRESS_ERROR <br />usMaxOutput not large enough for the compressed output.
 
=== GplCompressChooseMode ===
 
'''Description'''
 
This function uses a semi-intelligent algorithm to select the compression mode that will most likely give the best compression for the row of data.
 
'''RLL Delta Row'''is currently chosen if this method best and if the printer supports this compression. '''Delta Row'''is chosen if most of the bytes are the same as the corresponding bytes in the previous row. '''TIFF'''is chosen if most of the bytes are repeated within this row. RLL is chosen if most of the bytes are repeated within this row and the printer does not support TIFF PackBits. '''No compression (value of 0)'''is chosen of most bytes are neither repeats within the row nor duplicates of the previous row.
 
'''Note:'''The function GplCompressChooseMode() must be run before either of the delta-compression functions [[00036.htm|GplCompressDeltaRow]]() or [[00037.htm|GplCompressRLLDeltaRow]](). This function must be run first because pDelta is filled in by GplCompressChooseMode() while it is reading pbRow and pbLast_ Row. Performance is increased by combining GplCompressChooseMode() with either [[00036.htm|GplCompressDeltaRow]]() or [[00037.htm|GplCompressRLLDeltaRow]]().
 
'''Format'''
 
<pre class="western">INT APIENTRY GplCompressChooseMode( PBYTE    pbRow,
                                    PBYTE    pbLast_Row,
                                    INT      usRow_Length,
                                    ULONG    CompressModes,
                                    PUSHORT  pDelta );</pre>
'''Parameters'''
 
'''pbRow'''(''PBYTE'') Pointer to the current row's data.
 
'''pbLast_Row'''(''PBYTE'') Pointer to the last row's data.
 
'''usRow_Length'''(''INT'') The number of bytes in the row. Note that both the previous row and the current row are equal in size.
 
'''CompressModes'''(''ULONG'') Compression modes supported.
 
This is a ULONG with the follow bit positions used to represent compress modes that this printer supports:
 
GPLCOMPRESS_NONE <br />GPLCOMPRESS_RLL <br />GPLCOMPRESS_TIFF <br />GPLCOMPRESS_DELTAROW <br />GPLCOMPRESS_RLLDELTAROW
 
These values may be logically ORed together to create a bitfield of all compression methods to consider. For example,
 
<pre class="western">    CompressModes = GPLCOMPRESS_RLL | GPLCOMPRESS_TIFF</pre>
This tells the routine to only choose between the RLL and TIFF compression routines and GPLCOMPRESS_NONE.
 
'''pDelta'''(''PUSHORT'') Array of unsigned shorts to hold the offsets from the beginning of pbRow that differ from pbLast_Row. This data will be used by [[00036.htm|GplCompressDeltaRow]]and [[00037.htm|GplCompressRLLDeltaRow]]. Note that pDelta must have a length equal to two times usRow_Length plus one to hold the pDelta output . There is no check on the size of pDelta. You must supply a size of a minimum of two times usRow_Length plus one. This is because the maximum number of differences occur when every other byte differs from the preceding row.
 
'''Returns'''
 
The mode that will probably compress the best:
 
0 No compression <br />1 RLL (run-length limited) compression <br />2 TIFF (tagged image file format) compression <br />3 Delta-row compression <br />9 RLL delta-row compression
 
'''Notes'''
 
For [[00036.htm|GplCompressDeltaRow]]and [[00037.htm|GplCompressRLLDeltaRow]], pDelta is filled with the start and end of the difference fragments. Note that a difference fragment is defined as a contiguous group of bytes in the current row that differ from those in the previous row. For example:
 
<pre class="western">/-----------------------------------------------------------------------\
|Column Number  |1  |2  |3  |4  |5  |6  |7  |8  |9  |10 |11 |12 |13 |14 |
|---------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---|
|Current Row    |7  |8  |1  |0  |4  |5  |6  |7  |23 |128|257|1  |7  |8  |
|Byte Value    |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
|---------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---|
|Previous Row  |7  |1  |3  |1  |4  |5  |9  |7  |23 |128|7  |9  |7  |8  |
|Byte Value    |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
\-----------------------------------------------------------------------/</pre>
There are three difference fragments:
 
*Fragment one begins at column 2 and ends at column 4. <br />*Fragment two begins at column 7 and ends at column 7. <br />*Fragment three begins at column 11 and ends at column 12.
 
The output in pDelta will be 2 4 7 7 11 12 0. Note that these are unsigned shorts and the difference array is null-terminated. If no difference fragments are found (the previous and current buffers are the same) the first unsigned short in pDelta will be 0.
 
''pDelta''above will point to a array of the indexes stored to used by GplCompressDeltaRow() and GplCompressRLLDeltaRow().
 
'''Example Code'''
 
Following is an example of GplCompressChooseMode usage from the Omni driver for a typical inkjet device:
 
<pre class="western">iNewMode = GplCompressChooseMode(
                pbBuffer,            // Contains current row of data
                pbLastLine,          // Contains previous row of data
                iBytesInRow,          // Number of bytes in output row (pbBuffer)
                GPLCOMPRESS_RLL |    // All compression modes supported
                GPLCOMPRESS_TIFF,
                pDelta );            // Offsets into pbBuffer ((2 x pbBuffer) + 1)
 
  if( iNewMode != iCurrentMode )
  {
    // Send command to printer to set new mode
    iCurrentMode = iNewMode;
 
  } /* end if */
 
  switch( iNewMode )
  {
    case 0:                          // No Compression
    break;
    case 1: iCompressed = GplCompressRLL();
    break;
    case 2: iCompressed = GplCompressTIFF();
    break;
    case 3: iCompressed = GplCompressDeltaRow();
    break;
    case 9: iCompressed = GplCompressRLLDeltaRow();
    break;
 
  } /* end switch */
 
  // Write raster data transfer command and compressed data</pre>
 
=== GplCompressAscii85 ===
 
'''Description'''
 
This function performs ASCII encoding. It encodes 4 bytes in to 5 bytes out , and it converts data from a base 256 on input to a base-85 representation on output. The output is then output in ASCII with base 85.
 
Buffer allocation is the responsibility of the driver.
 
'''Format'''
 
<pre class="western">INT APIENTRY GplCompressAscii85(
                    PBYTE  pSource,        // Source input data buffer (normal Hex 256)
                    PBYTE  pDest,          // Destination output data buffer (ASCII 85)
                    INT    usSourceLen );  // Source buffer input length</pre>
'''Parameters'''
 
'''pSource'''(''PBYTE'') Pointer to input data buffer.
 
'''pDest'''(''PBYTE'') Pointer to output data buffer. It must be at least 5/4 size of pSource.
 
'''usSourceLen'''(''LONG'') Length of source buffer in bytes.
 
'''Returns'''
 
Success Count of bytes put in destination. <br />Failure GPLCOMPRESS_ERROR (-1)
 
=== GplFaxG3EncodeBlock ===
 
'''Description'''
 
This function performs G3 &quot;Fax&quot;-type compression.
 
It provides a run-length type compression with table-lookup replacement encodings for certain bit sequences. This type of compression is also know as &quot;Modified Huffman.&quot;
 
'''Format'''
 
<pre class="western">GplFaxG3EncodeBlock( HTHREAD  hThread,
                    PBYTE    pbOutput,
                    ULONG    ulOutputSize,
                    PULONG  pulBitposition,
                    PBYTE    pbInput,
                    ULONG    ulBitwide,
                    ULONG    ulBitheight,
                    PFN      pfnFlushBuffer );</pre>
'''Parameters'''
 
'''hThread'''(''HTHREAD'') Handle.
 
'''pbOutput'''(''PBYTE'') Pointer to output buffer to fill.
 
'''ulOutputSize'''(''ULONG'') Number of output bytes; must be divisible by 4.
 
'''pulBitposition'''(''PULONG'') Pointer to bit position in output buffer; gets updated and must be stored off the pddc.
 
'''pbInput'''(''PBYTE'') Input pointer to upper left corner of raster image to compress.
 
'''ulBitwide'''(''ULONG'') Width of raster image to compress in bits; must be less than or equal to 2560 + 63 = 2623.
 
'''ulBitheight'''(''ULONG'') Height of raster image to compress in bits.
 
'''pfnFlushBuffer'''(''PFN'') The prototype for this function must be:
 
<pre class="western">void  pfnFlushBuffer ( PVOID,
                        PBYTE,
                        ULONG );</pre>
PVOID Use is the same as G4.
 
PBYTE Unsigned char * to output buffer; same as pbOutput.
 
ULONG Unsigned long; size of pbOutput buffer; same as ulOutputSize.
 
'''Returns'''
 
Success Count of data written out (compressed data count). <br />Failure GPLCOMPRESS_ERROR (-1)
 
'''Related Functions'''The following G3 &quot;Fax&quot;-compression related functions provide help in sending down special G3 commands.
 
GplFaxG3StartBlock() Modified Huffman (MH) Group 3 end of line (EOL) sent at the beginning of the first page. This function outputs the EOL to pbOutput and initializes pulBitposition to 12. It simply sends out the EOL bit sequence to signal the start of raster data (for example, '000000000001 ' binary, eleven 0's and a single 1).
 
Inputs
 
pbOutput Output buffer to fill <br />pulBitposition Bit-position count in the output buffer
 
Returns Void
 
GplFaxG3EndBlock() End of block flushed.
 
<pre class="western">GplFaxG3EndBlock( PVOID    hThread,
                  PBYTE    pbOutput,
                  ULONG    ulOutputSize,
                  PULONG  pulBitposition
                  PFN      pfnFlushBuffer );</pre>
Inputs
 
hThread PVOID.
 
pbOutput Output buffer to fill.
 
ulOutputSize Size in bytes of output buffer; must be a multiple of 32 bits; must be divisible by 4.
 
pulBitposition Bit-position count in the output buffer; *pulBitposition gets updated and must be stored off the pddc.
 
pfnFlushBuffer Flush buffer function; prototype for this function must be:
 
<pre class="western">void  pfnFlushBuffer( PVOID,
                      PBYTE,
                      ULONG );</pre>
PVOID Use is the same as above.
 
PBYTE Unsigned char to output buffer; same as pbOutput.
 
ULONG Unsigned long; size of pbOutput buffer; same as ulOutputSize.
 
Returns
 
Success Count of data written out (compressed data count).
 
Failure GPLCOMPRESS_ERROR (-1).
 
GplFaxG3EndDoc() Modified Huffman (MH) Group 3 return to control (RTC) sent at the end of document.
 
<pre class="western">GplFaxG3EndDoc( PVOID    hThread,
                PBYTE    pbOutput,
                ULONG    ulOutputSize,
                PULONG  pulBitposition
                PFN      pfnFlushBuffer );</pre>
Inputs
 
hThread PVOID.
 
pbOutput Output buffer to fill.
 
ulOutputSize Size in bytes of output buffer; must be a multiple of 32 bits; must be divisible by 4.
 
pulBitposition Bit-position count in the output buffer; gets updated and must be stored off the pddc.
 
pfnFlushBuffer Flush buffer function; prototype for this function must be:
 
<pre class="western">void  pfnFlushBuffer( PVOID,
                      PBYTE,
                      ULONG );</pre>
PVOID Use is the same as above.
 
PBYTE Unsigned char to output buffer; same as pbOutput.
 
ULONG Unsigned long; size of pbOutput buffer; same as ulOutputSize.
 
Returns
 
Success Count of data written out (compressed data count).
 
Failure GPLCOMPRESS_ERROR (-1).
 
GplFaxG3NewFrame() Modified Huffman (MH) Group 3 end of line (EOL) sent at the beginning of each new page. This function is the same as GplFaxG3EncodeBlock() except that it flushes data at this point to cause the current page to be completely sent. This call sends compressed data followed by the EOL bit sequence (see GplFaxG3StartBlock).
 
Instead of GplFaxG3NewFrame() you can use pfnFlushBuffer() = NULL to see whether or not the buffer for GplFaxG3EncodeBlock() is large enough. You output the bytes after GplFaxG3EncodeBlock() returns OK. You can then call GplFaxG3StartBlock(). This function places an EOL in the output buffer and sets the pulBitposition to 12.
 
<pre class="western">GplFaxG3NewFrame( HTHREAD  hThread,
                  PBYTE    pbOutput,
                  ULONG    ulOutputSize,
                  PULONG  pulBitposition
                  PFN      pfnFlushBuffer );</pre>
Inputs
 
hThread HTHREAD
 
pbOutput Output buffer to fill.
 
ulOutputSize Size in bytes of output buffer; must be a multiple of 32 bits.
 
pulBitposition Bit-position count in the output buffer.
 
pfnFlushBuffer Flush buffer function; prototype for this function must be:
 
<pre class="western">void  pfnFlushBuffer( PVOID,
                      PBYTE,
                      ULONG );</pre>
PVOID Use is the same as above.
 
PBYTE Unsigned char to output buffer; same as pbOutput.
 
ULONG Unsigned long; size of pbOutput buffer; same as ulOutputSize.
 
Returns
 
Success Count of data written out (compressed data count).
 
Failure GPLCOMPRESS_ERROR (-1)
 
=== GplFaxG4EncodeBlock ===
 
'''Description'''
 
This function performs G4 &quot;Fax&quot;-type compression.
 
It is similar to [[00040.htm|GplFaxG3EncodeBlock]](), but it has five extra parameters. These extra parameters are used to keep track of on/off bit runs between calls.
 
The driver is again responsible for all memory allocations.
 
Make sure all buffers for on/off bit tracking are equal to scanline DWORD aligned.
 
'''Format'''
 
<pre class="western">GplFaxG4EncodeBlock( PVOID  pddc,
                    PBYTE  pbOutput,
                    ULONG  ulOutputSize,
                    PULONG  pulBitposition,
                    PBYTE  pbInput,
                    ULONG  ulBitwide,
                    ULONG  ulBitheight,
                    PFN    pfnFlushBuffer,
                    PULONG  pulwstartc,
                    PULONG  pulbstartc,
                    PULONG  pulwstartp,
                    PULONG  pulbstartp,
                    ULONG  ulSkipCount );</pre>
'''Parameters'''
 
'''pddc'''(''PVOID'') First parameter to pfnFlushBuffer; generally pddc or hThread.
 
'''pbOutput'''(''PBYTE'') Pointer to output buffer to fill.
 
'''ulOutputSize'''(''ULONG'') Size in bytes of output buffer; must be a multiple of 32 bits; must be divisible by 4.
 
'''pulBitposition'''(''PULONG'') Pointer to position in the output buffer; gets updated and must be unique to each print job; *pulBitposition must be zero on the first invocation of this function for a block.
 
'''pbInput'''(''PBYTE'') Input pointer to upper left corner of raster image to compress.
 
'''ulBitwide'''(''ULONG'') Width of raster image to compress in bits; must be less than or equal to 2560 + 63 = 2623.
 
'''ulBitheight'''(''ULONG'') Height of raster image to compress in bits.
 
'''pfnFlushBuffer'''(''PFN'') The prototype for this function must be:
 
<pre class="western">void  pfnFlushBuffer ( PVOID,
                        PBYTE,
                        ULONG );</pre>
PVOID Use is the same as G3; necessary parameter for separating printout; generally pddc or hThread.
 
PBYTE Unsigned char * to output buffer; same as pbOutput.
 
ULONG Unsigned long; size of pbOutput buffer; same as ulOutputSize.
 
pfnFlushBuffer can be either NULL or point to a function that you supply that will write the compressed bytes out. If pfnFlushBuffer is not NULL, this function will be called when output buffer is full. If pfnFlushBuffer is NULL, you must write the bytes out yourself.
 
If pfnFlushBuffer() = NULL this function will compress the data and place it into pbOutput. If the output buffer size is not large enough for all the compressed data, the function will return with -1 = error. If pfnFlushBuffer() is not NULL, every time pbOutput is full, pfnFlushBuffer( ) is called to write the compressed bytes out. Note that the return value will the total number of bytes written even though the buffer was filled multiple times.
 
'''pulwstartc'''(''PULONG'') Pointer to array of ULONGs. Its length must be ( ulBitwide + 31 ) / 32 + 2. The 2 extra ULONGs are needed. So for an image of 371 bits width, the length of this array is ( 371 + 31 ) / 32 = 12 plus 2 more-which is 14 unsigned longs. This array is used to store the start bits of the beginning of consecutive 0 bits for the current scan line.
 
'''pulbstartc'''(''PULONG'') Size is the same calculation as above. This array is used to store the start bits of the beginning of consecutive 1 bits for the current scan line.
 
'''pulwstartp'''(''PULONG'') Size is the same calculation as above. This array is used to store the start bits of the beginning of consecutive 0 bits for the previous scan line. This must be zero filled on the first invocation of this function.
 
'''pulbstartp'''(''PULONG'') Size is the same calculation as above. This array is used to store the start bits of the beginning of consecutive 1 bits for the previous scan line. This must be zero filled on the first invocation of this function.
 
'''ulSkipCount'''(''ULONG'') Number of bytes to skip to the next row of input data to compress.
 
'''Returns'''
 
Success Count of data written out (compressed data count). <br />Failure GPLCOMPRESS_ERROR (-1)
 
'''Related Function'''The following is a G4-compression related function automatically sends the &quot;End Block&quot; data sequence (24 bits represented by Hex 001001).
 
GplFaxG4EndBlock() Modified Read ( MRR) Group 4 compression with K = infinity for sending end-of-facsimile block (EOFB). This function has the same first eight parameters as GplFaxG4EncodeBlock().
 
<pre class="western">GplFaxG4EndBlock( PVOID  pHandle,
                  PBYTE  pbOutput,
                  ULONG  ulOutputSize,
                  PULONG  pulBitposition,
                  PBYTE  pbInput,
                  ULONG  ulBitwide,
                  ULONG  ulBitheight,
                  PFN    pfnFlushBuffer );</pre>
Inputs
 
pddc PVOID; used as first parameter to the pfnFlushBuffer function; generally the pddc or HTHREAD.
 
pbOutput Output buffer to fill.
 
ulOutputSize Size in bytes of output buffer; must be a multiple of 32 bits; must be divisible by 4.
 
pulBitposition Bit-position count in the output buffer; gets updated and must be unique to each print job.
 
ulBitwide Width of the raster image in bits.
 
ulBitheight Height of the raster image in bits.
 
pfnFlushBuffer Flush buffer function; prototype for this function must be:
 
<pre class="western">void  pfnFlushBuffer( PVOID,
                      PBYTE,
                      ULONG );</pre>
PVOID Necessary parameter for separating printout; generally pddc or hThread.
 
PBYTE Unsigned char * to output buffer; same as pbOutput.
 
ULONG Unsigned long; size of pbOutput buffer; same as ulOutputSize.
 
pfnFlushBuffer can be either NULL or point to the function you supply that will write the compressed bytes out. If pfnFlushBuffer is not NULL, this function will be called when the output buffer is full. If pfnFlushBuffer is NULL, you must write the bytes out yourself.
 
Returns
 
Success Count of data written out (compressed data count). <br />Failure GPLCOMPRESS_ERROR (-1)
 
=== GplFaxTIFF2EncodeBlock ===
 
'''Description'''
 
TIFF algorithm 2 compression. This function essentially provides a &quot; Modified Huffman&quot; G3 compression with no size limits. It is limited only by the byte representation of ULONG (4 Gigabytes).
 
'''Format'''
 
<pre class="western">GplFaxTIFF2EncodeBlock( PVOID  pHandle,
                        PBYTE  pbOutput,
                        ULONG  ulOutputSize,
                        PULONG  pulBitposition,
                        PBYTE  pbInput,
                        ULONG  ulBitwide,
                        ULONG  ulBitheight,
                        PFN    pfnFlushBuffer );</pre>
'''Parameters'''
 
'''pHandle'''(''PVOID'') Pointer to a handle.
 
'''pbOutput'''(''PBYTE'') Pointer to output buffer to fill.
 
'''ulOutputSize'''(''ULONG'') Size in bytes of output buffer; must be a multiple of 32 bits; must be divisible by 4.
 
'''pulBitposition'''(''PULONG'') Pointer to position in output buffer.
 
'''pbInput'''(''PBYTE'') Input pointer to upper left corner of raster image to compress.
 
'''ulBitwide'''(''ULONG'') Width of raster image to compress in bits.
 
'''ulBitheight'''(''ULONG'') Height of raster image to compress in bits.
 
'''pfnFlushBuffer'''(''PFN'') Flush buffer function; prototype for this function must be:
 
<pre class="western">void  pfnFlushBuffer( PVOID,
                      PBYTE,
                      ULONG );</pre>
PVOID Necessary parameter for separating printout; generally pddc or hThread.
 
PBYTE Unsigned char * to output buffer; same as pbOutput.
 
ULONG Unsigned long; size of pbOutput buffer; same as ulOutputSize.
 
'''Returns'''
 
Success Count of data written out (compressed data count). <br />Failure GPLCOMPRESS_ERROR (-1)
 
'''Related Functions'''The following are TIFF2-compression related functions.
 
GplFaxTIFF2StartBlock() TIFF algorithm 2 compression start-of-document function.
 
Inputs
 
pulBitposition Bit-position count in the output buffer; *pulBitposition gets updated and must be stored off the pddc; function just sets pulBitposition to 0 (you can do this yourself).
 
Returns Void
 
GplFaxTIFF2EndBlock() TIFF algorithm 2 compression to flush output buffer.
 
<pre class="western">GplFaxTIFF2EndBlock( PVOID  pHandle,
                    PBYTE  pbOutput,
                    ULONG  ulOutputSize,
                    PULONG  pulBitposition,
                    PBYTE  pbInput,
                    ULONG  ulBitwide,
                    ULONG  ulBitheight,
                    PFN    pfnFlushBuffer );</pre>
Inputs
 
hThread HTHREAD.
 
pbOutput Output buffer to fill.
 
ulOutputSize Size in bytes of output buffer; must be divisible by 4.
 
pulBitposition Bit-position count in the output buffer; must be a multiple of 32 bits; gets updated and must be stored off the pddc.
 
pbInput Input pointer to upper left corner of raster image to compress.
 
ulBitwide Width of the raster image in bits.
 
ulBitheight Height of the raster image in bits.
 
pfnFlushBuffer Flush buffer function; prototype for this function must be:
 
<pre class="western">int  pfnFlushBuffer( HTHREAD,
                    PBYTE,
                    ULONG );</pre>
HTHREAD Gotten from GplThreadCreateInstance().
 
PBYTE Unsigned char to output buffer; same as pbOutput.
 
ULONG Unsigned long; size of pbOutput buffer; same as ulOutputSize.
 
Returns
 
TRUE If OK <br />FALSE If error
 
=== Exception Management ===
This package contains functions for setting errors with WinSetErrorInfo and logging appropriate warnings, exceptions, and error codes.
 
Four ascending severity levels are defined for error messages:
 
Warning The function detected a problem, took corrective action, and was able to complete processing successfully.
 
Error The function detected a problem for which no sensible corrective action is possible. The function is not executed and the system remains at the same state as when the function was requested.
 
Severe Error The function detected a problem from which the system cannot reestablish its state. The function has partially executed and the application must now make some corrective action to restore the system to a known state.
 
Unrecoverable Error The function detected an error from which it is impossible for the system to reestablish the state that it held at the time that the function was called. It is also impossible for the application to restore the system to a known state.
 
To use the GenPLib Exception-Management package, you must include:
 
<pre class="western">INCL_GENPLIB_ERROR</pre>
 
The following functions are included in the package:
 
[[00044.htm|GplErrSetDosError]]<br />[[00045.htm|GplErrSetError]]<br />[[00046.htm|GplErrSetSevereError]]<br />[[00047.htm|GplErrSetWarning]]<br />[[00048.htm|GplErrSetUnrecoverableError]]
 
=== GplErrSetDosError ===
 
'''Description'''
 
This function saves DOS error.
 
'''Format'''
 
<pre class="western">ERRORID APIENTRY GplErrSetDosError( USHORT usDosError );</pre>
'''Parameter'''
 
'''usDosError'''(''USHORT'') Any error code defined in BSEERR.H that best identifies the failing event.
 
'''Returns'''
 
Success ERRORID <br />Failure None
 
=== GplErrSetError ===
 
'''Description'''
 
This function saves an error.
 
'''Format'''
 
<pre class="western">ERRORID APIENTRY GplErrSetError( USHORT usError );</pre>
'''Parameter'''
 
'''usError'''(''USHORT'') Any error code defined in PMERR.H that best identifies the failing event.
 
'''Returns'''
 
Success ERRORID <br />Failure None
 
=== GplErrSetSevereError ===
 
'''Description'''
 
This function saves a severe error.
 
'''Format'''
 
<pre class="western">ERRORID APIENTRY GplErrSetSevereError( USHORT usError );</pre>
'''Parameter'''
 
'''usError'''(''USHORT'') Any error code defined in PMERR.H that best identifies the failing event.
 
'''Returns'''
 
Success ERRORID <br />Failure None
 
=== GplErrSetWarning ===
 
'''Description'''
 
This function saves the error warning.
 
'''Format'''
 
<pre class="western">ERRORID APIENTRY GplErrSetWarning( USHORT usError );</pre>
'''Parameter'''
 
'''usError'''(''USHORT'') Any error code defined in PMERR.H that best identifies the failing event.
 
'''Returns'''
 
Success ERRORID <br />Failure None
 
=== GplErrSetUnrecoverableError ===
 
'''Description'''
 
This function saves an unrecoverable error.
 
'''Format'''
 
<pre class="western">ERRORID APIENTRY GplErrSetUnrecoverableError( USHORT usError );</pre>
'''Parameter'''
 
'''usError'''(''USHORT'') Any error code defined in PMERR.H that best identifies the failing event.
 
'''Returns'''
 
Success ERRORID <br />Failure None
 
=== Memory Management ===
This package manages global and process (shared and non-shared) memory areas (heaps) using a single handle to a memory control block (HMCB) for all allocations. Therefore, you do not need to manage different heap or memory handles within your code.
 
This package calls appropriate OS/2 system APIs for memory creation and allocation. Dosxxx, SSxxx, and other API decisions are optimized for current OS/2 version performance. Examples include the underlying file system paging architecture and the number of processes in system.
 
Memory areas (heaps) are automatically grown when the initial memory size runs out. Committing more memory than needed is not required. Your code can use a single HMCB and underlying code will manage multiple memory areas ( heaps) if necessary.
 
Sets of debug trace information are displayed whenever memory is overwritten by other processes or writes to memory exceed the allocation size. Memory that has been allocated and not freed (memory leaks) is also shown as debug information.
 
To use the GenPLib Memory-Management package, you must include:
 
<pre class="western">INCL_GENPLIB_MEMORY</pre>
 
 
The following APIs comprise the GenPLib Memory-Management package:
 
*[[00051.htm|GplMemoryCreateInstance]]<br />*[[00052.htm|GplMemoryDeleteInstance]]<br />*[[00053.htm|GplMemoryAlloc]]<br />*[[00054.htm|GplMemoryFree]]<br />*[[00055.htm|GplMemoryGetObjectSize]]<br />*[[00056.htm|GplMemorySetUserID]]
 
=== Call Flow ===
The [[00051.htm|GplMemoryCreateInstance]]() function should be the first memory API called in order to get a handle to a memory control block (HMCB). The HMCB handles all memory allocations. Using an HMCB, any number of memory allocations can be made using [[00053.htm|GplMemoryAlloc]](). These allocations should be freed using [[00054.htm|GplMemoryFree]].
 
[[00052.htm|GplMemoryDeleteInstance]]() is used when the HMCB is no longer needed for memory allocations.
 
'''Note:'''Any memory that was allocated using [[00053.htm|GplMemoryAlloc]]() using an HMCB being deleted by [[00052.htm|GplMemoryDeleteInstance]]and not freed by a corresponding [[00054.htm|GplMemoryFree]]() call will be shown as debug output (with location of function where allocation was done) for developers to correct memory leaks within their code.
 
=== GplMemoryCreateInstance ===
 
'''Description'''
 
This function creates an MCB and a user heap.
 
'''Format'''
 
<pre class="western">HMCB APIENTRY GplMemoryCreateInstance( ULONG  ulPrimarySize,
                                      ULONG  ulExtSize,
                                      ULONG  ulThreshold,
                                      ULONG  ulType );</pre>
'''Parameters'''
 
'''ulPrimarySize'''(''ULONG'') Initial Heap size in bytes.
 
'''ulExtSize'''(''ULONG'') Heap growth size fills in bytes.
 
'''ulThreshold'''(''ULONG'') Threshold for heap allocation. Requests larger than this will be converted to DosAllocMem.
 
'''ulType'''(''ULONG'') Heap type (process, shared). See the following notes for a description of process and shared heaps.
 
'''Returns'''
 
Success Valid handle to memory control block. Failure NULL. <br />WinGetLastError() will return one of the following: <br />PMERR_MEMORY_ALLOCATION_ERROR <br />PMERR_INV_OR_INCOMPAT_OPTIONS
 
'''Notes'''
 
Treat creating a memory instance like creating a memory heap. The ulSize parameter should be a reasonable amount of memory for most of your processing. It is not necessary to set ulSize to a high number so that you do not run out of memory, because the memory area will automatically grow if your processing allocates more than the amount originally set by ulSize.
 
When the memory area is automatically grown, the ulExtSize value is used to determine how large an additional memory area should be created. A default value of 0 (zero) may be used, and the growth size will be tailored to a reasonable amount for the OS/2 version.
 
The [[00053.htm|GplMemoryAlloc]]() API will allocate memory blocks differently based on the ulThreshold value. Typically, allocations of memory of sizes less than the threshold are allocated in a fast access memory area, and sizes larger than the threshold are allocated from a different memory pool. A default value of 0 (zero) may be used and the threshold will be automatically set to perform most efficiently on the current OS/2 version.
 
The ulType parameter allows you to specify the type of memory that you want to allocate. This defines the scope of accessibility to the memory within your driver or program and is one of the following:
 
'''SHARED_MEMORY'''Used to create a global memory area (heap). For example, it is used for allocating global data like string tables in a printer driver.
 
'''PROCESS_MEMORY'''Used to create a per process memory area (heap). For example , it is used for allocating a per device context (DC) memory in a printer driver.
 
=== GplMemoryDeleteInstance ===
 
'''Description'''
 
This function frees memory heap(s) for the user.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplMemoryDeleteInstance( HMCB  hMCB );</pre>
'''Parameter'''
 
'''hMCB'''(''HMCB'') Pointer to memory allocated.
 
'''Returns'''
 
Success NO_ERROR. <br />Returns valid handle to memory control block. Failure ERROR_INVALID_PARA <br />or return values from: <br />SSFreeMem <br />DosFreeMem <br />DosSubUnsetMem <br />WinGetLastError() returns one of the following: <br />PM_INV_OR_INCOMPAT_OPTIONS <br />PMERR_MEMORY_DEALLOCATION_ERR
 
=== GplMemoryAlloc ===
 
'''Description'''
 
This function allocates memory for the user.
 
'''Format'''
 
<pre class="western">PVOID APIENTRY GplMemoryAlloc( HMCB  hMCB,
                              ULONG  ulSize );</pre>
'''Parameters'''
 
'''hMCB'''(''HMCB'') Handle to memory control block.
 
'''ulSize'''(''ULONG'') Amount to allocate.
 
'''Returns'''
 
Success Valid pointer to memory allocated. Failure NULL. <br />WinGetLastError() returns one of the following: <br />PMERR_INV_OR_INCOMPAT_OPTIONS <br />PMERR_INSUFFICIENT_MEMORY
 
=== GplMemoryFree ===
 
'''Description'''
 
This function frees memory for a user.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplMemoryFree( PVOID  pData );</pre>
'''Parameter'''
 
'''pData'''(''PVOID'') Pointer to memory allocated.
 
'''Returns'''
 
Success NO_ERROR. Failure ERROR_INVALID_PARA <br />or return values from: <br />SSFreeMem <br />DosFreeMem <br />DosSubFreeMem <br />WinGetLastError() returns one of the following: <br />PM_INV_OR_INCOMPAT_OPTIONS <br />PMERR_MEMORY_DEALLOCATION_ERR
 
=== GplMemoryGetObjectSize ===
 
'''Description'''
 
This function returns the size of a memory object allocated by [[00053.htm|GplMemoryAlloc]].
 
'''Format'''
 
<pre class="western">LONG APIENTRY GplMemoryGetObjectSize( PVOID  pData );</pre>
'''Parameter'''
 
'''pData'''(''PVOID'') Pointer to object.
 
'''Returns'''
 
Success Size of memory object.
 
(LONG) lsize
 
Failure 0, no size found for memory object. WinGetLastError will return PMERR_INVALID_PARAMETERS (meaning pData was invalid or NULL).
 
 
=== GplMemorySetUserID ===
 
'''Description'''
 
This function is optional, and it is helpful in debugging. You attach a pointer to the heap instance (like your pddc or pdb)-this extra pointer can then be viewed under the kernel debugger.
 
'''Format'''
 
<pre class="western">VOID APIENTRY GplMemorySetUserID( HMCB  hMCB,
                                  ULONG  ulUserID );</pre>
'''Parameters'''
 
'''hMCB'''(''HMCB'') Handle to memory control block.
 
'''ulUserID'''(''ULONG'') Pointer to something helpful.
 
=== Implementation ===
The GenPLib Memory-Management package was created to provide consistency and to simplify the growth and management of heaps.
 
This package was one of the first developed for driver use. When writing a driver &quot;from scratch&quot; or modifying a driver to use GenPLib, begin with this package because many of the other GenPLib packages require memory allocated in the unique format of the memory-management package.
 
Previously, all drivers had to manage their own memory heaps, often using memory allocation packages exported from other parts of the OS/2 system-for example, the INCL_WINHEAP functions from PM WIN or the Subsystem Allocation routines in the PM Graphics Rendering Engine (GRE). It was never clear what routines should be used in a presentation driver or where they should be used (especially for portability). Many of these packages did not allow the caller to grow their heaps, provided no controls for memory leakage, and had no validation or recovery when a driver terminated unexpectedly.
 
A typical raster printer driver creates two types of heaps: a shared heap during Dynamic Link Library (DLL) initialization processing, and a per-DC heap when the PM GRE enables the driver during the FILL_PHYSICAL (02 Hex) subfunction. These heaps are freed during corresponding DLL termination and DISABLE_PHYSICAL calls to the driver.
 
In addition, a per-process heap is also created for the OS2_PM_DRV_DEVMODE entry point in a printer presentation driver. This entry point causes the driver to display its printer and job properties dialogs to the user or to retrieve printer and job property information for a specific output device/ destination.
 
A typical driver initially allocates a 256KB shared global heap and a 100KB per-DC heap and elects to use the memory package's default heap growth size and threshold for larger allocations (achieved by passing in 0L for parameters 2 and 3 for [[00052.htm|GplMemoryDeleteInstance]]).
 
In case of unexpected driver termination, a driver should register a per- process exception handler for each of the major presentation driver entry points. This exception handler can contain cleanup code that frees any per- process heaps created using [[00051.htm|GplMemoryCreateInstance]]in case any code problems cause an exception to occur.
 
One major benefit of the GenPLib memory code is the ability to detect memory leaks (memory a driver allocates but never frees). Whenever a call to [[00052.htm|GplMemoryDeleteInstance]]is made, all memory allocated from the heap is freed so that no leaks can occur. If the debug version of the GenPLib library is used, while [[00052.htm|GplMemoryDeleteInstance]]is cleaning up memory areas that a developer forgot to free, it will inform the developer on a debugging terminal which line of code allocated the memory that was not freed. This is possible because the memory-management package records the function address (and other information) from where [[00053.htm|GplMemoryAlloc]]is called.
 
An OS/2 presentation driver must consider the memory constraints of the user and other programs in the system. In the past, drivers allocated large heaps, hoping the memory an application needed would never overrun the amount initially allocated and cause an exception. Under the paging architecture of OS/2 Warp, however, all the heap memory is often committed during heap creation.
 
All this memory could be forced in and never used by an application (for example, an application queries the driver for the devices it supports and performs no output). In this case, the driver's memory pages would not be touched, so OS/2 would slowly page it out and give it back to the applications that had it in the first place. As a result, a good deal of swapping could occur for active addressable memory, especially on low-RAM systems. The alternative was to force the driver to manage its own heap growth and consolidate multiple heaps.
 
Using the GenPLib Memory-Management package, the heap is identified to the driver as a generic handle to a memory control block (HMCB), not as an address into memory. This handle is supplied by [[00051.htm|GplMemoryCreateInstance]]and is used to identify the heap for all subsequent memory allocations and frees.
 
Therefore, a reasonable initial heap can be created that is just large enough to allow the driver to enable and respond to basic queries. As applications use the driver to render graphics (or other memory-intensive operations), the memory package detects when a given [[00053.htm|GplMemoryAlloc]]call will overflow the current heap and grows it by a default or specified size. The caller does not ever need to know that the heap has grown because it continues to use the same HMCB, while the memory package chains these heaps together.
 
=== Example Code ===
 
'''Creating and Allocating From a Per-DC Heap'''
 
Following is an example of creating and allocating from a per-DC heap during a printer-driver enable via the OS2_PM_DRV_ENABLE entry point:
 
<pre class="western">ULONG APIENTRY OS2_PM_DRV_ENABLE( ULONG ulSubFunc, ULONG p1, ULONG p2 )
{
  switch( ulSubFunc )            // Determine which enable/disable subfunction
  {
    case FILL_PHYSICAL:          // Enable subfunction
    {
      // Create a per-DC memory area (heap)
      hmcbHeap = GplMemoryCreateInstance(
                          LEN_DCHEAP,            // Size of DC Heap (80K)
                          0L,                    // Default extent
                          0L,                    // Default threshold
                          PROCESS_MEMORY );      // Type of heap (define in GPLMEM.H)
 
      // If GplMemoryCreateInstance succeeded
      if(hmcbHeap != NULL);
      {
        // Allocate PDEVICEBLOCK
        pddc-&gt;pdb = ( PDEVICEBLOCK ) GplMemoryAlloc( hmcbHeap, sizeof( DEVICEBLOCK ) );
 
      } /* end if */
    } /* end case */
    break;
  } /* end switch */
} /* end OS2_PM_DRV_ENABLE */</pre>
'''Note:'''System memory must be used when passing data buffers to PrtWrite() calls.
 
'''Creating a Global Heap'''
 
Following is an example of creating a global heap:
 
<pre class="western">ULONG APIENTRY  _DLL_InitTerm( ULONG hThisModule, ULONG ulFlag )
{
  switch( ulFlag )        // Flag to determine which load/unload module subfunction
  {
    case 0:              // Load module
    {
      // Create a global heap
      globals.pvHeap = GplMemoryCreateInstance(
                                LEN_SHAREDHEAP,  // Initial size (256K)
                                0,                // Default extent
                                0,                // Default threshold
                                SHARED_MEMORY);  // Type of heap (defined in GPLMEM.H)
    } /* end case */
    break;
  } /* end switch */
} /* end _DLL_InitTerm */</pre>
'''Allocating From a Global Heap'''
 
Following is an example of allocating from a global heap:
 
<pre class="western">switch( ulSubFunc )                      // Determine which enable/disable subfunction
{
  case FILL_LOGICAL:                      // Enable subfunction
  {
    // For every string in our driver's string resource table
    for( i=0; i &lt; STRING_TABLE_SIZE; i++ )
    {
      // Load each string from resource table (returns length)
      sLen = WinLoadString (szTemp);
 
      // Allocate memory to hold string just loaded from global heap
      globals.pbStringTable[i] = GplMemoryAlloc( globals.pvSharedHeap, sLen+1 );
 
      // Copy string from temporary buffer to our driver's global string table
      strcpy( globals.pbStringTable[i], szTemp );
 
    } /* end for */
    break;
  } /* end case */
} /* end switch */</pre>
'''Deleting a Per-DC Heap'''
 
Following is an example of deleting a per-DC heap:
 
<pre class="western">ULONG APIENTRY OS2_PM_DRV_ENABLE( ULONG ulSubFunc, ULONG p1, ULONG p2 )
{
  switch( ulSubFunc )
  {
    case DISABLE_PHYSICAL:
    {
      // Free per-DC heap after freeing per-DC memory objects
      GplMemoryDeleteInstance( hmcbHeap );
 
    } /* end case */
    break;
  } /* end switch */
} /* end OS2_PM_DRV_ENABLE */</pre>
'''Deleting a Global Heap'''
 
Following is an example of deleting a global heap:
 
<pre class="western">ULONG APIENTRY  _DLL_InitTerm( ULONG hThisModule, ULONG ulFlag )
{
  switch( ulFlag )
  {
    case 1:
    {
      // Free global heap after freeing global memory objects
      GplMemoryDeleteInstance( globals.pvSharedHeap );
 
    } /* end case */
    break;
  } /* end switch */
} /* end _DLL_InitTerm */</pre>
 
=== Output-Thread Management ===
The output-thread management module provides a way to create multiple output threads that will manage the sending of data buffers to the printer. This functionality has also been called ''second-thread code''; however, the implementation allows a separate thread per physical output address (for example, LPT, COM, and file).
 
This package seamlessly manages multiple buffer allocations and chains them together. It adjusts the internal data buffering to always try to keep the printer busy processing data. The functions assure that buffer sizes and their reuse align for the best performance with the system-memory memory model (for example, the OS/2 paging architecture).
 
'''Note:''' You may override the default buffer size and the maximum number of buffers to create.
 
Other benefits of using the separate output-thread code in your driver include:
 
*Ability to pass off data buffers as fast as you can fill them without waiting for a device with slower transfer speeds
 
*Unknowingly, the OS/2 PM graphics engine (and other system components) might have locked down system resources, such as fonts, while calling your driver. Therefore, implementing the thread code allows you to return to the graphics engine and free up the resource for other parts of the system, such as the display. This makes the system and applications more responsive to the user.
 
*The package uses the GenPLib Exception-Management package for simple debug tracing.
 
*The package uses the GenPLib Memory-Management package for allocation of instance data.
 
To use the GenPLib Output-Thread Management package, you must include:
 
<pre class="western">INCL_GENPLIB_THREAD</pre>
 
 
Following are the Output-Thread Management APIs:
 
*[[00061.htm|GplThreadCreateInstance]]
*[[00062.htm|GplThreadStart]]
*[[00063.htm|GplThreadOutput]]
*[[00064.htm|GplThreadEnd]]
*[[00065.htm|GplThreadDeleteInstance]]
*[[00066.htm|GplThreadAbortDoc]]
*[[00067.htm|GplThreadResetAbortDoc]]
*[[00068.htm|GplThreadFlushBuffer]]
*[[00069.htm|GplThreadHookDeviceWrites]]
 
=== Call Flow ===
The thread instance (data and semaphores) is initialized; but a real thread is not spun off until you are certain that the application is really sending data to be printed. Therefore, you can systematically use [[00061.htm|GplThreadCreateInstance]]() at enable and [[00062.htm|GplThreadStart]]() at the first data write. This keeps the code straightforward.
 
=== GplThreadCreateInstance ===
 
'''Description'''
 
This function is used to allocate and initialize thread instance data. This function must be called before making any other thread calls in order to get a thread instance handle (HTHREAD). Semaphores and buffers are not created or allocated by this call.
 
'''Format'''
 
<pre class="western">BOOL APIENTRY GplThreadCreateInstance( HMCB      hMcb
                                      HMODULE  hMod,
                                      HTHREAD  *phThread,
                                      PVOID    pvUserData );</pre>
'''Parameters'''
 
'''hMcb'''(''HMCB'') Handle to the memory control block (See [[00049.htm|Memory Management]]).
 
'''hMod'''(''HMODULE'') Handle of calling module. Used for exception management and error logging.
 
'''*phThread'''(''HTHREAD'')-output Thread instance handle.
 
'''pvUserData'''(''PVOID'')-output This is used in debugging and is optional. It is recommended that you place a helpful pointer, such as your pddc or pdb pointer.
 
'''Returns'''
 
Success TRUE <br />Failure FALSE
 
=== GplThreadStart ===
 
'''Description'''
 
This function starts or updates thread parameters. It creates semaphores and buffers, committing system resources.
 
'''Format'''
 
<pre class="western">BOOL APIENTRY GplThreadStart( HTHREAD  hThread,
                              LHANDLE  hSpooler,
                              HFILE    hDev,
                              ULONG    ulBufferSize,
                              USHORT  usMaxBuffers,
                              UCHAR    ucAbortChar,
                              ULONG    ulAbortCharCount,
                              ULONG    ulAbortBufferSize,
                              PBYTE    pbAbortBuffer,
                              PSZ      pszAbortString,
                              PSZ      pszLogAddress,
                              PSZ      pszWriteError,
                              PSZ      pszDeviceDescription,
                              LONG    lDCType );</pre>
'''Parameters'''
 
'''hThread'''(''HTHREAD'') Instance handle of thread to start. Returned by [[00061.htm|GplThreadCreateInstance]].
 
'''hSpooler'''(''LHANDLE'') Handle to Spooler (OD_QUEUED). Returned from SplQmOpen. May be zero (0) if hDev is supplied.
 
'''hDev'''(''HFILE'') Handle to Device (OD_DIRECT). Returned from PrtOpen. May be zero (0) if hSpooler is supplied.
 
'''ulBufferSize'''(''ULONG'') Size of buffer allocations. May be 0 to use default size.
 
'''usMaxBuffers'''(''USHORT'') Maximum number of buffers to create. May be 0 to use default # of buffers.
 
'''ucAbortChar'''(''UCHAR'') Character to send before the abort string. ucAbortChar can be used for devices that need to be sent a number of bytes before the abort string can be sent. ulAbortChar is sent first during the abort sequence.
 
'''ulAbortCharCount'''(''ULONG'') Number of ucAbortChars to send to the device.
 
'''ulAbortBufferSize'''(''ULONG'') Abort buffer size in bytes.
 
'''pbAbortBuffer'''(''PBYTE'') Pointer to buffer to send when aborting a job. Buffer must not be deleted until after [[00064.htm|GplThreadEnd]]. ulAbortBuffer is sent after ulAbortChar.
 
'''pszAbortString'''(''PSZ'') Abort job reset command for your specific printer language. May be NULL and no string will be sent. pszAbortString is sent last in the abort sequence.
 
'''pszLogAddress'''(''PSZ'') File or port name (for example, LPT1). Used for error reporting. May be NULL.
 
'''pszWriteError'''(''PSZ'') Error prompt string to display in a SplMsgBox (for example, &quot;Unable to write to printer&quot;). May be NULL.
 
'''pszDeviceDescription'''(''PSZ'') Device description to display in a SplMsgBox ( for example, &quot;Laserprinter&quot;). May be NULL.
 
'''lDCType'''(''LONG'') DC type (OD_QUEUED, OD_DIRECT).
 
'''Returns'''
 
Success TRUE <br />Failure FALSE
 
'''Notes'''
 
ulAbortChar is sent first during the abort sequence. <br />ulAbortBuffer is sent after ulAbortChar. <br />pszAbortString is sent last in the abort sequence.
 
=== GplThreadOutput ===
 
'''Description'''
 
This function is used to pass data to a thread instance (referenced by the thread instance handle passed in) for output. [[00062.htm|GplThreadStart]]must be called prior to calling GplThreadOutput.
 
'''Format'''
 
<pre class="western">BOOL APIENTRY GplThreadOutput( HTHREAD  hThread,
                              PBYTE    pBytes,
                              ULONG    ulCount,
                              ULONG    fulDataType );</pre>
'''Parameters'''
 
'''hThread'''(''HTHREAD'') Thread instance handle.
 
'''pBytes'''(''PBYTE'') Pointer to data to buffer.
 
'''ulCount'''(''ULONG'') Size of data (byte size) pointed to by pBytes parameter
 
'''fulDataType'''(''ULONG'') Data type flag.
 
THREAD_DT_PRINTERLANGUAGE Data is printer language commands and only requires an abort string to be sent when aborting during this buffer. See pszAbortString in [[00062.htm|GplThreadStart]].
 
THREAD_DT_BINARY Data is binary (raster) data and requires a series of bytes to be sent to ensure the printer is not in binary transfer mode before the abort string can be sent. See ucAbortChar in [[00062.htm|GplThreadStart]].
 
'''Returns'''
 
Success TRUE <br />Failure FALSE
 
=== GplThreadEnd ===
 
'''Description'''
 
This function frees up any resources allocated by the thread instance ( semaphores and data buffers). A call to this function implies that any remaining data buffers are flushed before the return of this call. This call is the logical pair to GplThreadCreate, which allocates system resources.
 
'''Format'''
 
<pre class="western">BOOL APIENTRY GplThreadEnd( HTHREAD  hThread );</pre>
'''Parameter'''
 
'''hThread'''(''HTHREAD'') Handle to thread instance.
 
'''Returns'''
 
Success TRUE <br />Failure FALSE
 
=== GplThreadDeleteInstance ===
 
'''Description'''
 
This function is used to free thread instance data allocated by a corresponding call to [[00061.htm|GplThreadCreateInstance]]().
 
'''Format'''
 
<pre class="western">BOOL APIENTRY GplThreadDeleteInstance( HTHREAD *phThread );</pre>
'''Parameter'''
 
'''phThread'''(''HTHREAD'') Pointer to the thread instance handle to be freed.
 
'''Returns'''
 
Success TRUE <br />Failure FALSE
 
=== GplThreadAbortDoc ===
 
'''Description'''
 
This function is called to abort output from the thread that is referenced by the thread instance handle that was passed in. After output is stopped, the function will attempt to restore the printer to a known state where it can process data from another print job.
 
The first issue to consider when using this function is that the device may be executing a command that has a large amount of data that it is expecting to receive as a block. Therefore the parameter ulAbortChar passed in on [[00062.htm|GplThreadStart]]is sent ulAbortCharCount times.
 
The second issue to consider is that the abort string 'pszAbortString' provided in [[00062.htm|GplThreadStart]]() is sent last.
 
'''Format'''
 
<pre class="western">BOOL APIENTRY GplThreadAbortDoc( HTHREAD  hThread );</pre>
'''Parameter'''
 
'''hThread'''(''HTHREAD'') Handle to thread instance.
 
'''Returns'''
 
Success TRUE <br />Failure FALSE
 
=== GplThreadResetAbortDoc ===
 
'''Description'''
 
This function is used to resolve any previous calls to [[00066.htm|GplThreadAbortDoc]]() so that another job can start printing using the same thread instance handle.
 
This function will wait, if necessary, for the abort processing started by [[00066.htm|GplThreadAbortDoc]]to be completed before returning so that the thread instance can be put into a state to receive data from a new print job.
 
'''Format'''
 
<pre class="western">BOOL APIENTRY GplThreadResetAbortDoc( HTHREAD  hThread );</pre>
'''Parameter'''
 
'''hThread'''(''HTHREAD'') Handle to thread instance.
 
'''Returns'''
 
Success TRUE <br />Failure FALSE
 
=== GplThreadFlushBuffer ===
 
'''Description'''
 
This function causes all data buffers currently being managed by the thread instance to be flushed (written) to their final output destination (for example, parallel port and spool file).
 
This call allows a flag to be set so that all the data buffers are sent ( flushed) before this call returns (fwait == TRUE) or synchronously (fwait = = FALSE).
 
'''Format'''
 
<pre class="western">BOOL APIENTRY GplThreadFlushBuffer( HTHREAD  hThread,
                                    BOOL    fWait );</pre>
'''Parameters'''
 
'''hThread'''(''HTHREAD'') Handle to thread instance.
 
'''fWait'''(''BOOL'') Flag indicating flush asynchronously or synchronously.
 
'''Returns'''
 
Success TRUE <br />Failure FALSE
 
=== GplThreadHookDeviceWrites ===
 
'''Description'''
 
This is an optional function. This call was created because a class of devices added to the Omni driver did not set status lines according to known standard protocols. Calling this function allows the Omni driver to interpret the status lines because it knows about the devices' special protocols.
 
'''Format'''
 
<pre class="western">BOOL APIENTRY GplThreadHookDeviceWrites( HTHREAD  hThread,
                                        PFN      PfnPrtWrite,
                                                  pddc );</pre>
'''Parameters'''
 
'''hThread'''(''HTHREAD'') Handle to thread instance.
 
'''pfnPrtWrite'''(''PFN'') Our function.
 
'''pddc'''Parameter to our function.
 
'''Returns'''
 
Success TRUE <br />Failure FALSE
 
=== Implementation ===
After the memory-management package is implemented, the next logical package that can be added to a driver is the GenPLib Output-Thread Management package.
 
The best place to implement threads in a driver is when sending and buffering data to what is more than likely a slower output device (or file) . This allows the driver to return back to the application and PM GRE for rendering the next page immediately to improve system response.
 
The benefits of adding multiple threads are proven in tests performed on OS /2 printer drivers that have added the GenPLib thread-management package. Results have shown a 7%-12% performance increase.
 
A printer driver retrieves a thread handle (HTHREAD) from GenPLib by calling [[00061.htm|GplThreadCreateInstance]]during the FILL_PHYSICAL enable subfunction . This call is made only if the DC type is OD_QUEUED or OD_DIRECT (the DC types that request output). This call does not start a thread at this time but causes the GenPLib thread code to initialize its internal structures with information you supply. Once again, a corresponding call to [[00065.htm|GplThreadDeleteInstance]]is made during the driver's disable subfunction DISABLE_PHYSICAL to free the thread handle.
 
The actual thread is started in the driver when the start-document escape code is received from the application (DEVESC_STARTDOC from the DevEscape() device call) using [[00062.htm|GplThreadStart]]. The [[00064.htm|GplThreadEnd]]call that stops the thread is placed in disable subfunction BEGIN_CLOSE_DC by the driver. It is not placed in end-document (DEVESC_ENDDOC) code because some applications choose to call many DEVESC_STARTDOC/DEVESC_ENDDOC pairs for the same DC. Placing the call in a disable subfunction assures that a thread will not start and stop many times in a row. The side effect of this is that the GenPLib thread code will receive multiple [[00062.htm|GplThreadStart]]calls for the same thread. In this case, subsequent [[00062.htm|GplThreadStart]]calls cause an implied flush of all data received at that time for the thread.
 
If you call [[00062.htm|GplThreadStart]]multiple times, the thread code accepts any changed information for input parameters to this call. This allows the driver to dynamically change the buffer size and the maximum number of buffers used by the thread code.
 
The [[00066.htm|GplThreadAbortDoc]]call is also added to the driver's escape code processing routine for the abort-document call (DEVESC_ABORTDOC). This call the thread code to clear data out of all its buffers and to ignore any other data received by the thread until a [[00067.htm|GplThreadResetAbortDoc]]call is made to the thread. As soon as all data is flushed by [[00066.htm|GplThreadAbortDoc]], the abort sequences supplied during [[00062.htm|GplThreadStart]]will place the printer in a known state for the next print job.
 
[[00067.htm|GplThreadResetAbortDoc]]tells the thread code that the job has ended, that no more data will be sent for this print job, and to resume sending data. This call is added during the end-document escape processing (DEVESC_ENDDOC ) in the driver. This allows applications that perform multiple DEVESC_ STARTDOC/DEVESC_ENDDOC calls for a single DC (that is, submitting multiple print jobs using one DC) to function normally.
 
[[00063.htm|GplThreadOutput]]is used to add any data to the thread's output buffers. The call has been added for the DEVESC_RAWDATA escape code. This escape code is sent to a driver to pass through raw data received from DOS or Windows applications along with a data buffer and data count. The call is also implemented wherever the driver needs to send out its own escape codes for graphical or text generating output. This data includes printer/job initialization commands, raster image data (compressed or uncompressed), font/text data, and job/printer termination commands.
 
The last function in the thread-management package is [[00068.htm|GplThreadFlushBuffer]], which tells the thread code to send all data currently held in the thread's buffers before the call returns. This call appears just after [[00067.htm|GplThreadResetAbortDoc]]in a driver's DEVESC_ENDDOC processing code.
 
=== Example Code ===
 
'''Starting a Thread With Output to a Printer'''
 
Following is an example of starting a thread with output to a printer:
 
<pre class="western">  case DEVESC_STARTDOC:                          // Escape code signals start of document
  {
    // If going to a file or direct to a printer
    if( OD_DIRECT == ulDCType )
    {
      // Open output port (printer-driver version of DosOpen)
      rc  =  PrtOpen( hFile, pszLogAddress );
 
      // Create/Update the second print thread
      rc = GplThreadStart( hThread,                // Instance handle
                          0,                      // Handle to spooler
                          hFile,                  // Handle to device
                          0,                      // Default buffer size
                          0,                      // Default number of buffers
                          '\0',                    // Abort character
                          1024,                    // Abort character repeat count
                          sizeof( pszCmdAbort );  // Length of abort command
                          pszCmdAbort,            // Our abort command
                          pszLogAddress,          // For example, LPT1
                          &quot;Error&quot;,                // Error string if write fails
                          pszDeviceName,          // For example, &quot;Epson LQ2550&quot;
                          ulDCType );              // DC type
    } /* end if */
  } /* end case */</pre>
'''Starting a Thread With Output Queuing &quot;Raw&quot; Data'''
 
Following is an example of starting a thread with output queuing &quot;raw&quot; printer escapes:
 
<pre class="western">  case DEVESC_STARTDOC:                          // Escape code signals start of document
  {
    // Else DC type is queued, not direct to a printer
    elseif( OD_QUEUED == ulDCType )
    {
      if( ulDataType == PM_Q_RAW )
      {
        if( !hspl )
        {
          // Open appropriate queue (from DevOpenData) for output
          hspl  =  SplQmOpen( &quot;*&quot;, 9, (PQMOPENDATA)&amp;DevOpenData );
          SplQmStartDoc( hspl, szDocumentName );
 
        } /* end if */
 
        // Create/Update the second print thread
        rc = GplThreadStart( hThread,                // Instance handle
                            hspl,                    // Handle to spooler
                            0,                      // Handle to device
                            0,                      // Default buffer size
                            0,                      // Default number of buffers
                            '\0',                    // Abort character
                            1024,                    // Abort character repeat count
                            sizeof( pszCmdAbort );  // Length of abort command
                            pszCmdAbort,            // Our abort command
                            pszLogAddress,          // For example, LPT1
                            &quot;Error&quot;,                // Error string if write fails
                            pszDeviceName,          // For example, &quot;Epson LQ2550&quot;
                            ulDCType );                // DC Type
      } /* end if */
    } /* end if */
  } /* end case */</pre>
'''Starting a Thread With Output Queuing &quot;Standard&quot; Data'''
 
Following is an example of starting a thread with output queuing &quot;standard&quot; data:
 
<pre class="western">  case DEVESC_STARTDOC:                          // Escape code signals start of document
  {
    // Else DC type is queued, not direct to a printer
    elseif( OD_QUEUED == ulDCType )
    {
      if( ulDataType == PM_Q_STD )
      {
        SplStdStart( pddc-&gt;pdb-&gt;hdc );
 
        // Open appropriate queue (from DevOpenData) for output
        hspl = SplQmOpen( &quot;*&quot;, 9, (PQMOPENDATA)&amp;DevOpenData );
 
        // Signal start of document (no thread is started by Omni driver)
        SplQmStartDoc( hspl, szDocumentName );
 
      } /* end if */
    } /* end if */
  } /* end case */</pre>
'''GplThreadCreateInstance and GplThreadDeleteInstance Usage'''
 
The enable and disable subfunctions FILL_PHYSICAL and DISABLE_PHYSICAL are ideal points at which to create and delete a thread instance. Following is an example of [[00061.htm|GplThreadCreateInstance]]() and [[00065.htm|GplThreadDeleteInstance]]() usage :
 
<pre class="western">ULONG APIENTRY OS2_PM_DRV_ENABLE( ULONG ulSubFunc, ULONG p1, ULONG p2 )
{
  switch( ulSubFunc )                                // Determine enable subfunction
  {
      case FILL_PHYSICAL:                            // An enable subfunction
      {
        // Only create a thread if we expect to output data
        if( (OD_QUEUED == pdb-&gt;ulType )  ||  (OD_DIRECT == pdb-&gt;ulType ) )
        {
          // Create an output thread instance (do not start thread yet)
          bRC = GplThreadCreateInstance( hmcbHeap, globals.hmod, &amp;hThread, pddc );
 
        } /* end if */
      } /* end case */
      break;
 
      case DISABLE_PHYSICAL:                          // A disable subfunction
      {
        // Delete the output thread instance if allocated
        if( hThread )
        {
          bRC = GplThreadDeleteInstance( &amp;hThread );
 
        } /* end if */
      } /* end case */
      break;
 
  } /* end switch */
} /* end OS2_PM_DRV_ENABLE */</pre>
'''GplThreadOutput Usage'''
 
Following is an example of [[00063.htm|GplThreadOutput]]() usage:
 
<pre class="western">  case DEVESC_NEWFRAME:                            // Page eject requested
  {
    CHAR achRasterCmd[] = &quot;*Esc*r1Q&quot;;
 
    // When getting a DEVESC_NEWFRAME or DEVESC_ENDDOC,
    // The current page's raster image can be retrieved from the
    // device surface and transferred to the printer
 
    // Enter raster mode by sending down escape code for current device
    bRC = GplThreadOutput( hThread,                // Thread instance handle
                            achRasterCmd,            // Pointer to data buffer
                            strlen(achRasterCmd),    // Size of data buffer
                            THREAD_DT_BINARY );      // Data type
 
    // Dither and/or compress raster data and send to output thread
    bRC = GplThreadOutput( hThread,
                            pbRasterData,
                            ulRasterDataLength,
                            THREAD_DT_BINARY );
 
  } /* end case */</pre>
'''[[00064.htm|GplThreadEnd]]Usage'''
 
Following is an example of [[00064.htm|GplThreadEnd]]usage during OS2_PM_DRV_ENABLE:
 
<pre class="western">ULONG APIENTRY OS2_PM_DRV_ENABLE( ULONG ulSubFunc, ULONG p1, ULONG p2 )
{
  switch( ulSubFunc )                              // Determine enable subfunction
  {
    case BEGIN_CLOSE_DC:
    {
      // If we created an output thread
      if( hThread )
      {
        // End  the  second  thread  implied  flush  with  wait
        bRC  =  GplThreadEnd (  hThread  ) ;
 
      }  / *  end  if  * /
    }  / *  end  case  * /
  }  / *  end  switch  * /
}  / *  end  OS2 _ PM _ DRV _ ENABLE  * / </pre>
'''[[00066.htm|GplThreadAbortDoc]]Usage'''
 
Following is an example of [[00066.htm|GplThreadAbortDoc]]usage for handling an abort- document escape:
 
<pre class="western">  case DEVESC_ABORTDOC:
  {
    // Tell second thread that an abort doc occurred
    GplThreadAbortDoc( hThread );
 
    // Store a state flag in our pddc to indicate abort is in effect
    pddc-&gt;fAbortDocCalled = TRUE;
 
  } /* end case */</pre>
'''[[00067.htm|GplThreadResetAbortDoc]]Usage'''
 
Following is an example of using [[00067.htm|GplThreadResetAbortDoc]]:
 
<pre class="western">case DEVESC_ENDDOC:
{
  // If we received a DEVESC_ABORTDOC
  if( pddc-&gt;fAbortDocCalled )
  {
    // Notify the output thread that the abort condition is over
    GplThreadResetAbortDoc( hThread );
 
    // Reset the abort state so thread will begin processing data again
    pddc-&gt;fAbortDocCalled = FALSE;
 
  } /* end if */
} /* end case */</pre>
'''[[00068.htm|GplThreadFlushBuffer]]Usage'''
 
Following is an example of using [[00068.htm|GplThreadFlushBuffer]]:
 
<pre class="western">case DEVESC_ENDDOC:
{
  // If going to a file or direct to a printer
  if( OD_DIRECT == ulDCType )
  {
    // Flush all data in second thread; we are done
    GplThreadFlushBuffer( hThread, TRUE );
 
  } /* end if */
 
  elseif( OD_QUEUED == ulDCType  &amp;&amp;  PM_Q_RAW == ulDataType )
  {
    // Flush all data in second thread; we are done
    GplThreadFlushBuffer( hThread, TRUE );
 
  } /* end if */
} /* end case */</pre>
'''[[00069.htm|GplThreadHookDeviceWrites]]Usage'''
 
Following is an example of using [[00069.htm|GplThreadHookDeviceWrites]]:
 
<pre class="western">case DEVESC_STARTDOC:
{
  // We have just called thread Start
  GplThreadStart();
 
  // We inform the thread that we want to subclass the write of data
  // to the output destination, replacing it with our callback function
  GplThreadHookDeviceWrites( hThread,        // Thread handle
                            pfnPrtWrite,    // Our &quot;write&quot; function
                            pddc );        // Parameter to our &quot;write&quot; function
} /* end case */</pre>
 
=== Pattern Creation ===
 
This module contains functions to create bitmap patterns.
 
To use the GenPLib Pattern-Creation package, you must include:
 
<pre class="western">INCL_GENPLIB_MEMORY
INCL_GENPLIB_PATTERNS</pre>
 
 
The following functions are used to create bitmap patterns.
 
[[00073.htm|GplPatternCreateBitmaps]]<br />[[00074.htm|GplPatternDeleteBitmaps]]<br />[[00075.htm|GplPatternCreate]]
 
=== GplPatternCreateBitmaps ===
 
'''Description'''
 
This function fills in an array of BMAPINFO structures with the PATSYM patterns. This function is designed to be used to fill in the DEVICESURFACE structure with patterns that match the resolution of the target device. GplPattern functions use the GenPLib Memory-Management package and require that a HMCB had been created with [[00051.htm|GplMemoryCreateInstance]].
 
'''Format'''
 
<pre class="western">LONG APIENTRY GplPatternCreateBitmaps(
                            HMCB        hMcb,              // Memory instance handle
                            ULONG      ulXResolution,      // X device resolution
                            ULONG      ulYResolution,      // Y device resolution
                            ULONG      ulWidth,            // Desired pattern width
                            ULONG      ulHeight,          // Desired pattern height
                            PBMAPINFO  paBmapInfo,        // Array of pattern bitmaps (output)
                            LONG        lCount,            // Number of bitmaps to create
                            ULONG      ulFlip );          // Flip bitmaps horiz/vertically</pre>
'''Parameters'''
 
'''hMcb'''(''HMCB'') Handle to initialized memory control block.
 
'''ulXResolution'''(''ULONG'') Target device x resolution.
 
'''ulYResolution'''(''ULONG'') Target device y resolution.
 
'''ulWidth'''(''ULONG'') Size of bitmap X.
 
'''ulHeigh'''(''ULONG'') Size of bitmap Y.
 
'''paBmapInfo'''(''PBMAPINFO'') Pointer to an array of BMAPINFO.
 
'''lCount'''(''LONG'') Number of bitmap information structures.
 
'''ulFlip'''(''ULONG'') Bit vector. If GPLPAT_INVERT_BITS is set, the bitmaps are inverted.
 
'''Returns'''
 
TRUE Success <br />FALSE Failure
 
=== GplPatternDeleteBitmaps ===
 
'''Description'''
 
This function deletes the bits and clears the array of BMAPINFO.
 
'''Format'''
 
<pre class="western">LONG APIENTRY GplPatternDeleteBitmaps(
                            HMCB      hMcb,            // Memory instance handle
                            PBMAPINFO  paBmapInfo,      // Pointer to bitmaps to be freed
                            LONG      lCount );        // Count of bitmaps to be freed</pre>
'''Parameters'''
 
'''hMcb'''(''HMCB'') Handle to initialized memory control block.
 
'''paBmapInfo'''(''PBMAPINFO'') Pointer to an array of BMAPINFO.
 
'''lCount'''(''LONG'') Number of bitmap information structures.
 
'''Returns'''
 
TRUE Success <br />FALSE Failure
 
=== GplPatternCreate ===
 
'''Description'''
 
This function can be used by a presentation driver to create a bitmap representation of any one of the predefined OS/2 patterns. Typically, it is called to create all or a subset of patterns a device driver will support at the start of a print job.
 
'''Format'''
 
<pre class="western">LONG APIENTRY GplPatternCreate( HMCB      hMcb,                // Memory instance handle
                                ULONG      ulXResolution,        // X device resolution
                                ULONG      ulYResolution,        // Y device resolution
                                ULONG      ulPatSym,            // OS/2 pattern define
                                PBMAPINFO  pBmapInfo );          // A pattern bitmap (output)</pre>
'''Parameters'''
 
'''hMcb'''(''HMCB'') Handle to initialized Memory control block.
 
'''ulXResolution'''(''ULONG'') Target device x resolution.
 
'''ulYResolution'''(''ULONG'') Target device y resolution.
 
'''ulPatSym'''(''ULONG'') Pattern number as defined for OS/2 in PMDDI.H:
 
<pre class="western">  PATSYM_DEFAULT
  PATSYM_DENSE1
  PATSYM_DENSE2
  PATSYM_DENSE3
  PATSYM_DENSE4
  PATSYM_DENSE5
  PATSYM_DENSE6
  PATSYM_DENSE7
  PATSYM_DENSE8
  PATSYM_VERT
  PATSYM_HORIZ
  PATSYM_DIAG1
  PATSYM_DIAG2
  PATSYM_DIAG3
  PATSYM_DIAG4
  PATSYM_NOSHADE
  PATSYM_SOLID
  PATSYM_BLANK
  PATSYM_HALFTONE
  PATSYM_HATCH
  PATSYM_DIAGHATCH</pre>
'''pBmapInfo'''(''PBMAPINFO'') Number of bitmap information structures.
 
'''Returns'''
 
TRUE Success <br />FALSE Failure
 
=== Example Code ===
 
'''GplPatternCreateBitmaps Usage'''
 
Following is an example of using [[00073.htm|GplPatternCreateBitmaps]]:
 
<pre class="western">// PM Graphics Rendering Engine v2.2 Device Surface Function from the Omni driver
 
LONG APIENTRY QueryDeviceSurface( PDDC pddc, PVOID pv )
{
  // Initialize all fields of the device surface structure, then...
  if( !pddc-&gt;pdb-&gt;bAllocatedPatterns )
  {
      if( ORIENTATION_PORTRAIT == pdb-&gt;pJobProperties-&gt;ulOrientation )
      {
        if( GplPatternCreateBitmaps ( pddc-&gt;hmcbHeap,
                                      pddc-&gt;pResInfo-&gt;ulXRes,
                                      pddc-&gt;pResInfo-&gt;ulYRes,
                                      64L,
                                      64L,
                                      (PBMAPINFO)&amp;pds-&gt;abmapinfoDefPattern,
                                      DEFAULT_PATTERNS_NUMBER,
                                      0L ) )
        {
          pddc-&gt;pdb-&gt;bAllocatedPatterns = TRUE;
 
        } /* end if */
      } /* end if */
  } /* end if */
} /* end QueryDeviceSurface */</pre>
'''GplPatternDeleteBitmaps Usage'''
 
Following is an example of using [[00074.htm|GplPatternDeleteBitmaps]]:
 
<pre class="western">case BEGIN_CLOSE_DC:
 
  // Perform other disable processing, then near end of case...
  if( GRE_22 &lt;= globals.ulGreVersion )  // PM Graphics Rendering Engine v2.2 or higher
  {
    PDEVICESURFACE pds;
 
    // Note:  We only allocate patterns in QueryDeviceSurface for GRE v2.2 and higher
    pds = (PDEVICESURFACE)pddc-&gt;pdb-&gt;pDeviceSurface;
    if( GplPatternDeleteBitmaps( pddc-&gt;pdb-&gt;hmcbHeap,
                                (PBMAPINFO)&amp;pds-&gt;abmapinfoDefPattern,
                                DEFAULT_PATTERNS_NUMBER ) )
    {
      pddc-&gt;pdb-&gt;bAllocatedPatterns = FALSE;
 
    } /* end if */
  } /* end if */</pre>
 
=== Semaphores ===
Printer drivers are responsible for serializing threads' access to any of their device contexts (DCs). OS/2 mutual exclusion (MUTEX) semaphores are a possible choice to implement this serialization. When two threads attempt to use the same printer DC at the same time, the second thread should receive a failing result code and PMERR_HDC_BUSY from WinGetLastError.
 
Given this behavior of OS/2 and its presentation drivers, most OS/2 applications use just one thread when printing. Whenever there is just one thread, there is little contention for the DC; but presentation drivers must safely manage this contention.
 
There is some performance overhead to consider whenever a thread calls into the OS/2 kernel, as is the case for calls to DosRequest/ReleaseMutexSem. The overhead occurs because the kernel reloads code and data selectors on kernel entry and exit. OS/2 MUTEX semaphores are always safe semaphores, however, because of this transition to the kernel.
 
=== Semaphores in the GenPLib ===
The semaphore package in the GenPLib implements a Ring-3 RAM semaphore when running on the 486 processor. The 486 has the CMPXCHG instruction that is not present on the 386. This single instruction implements a fast, safe, RAM semaphore at Ring 3.
 
On a 486, a thread requesting an unowned semaphore will remain at Ring 3 and not enter the kernel. If the semaphore is owned and the thread intends to wait, however, then it will enter the kernel to block on an event semaphore.
 
On a 386, the GenPLib simply uses OS/2 MUTEX semaphores. Implementing a semaphore on the 386 requires multiple instructions; thus, a switch to the kernel is required to disable interrupts while these multiple instructions execute.
 
For either processor, a thread may repeatedly request the same semaphore without an intervening release (nested requests). Use [[00084.htm|GplSemQueryMutexSem]]to query the nested use count.
 
The GenPLib detects the processor type at runtime.
 
All GenPLib semaphore APIs return 0 on success. When not zero, they return the same result codes documented for their OS/2 MUTEX semaphore counterparts.
 
The GenPLib semaphore APIs require a pointer to a MTXSEM data structure instead of a semaphore handle like OS/2 MUTEX semaphores. It is the responsibility of the client to allocate one of these structures per semaphore and supply its pointer to the GenPLib semaphore API.
 
When the MTXSEM semaphore structure resides on shared memory, it may be created with the DC_SEM_SHARED flag. Additional processes may obtain access to this shared memory and open the semaphore.
 
All GenPLib semaphores are created in the unowned state.
 
To use the GenPLib Semaphores package, you must include:
 
<pre class="western">INCL_GENPLIB_SEMAPHORES</pre>
The following APIs are included in the semaphore package of GenPLib:
 
*[[00079.htm|GplSemCreateMutexSem]]
*[[00080.htm|GplSemOpenMutexSem]]
*[[00081.htm|GplSemRequestMutexSem]]
*[[00082.htm|GplSemReleaseMutexSem]]
*[[00083.htm|GplSemCloseMutexSem]]
*[[00084.htm|GplSemQueryMutexSem]]
 
With the exception of the first parameter, PMTXSEM, the parameters to the GenPLib semaphore APIs are as documented for OS/2 MUTEX semaphores.
 
=== GplSemCreateMutexSem ===
 
'''Description'''
 
This call creates a MUTEX semaphore.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplSemCreateMutexSem( PMTXSEM  pmtxsem,
                                      ULONG    flAttr );</pre>
'''Parameters'''
 
'''pmtxsem'''(''PMTXSEM'') Address of MTXSEM structure.
 
'''flAttr'''(''ULONG'') Creation flags. DC_SEM_SHARED is the only flag.
 
'''Returns'''
 
Success NO_ERROR Failure ERROR_INVALID_PARAMETER <br />or return code from: <br />DosQueryMem <br />DosCreateEventSem <br />DosCreateMutexSem
 
'''Notes'''
 
The caller must first allocate memory for the MTXSEM structure. See GPLSEM. H, where this structure is defined. If the memory is allocated from shared memory, the caller may specify the DC_SEM_SHARED flag for flAttr parameter.
 
=== GplSemOpenMutexSem ===
 
'''Description'''
 
This call opens a shared GPL Mutex semaphore.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplSemOpenMutexSem( PMTXSEM  pmtxsem );</pre>
'''Parameter'''
 
'''pmtxsem'''(''PMTXSEM'') Address of MTXSEM structure.
 
'''Notes'''
 
When multiple processes are using a shared semaphore, then subsequent processes must open the semaphore. It is not necessary for the creating process to perform an open.
 
'''Returns'''
 
Success NO_ERROR Failure ERROR_INVALID_PARAMETER <br />or return code from: <br />DosOpenEventSem <br />DosOpenMutexSem
 
=== GplSemRequestMutexSem ===
 
'''Description'''
 
This call is used to request an OS/2 PM MUTEX semaphore.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplSemRequestMutexSem( PMTXSEM  pmtxsem,
                                      LONG    lTime );</pre>
'''Parameters'''
 
'''pmtxsem'''(''PMTXSEM'') Address of MTXSEM structure.
 
'''lTime'''(''LONG'') Time out value in milliseconds.
 
'''Returns'''
 
Success NO_ERROR
 
Failure Typical error returns for this function include ERROR_INVALID_ PARAMETER or return codes from DosRequestMutexSem.
 
ERROR_TIMEOUT (RC 640d) means that the semaphore is owned.
 
'''Notes'''
 
The caller can specify the timeout value for the request. When timeout is 0 , the call returns immediately. When timeout is -1, the call is an indefinite wait. Otherwise the call will block up to the timeout specified.
 
=== GplSemReleaseMutexSem ===
 
'''Description'''
 
This call will release an owned MUTEX semaphore.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplSemReleaseMutexSem( PMTXSEM  pmtxsem );</pre>
'''Parameter'''
 
'''pmtxsem'''(''PMTXSEM'') Address of MTXSEM structure.
 
'''Returns'''
 
Success NO_ERROR Failure ERROR_INVALID_PARAMETER <br />ERROR_NOT_OWNER (not the owner of the MUTEX semaphore) <br />DosReleaseMutexSem
 
'''Notes'''
 
This call decrements the nested use count for the semaphore. When the nested use count goes to zero, the semaphore is truly released.
 
=== GplSemCloseMutexSem ===
 
'''Description'''
 
This call closes a GPL MUTEX semaphore for the process.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplSemCloseMutexSem( PMTXSEM  pmtxsem );</pre>
'''Parameter'''
 
'''pmtxsem'''(''PMTXSEM'') Address of MTXSEM structure.
 
'''Returns'''
 
Success NO_ERROR Failure ERROR_INVALID_PARAMETER <br />DosCloseEventSem <br />DosCloseMutexSem
 
'''Notes'''
 
Every process using GPL semaphores should close each one with this API.
 
=== GplSemQueryMutexSem ===
 
'''Description'''
 
This call returns information about the semaphore.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplSemQueryMutexSem( PMTXSEM  pmtxsem,
                                    PID      *ppid,
                                    TID      *ptid,
                                    PULONG  pulCount );</pre>
'''Parameters'''
 
'''pmtxsem'''(''PMTXSEM'') Address of MTXSEM structure.
 
'''*ppid'''(''PPID'') Address where process ID is returned.
 
'''*ptid'''(''PTID'') Address where thread ID is returned.
 
'''pulCount'''(''PULONG'') Request count.
 
'''Returns'''
 
Success NO_ERROR Failure ERROR_INVALID_PARAMETER <br />or the return codes from: <br />DosQueryMutexSem
 
'''Notes'''
 
This API will return information about the semaphore, such as what process and thread currently owns it, and if owned, what is the nested use count.
 
It is important for asynchronously killed threads to make this call to determine if they own the DC semaphore. If they own the semaphore, they should release it the appropriate number of times before exiting.
 
=== Differences Between GenPLib Semaphores and Kernel Semaphores ===
 
If a nonzero request time times out, it will timeout to within 30 milliseconds of the supplied time out.
 
DosQueryMutexSem returns a process and thread ID even if the MUTEX sem is unowned; that is, the count returned is zero. This semaphore package returns process and thread ID of zero when the semaphore is unowned regardless of 386 or 486.
 
=== String Management ===
The string-management package provides string-sorting functionality for printer output devices.
 
Certain printer output devices can output data only in small bands, yet they are expected to keep track of strings that might be positioned anywhere on a physical output page. These devices need an independent mechanism for keeping those strings in sorted &quot;page&quot; order until the device is actually processing the band of that string.
 
This is true for raster printers that utilize a print head and must only send text strings that are drawn using device (printer) fonts within a certain range of the print head when printing graphics data. The following diagrams represent this concept:
 
<pre class="western">                        Output Page
                        /----------\
                        |          |
                        |          |
                        |xxxxxxxxxx|
                        |xxxxxxxxxx| &lt;--- Current band of raster output
                        |          |      that can be processed by the
                        |          |      output device.
                        | Hello    |
                        |          |
                        |          | &lt;--- Text is below current band so
                        |    ABCD  |      we can't output it yet
                        |          |
                        |          |
                        |          |
                        \----------/</pre>
 
 
<pre class="western">                        Output Page (later)
                        /----------\
                        |          |
                        |          |
                        |          |
                        |          |
                        |          |
                        |xHelloxxxx| &lt;--- Current band of raster output
                        |xxxxxxxxxx|      that can be processed by the
                        |          |      output device.
Lower string still --&gt; |    ABCD  |      This time the text string is in
not in range          |          |      the band region and it should be
                        |          |      processed at this time
                        |          |
                        |          |
                        \----------/</pre>
 
 
<pre class="western">                        Output Page (later)
                        /----------\
                        |          |
                        |          |
                        |          |
                        |          |
                        |          |
  String already  --&gt; | Hello    |
  processed            |          |
                        |          |
                        |          |
                        |xxxxABCDxx|  &lt;--- Current band of raster output
                        |xxxxxxxxxx|        that can be processed by the
                        |          |        output device.
                        |          |        This time the second string is in
                        \----------/        the band region and it should be
                                            processed at this time.</pre>
The package sorts text strings passed in page order. Top-to-bottom and left -to-right is the current default page order.
 
Once strings are inserted, you can extract strings in respect to a rectangular area (typically the current graphics band rectangle) that you pass in.
 
The string-sorting package utilizes the GenPLib Memory-Management and Exception-Management packages, thereby providing very efficient system resource usage and consistent error reporting and logging.
 
To use the GenPLib String-Management package, you must include:
 
<pre class="western">INCL_GENPLIB_STRING</pre>
 
The following functions comprise the string-management package:
*[[00087.htm|GplStringSorterCreateInstance]]
*[[00088.htm|GplStringSorterInsertString]]
*[[00089.htm|GplStringSorterQueryNumStrings]]
*[[00090.htm|GplStringSorterGetFirstString]]
*[[00091.htm|GplStringSorterGetNextString]]
*[[00092.htm|GplStringSorterRemoveStrings]]
*[[00093.htm|GplStringSorterReset]]
*[[00094.htm|GplStringSorterDeleteInstance]]
 
=== GplStringSorterCreateInstance ===
 
'''Description'''
 
This function creates a string sorter instance (memory resource allocated) and returns a handle that must be used by all other string sorter package functions.
 
The default heap size that is created is based on current printer driver media sizes and application text usage. A parameter is supplied so that the user can increase the initial memory area that is created to hold text strings. Otherwise a default value, based on test averages, will be used.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplStringSorterCreateInstance( HDC      hdc,
                                              PHSORTER  phStrSort,
                                              ULONG    ulHeapSize,
                                              ULONG    ulOptions );</pre>
'''Parameters'''
 
'''hdc'''(''HDC'') Handle to current DC.
 
'''phStrSort'''(''PHSORTER'') Pointer to the location where string-sorter handle will be placed.
 
'''ulHeapSize'''(''ULONG'') Initial size of heap to allocate for strings. This can be zero. A default memory area will be created.
 
'''ulOptions'''(''ULONG'') Creation options (for example, DBCS and TTY). This parameter is reserved for future use. This parameter must be zero.
 
'''Returns'''
 
Success NO_ERROR <br />Failure ERROR_xxx
 
=== GplStringSorterInsertString ===
 
'''Description'''
 
This function adds a text string to a string instance. Information, including the bounding rectangle passed in and a pointer to the data, is stored with the string. You can store with the string (for example, a pointer to a structure containing font name, font ID, and color).
 
Currently, the sort order is determined by the top-left corner of the text box passed in. The strings are sorted in page order. Page order is the order the text would be printed by a banding device on a hardcopy page.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplStringSorterInsertString( HSORTER  hStrSort,
                                            PSZ      pszStr,
                                            RECTL    rectlStr,
                                            PVOID    pUserDef,
                                            PVOID    pUnused );</pre>
'''Parameters'''
 
'''hStrSort'''(''HSORTER'') Handle of the string sorter to be used for insert operation.
 
'''pszStr'''(''PSZ'') Pointer to text string to insert.
 
'''rectlStr'''(''RECTL'') Bounding rectangle of string being inserted.
 
'''pUserDef'''(''PVOID'') Pointer to user-defined data to be stored with this string .
 
'''pUnused'''(''PVOID'') NULL. Reserved for future use.
 
'''Returns'''
 
Success NO_ERROR <br />Failure ERROR_INVALID_PARAMETER <br />ERROR_xxx
 
 
 
 
 
=== GplStringSorterQueryNumStrings ===
 
'''Description'''
 
This function returns the current number of strings in the string sorter instance (HSORTER) referenced on the call.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplStringSorterQueryNumStrings( HSORTER  hStrSort,
                                                PULONG  pulNumStr );</pre>
'''Parameters'''
 
'''hStrSort'''(''HSORTER'') Handle of string sorter instance to be queried.
 
'''pulNumStr'''(''PULONG'') Pointer to the location where number is to be returned.
 
'''Returns'''
 
Success NO_ERROR <br />Failure ERROR_xxx
 
 
 
 
 
=== GplStringSorterGetFirstString ===
 
'''Description'''
 
This function is used to get a linked list of strings from the string sorter in relation to a band rectangle passed in.
 
The strings are not deleted from the linked list on this call because we allocated the information and will de-allocate on a [[00093.htm|GplStringSorterReset]]() call or a [[00092.htm|GplStringSorterRemoveStrings]]() call.
 
Currently, the defined relationships that can be selected are:
 
Option Description
 
STR_INCL_PART_IN_BAND Return any string whose text box intersects any part of the band passed in.
 
STR_INCL_ALL_IN_BAND Return any string whose text box is entirely inside the band passed in.
 
STR_INCL_TOPLEFT_IN_BAND Return any string whose top-left coordinate is inside the band passed in.
 
'''Notes:'''
 
1.All retrievals are inclusive on all boundaries of the ''rectlBand''passed in.
 
2.GplStringSorterGetFirstString retrievals are non-destructive. (the string remains in the string-sorter instance and are only removed by [[00092.htm|GplStringSorterRemoveStrings]]or [[00093.htm|GplStringSorterReset]]calls).
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplStringSorterGetFirstString( HSORTER  hStrSort,
                                              ULONG    ulOption,
                                              RECTL    rectlBand,
                                              PSZ      *ppszStr,
                                              PRECTL  prectlStr,
                                              PPVOID  ppUserDef );</pre>
'''Parameters'''
 
'''hStrSort'''(''HSORTER'') Handle of string-sorter instance to be used for string retrieval.
 
'''ulOption'''(''ULONG'') Option passed in to indicate the relationship to test for on the &quot;Get&quot; operation. See options above.
 
'''rectlBand'''(''RECTL'') The band rectangle passed in that will be used to test all text-string rectangles against.
 
'''*ppszStr'''(''PSZ'')-output Pointer to first text string meeting retrieve criteria (ulOption).
 
'''prectlStr'''(''PRECTL'')-output Pointer to the bounding rectangle of first string retrieved (passed in during [[00088.htm|GplStringSorterInsertString]]).
 
'''ppUserDef'''(''PPVOID'')-output Pointer to the user-defined data that was associated with text string retrieved (passed in during [[00088.htm|GplStringSorterInsertString]]).
 
'''Returns'''
 
Success NO_ERROR <br />Failure ERROR_xxx
 
 
 
 
 
=== GplStringSorterGetNextString ===
 
'''Description'''
 
This function is used to retrieve the next string matching the retrieve criteria passed in on the last call to [[00090.htm|GplStringSorterGetFirstString]](). The criteria is based on the ''ulOption''and ''rectlBand''parameters from that function). This function can be called multiple times until an ERROR_NO_ MORE_ITEMS return code is detected. Each successful call (NO_ERROR) returns another string from the string sorter instance meeting the criteria until no more strings meet the criteria.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplStringSorterGetNextString( HSORTER  hStrSort
                                              PSZ      *ppszStr,
                                              PRECTL  prectlStr
                                              PPVOID  ppUserDef );</pre>
'''Parameters'''
 
'''hStrSort'''(''HSORTER'') Handle of the string-sorter instance to be used for the retrieve operation.
 
'''*ppszStr'''(''PSZ'') - output Pointer to the location that the text string will be retrieved to.
 
'''prectlStr'''(''PRECTL'') - output Bounding rectangle of the string being retrieved.
 
'''ppUserDef'''(''PPVOID'') - output Pointer to user-defined data stored with string during the insert operation.
 
'''Returns'''
 
Success NO_ERROR <br />Failure ERROR_xxx
 
 
 
 
 
=== GplStringSorterRemoveStrings ===
 
'''Description'''
 
This function is used to delete all strings from the string sorter instance , based on a relationship (ulOption) to a rectangle (rectlBand) both passed .
 
See StringGetFirstStringFromSorter() and StringGetNextStringFromSorter() calls for non-destructive string retrievals.
 
Remove options include:
 
Option Description
 
STR_INCL_PART_IN_BAND Return any string whose text box intersects any part of the band passed in.
 
STR_INCL_ALL_IN_BAND Return any string whose text box is entirely inside the band passed in.
 
STR_INCL_TOPLEFT_IN_BAND Return any string whose top-left coordinate is inside the band passed in.
 
Removes are inclusive on all sides of ''rectlBand''passed in.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplStringSorterRemoveStrings( HSORTER  hStrSort,
                                              ULONG    ulOption,
                                              RECTL    rectlBand );</pre>
'''Parameters'''
 
'''hStrSort'''(''HSORTER'') Handle of the string sorter to be used for remove operation.
 
'''ulOption'''(''ULONG'') Remove options.
 
'''rectlBand'''(''RECTL'') Rectangle that is used for comparison by the remove option.
 
'''Returns'''
 
Success NO_ERROR <br />Failure ERROR_xxx
 
 
 
 
 
=== GplStringSorterReset ===
 
'''Description'''
 
This function resets the string sorter instance by removing all text strings inserted into the sorter.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplStringSorterReset( HSORTER  hStrSort );</pre>
'''Parameter'''
 
'''hStrSort'''(''HSORTER'') Handle of the string sorter to be reset.
 
'''Returns'''
 
Success NO_ERROR <br />Failure ERROR_xxx
 
 
 
 
 
=== GplStringSorterDeleteInstance ===
 
'''Description'''
 
This function destroys a string sorter instance by freeing any system resources allocated on the corresponding call to [[00087.htm|GplStringSorterCreateInstance]](). This function implies a [[00093.htm|GplStringSorterReset]]() call.
 
'''Format'''
 
<pre class="western">APIRET APIENTRY GplStringSorterDeleteInstance( HSORTER  hStrSort );</pre>
'''Parameter'''
 
'''hStrSort'''(''HSORTER'') Handle of string sorter to be destroyed. The handle is no longer valid after the call.
 
'''Returns'''
 
Success NO_ERROR <br />Failure ERROR_INVALID_PARAMETER
 
 
 
 
 
=== Example Code ===
 
'''Retrieving Strings From String Sorter During Band Processing'''
 
Following is an example of retrieving strings from string sorter during band processing in a raster printer driver:
 
<pre class="western"> HSORTER hSorter;
CharString( PDDC pddc, ..., LONG cChars, PCH pchString, ... )
{
  if( bDeviceFont )                        // If we have a device font to manage
  {
    if( ! hSorter )                        // If we have not yet created a sorter
    {
      // Create a string sorter to handle our device fonts
      apiret = GplStringSorterCreateInstance( pddc,&amp;hSorter, 0L, 0L );
 
    } /* end if */
 
    // Calculate text box of string from our character-width tables
    // Insert character string into sorter
    apiret = GplStringSorterInsertString( hSorter,
                                          (PSZ)pchString,
                                          rectlTextBox,
                                          (PVOID)NULL,
                                          (PVOID)NULL );
 
    // Example: check number of strings currently in sorter
    apiret = GplStringSorterQueryNumStrings( hSorter,&amp;ulNumStr );
 
  } /* end if */
} /* end CharString */
 
Usage Notes:
 
  Used default values for heap size and options during 'StringCreate' API (LTR, TTB).
 
  Used default value for during 'StringInsert' API.
 
  For 'StringInsert' API, we could have allocated and filled in our own
  structure that helps us process this string (for example, font name, identifier,
  color, etc.).</pre>
'''Removing Strings From a String Sorter During Processing of a Graphics Band'''
 
Following is an example of removing strings from a string sorter during processing of a graphics band (banding):
 
<pre class="western"> ProcessBand( PDDC pddc, ...)
{
  APIRET  apiret;
  RECTL  rectlString, rectlBand;
  PSZ    pszString;
 
  // Retrieve first sting in the raster band we are processing
  apiret = GplStringSorterGetFirstString(
                hSorter,
                STR_INCL_TOP_LEFT_IN_BAND,
                                // Retrieve strings whose Top-Left corner are in band
                rectlBand,
                                // Rectangle of the graphic band we are processing
                &amp;pszString,
                                // Pointer that first string will be returned in
                &amp;rectlString,
                                // Text box of the string
                (PVOID)NULL );
                                // We had no user-defined data to retrieve
 
  // if we have a string meeting retrieval criteria
  while( apiret != ERROR_NO_MORE_ITEMS )
  {
    // Get next string (uses same retrieve option as &quot;GetFirst&quot;)
    apiret = GplStringSorterGetNextString( hSorter,
                                            &amp;pszString,
                                            &amp;rectlString,
                                            (PVOID)NULL );
  } /* end while */
 
} /* end ProcessBand */</pre>
'''Removing Strings From a String Sorter After Retrieving Them'''
 
Following is an example of removing strings from a string sorter after retrieving them (during graphics band processing):
 
<pre class="western"> ProcessBand( PDDC pddc, ... )
{
  // After retrieving all strings from band and sending them to printer
  // See the previous example
 
  // We can remove these strings from the sorter
  // since we do not need to process them again
  apiret = GplStringSorterRemoveStrings( hSorter,
                                          STR_INCL_TOP_LEFT_IN_BAND,
                                          rectlBand );
} /* end ProcessBand */</pre>
'''Resetting and Destroying the String Sorter During Escape Processing'''
 
Following is an example of resetting and destroying the string sorter during escape processing in a printer driver:
 
<pre class="western"> Escape( PDDC pddc, ... )
{
  APIRET apiret;
 
  case DEVESC_NEWFRAME:
  {
    // Process all graphics bands on page
 
    // Reset sorter for next page
    apiret = GplStringSorterReset( hSorter );
 
    } /* end case */
    break;
 
    case DEVESC_ENDDOC:
    {
      // Process the last page (implied NewFrame)
 
      // Sorter no longer needed for this print job
      apiret = GplStringSorterDeleteInstance( hSorter );
 
    } /* end case */
    break;
} /* end Escape */</pre>
 
 
 
 
 
 
=== 32-Bit PostScript Driver ===
 
The PostScript driver is a 32-bit presentation driver that converts graphics engine calls to the PostScript language.
 
The PostScript driver is known as a &quot;high-level&quot; driver because it can hook many graphics calls at a high level. It rarely must call back to the graphics engine to have high-level calls simplified. Most other printer drivers, except the plotter driver, are raster devices (their primary output is a bit map). These drivers allow the engine and display driver (or shadow DC) to do most of the work.
 
PostScript is a vector device. Its output is a series of high-level commands that tell the printer to perform actions such as draw a line, clip to an area, create and scale a font. The PostScript driver hooks all the path, region, clipping and fonts directly. This method is more efficient than calling back to the graphics engine, but it reequires that the driver be responsible for this additional support. Both PostScript and the GPI/GRE have analogous constructs, so mapping between them can be almost one-to-one .
 
The PostScript driver currently supports 214 printer configurations. New printers are easily added by updating a list and running a complier on the PostScript Printer Description (PPD) file. For more information about PPD files, see [[00110.htm|Device Support]].
 
Because the PostScript driver is 32 bit, it has a direct path to the 32-bit engine (no thunking). Therefore, the driver can get some large values in certain calls. The values can be so large that they can overflow the floating point representation (16bits integer : 16bits fraction). ''Sliding point''has been implemented in the driver to scale the number. For an example of sliding point, see [[00483.htm|prdl_DrawConic]]in [[00479.htm|POLYSTUF.C]].
 
 
 
 
 
=== Generic Printer Library (GenPLib) ===
 
The GenPLib is a set of subroutines that are useful for 32-bit presentation drivers. The PostScript driver takes advantage of the following GenPLib functions:
 
*Memory-management routines <br />*Multi-threading output capabilities <br />*Error and debugging support routines
 
For further information about the GenPLib, see [[00005.htm|Generic Printer Library]].
 
 
 
 
 
=== Font Support ===
 
The driver supports two types of fonts: built-in and downloadable. Built- in fonts are stored as resources during driver build time. Downloadable fonts come from the system font manager.
 
 
 
 
 
=== Built-In Fonts ===
 
Currently, 69 fonts are built into the driver. When a &quot;compiler&quot; is built, it extracts information from the Adobe Font Metrics (AFM) file and creates a .PFM file. The following are stored in each .PFM:
 
*Character code points <br />*Character widths <br />*Kerning pairs <br />*General font information <br />*Font metrics
 
The font compiler (afm2bin) pre-processes the font metrics so that it does not have to be generated each time the driver is asked for FontMetrics. For an example, see [[00360.htm|prda_DeviceQueryFonts]]in [[00354.htm|FONTS.C]].
 
 
 
 
 
=== DownLoadable Fonts ===
 
The driver can also use the system OS/2 font metrics (OFM) fonts. These files are created by the Adobe Type Manager (ATM) subsystem. The OFM files contain packed font information from the ATM files (they are more extensive than a PFM). The format of the OFM file is in OFM.H. When the DC is initialized, the INI file is queried for the location of the .OFM and .PFB files. These fonts are added to the list of device fonts. If there is a is conflict, the device font is kept. The list of printer fonts will consist of real device fonts and OFM/downloaded fonts. When the user requests a list of fonts, the driver reports its fonts and the engine adds its outline fonts. This can result in a font that is listed twice to the user, once by the driver and once by the engine. The engine fonts are indicated by the ON setting of the GENERIC bit.
 
When a user requests an outline font, the driver will always first look for a downloaded font. The driver will not substitute a device font for a generic font, but will try to find a downloaded font before returning GPI_ ALTERROR on realizefont. Therefore, the font will be stroked, which generates a large number of PS commands.
 
 
 
 
 
=== Conversions ===
 
The OFM file must be converted to the internal format. This conversion is done by [[00205.htm|ConvertOFMtoPFM]]() in [[00321.htm|DOWNLOAD.C]]. The built-in fonts are slightly modified by adding character bounding box information to each character.
 
 
 
 
 
=== Downloading ===
 
Because of page saving, fonts are sent to the printer twice, once in the middle of the page and once at the top of the next page, before the page state is saved. This method is inefficient, but the driver has no way to know at the beginning of the page what fonts will be needed on that and following pages.
 
 
 
 
 
=== Creating the Font List ===
 
When a PPD for a printer is compiled, the hardware device fonts are put in the PostScript Printer Binary (PPB) resource. The printer information that is loaded during FillPhysicalDeviceBlock provides the names of the fonts that the hardware supports. These fonts must be in the list of built-in fonts.
 
 
 
 
 
=== Memory Management ===
 
In the driver, all memory requests and frees are done through two calls, [[00053.htm|GplMemoryAlloc]]and [[00054.htm|GplMemoryFree]]via the GenPLib. Through these calls, the user is relieved of the task of keeping track of where the memory came from .
 
The PostScript driver creates two heaps:
 
*A per-process heap that is used when there is possibly no DC ( DevPostDeviceModes, DevQueryDeviceNames) <br />*A DC heap that is the main source of memory for the driver
 
This is larger because it is expected to be used more extensively.
 
 
 
 
 
=== High-Level Support ===
 
This section contains three examples of high-level support for the PostScript driver:
 
*Paths <br />*Boxes <br />*Arcs
 
 
 
 
 
=== Paths ===
 
The driver hooks high-level path calls, such as BeginPath and EndPath calls . The hooking of these calls makes the driver it responsible for ''all''the path calls because the engine has no record of the path. When a BeginPath is encountered, the driver stops outputting PostScript to the printer and begins placing the PostScript in an internal buffer. When the EndPath is received, the driver begins outputting to the printer again. Normally, a command dealing with a path comes in from the graphics engine. This command can include SetClipPath, StrokePath, and FillPath. The driver then dumps the path buffer to the printer and issues the appropriate PostScript command to the printer to complete the action. For an example, see [[00469.htm|prdl_ StrokePath]]in [[00454.htm|PATH.C]].
 
 
 
 
 
=== Boxes ===
 
The driver can give direct support on Box calls such as BoxBoth, BoxBoundary, BoxInterior. These calls can be translated to PostScript line and fill commands. For an example, see [[00186.htm|prdl_BoxBoth]]in [[00185.htm|BOX.C]].
 
 
 
 
 
=== Arcs ===
 
Arcs and curves are translated to the corresponding PostScript calls. For an example, see [[00133.htm|prdl_FullArcBoth]]in [[00131.htm|ARCS.C]].
 
 
 
 
 
=== Shadow DC ===
 
Because the driver cannot handle bit maps, the driver must use the graphics engine and display device. The driver creates a shadow memory DC in display for each DC enabled for the printer (done in [[00343.htm|prde_EnableDC]]). If the driver is enabling a memory DC, the shadow memory DC will be used for all calls. Otherwise, the shadow memory DC will be used mainly for handling the bit maps.
 
In some functions, usually main entry points, the DC type is checked against memory. If the DC is memory, the call is routed to hdcMemory using an InnerGRE entry point.
 
 
 
 
 
=== Device Support ===
 
PostScript supports many different devices that handle different page sizes , duplexing options, and font availability. The driver requires information for each device it supports so the driver can invoke those features by sending a series of PostScript commands. Information for each device is provided to the driver by means of a PPD file.
 
A PPD file is a text file that contains PostScript commands for specific device functions. These commands are used to invoke the features of a specific device. PPD files are parsed into binary data that is stored as a resource in the driver. Currently, the PostScript driver supports version-3 PPD files.
 
A PPD file contains multiple entries, each referring to a specific device feature and matching PostScript commands needed to invoke that feature. A standard PPD entry is broken down into the following format:
 
<pre class="western">*MainKey [OptionKey][/Translation String]]: Value</pre>
<br />where:
 
'''*MainKey'''describes a class of features such as page sizes, duplex options, and fonts. A mainkey always begins with an asterisk. ''*PageSize'', an example of a mainkey, defines types of pages.
 
'''OptionKey'''(optional) identifies a specific option for the feature. If there is more than one option key for each mainkey, a separate entry is needed for each option. For example, several options for ''*PageSize''would be ''Letter'' , ''Legal'', and ''Envelope''.
 
'''Translation string'''(optional) clarifies the matching option to the user in simpler terms or in another language. Because each mainkey can have more than one option, it might be necessary to provide some text for each option that the user can understand.
 
'''Value'''will either contain actual PostScript code that is sent to the printer when the feature is selected or a reference to another resource that contains more PPD and PostScript information.
 
The following is an example of a standard PPD entry:
 
<pre class="western">*PageSize CommEnv/Business Envelope&amp; &quot;statusdict /commenv get exec&quot;</pre>
 
 
The mainkey in the above line is *PageSize. The option key is CommEnv. The translation string is Businepss Envelope The value is statusdict /commenv get exec. It is sent to the device when Business Envelope is selected.
 
 
 
 
 
=== PPD Compiler ===
 
A PPD file is parsed to binary data before it is used by the driver. Before the binary data is addfued as a resource in the driver, it is stored into a PPB file. The process of converting standard PostScript PPD text into OS/2 PPB data is done by an OS/2 PPD compiler. This compiler, called PPD2BIN.EXE , is located in the ''IBM Device Driver Source Kit for OS/2''. See ''Using Your DDK''for a 'roadmap' of the directory structures on the ''IBM Device Driver Source Kit for OS/2''. The compiler opens a file that contains a list of PPD files, and converts each one into a PPB file of the same name. Each PPB file is later added as a driver resource by the C compiler.
 
 
 
 
 
=== Dialog Mapping ===
 
The following identifies all dialog-box fields used in the driver and the PPD keywords that are used to modify these fields. These keywords are case sensitive:
 
*'''PostScript Printer Properties'''
 
Tray The ''*InputSlot''key defines the available printer trays. The Option Key identifies the tray name. If no input slot is provided, ''Upper''is displayed as the default. The key ''*DefaultInputSlot''identifies the tray that is the default.
 
Form The ''*PageSize''key defines the available pages. The Option Key identifies the page name. The key ''*DefaultPageSize''identifies the default page size.
 
Maximum Downloaded Fonts This value is calculated by obtaining the value of ''*FreeVM''and dividing it by the approximate amount of memory needed for each font. *FreeVM contains the maximum amount of memory available to a device.
 
Automatic Mode Switching If the key ''*InitPostScriptMode''is included in the PPD file at compilation, the '''Automatic Mode Switching'''check box is enabled. If checked, a command will be sent to the device to automatically set the device into PostScript mode at the start of each job.
 
*'''Job Properties and PostScript Device Defaults'''
 
Resolution The ''*SetResolution''key identifies the resolution to which the printer is set. If no ''*SetResolution''key is provided, 300 is used as the default. The key ''*DefaultResolution''sets the default resolution.
 
Duplex Options This group is enabled only if the ''*Duplex''key is provided. The following Option Keys manage the following buttons:
 
-DuplexTumble is used if '''2-Sided Flip'''is selected. The back page of the output will be inverted. <br />-DuplexNoTumble is used if '''2-Sided Book'''is selected. The back page of the output will not be inverted. The key ''*DefaultDuplex''determines the default duplex setting.
 
Manual Feed This check box is enabled if ''*DefaultManualFeed''is provided. If ''*DefaultManualFeed''is set to TRUE, this box is initially checked.
 
Use Color This check box is enabled if the key ''*ColorDevice''is set to TRUE. If this key is either missing or set to FALSE, this check box is disabled.
 
PostScript level-1 compatibility This check box is enabled if the key ''* LanguageLevel''is set to &quot;2.&quot; If the key is missing, or if it is set to &quot;1,&quot; this option is disabled. If this option is not checked, output is sent in PostScript level-2 format. If it is checked, ouput is sent in PostScript level-1 format.
 
 
 
 
 
=== Debugging Tips ===
 
This section describes debugging tips and techniques for the PostScript driver. This information is provided under the assumption that you know how to use the kernal debugger, that you have a debugging terminal installed and ready, and that PSCRIPT.DRV and PSCRIPT.SYM are installed in the '''\OS2\ DLL\PSCRIPT'''directory.
 
 
 
 
 
=== General Tips ===
 
*You can set the driver to send the job to a file rather than to the printer. (One reason to do this is to save paper.)
 
*The driver is loaded in memory at the first job and remains in memory until the system is restarted. While loaded, PSCRIPT.DRV cannot be modified or deleted. If the driver is not currently loaded, however, accessing '''Printer Properties'''or '''Job Properties'''will not load the driver. Therefore, the driver can still be modified or deleted if either dialog box has been previously opened.
 
*If there is a trap while using the '''Job Properties'''dialog box, it is better to open the '''Job Properties'''dialog box from an application rather than from the Printer Object. This will cause the application to terminate rather than the Workplace Shell.
 
*The driver does not process &quot;raw&quot; PostScript jobs. The driver receives the job and passes it directly to the device through DEVESC_RAWDATA.
 
*The PostScript driver only handles OS/2 and, in some cases, WIN-OS/2* jobs . For the driver to support WIN-OS/2, the port setting in the WIN-OS/2 session must be set to the port name with &quot;.OS2&quot; appended (for example, &quot; LPT1.OS2&quot;). In WIN-OS/2, all other port settings will cause the job to be handled by a Windows-compatible driver. OS/2-DOS uses standard DOS drivers and is completely ignored by this driver.
 
*To make debugging easier, you can compile the source code (no linking necessary) using the &quot;/Fa+&quot; option. This will generate the source code with matching assembler code, which will virtually match the assembler output on the debugger.
 
*If a job contains any invalid characters, with the exception of the last character (ASCII 4, the diamond character), or the first line (the first line might contain characters that set the device in PostScript mode), the device will end the job. For more information about valid and invalid characters, refer to a PostScript manual. Even with little knowledge of the PostScript language, it is usually not difficult to identify invalid characters in a job.
 
*The compiler can produce a file that contains both the source and matching assembler code. These files contain the extension &quot;.OUT&quot;. To generate such a file, type:
 
<pre class="western">NMAKE ALL COD=1</pre>
Any C source file that is compiled will generate a matching file that contains both C and assembler.
 
 
 
 
 
=== Error Handler ===
 
If a PostScript job does not print when sent, it could mean that there was an invalid command or limit check in the job and the device terminated that job. All PostScript printers will abort the entire job if an error is found .
 
There is a way to identify errors in a job. The driver contains an error handler that, when sent to the printer, reports any errors it finds. The job will still be aborted, but an error will be reported. Once loaded in the printer, the error handler will remain in the printer's memory until the printer is turned off, so it is only necessary to load the error handler once. In fact, if the error handler is loaded more than once while the printer is on, an error will be generated as the printer tries to reload the error handler.
 
To send the error handler, go to the Job Properties dialog and then to the 'Output' page. You will see a button called &quot;Download error handler&quot;. Select that button to send the error handler. The printer will indicate that it is receiving data, but no output will be sent. After that, every time the printer encounters an error, it prints the error in the following format:
 
<pre class="western">      ERROR: &lt;error type&gt;
      OFFENDING COMMAND: &lt;command that caused the error&gt;
 
      STACK:
      &lt;contents of the printer's stack&gt;</pre>
The error handler will only report errors it has found. It will not report the location in the job where the error occurred. Because one job might contain the same command more than once, it is important to locate the exact place in the job where the error occurred. To accomplish this, insert specific invalid characters (such as &quot;$$$&quot;) in the first column anywhere in the job. If the error handler reports the invalid characters you inserted first, the true error is after those invalid characters. You can either move the characters to another spot in the file and resend the job, or use several sets of invalid characters and eliminate the topmost set, one at a time after each output, until the real error is displayed. Eventually, you will be able to find the command that the error handler reported.
 
 
 
 
 
=== Breakpoints ===
 
This section contains symbols that are helpful when setting breakpoints during debugging.
 
The driver accesses a function from the GenPLib called ''GplErrSetError''that reports errors that have occurred in the driver. By setting a breakpoint at this function, it is possible to identy the calling function that generated the error. To identify the function with the error, display a stack trace when the breakpoint stops at ''GplErrSetError''. The first function name in the list is the function that generated the error.
 
It is possible for a trap to occur early in the driver before you are able to set a breakpoint. Instead of inserting an INT 3 in the code, you can insert a breakpoint at the location '''ENDDEBUGLOADSYMMTE'''. This routine is called after the symbol file is loaded, but before the driver is executed. First, set up a test case to the point just before accessing the driver; and then, set a breakpoint at '''ENDDEBUGLOADSYMMTE'''. When the test case invokes the driver, the breakpoint will be encountered immediately after the PostScript driver and symbols are loaded. Now insert breakpoints in the driver. If the driver responds with an error when inserting driver breakpoints, it might be necessary to run GO four or five times before the debugger understands the symbol names. However, if you prefer to use interrupt 3 (INT 3), there is a function in [[00565.htm|UTLASM.ASM]], called Int3, that accesses the interrupt. Because this function is currently commented out, you must &quot;un-comment&quot; the function to access it.
 
 
 
 
 
=== Makefile ===
 
The makefile used for this driver is called &quot;makefile&quot; and is located in the IBM Developer Connection Device Driver Kit for OS/2. Refer to ''Using Your DDK''for a roadmap of the file structure.
 
This makefile can be used to build either a retail or debug version of the driver for the Intel or PowerPC version of OS/2. The syntax is as follows:
 
<pre class="western">nmake [RET | DBG][PPC | OS2C]</pre>
<br />where
 
RET builds a retail version.
 
DBG builds a debug version.
 
PPC builds a driver for the PowerPC version of OS/2.
 
OS2C builds a driver for the intel version of OS/2. <br />To build a retail Intel driver, for example, use: &quot;nmake retos2c&quot;. To build a debug PowerPC driver, use &quot;nmake dbgppc&quot;.
 
 
 
 
 
=== Driver Entry Points ===
 
The driver uses the following entry points:
 
OS2_PM_DRV_ENABLE Calls subfunctions that initialize this driver, the device, and the device context. This is called when a job is sent.
 
OS2_PM_DRV_DEVMODE Used to query or change device information or to display the '''Printer Properties'''and '''Job Properties'''dialog boxes.
 
OS2_PM_DRV_DEVICENAMES Returns device names and information that is supported by this driver.
 
 
 
 
 
=== Primary Structures ===
 
Although the driver uses many structures, there are one buffer and three structures that are primary to the driver's function:
 
PostScript Command Buffer This buffer contains the actual strings retrieved from the PPD file. These include the translation strings that are displayed in the dialog box.
 
This buffer is accessed by a base pointer. This base pointer can be accessed by apResources[ RESBUF ], by the DESPPD structure, or by the dialog header when '''Printer Properties'''and '''Job Properties'''are displayed ( DLGHDR.pIemsBuff).
 
DESPPD structure (located in PPDIALOG.H) This contains the data take from the PPD structure. This is the only structure that is used by PPD compiler. Most fields contain an offset value that, when added to the base pointer to the PostScript Command buffer, will yield an address to the desired data. One access to this structure is through apResources[ PPDRES ].
 
This contains the following:
 
*The PostScript command strings that are sent out to the job. These command strings include such things as which paper size to use, the input slot from which to pull the paper, etc.
 
*The UI structure (UI_LIST).
 
*There is a pointer called pPSStringBuff that points to the PostScript Command buffer.
 
CNFDATA structure (located in PPDIALOG.H) The CNFDATA structure contains the current settings specified by the user in '''Job Properties'''and '''Printer Properties'''. This includes such things as whether the user specified portrait or landscape printing. One access to this structure is through apResources[ CNFRES ].
 
DV structure (located in PRDPTYPT.H) This structure is passed along with the the PDDC that is sent along with the job. Any data that is to be used during a job may be stored in the structure. The data is passed to the DV structure in the [[00276.htm|prde_FillPdb]]function.
 
 
 
 
 
=== User-Interface Features ===
 
Before reading this section, we recommend that you read the ''Adobe Postscript Printer Description Document'', version 4.2, to understand the PostScript user-interface (UI) format. In that document, refer specifically to the &quot;User Interface&quot; section.
 
The UI format gives printers the ability to support specific features that may not be available on other printers. The following is an example taken from the PPD file:
 
<pre class="western">*OpenUI *PageSize/Paper Size: PickOne
*OrderDependency: 20 AnySetup *PageSize
*DefaultPageSize: Letter
*PageSize Letter/Letter 8.5 x 11: &quot;statusdict /letter get exec&quot;
*PageSize Legal/Legal 8.5 x 14: &quot;statusdict /legal get exec&quot;
*PageSize Executive/Executive Envelope: &quot;statusdict/executive get exec&quot;
*PageSize Monarch/MonarchEnvelope: &quot;statusdict /monarch getexec&quot;
*CloseUI: *PageSize</pre>
 
 
Each PPD file may contain a variable number of *OpenUI/*CloseUI groups. The text within each *OpenUI/*CloseUI group is known in this document as a &quot;block&quot; (or a &quot;feature&quot;). Within each block, there are a variable number of options, each one known here as an '''entry'''. In the example above,
 
*the UI block is called &quot;PageSize&quot; and covers the text between *OpenUI and *CloseUI.
 
*there are four entries, each named after the UI block name.
 
*the default entry is referenced by the string *Default string followed by the UI block name.
 
Not only can PPDs contain a variable number of UI blocks, but each block can contain a variable number of UI entries. In addition, there are three types of selections available to a UI block:
 
PickOne Only one entry in a UI block may be selected at a time.
 
PickMany One or more entries in a UI block may be selected at a time.
 
Boolean This is similar to PickOne, but it provides a TRUE/FALSE type selection. In the OS/2 Postscript driver, Boolean values are treated like PickOne values.
 
In order to support the Postscript UI format, a printer driver must:
 
*support a variable number of UI blocks <br />*support a variable number of UI entries within each block <br />*minimize the amount of overhead as much as possible
 
'''Note:'''All of our OS/2 UI structures are located in PPDIALOG.H.
 
 
 
 
 
=== UI Entries ===
 
Each UI entry is supported by the UI_ENTRY structure. This structure contains three fields. Each field contains an offset value which, when added to the base pointer to the '''Postscript Command'''buffer, yields the desired string. There may be up to and including thirty-two UI entries per block. The fields in the UI_ENTRY structure are as follows:
 
ofsOption This contains the offset where the option string for the current entry can be found. In the above example, the entry options for the PageSize UI block would be: Letter, Legal, Executive, and Monarch.
 
ofsTransString This contains the offset value of the entry's translation string. The translation string is optional and contains the string that is displayed for the user to see. If no translation string exists, ofsTransString contains the same value as ofsOption. In the above example, the translation string for the Letter entry is: Letter 8.5 x 11.
 
ofsValue This contains the Postscript string that is sent with the job if the user has selected that entry. In the above example, the value for the Legal entry is: statusdict /legal get exec.
 
 
 
 
 
=== UI Blocks ===
 
Each entry is part of a larger structure, the UI_BLOCK structure. Each UI block in the PPD has a matching structure. The end of the UI_BLOCK structure contains a variable-length UI_ENTRY array. This allows the support of a variable number of UI entries.
 
Each UI_BLOCK contains the following fields:
 
ofsUIName The offset of the UI block name. In the example above, the UI block name is: PageSize.
 
ofsUITransString The translation string of the UI block. If no translation string exists, this value is the same as ofsUIName. In the above example, the translation string for the block is: Paper Size.
 
usOrderDep This contains the numeric value of where the specific UI block is to be located with respect to other UI blocks in the PPD. The UI blocks in the PPD are not necessarily listed in the order that they appear. In the PPD compiler, this value contains the numeric value taken from * OrderDependency. In the example above, usOrderDepen contains the value 20. The lower the number, the higher in priority the UI block appears in the UI list. After all the UI blocks have been parsed, this value contains the zero-based offset of where the specific UI block is listed in respect to the UI list. For example, the first UI block in the list, usOrderDep, is 0, the next UI block contains 1, etc.
 
uiEntry This is the variable-length array containing UI_ENTRY structures.
 
usDefaultEntry This contains the uiEntry array number to the default entry.
 
usNumOfEntries This contains the number of UI_ENTRY structures for a given block.
 
ucGroupType This contains the value of the type of group where the UI block belongs. The group type is defined by the *OpenGroup/*CloseGroup keywords. This field contains one of the following values:
 
UIGT_INSTALLABLEOPTION This is used for UI blocks that fall between the * OpenGroup InstallableOption / *CloseGroup InstallableOption keywords. UI blocks that belong to this group are displayed in '''Printer Properties'''.
 
UIGT_DEFAULTOPTION This is the default group type for UI blocks. Blocks that belong to this group are displayed in '''Job Properties'''.
 
usSelectType This identifies whether the current UI block is a single- selection UI, multiple-selection UI, or Boolean UI. This field contains one of the following values:
 
UI_SELECT_PICKONE The current UI only allows one selection. This is set if PickOne is specified.
 
UI_SELECTTYPE_PICKMANY The UI allows one or more selections. This value is set if PickMany is set.
 
UI_SELECT_BOOLEAN The UI allows only one selection from a TRUE/FALSE type of selection. This value is set if Boolean is provided. The selection type of the UI is determined by the string PickOne, string PickMany, or Boolean strings that appear on the same line as *OpenUI. In the example above, the string PickOne sets the value of this field to UI_SELECT_PICKONE.
 
ucPanelID This identifies where the block string is to be displayed. It contains one of the following values:
 
UIP_PREDEF_FEATURE This identifies the block as a predefined feature. A predefined feature is a UI block that is displayed in a page other than the '''Features'''page. Some examples of predefined features are PageSize and MediaType-these blocks are not displayed in the '''Features'''page, but rather in the '''Forms'''page. These UI controls are called &quot;predefined UIs,&quot; meaning that they have a specific control that handles them and are not to be listed in the '''Features'''page. To define your own predefined UI, do the following:
 
1.The header file PPD2BIN.H contains a global structure called &quot; szPredefined&quot;. This lists all the UI strings as predefined UIs. Insert the string for the UI that you wish to list in a page other than the '''Features'''page. Order is not important, but case sensitivity is necessary.
 
2.Change the value of MAX_PREDEFINED to the number of strings in the array .
 
When the PPD compiler finds a match for the string you defined, the UI block field ucPanelID is modified with the flag UIP_PREDEF_FEATURE. When the '''Features'''page lists all the default UI blocks, it queries the UI block to see whether or not UIP_PREDEF_FEATURE exists. If it exists, the block is not inserted.
 
UIP_OEM_FEATURE This setting means that this UI block is to be displayed in a special page defined for a specific device. In other words, this UI block is not listed in any of the standard dialog pages, but rather in a page for a specific device only.
 
UIP_OS2_FEATURE This is the default value for UI blocks. At this setting, the UI block is displayed in the '''Features'''page.
 
usUILocation As mentioned before, OrderDependency arranges the UI blocks in the order that they appear in the raw job. However, where the UI block string appears in the raw job is also important. The location where the string is sent is determined by this field. This field may contain one of the following values:
 
UI_ORDER_ANYSETUP This is the default value. This indicates that the data may be inserted anywhere in the job. For this driver, data with this value is inserted in the document-setup section.
 
UI_ORDER_JCLSETUP This value accompanies a JCL UI block. This means that the data is inserted at the beginning of the job where the JCL code is inserted.
 
UI_ORDER_PAGESETUP For this value, the data is inserted at the beginning of a page.
 
UI_ORDER_DOCSETUP For this value, the data is inserted after the prologue section at the beginning of the job.
 
UI_ORDER_EXITSERVER
 
 
 
 
 
=== UI List ===
 
All UI blocks are grouped together to make up the UI list. The UI_LIST structure contains a pointer to the beginning of the list of UI blocks as well as the number of blocks and number of bytes that make up the list. The PPD compiler orders the UI blocks in the list, according to the OrderDependency key. The lower a block's OrderDependency value, the higher it is placed in the UI list.
 
Each block in the UI list is referenced by an offset value. For example, the first UI block in the list is at offset zero, the second block is at offset one, and so on. This is important to know in order to access the current selection the user has made for that block.
 
For each UI block, there is a matching UI-Selection value. A UI-Selection value is a 32-bit value that contains the current selection(s) the user has made for the matching UI block. Each bit in a UI-Selection value (otherwise known as UI_SEL) corresponds to a UI entry for a given block. Bit 0 corresponds to the first entry, bit 1 corresponds to the second entry, and so on. If a selection has been made for that entry, the bit is set to 1; if a selection has not been made for that entry, the bit is set to 0. Normally , no UI-Selection values will be 0 because there must be at least one selection. This way, it is possible to support multiple UI selections with minimal overhead; but, it also means that there can be no more than 32 entries for a given block.
 
Each UI_SEL value is part of the UI-Selection list. This list is accessed by a base pointer. To access a UI_SEL value for a specific UI block, it is important to know the offset of that UI block with respect to the UI list. Add that offset to the base pointer to get the UI-Selection value. To query the UI-Selection entry for MEDIATYPE, for example, assume that the MEDIATYPE UI block is the fourth block in the list. This means that the offset value for the MEDIATYPE block is 3. Add three to the base pointer, and that will yield the UI-Selection value for MEDIATYPE.
 
The UI-Selection list is stored in the buffer immediately following the CNFDATA structure. To query the UI-Selection list base pointer, use the macro ASSIGN_UISELLIST_PTR with the only macro being the pointer to the CNFDATA structure.
 
When the UI-Selection list is first queried at initialization, the list is re-initialized if any UI_SEL values are 0.
 
 
 
 
 
=== UI Controls ===
 
Because UI features require special processing, there is a special procedure that handles the UI data. This type of control is called a &quot;UI control&quot;. Normally, UI controls are drop-down listboxes. Standard listboxes are used for multiple-selection UIs, however, and the duplex UI uses three radio buttons.
 
 
 
 
 
=== Dialog-Box Format ===
 
There are three C files that are used for the PostScript dialogs:
 
PPDLG.C contains code that maintains the '''Printer-Properties'''dialog box. <br />JPDLG.C contains code that maintains the '''Job-Properties'''dialog box. <br />DLG.C contains common code that is used by both properties. <br />Each page in the dialog's notebook is a separate dialog box, and each page handles data internally. There is a structure called the ''dialog header''( DLGHDR). The address of the dialog header is stored in the reserved doubleword of each dialog page.
 
Each page dialog must handle the following messages:
 
WMPS_INITSETTINGS This is sent to all dialog pages after the dialog header initializes. The WM_INITDLG message is sent before this message; at this time, the dialog header has not yet been initialized. A rule of thumb is that controls can be set up when the WM_INITDLG message is received. For example, spin buttons can be set to their minimum and maximum values. At the WMPS_INITSETTINGS message, the control is initialized with the values from the dialog header. Processing of this message is optional.
 
WMPS_VERIFYSETTINGS This indicates that the page dialog should verify that the settings within the page are valid. If all the control settings are valid, or if no verification is needed, the return code should be set to PSDRC_VERIFY_SUCCESS. If an invalid setting exists, the page should return another return code, which will cause the dialog to display a message indicating that an error exists. Processing of this message is required.
 
WMPS_SAVESETTINGS This indicates that the page dialog should save the settings within its controls. The page dialog must return PSDRC_SAVE_ SUCCESS to indicate that all was saved successfully. Processing of this message is required only if you wish to save any settings.
 
There is a structure called the &quot;dialog template&quot; (DLG_TMPL). This structure contains information that is used by the dialog functions at initialization. The DLG_TMPL structure is broken down as follows:
 
uiDialogID This contains the ID of the dialog to be inserted.
 
pfnDlgProc This contains the dialog procedure.
 
usTabID This contains a string ID. This is the string that is inserted in the page's tab.
 
chTabID This is reserved.
 
pfnQueryLoadFn This is optional. It contains a function to verify whether or not the page should be loaded. If the page should be inserted, the function should return TRUE; otherwise, the function should return FALSE. The only input argument is a PVOID to the dialog header. The function returns a BOOL value. Before inserting the &quot;Features&quot; page, for example, the dialog calls the function [[00393.htm|QueryFeaturePageLoad]](). If there are enough features that warrant this page, the function returns TRUE. If no function is provided, the page is always loaded.
 
 
 
 
 
=== Status Bar ===
 
At the bottom of the '''Job-Properties'''dialog box, there is a row of icons that make up the Status Bar. The purpose of the Status Bar is to continuously display general printer settings. No matter what page you're on, the Status Bar displays at least some current settings. Each reserved doubleword in the Status Bar contains the icon ID that is currently displayed. If a status icon needs to be repainted, the doubleword is queried and the icon is re-loaded in memory and repainted. Each icon in the Status Bar also has a matching icon in the respective control; both icons are always the same.
 
The first icon makes up orientation and is modified every time Portrait or Landscape is selected in the '''Forms'''page.
 
The second icon makes up a color or monochrome value. If color is supported and enabled, a colored icon is displayed. This is modified every time Color is selected in the '''Effects'''page.
 
The third icon makes up duplex. For single sided, two forms appear-one with a red arrow pointing up,indicating how the text will appear. The second side is blank. For 2-page book, both forms appear with a red arrow pointing up, indicating how text will appear. For 2-sided flip, both forms appear with inverse arrows-indicating that text will be flipped.
 
The fourth icon indicates where the job will be sent-to the printer, to an encapsulated Postscript file, or to a standard file.
 
 
 
 
 
=== Changing the Driver Name ===
 
Although the code provided in the DDK builds to &quot;PSCRIPT.DRV&quot;, it is recommended that you use a name other than &quot;PSCRIPT.DRV&quot; for your own driver. This section describes how to change the driver's name.
 
To change the file name of the driver, the following components must be altered:
 
Extended attributes Extended attributes are read by the print object that installs the driver in a specific path. The path is \OS2\DLL followed by a path that has the same name as the driver. For example, the path for the OS /2 PostScript driver is \OS2\DLL\PSCRIPT.
 
Driver contents The current driver stores printer-properties selections in OS2SYS.INI. The application string in the INI is in the following format:
 
<pre class="western">  &quot;PM_DD_&quot;[name of print object]&quot;,&quot;[driver name]&quot;.&quot;[device name]</pre>
where the:
 
name of print object is the name of the printer object where printer properties were stored
 
driver name is the name of the driver file-for the OS/2 PostScript driver, the string is &quot;PSCRIPT&quot;
 
device name is the name of the printer that is displayed in the print object's '''Settings'''dialog.
 
To set and retrieve data from the INI file, the driver uses the hard-coded string &quot;PSCRIPT&quot; to create a string that is then used to set/query the data in the INI file. If you change the name of the driver, you must also change the name of this string; otherwise, you may be querying and setting the wrong INI entry.
 
The following example shows you how to change the name of the driver &quot; PSCRIPT.DRV&quot; to &quot;SAMPLE.DRV&quot;:
 
1.First, change the contents of a file called &quot;PKGPS.CMD&quot;. This batch file sets the extended attributes for the driver. Change all occurrences of &quot; PSCRIPT&quot; to the name of your driver-e.g., change &quot;PSCRIPT&quot; to &quot;SAMPLE&quot;.
 
2.Make changes to several functions of the driver where &quot;PSCRIPT&quot; is hard coded. Replace the string &quot;PSCRIPT&quot; with the name of your driver-e.g., change &quot;PSCRIPT&quot; to &quot;SAMPLE&quot;. Below is a list of source files that need to be changed and the locations where changes are needed:
 
[[00238.htm|CONFIG.C]]Change HELPFILENAME to include driver name, [[00246.htm|PrintFontMem]]
 
[[00254.htm|DEVBLOCK.C]][[00256.htm|BuildKeyName]], [[00276.htm|prde_FillPdb]]
 
[[00297.htm|DEVMODE.C]][[00303.htm|OS2_PM_DRV_DEVMODE]], [[00302.htm|GetPrinterName]]
 
[[00536.htm|QUERYBOX.C]][[00554.htm|WrtQueryProfile]]
 
UTLLOG.C LogIsOn
 
SOFTFONT.H Change string accessed by FONT_DIR_APP from &quot;PM_PSCRIPT&quot; to &quot;PM_ &quot; followed by the driver name
 
3.Change the makefile. In the makefile, the minimum change that you must make is to change all occurrences of &quot;PSCRIPT.DRV&quot; and &quot;PSCRIPT.HLP&quot; to include the name of your driver-e.g., &quot;SAMPLE.DRV&quot; and &quot;SAMPLE.HLP&quot;.
 
You can also change all other occurrences of &quot;PSCRIPT&quot;, including path names and other file names; but this is not required.
 
4.The conversion is now complete, and you are ready to rebuild the new driver. When installing from the print object, select '''Other OS/2 printer driver'''and specify the path of your driver. Your driver will install on the path OS2\DLL followed by the name of your driver-e.g., SAMPLE.DRV will install on \OS2\DLL\SAMPLE. This path will include SAMPLE.DRV and SAMPLE. HLP.
 
 
 
 
 
=== PostScript Modules and Functions ===
 
This section provides a layout of the PostScript source code. Refer the DDK CD for the PostScript source code and to the &quot;Using Your DDK&quot;, also available on the DDK CD, for a roadmap of the file structure used by the PostScript source code.
 
The first part of this section lists all functions of PostScript in alphabetical order. The module in which each function is found is listed next to the function.
 
The second part of this section lists the modules that comprise PostScript and the functions that comprise each module. Each function is followed by a description.
 
'''Notes:'''
 
1.If a function is not listed in this document, it has been commented out in the source code.
 
2.Some functions have the same name but are used for different executables .
 
 
 
 
 
=== Function List ===
 
 
 
<pre class="western">/-------------------------------------------------------------\
|Function Name                      |Module Location        |
|------------------------------------+------------------------|
|AllocateLDRIVDATABuffer            |DEVBLOCK.C              |
|------------------------------------+------------------------|
|AllocCNFStructure                  |DEVMODE.C              |
|------------------------------------+------------------------|
|AsciiToBin                          |UTLCHNL.C              |
|------------------------------------+------------------------|
|b2a                                |QUERYBOX.C              |
|------------------------------------+------------------------|
|BeginImage                          |BITMAPS.C              |
|------------------------------------+------------------------|
|BigMulDiv                          |MATH.ASM                |
|------------------------------------+------------------------|
|BuildKeyName                        |DEVBLOCK.C              |
|------------------------------------+------------------------|
|CharStringDebug                    |CHARSTR.C              |
|------------------------------------+------------------------|
|CharStringKern                      |CHARSTR.C              |
|------------------------------------+------------------------|
|CharStringLeftRight                |CHARSTR.C              |
|------------------------------------+------------------------|
|CharStringRect                      |CHARSTR.C              |
|------------------------------------+------------------------|
|CharStringReverse                  |CHARSTR.C              |
|------------------------------------+------------------------|
|CharStringRightLeft                |CHARSTR.C              |
|------------------------------------+------------------------|
|CharStringUpDown                    |CHARSTR.C              |
|------------------------------------+------------------------|
|CharStringWidthVector              |CHARSTR.C              |
|------------------------------------+------------------------|
|CheckComPortName                    |UTLCHNL.C              |
|------------------------------------+------------------------|
|CheckForOverwrite                  |FLCHKDLG.C              |
|------------------------------------+------------------------|
|CheckNumeric                        |CONFIG.C                |
|------------------------------------+------------------------|
|CheckPrinterName                    |DEVMODE.C              |
|------------------------------------+------------------------|
|CheckProfileName                    |QUERYBOX.C              |
|------------------------------------+------------------------|
|CleanUpHelpStubHook                |CONFIG.C                |
|------------------------------------+------------------------|
|ClearMem                            |DEVBLOCK.C              |
|------------------------------------+------------------------|
|CloseChannel                        |UTLCHNL.C              |
|------------------------------------+------------------------|
|ClosePSDlg                          |DLG.C                  |
|------------------------------------+------------------------|
|CmndInpTray                        |DEVBLOCK.C              |
|------------------------------------+------------------------|
|CmndPaper                          |DEVBLOCK.C              |
|------------------------------------+------------------------|
|ColorDistance                      |COLORTAB.C              |
|------------------------------------+------------------------|
|CompareRealNames                    |QUERYBOX.C              |
|------------------------------------+------------------------|
|CompareStri                        |PPDLG.C                |
|------------------------------------+------------------------|
|CompressAscii85                    |BITMAPS.C              |
|------------------------------------+------------------------|
|CompressMode2Out                    |BITMAPS.C              |
|------------------------------------+------------------------|
|ConcatXforms                        |CHARSTR2.C              |
|------------------------------------+------------------------|
|ConvertColorModel                  |DEVBLOCK.C              |
|------------------------------------+------------------------|
|ConvertOFMtoPFM                    |CHARSTR2.C              |
|------------------------------------+------------------------|
|ConvertPFM                          |CHARSTR2.C              |
|------------------------------------+------------------------|
|ConvertUIBitsToStrings              |DEVBLOCK.C              |
|------------------------------------+------------------------|
|CopyAndNormalize                    |MATH.ASM                |
|------------------------------------+------------------------|
|CopyCNFData                        |DEVMODE.C              |
|------------------------------------+------------------------|
|CopyLDRIVDATAToCNFDATA              |DEVBLOCK.C              |
|------------------------------------+------------------------|
|CopyStr                            |DOWNLOAD.C              |
|------------------------------------+------------------------|
|CPDownLoaded                        |FONTS.C                |
|------------------------------------+------------------------|
|CreateDCHeap                        |MEMORY.C                |
|------------------------------------+------------------------|
|CreateProcessHeap                  |MEMORY.C                |
|------------------------------------+------------------------|
|cvi                                |QUERYBOX.C              |
|------------------------------------+------------------------|
|Cvi_R2                              |UTLCHNL.C              |
|------------------------------------+------------------------|
|DefaultFontCount                    |DOWNLOAD.C              |
|------------------------------------+------------------------|
|DefineFormsDlgProc                  |PPDLG.C                |
|------------------------------------+------------------------|
|DefinePal                          |BITMAPS.C              |
|------------------------------------+------------------------|
|DeviceModes                        |CONFIG.C                |
|------------------------------------+------------------------|
|DevicePalette                      |SURFACE.C              |
|------------------------------------+------------------------|
|discard_clip_path_buf              |PATH2.C                |
|------------------------------------+------------------------|
|discard_path_buf                    |PATH2.C                |
|------------------------------------+------------------------|
|DisplayFeaturesUIEntries            |DLG.C                  |
|------------------------------------+------------------------|
|DisplayGammaValue                  |JPDLG.C                |
|------------------------------------+------------------------|
|DisplayMatchingForm                |PPDLG.C                |
|------------------------------------+------------------------|
|DisplayMessageBox                  |DLG.C                  |
|------------------------------------+------------------------|
|DisplayTranslationString            |QUERYBOX.C              |
|------------------------------------+------------------------|
|_DLL_InitTerm                      |MEMORY.C                |
|------------------------------------+------------------------|
|dodiv                              |STUB.ASM                |
|------------------------------------+------------------------|
|doimul                              |STUB.ASM                |
|------------------------------------+------------------------|
|DoSelectFont                        |UTLPS.C                |
|------------------------------------+------------------------|
|DrawImage                          |BITMAPS.C              |
|------------------------------------+------------------------|
|EA_GetVersion                      |QUERYBOX.C              |
|------------------------------------+------------------------|
|EatSeper                            |UTLPS.C                |
|------------------------------------+------------------------|
|EffectsPageDefaultControls          |JPDLG.C                |
|------------------------------------+------------------------|
|EffectsPageDlgProc                  |JPDLG.C                |
|------------------------------------+------------------------|
|EffectsPageInitControls            |JPDLG.C                |
|------------------------------------+------------------------|
|EffectsPageSaveSettings            |JPDLG.C                |
|------------------------------------+------------------------|
|EnableDefineFormAddButton          |PPDLG.C                |
|------------------------------------+------------------------|
|EnterDriver                        |PRDEVECT.C              |
|------------------------------------+------------------------|
|ExceptHandler                      |MEMORY.C                |
|------------------------------------+------------------------|
|ExitDriver                          |PRDEVECT.C              |
|------------------------------------+------------------------|
|Exitpdd                            |DEVBLOCK.C              |
|------------------------------------+------------------------|
|FeaturePageDefaultControls          |JPDLG.C                |
|------------------------------------+------------------------|
|FeaturePageDlgProc                  |JPDLG.C                |
|------------------------------------+------------------------|
|FeaturePageInitControls            |JPDLG.C                |
|------------------------------------+------------------------|
|FillEffects                        |QUERYBOX.C              |
|------------------------------------+------------------------|
|FillFormList                        |DLG.C                  |
|------------------------------------+------------------------|
|FillOFMFont                        |DOWNLOAD.C              |
|------------------------------------+------------------------|
|FillPaperNames                      |QUERYBOX.C              |
|------------------------------------+------------------------|
|FillSFonts                          |DOWNLOAD.C              |
|------------------------------------+------------------------|
|FillTrayList                        |DLG.C                  |
|------------------------------------+------------------------|
|find_arc_direction                  |ARCS.C                  |
|------------------------------------+------------------------|
|FindString                          |UTLPS.C                |
|------------------------------------+------------------------|
|FixUpColors                        |JPDLG.C                |
|------------------------------------+------------------------|
|FlushChannel                        |UTLCHNL.C              |
|------------------------------------+------------------------|
|FontDownload                        |FONTS.C                |
|------------------------------------+------------------------|
|FormDefPageDlgProc                  |PPDLG.C                |
|------------------------------------+------------------------|
|FormPageDefaultControls            |JPDLG.C                |
|------------------------------------+------------------------|
|FormPageDlgProc                    |JPDLG.C                |
|------------------------------------+------------------------|
|FormPageInitControls                |JPDLG.C                |
|------------------------------------+------------------------|
|FormPageSaveSettings                |JPDLG.C                |
|------------------------------------+------------------------|
|FormPPPageDefaultControls          |PPDLG.C                |
|------------------------------------+------------------------|
|FormPPPageInitControls              |PPDLG.C                |
|------------------------------------+------------------------|
|Fraction2A                          |QUERYBOX.C              |
|------------------------------------+------------------------|
|FractionToDecimal                  |UTLASM.ASM              |
|------------------------------------+------------------------|
|frdiv                              |ASM2C.C                |
|------------------------------------+------------------------|
|FreeCNFStructure                    |DEVMODE.C              |
|------------------------------------+------------------------|
|FreeDialogHeader                    |DLG.C                  |
|------------------------------------+------------------------|
|FreeFontResource                    |CHARSTR2.C              |
|------------------------------------+------------------------|
|FreeMemory                          |DEVBLOCK.C              |
|------------------------------------+------------------------|
|FreePathBufs                        |ENABLE.C                |
|------------------------------------+------------------------|
|FreePPBResource                    |DEVBLOCK.C              |
|------------------------------------+------------------------|
|frmul                              |ASM2C.C                |
|------------------------------------+------------------------|
|frsqrt                              |ASM2C.C                |
|------------------------------------+------------------------|
|frVectLength                        |ASM2C.C                |
|------------------------------------+------------------------|
|fxmultiply                          |ASM2C.C                |
|------------------------------------+------------------------|
|GammaAdjust                        |UTLPS.C                |
|------------------------------------+------------------------|
|get_module_dir                      |CONFIG.C                |
|------------------------------------+------------------------|
|GetAndSaveColorModel                |JPDLG.C                |
|------------------------------------+------------------------|
|GetDefaultPageSize                  |QUERYBOX.C              |
|------------------------------------+------------------------|
|GetDuplexCommand                    |UTLPS.C                |
|------------------------------------+------------------------|
|GetImageableArea                    |QUERYBOX.C              |
|------------------------------------+------------------------|
|GetMappedFontName                  |UTLPS.C                |
|------------------------------------+------------------------|
|GetOffset                          |JPDLG.C                |
|------------------------------------+------------------------|
|GetPFMetrics                        |CHARSTR2.C              |
|------------------------------------+------------------------|
|GetPM_Fonts                        |DOWNLOAD.C              |
|------------------------------------+------------------------|
|GetPrinterName                      |DEVMODE.C              |
|------------------------------------+------------------------|
|GetR3String                        |MEMORY.C                |
|------------------------------------+------------------------|
|HelpErrorFilter                    |CONFIG.C                |
|------------------------------------+------------------------|
|HelpStubHook                        |CONFIG.C                |
|------------------------------------+------------------------|
|HexToChannel                        |UTLCHNL.C              |
|------------------------------------+------------------------|
|Hook22Calls                        |PRDEVECT.C              |
|------------------------------------+------------------------|
|ImageCoords                        |DEVBLOCK.C              |
|------------------------------------+------------------------|
|ImageProcToChannel                  |BITMAPS.C              |
|------------------------------------+------------------------|
|ImageScan                          |BITMAPS.C              |
|------------------------------------+------------------------|
|init_cgs                            |UTLPS.C                |
|------------------------------------+------------------------|
|init_clip_path_buf                  |PATH2.C                |
|------------------------------------+------------------------|
|init_path_buf                      |PATH2.C                |
|------------------------------------+------------------------|
|init_semaphores                    |ENABLE.C                |
|------------------------------------+------------------------|
|InitGlobalHeap                      |MEMORY.C                |
|------------------------------------+------------------------|
|InitializeCommPort                  |UTLCHNL.C              |
|------------------------------------+------------------------|
|InitializeCustomForms              |PPDLG.C                |
|------------------------------------+------------------------|
|InitializeDialog                    |DLG.C                  |
|------------------------------------+------------------------|
|InitializeDialogHeader              |DLG.C                  |
|------------------------------------+------------------------|
|InitializeHelp                      |CONFIG.C                |
|------------------------------------+------------------------|
|InsertPageInNotebook                |DLG.C                  |
|------------------------------------+------------------------|
|InsertSliderValues                  |JPDLG.C                |
|------------------------------------+------------------------|
|InsertStringInListbox              |DLG.C                  |
|------------------------------------+------------------------|
|InstallDispatchVectors              |PRDEVECT.C              |
|------------------------------------+------------------------|
|InvertTransfer                      |UTLPS.C                |
|------------------------------------+------------------------|
|iqdiv                              |ASM2C.C                |
|------------------------------------+------------------------|
|IsFilePipe                          |FLCHKDLG.C              |
|------------------------------------+------------------------|
|isHWFont                            |DOWNLOAD.C              |
|------------------------------------+------------------------|
|IsOFMFile                          |DOWNLOAD.C              |
|------------------------------------+------------------------|
|JobPropertiesDlgProc                |JPDLG.C                |
|------------------------------------+------------------------|
|KillGlobalHeap                      |MEMORY.C                |
|------------------------------------+------------------------|
|KillHeap                            |MEMORY.C                |
|------------------------------------+------------------------|
|kprintf                            |UTLPRINT.C              |
|------------------------------------+------------------------|
|ListUniqueForms                    |DLG.C                  |
|------------------------------------+------------------------|
|ListUserForms                      |QUERYBOX.C              |
|------------------------------------+------------------------|
|LoadCurrentUISelections            |DEVBLOCK.C              |
|------------------------------------+------------------------|
|LoadFile                            |DOWNLOAD.C              |
|------------------------------------+------------------------|
|LoadInfoSegment                    |DEVBLOCK.C              |
|------------------------------------+------------------------|
|LoadMarkerFont                      |POLYSTUF.C              |
|------------------------------------+------------------------|
|LoadPaperDim                        |QUERY.C                |
|------------------------------------+------------------------|
|LoadPPBResource                    |DEVBLOCK.C              |
|------------------------------------+------------------------|
|LoadProfile                        |DEVBLOCK.C              |
|------------------------------------+------------------------|
|LoadStringTable                    |MEMORY.C                |
|------------------------------------+------------------------|
|LoadTrayCommand                    |UTLPS.C                |
|------------------------------------+------------------------|
|LoadUserForms                      |PROFILE.C              |
|------------------------------------+------------------------|
|LockDevice                          |SURFACE.C              |
|------------------------------------+------------------------|
|LongMulFixed                        |MATH.ASM                |
|------------------------------------+------------------------|
|LongShiftRight                      |UTLASM.ASM              |
|------------------------------------+------------------------|
|LongXFixed                          |ASM2C.C                |
|------------------------------------+------------------------|
|MatchFaceName                      |FONTS.C                |
|------------------------------------+------------------------|
|MatchHWFontName                    |DEVBLOCK.C              |
|------------------------------------+------------------------|
|MatrixToChannel                    |UTLPS.C                |
|------------------------------------+------------------------|
|ModeSwitchDefaultControls          |PPDLG.C                |
|------------------------------------+------------------------|
|ModeSwitchDlgProc                  |PPDLG.C                |
|------------------------------------+------------------------|
|ModeSwitchInitPage                  |PPDLG.C                |
|------------------------------------+------------------------|
|ModeSwitchSaveSettings              |PPDLG.C                |
|------------------------------------+------------------------|
|NameWithSC                          |QUERYBOX.C              |
|------------------------------------+------------------------|
|NewUserForms                        |QUERY.C                |
|------------------------------------+------------------------|
|OpenChannel                        |UTLCHNL.C              |
|------------------------------------+------------------------|
|OS2_PM_DRV_DEVICENAMES                | QUERY . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| OS2 _ PM _ DRV _ DEVMODE                    | DEVMODE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| OS2 _ PM _ DRV _ ENABLE                      | ENABLE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| OutputPageDefaultControls              | JPDLG . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| OutputPageDlgProc                      | JPDLG . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| OutputPageInitControls                | JPDLG . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| OuputPageSaveSettings                  | JPDLG . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| PageAtPaper                            | QUERY . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| PalGray                                | BITMAPS . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| PaperDimensions                        | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| perform _ std _ spooling                  | DEVESC . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| PfntFromIndex                          | CHARSTR2 . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| play _ clip _ path _ buf                    | PATH2 . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| play _ clip _ rects                        | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| play _ path _ buf                          | PATH2 . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| PostWriteError                          | QUERYBOX . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| PpdDefaults                            | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ BackMapChar                      | CHARSTR2 . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ CheckFontResource                | CHARSTR2 . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ ComputeTextTransformMatrix      | CHARSTR2 . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ CopyMetrics                      | CHARSTR2 . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ CountKernPairs                    | FONTS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ DefaultFontIndex                  | CHARSTR2 . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ DeviceGetAttributes              | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ DeviceQueryFontAttributes        | FONTS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ DeviceQueryFonts                  | FONTS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ DeviceSetAttributes              | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ DeviceSetGlobalAttribute        | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ DrawLine                          | CHARSTR2 . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ FontTransform                    | CHARSTR2 . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ GetCodePage                      | FONTS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ GetImagAttrs                      | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ GetKernAmount                    | CHARSTR2 . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ GetLineAttrs                      | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ GetMarkAttrs                      | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ GetPairKerningTable              | FONTS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ GetPtrnAttrs                      | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ GetTextAttrs                      | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ LoadFontResource                  | CHARSTR2 . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ NumPrinterFonts                  | CHARSTR2 . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ QueryWidthTable                  | FONTS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ QuoteChar                          | CHARSTR2 . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ RealizeFont                      | FONTS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ RemapString                      | CHARSTR2 . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ SetCodePage                      | FONTS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ SetImagAttrs                      | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ SetLineAttrs                      | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ SetMarkAttrs                      | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ SetPtrnAttrs                      | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prda _ SetTextAttrs                      | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdb _ Bitblt                            | BITMAPS . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdb _ DeviceCreateBitmap                | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdb _ DeviceDeleteBitmap                | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdb _ DeviceSelectBitmap                | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdb _ GetBitmapBits                    | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdb _ GetBitmapHandle                  | BITMAPS . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdb _ GetPel                            | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdb _ ImageData                          | BITMAPS . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdb _ PolyMarker                        | POLYSTUF . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdb _ RestoreScreenBits                | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdb _ SaveScreenBits                    | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdb _ ScrollRect                        | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdb _ SetBitmapBits                    | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdb _ SetPel                            | BITMAPS . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdc _ CreateLogColorTable              | COLORTAB . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdc _ GetColor                          | COLORTAB . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdc _ QueryColorData                    | COLORTAB . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdc _ QueryColorIndex                  | COLORTAB . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdc _ QueryLogColorTable                | COLORTAB . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdc _ QueryNearestColor                | COLORTAB . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdc _ QueryRealColors                  | COLORTAB . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdc _ QueryRGBColor                    | COLORTAB . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdc _ RealizeColorTable                | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdc _ RGB _ to _ Solid                      | COLORTAB . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdc _ RgbToGray                          | COLORTAB . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdc _ RgbToNearestRgb                  | COLORTAB . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdc _ UnRealizeColorTable              | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdd _ CharRect                          | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdd _ CharStr                            | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdd _ DeviceInvalidateVisRegion        | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdd _ DeviceSetAVIOFont                | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdd _ DeviceSetCursor                  | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdd _ GetPickWindow                    | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdd _ GetStyleRatio                    | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdd _ SetColorCursor                    | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdd _ SetPickWindow                    | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdd _ UpdateCursor                      | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prde _ DeleteSavedDCs                    | ENABLE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prde _ DisableDC                          | ENABLE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prde _ DisablePdb                        | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prde _ EnableDC                          | ENABLE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prde _ FillLdb                            | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prde _ FillPdb                            | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prde _ ResetDC                            | ENABLE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prde _ RestoreDC                          | ENABLE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prde _ SaveDC                            | ENABLE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prde _ SetDDCDefaults                    | ENABLE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdg _ AccumulateBounds                  | BOUNDS . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdg _ Death                              | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdg _ DeviceSetDCOrigin                | XFORMS . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdg _ ErasePS                            | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdg _ GetBoundsData                    | BOUNDS . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdg _ GetDCOrigin                      | XFORMS . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdg _ LockDevice                        | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdg _ NotifyTransformChange            | XFORMS . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdg _ ResetBounds                      | BOUNDS . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdg _ Resurrection                      | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdg _ UnlockDevice                      | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ BeginArea                          | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ BeginPath                          | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ BoxBoth                            | BOX . C                      |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ BoxBoundary                      | BOX . C                      |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ BoxCommon                          | BOX . C                      |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ BoxInterior                      | BOX . C                      |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ BoxPath                            | BOX . C                      |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ CheckConic                        | POLYSTUF . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ CloseFigure                      | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ DrawConic                          | POLYSTUF . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ DrawConicsInPath                  | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ DrawLinesInPath                  | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ DrawSubConic                      | POLYSTUF . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ EndArea                            | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ EndPath                            | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ ExpandBounds                      | BOUNDS . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ FillPath                          | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ FullArcBoth                      | ARCS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ FullArcBoundary                  | ARCS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ FullArcCommon                    | ARCS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ FullArcInterior                  | ARCS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ FullArcPath                      | ARCS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ GetCurrentPosition                | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ GetLineOrigin                    | POLYSTUF . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ MemClipChange                    | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ ModifyPath                        | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ NotifyClipChange                  | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ OutlinePath                      | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ PatGray                            | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ PenGray                            | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ PolyFillet                        | POLYSTUF . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ PolyFilletSharp                  | POLYSTUF . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ PolyLine                          | POLYSTUF . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ PolySpline                        | POLYSTUF . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ RestorePath                      | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ SavePath                          | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ SelectClipPath                    | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ SetCurrentPosition                | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ SetLineOrigin                    | POLYSTUF . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ SetStyleRatio                    | ATTRS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdl _ StrokePath                        | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdm _ DisjointLines                    | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdm _ DrawBits                          | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdm _ DrawBorder                        | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdm _ PolyScanline                      | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdm _ PolyShortLine                    | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdm _ QueryDevResource                  | NOINSTAL . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdq _ AbortDoc                          | DEVESC . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdq _ EndDoc                            | DEVESC . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdq _ Escape                            | DEVESC . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdq _ NewFrame                          | DEVESC . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdq _ QueryDeviceBitmaps                | QUERY . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdq _ QueryDeviceCaps                  | QUERY . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdq _ QueryEscSupport                  | DEVESC . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdq _ QueryHardcopyCaps                | QUERY . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdq _ StartDoc                          | DEVESC . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdt _ CharString                        | CHARSTR . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdt _ CharStringPos                    | CHARSTR . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdt _ QueryCharPositions                | QUERYCHR . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| prdt _ QueryTextBox                      | QUERYCHR . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| PrintBool                              | UTLPRINT . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| PrintChannel                            | UTLCHNL . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| PrintColor                              | BITMAPS . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| PrintColorTable                        | COLORTAB . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| PrintDecimal                            | UTLPRINT . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| PrinterPropertiesDlgProc              | PPDLG . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| PrintFontMem                            | CONFIG . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| PrintFraction                          | UTLPRINT . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| PrintHex                                | UTLPRINT . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ProfileAllocStringQuery                | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ clearpath                            | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ clip                                | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ closepath                            | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ CosmeticLine                        | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ effects                              | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ enddoc                              | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ fill                                | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ grestore                            | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ gsave                                | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ imagedata                            | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ init                                | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ lineto                              | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ moveto                              | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ movetoCP                            | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ newpath                              | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ patfill                              | PATFILL . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ patfill _ base                        | PATFILL . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ patfill _ common                      | PATFILL . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ patfill _ font                        | PATFILL . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ restoreclipmatrix                  | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ restorematrix                      | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ rotatefont                          | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ saveclipmatrix                      | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ savematrix                          | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ scalefont                            | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ selectfont                          | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ setdash                              | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ setdashnow                          | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ SetDownloadedFont                  | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ setfont                              | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ setlinecap                          | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ setlinejoin                          | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ setlinewidth                        | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ setmatrix                            | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ setrgbcolor                          | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ shearfont                            | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ show                                | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ showpage                            | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ startdoc                            | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ status                              | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ stroke                              | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ strokecurrentpath                  | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ sync _ cp                              | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ps _ upper                                | PPDLG . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| QueryAddFormButtonStatus              | PPDLG . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| QueryBlockFromKeyword                  | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| QueryDefDrivFromQue                    | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| QueryDeviceSurface                    | SURFACE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| QueryEntryFromOption                  | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| QueryFeaturePageLoad                  | JPDLG . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| QueryMappedTray                        | DLG . C                      |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| QueryNextSubkey                        | PROFILE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| QueryTunerProcData                    | PSTUNER . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| QueryUIOptionString                    | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| QueryUserForm                          | CONFIG . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| R3 _ FileCheckDialogs                    | UTLCHNL . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| rclIsEqual                              | PATH . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ReadFormINIData                        | PROFILE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ReadHeader                              | DOWNLOAD . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ReadNewOrOldINIString                  | PROFILE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ReadPageOptionData                    | PROFILE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ReadProfile                            | QUERYBOX . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ReadTrayPageMapINI                    | PROFILE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ReleaseHelpStubHook                    | CONFIG . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| RemapBoldItalic                        | FONTS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| RemapCodePage                          | FONTS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| rwASCblock                              | DOWNLOAD . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| rwBINblock                              | DOWNLOAD . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SaveCurrentUISelections                | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SaveGammaVals                          | JPDLG . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SaveINIGroupData                      | PROFILE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SavePageTrayINIData                    | PROFILE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ScanCustomset                          | QUERYBOX . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ScanDigits                              | UTLPRINT . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ScanInt                                | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ScanPercentFormat                      | UTLPRINT . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ScanString                              | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ScanToken                              | UTLPRINT . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SendPFB                                | DOWNLOAD . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SetCanvasMetrics                      | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SetHelpStubHook                        | CONFIG . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SetLDBFlag                              | MEMORY . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SetSysMenuFields                      | DLG . C                      |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SetTabTextSize                          | DLG . C                      |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SetTextBackground                      | CHARSTR2 . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SetTextColors                          | CHARSTR . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SetUIOption                            | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SFDownload                              | DOWNLOAD . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SFQueryFonts                            | DOWNLOAD . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| SFReadOFMs                              | DOWNLOAD . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ShowCursor                              | QUERYBOX . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| sync _ graphic _ states                    | PATH2 . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| szColonCopy                            | QUERY . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| szCopy                                  | UTLPS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| szDCopy                                | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| szDlmCopy                              | CONFIG . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| szIsEqual                              | IMG2BIN . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| szLength                                | FONTS . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| szNewCopy                              | DEVMODE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| sznIsEqual                              | DEVMODE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| TerminateTranslationString            | PROFILE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ToTop ( )                                | CHARSTR2 . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ulNormalize                            | MATH . ASM                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| UnHookBitmapCalls                      | PRDEVECT . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| UpdateTrayList                          | JPDLG . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| UserFileInvalid                        | FLCHKDLG . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| utl _ memcopy                            | ASM2C . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| utl _ MemIsEqual                          | XFORMS . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ValidateDriveData                      | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| ValidFileName                          | CONFIG . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| VerifyAndSaveSettings                  | DLG . C                      |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| VerifyLDDCNFStructure                  | DEVMODE . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| VerifyTrayFormMapping                  | PPDLG . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| VerifyUISelectionList                  | DEVBLOCK . C                |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| VerifyUniqueForm                      | PPDLG . C                    |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| WriteChannel                            | UTLCHNL . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| WriteModeString                        | UTLCHNL . C                  |
| ---------- ---------- ---------- ------ + ---------- ---------- ---- |
| WrtQueryProfile                        | QUERYBOX . C                |
\ ---------- ---------- ---------- ------ - ---------- ---------- ---- / </pre>
 
 
 
 
=== Module and Function Descriptions ===
 
This section describes the modules that comprise the PostScript driver and the functions that comprise each module. Each function is followed by a description. The functions in each module are listed in alphabetical order.
 
 
 
 
 
=== ARCS.C ===
 
This module contains functions that handle drawing for arcs and circles.
 
 
 
 
 
=== find_arc_direction ===
 
Finds the direction the arc should be drawn. This is dependent on the arc parameters. If p * q &gt; r * s, the arc is drawn counter clockwise; otherwise , it is drawn clockwise.
 
 
 
 
 
=== prdl_FullArcBoth ===
 
Draws both the boundary and interior of a fullarc, centered at the current position.
 
 
 
 
 
=== prdl_FullArcBoundary ===
 
Draws the full boundary of an arc, centered at the current position.
 
 
 
 
 
=== prdl_FullArcCommon ===
 
Draws the interior of a fullarc, centered at the current position.
 
 
 
 
 
=== prdl_FullArcInterior ===
 
Draws the full interior of a fullarc, centered at the current position.
 
 
 
 
 
=== prdl_FullArcPath ===
 
Sends PostScript commands relating to any arc drawing.
 
 
 
 
 
=== ASM2C.C ===
 
This module contains math routines for the driver.
 
 
 
 
 
=== frdiv ===
 
Divides two fixed numbers and returns a fixed number.
 
 
 
 
 
=== frmul ===
 
Multiplies two fixed numbers and returns a fixed number.
 
 
 
 
 
=== frsqrt ===
 
Calculates the square root of a fixed number.
 
 
 
 
 
=== frVectLength ===
 
Computes the length of a vector, given the X and Y components as fixed point numbers, and returns the square root as a fixed point value.
 
 
 
 
 
=== fxmultiply ===
 
Multiplies two fixed numbers and returns a fixed number. The passed QUAD is filled in with the quad intermediate result. The overflow flag is always zero.
 
 
 
 
 
=== iqdiv ===
 
Divides a Quad by a long number, returning a fixed number.
 
 
 
 
 
=== LongXFixed ===
 
Multiplies a fixed and long and returns a long. This saves two shifts converting long to and from fixed. As a result, the function is simpler than ''frmul''. Method: ( long x fixed_fraction ), and then shift off fraction and add in long X fixed_integer.
 
 
 
 
 
=== utl_memcopy ===
 
Passthru to C memcpy.
 
 
 
 
 
=== ATTRS.C ===
 
This module contains functions that maintain image and device attributes.
 
 
 
 
 
=== prda_DeviceGetAttributes ===
 
Returns selected device attributes.
 
 
 
 
 
=== prda_DeviceSetAttributes ===
 
Sets selected device attributes.
 
 
 
 
 
=== prda_DeviceSetGlobalAttribute ===
 
Sets selected global attributes.
 
 
 
 
 
=== prda_GetImagAttrs ===
 
Returns selected image attributes.
 
 
 
 
 
=== prda_GetLineAttrs ===
 
Returns selected line attributes.
 
 
 
 
 
=== prda_GetMarkAttrs ===
 
Returns selected marker attributes.
 
 
 
 
 
=== prda_GetPtrnAttrs ===
 
Returns selected pattern attributes.
 
 
 
 
 
=== prda_GetTextAttrs ===
 
Returns selected text attributes.
 
 
 
 
 
=== prda_SetImagAttrs ===
 
Sets selected image attributes.
 
 
 
 
 
=== prda_SetLineAttrs ===
 
Sets selected line attributes.
 
 
 
 
 
=== prda_SetMarkAttrs ===
 
Sets selected marker attributes.
 
 
 
 
 
=== prda_SetPtrnAttrs ===
 
Sets selected pattern attributes.
 
 
 
 
 
=== prda_SetTextAttrs ===
 
Sets selected text attributes.
 
 
 
 
 
=== prdl_GetCurrentPosition ===
 
Returns the current position.
 
 
 
 
 
=== prdl_PatGray ===
 
Establishes the current pattern attributes used to fill a path.
 
 
 
 
 
=== prdl_PenGray ===
 
Establishes the current pen attributes used to stroke a path.
 
 
 
 
 
=== prdl_SetCurrentPosition ===
 
Sets the current position in the DDC, and outputs a ''moveto''command to the PostScript printer. As soon as this command is completed, the PostScript printer and the DDC will have the same current position.
 
 
 
 
 
=== prdl_SetStyleRatio ===
 
Informs the display driver of the aspect ratio of the pixels. Because PostScript does its own drawing, this function has no effect.
 
 
 
 
 
=== BITMAPS.C ===
 
This module contains functions that are used for bit map handling.
 
 
 
 
 
=== BeginImage ===
 
Outputs the PostScript code for the image command appropriate for the bit map format.
 
 
 
 
 
=== CompressAscii85 ===
 
Encodes 4 bytes ''in''to 5 bytes ''out'', converting from a base 256 representation on input to a base 85 representation on output. The output is then output in ASCII with base 85 ( zero digit = !) and base 85 ( 84 digit = u )
 
 
 
 
 
=== CompressMode2Out ===
 
Compresses a scanline. The compression is done according to LJ IIP Mode 2 compression: mixed binary and run-length encoding.
 
Once in a repeated run, if a different byte is encountered, the driver stops and emits a block.
 
Once in a literal run, if at least 4 repeated bytes follow, the driver stops and emits a block. The next block will be a repeat block. Repeats of 2 or more instances of a byte b are represented by -(n-1) b. Literal runs of different bytes b1 b2 b3 .. bn are represented by (n-1) b1 b2 b3 .. bn.
 
 
 
 
 
=== DefinePal ===
 
Defines the color table in PostScript that is used to translate between the sample indexes and the color values.
 
 
 
 
 
=== DrawImage ===
 
Projects an image of a rectangle on the source DC's bit map onto the printer.
 
 
 
 
 
=== ImageProcToChannel ===
 
Outputs the scanline data for the appropriate bit map format.
 
 
 
 
 
=== ImageScan ===
 
Outputs the scanline data for the appropriate bit map format.
 
 
 
 
 
=== PalGray ===
 
Converts an RGB color value into an 8-bit PostScript grayshade image value. Image values range from 0 to 255 where zero corresponds to black and 255 corresponds to white. Returns the grayshade value.
 
 
 
 
 
=== prdb_Bitblt ===
 
The GpiBitBlt function copies a bit map from one presentation space to another. It can also modify the bit map within a rectangle in a presentation space. The exact operation carried out by GpiBitBlt depends on the raster operation specified by the lRop parameter.
 
If lRop directs GpiBitBlt to copy a bit map, the function copies the bit map from a source presentation space specified by hpsSrc to a target presentation space specified by hpsTarg. Each presentation space must be associated with a device context for the display, for memory, or for some other suitable raster device. The target and source presentation spaces can be the same if desired. The aptl parameter points to an array of points that specify the corners of a rectangle containing the bit map in the source presentation space as well as the corners of the rectangle in the target presentation space to receive the bit map. If the source and target rectangles are not the same, GpiBitBlt stretches or compresses the bit map to fit the target rectangle.
 
If lRop directs GpiBitBlt to modify a bit map, the function uses the raster operation to determine how to alter the bits in a rectangle in the target presentation space. Raster operations include changes such as inverting target bits, replacing target bits with pattern bits, and mixing target and pattern bits to create new colors. For some raster operations, the function mixes the bits of a bit map from a source presentation space with the target or pattern bits, or both.
 
'''Comments:'''
 
The source and target presentation spaces can be associated with any device context having raster capabilities. Some raster devices, such as banded printers, can receive bit maps but cannot supply them. These devices cannot be used as sources.
 
GpiBitBlt does not affect the pels in the upper and right boundaries of the target rectangle. This means the function draws up to but does not include those pels.
 
If lRop includes a pattern, GpiBitBlt uses the current area color, area background color, pattern set, and pattern symbol of the target presentation space. Although the function may stretch or compress the bit map, it never stretches or compresses the pattern.
 
If the target and source presentation spaces are associated with device contexts that have different color formats, GpiBitBlt converts the bit map color format as it copies the bit map. This applies to bit maps copied to or from a device context having a monochrome format. To convert a monochrome bit map to a color bit map, GpiBitBlt converts one pel to the target's foreground color, and no pels to the current area background color . To convert a color bit map to a monochrome bit map, GpiBitBlt converts pels with the source's background color to the target's background color, and all other pels to the target's foreground color.
 
The bit map associated with a source presentation space is always a finite size. Although GpiBitBlt will copy a bit map when given a source rectangle that is larger than the source bit map or extends past the boundaries of the source bit map, any pels not associated with the source bit map are undefined.
 
'''Example:'''
 
This example uses GpiBitBlt to copy and compress a bit map in a presentation space. The function copies the bit map that is 100 pels wide and 100 pels high into a 50-by-50-pel rectangle at the location (300,400). Because the raster operation is ROP_SRCCOPY, GpiBitBlt replaces the image previously in the target rectangle. The function compresses the bit map to fit the new rectangle by discarding extra rows and columns as specified by the BBO_IGNORE option.
 
 
 
 
 
=== prdb_GetBitmapHandle ===
 
Returns the bit map handle.
 
 
 
 
 
=== prdb_ImageData ===
 
Outputs a scanline from a bit map.
 
 
 
 
 
=== prdb_SetPel ===
 
Sets the color value for a given pixel.
 
 
 
 
 
=== PrintColor ===
 
Outputs the RGB color in hex format on the output channel.
 
 
 
 
 
=== BOUNDS.C ===
 
This module contains routines for handling bounds.
 
 
 
 
 
=== prdg_AccumulateBounds ===
 
Causes the driver to add an additional rectangle to the bounds that it is accumulating.
 
 
 
 
 
=== prdg_GetBoundsData ===
 
This routine returns the current bounds rectangle that the driver has accumulated. A default rectangle is returned if no bounds data has yet been accumulated.
 
 
 
 
 
=== prdg_ResetBounds ===
 
Resets the driver's bounds accumulation.
 
 
 
 
 
=== prdl_ExpandBounds ===
 
This routine is the essential primitive for implementing accumulate bounds. The bounds rectangle in the DC instance is stretched so that it contains the new point passed in as a parameter.
 
 
 
 
 
=== BOX.C ===
 
This module contains box drawing routines.
 
 
 
 
 
=== prdl_BoxBoth ===
 
Draws the boundary of a rounded corner box and fills its interior.
 
 
 
 
 
=== prdl_BoxBoundary ===
 
Draws a boundary around a rounded corner box.
 
 
 
 
 
=== prdl_BoxCommon ===
 
Draws the boundary of a rounded corner box and fills its interior.
 
 
 
 
 
=== prdl_BoxInterior ===
 
Fills the interior of a rounded corner box.
 
 
 
 
 
=== prdl_BoxPath ===
 
Creates a path corresponding to the box primitives of the engine. Rounded corner boxes are implemented using Bezier curves and straight line segments .
 
 
 
 
 
=== CHARSTR.C ===
 
This module contains functions that are used in handling character strings.
 
 
 
 
 
=== CharStringDebug ===
 
This function is for debugging only. It writes character information options to the log file. Character information options includes starting point and clipping rectangle.
 
 
 
 
 
=== CharStringKern ===
 
Returns adjustments for kerning.
 
 
 
 
 
=== CharStringLeftRight ===
 
Displays a character string from left to right.
 
 
 
 
 
=== CharStringRect ===
 
Clips or fills the given rectangle, as requested.
 
 
 
 
 
=== CharStringReverse ===
 
Reverses a specified number of characters in a string, starting with the first ''n''characters.
 
 
 
 
 
=== CharStringRightLeft ===
 
Displays a character string from right to left.
 
 
 
 
 
=== CharStringUpDown ===
 
Prints text vertically, in either an up or down direction.
 
 
 
 
 
=== CharStringWidthVector ===
 
Prints characters, accounting for a given width vector.
 
 
 
 
 
=== prdt_CharString ===
 
Draws a character string starting at the current position.
 
 
 
 
 
=== prdt_CharStringPos ===
 
Draws a character string starting either at a specified position or at the current position.
 
 
 
 
 
=== SetTextColors ===
 
Sets the background color and draws the background if necessary. It then sets the foreground color for the text.
 
 
 
 
 
=== CHARSTR2.C ===
 
This module contains functions used in font resource, character, and color handling.
 
 
 
 
 
=== ConcatXforms ===
 
Performs calculations for the concatenation of two transform matrixes that were provided from the function [[00212.htm|prda_ComputeTextTransformMatrix]].
 
 
 
 
 
=== ConvertOFMtoPFM ===
 
Converts an OFM file to a PFM format.
 
 
 
 
 
=== ConvertPFM ===
 
Adds bounding box information to the PFM data.
 
 
 
 
 
=== FreeFontResource ===
 
Frees the memory of the font resource for this font.
 
 
 
 
 
=== GetPFMetrics ===
 
Given a pointer to a font resource, returns a pointer to the FONTMETRICS.
 
 
 
 
 
=== PfntFromIndex ===
 
Turn a font index into a pointer to the PFNT structure.
 
 
 
 
 
=== prda_BackMapChar ===
 
Determines what code point in the current code page corresponds to a given glyph (character pattern). If a match is found, this function returns it. If no match is found, it returns -1. If there is no code page vector, this font does not offer Winthorn multi-code page support. In this case, the provided glyph ID is simply returned as the code point.
 
 
 
 
 
=== prda_CheckFontResource ===
 
Confirms that the resource for the currently selected font is loaded. This function calls [[00218.htm|prda_LoadFontResource]]to load the resource corresponding to the currently selected font. A pointer to the header of this resource and a pointer to the font metrics within the resource are placed in the display context instance data.
 
 
 
 
 
=== prda_ComputeTextTransformMatrix ===
 
Computes a new text transform matrix from the character attribute bundle stored in the display context instance, and puts the new transform in the instance as well. This function recalculates the transform from scratch. This is necessary when any of the cell size, angle, or shear entries in the character attribute bundle change.
 
'''Warnings:'''
 
The transform matrix that is created will be suitable for converting points from Adobe style (1000x1000) units to world coordinate space. Because often the values already in world coordinate space need only to be rotated, the cosine and sine values that are calculated are also saved.
 
 
 
 
 
=== prda_CopyMetrics ===
 
Copies font metrics from the font resource to the caller's buffer, rescales the data to world coordinates, and inserts an lMatch value into the appropriate field of the caller's buffer.
 
This function copies the entire FONTMETRICS structure to a temporary buffer , rescales all values, inserts the lMatch field, and then copies the number of bytes requested to the destination buffer.
 
'''Warnings:'''
 
The number of bytes requested to be copied to the destination must not exceed the size of the font metrics structure, presently 208 bytes in length.
 
 
 
 
 
=== prda_DefaultFontIndex ===
 
Scans the list of all fonts offered by the current printer until one is found that matches the default font. The index of this matching font is then returned.
 
'''Warnings:'''
 
If no match is found, zero is returned. This will cause the first font in the printer's list of supported fonts to be used as if it were the default font. This situation should never arise naturally.
 
 
 
 
 
=== prda_DrawLine ===
 
Draws a line from the current position (assumed to be the end of the text) to the provided position (start of the text) at the specified elevation with regard to the text baseline and of the specified thickness. If no path is open, a line is drawn and stroked from the end of the text to the beginning of the text, adjusting both endpoints for the provided elevation. Current position, line type, line thickness, and line cap are all destroyed . If a path is open, a subpath is created and added to the current path. The subpath is actually a rectangle that outlines the requested line. The subpath is necessary for outline text and text pattern clipping. The current position and line attributes are destroyed.
 
'''Warnings:'''
 
It is assumed that the current position is on the baseline at end of the string that is being underscored or struck out. It is assumed that the major function has saved the current position and line attributes and will restore them later. This function must not be called if the draw bit is turned off.
 
 
 
 
 
=== prda_FontTransform ===
 
Transforms a point given in Adobe style (1000x1000) units into world coordinate space.
 
Applies the current text transform, held in the display context instance data, to the given point and returns the new point.
 
 
 
 
 
=== prda_GetKernAmount ===
 
Determines the amount of kerning space appropriate between the two given characters. This is in Adobe style (1000x1000) units. The value is signed; a negative value indicates that the characters should be pulled closer together and a positive value indicates that they should be pushed further apart.
 
'''Warnings:'''
 
The code points provided must be in the code page the font is designed for, not the code page the application is using. For fonts with Winthorn multi- code page support, this indicated that the code points must be in extended code page 850 form (presently a value 1-316).
 
 
 
 
 
=== prda_LoadFontResource ===
 
Loads the resource corresponding to the specified font and returns a pointer to the resource data.
 
Consults an internal table to convert the requested font into a resource number. Then DosGetResource is called upon to actually load the resource. If this is successful, a pointer to the loaded resource is returned.
 
 
 
 
 
=== prda_NumPrinterFonts ===
 
Scans the array of fonts offered by this printer, counting filled Full Name entries.
 
 
 
 
 
=== prda_QuoteChar ===
 
Given a character code 0-255, the function puts the proper information into the buffer so that a show command in PostScript will display the character with this code. This will be one, two, or four bytes of printable ASCII characters. Codes, such as 65 (A) and 33 (!), are copied directly. Non- printable codes, such as 255, are put in the buffer in octal form (for example, \377). Some special characters (such as parentheses) require a backslash to be placed in front of them.
 
'''Warnings:'''
 
If enough buffer space is not available to hold the quoted form of the character code, the buffer is left unchanged and a value of zero is returned.
 
 
 
 
 
=== prda_RemapString ===
 
Converts an the text string of an application into a string suitable for sending to PostScript as an argument to a SHOW command. This conversion requires that the following four procedures be completed:
 
*Convert code points to the right code page <br />*Possibly download a new font remapping to PostScript <br />*Add backslashes before parentheses <br />*Use octal for non-ASCII characters
 
This function scans the string, looking for troublesome code points ( characters without a numeric value in the Adobe Standard Encoding). If the string contains any such characters and a font remap has not yet been downloaded to the printer, the remap is downloaded. Next, the string is scanned a second time, converting each code point to the proper code page, adding backslashes and octal digits as needed, and storing the final string in a buffer in the display context instance data.
 
'''Warnings''':
 
*The font remapping is downloaded only if absolutely necessary. The download causes a loss of performance.
 
*The text buffer in the display context instance is limited in size ( presently 256 bytes long). If the provided string is too long, it will be truncated. Therefore, it is the responsibility of the major functions to make sure this never happens. For example, CharStringPos will automatically break longer strings into shorter ones to avoid truncated text.
 
 
 
 
 
=== SetTextBackground ===
 
Used to paint the background of the area where text will be placed in order to simulate a background mix mode of overpaint. This function sets the color to either the current background color or to the color provided in the bundle. It then makes a path of the provided bounding box and fills the box.
 
'''Warnings:'''
 
This function should not be called if the draw bit is turned off.
 
 
 
 
 
=== ToTop() ===
 
Moves a member of font cache to top of list. The function keeps exchanging two ajacent members until the element is &quot;bubbled&quot; to the top.
 
 
 
 
 
=== COLORTAB.C ===
 
This module contains color table functions.
 
 
 
 
 
=== ColorDistance ===
 
Computes the distance between two RGB color values. The distance is the average of the absolute values of the differences between each of the primary color values. The difference ranges from 0 to 255. If the device is a greyscale printer, the color differences are weighted according to the response of the human eye to the primary color.
 
=== prdc_CreateLogColorTable ===
Creates the driver's color table.
 
=== prdc_GetColor ===
Performs a color table lookup to convert an engine color value into an RGB color.
 
=== prdc_QueryColorData ===
Allows the application to determine the format and size of the color table.
 
=== prdc_QueryColorIndex ===
Searches the color table for an RGB value and returns the color table index of the closest color.
 
=== prdc_QueryLogColorTable ===
Returns the RGB color values stored in the logical color table with no conversion.
 
=== prdc_QueryNearestColor ===
Takes an RGB color value as input and returns the closest RGB color value that can be drawn on the device. Because PostScript processes shades of gray, this will be an RGB triplet with each of the components set to equal values.
 
=== prdc_QueryRealColors ===
Allows the application to determine if the RGB color values are in the color table as they are realized on the device.
 
=== prdc_QueryRGBColor ===
Allows the application to determine if the RGB color values are in the color table.
 
=== prdc_RGB_to_Solid ===
Returns a solid color for that device.
 
=== prdc_RgbToGray ===
Converts an RGB color to the a grayshade value that ranges from 0.0 to 1.0 (fixed point).
 
=== prdc_RgbToNearestRgb ===
Converts an RGB color to the nearest color available on the output device. For black-and-white printers, this will be one of the half-tone grayshades.
 
=== PrintColorTable ===
Used only for debugging. This function dumps color table information to the log file.
 
=== CONFIG.C ===
This module contains functions for the '''Printer Properties'''and '''Job Properties'''dialog boxes and for the help function.
 
=== CheckNumeric ===
Checks the string to see if it is a valid numeric string. The plus and minus signs as well as the decimal point are checked. Only one decimal point is allowed per string.
 
=== CleanUpHelpStubHook ===
Exit list routine that ensures that the stub HK_HELP hook is always removed before exiting.
 
=== DeviceModes ===
Called from [[00303.htm|OS2_PM_DRV_DEVMODE]]to perform tasks such as open printer descriptor resources and display dialog boxes.
 
=== get_module_dir ===
Returns the size of the directory path.
 
=== HelpErrorFilter ===
Checks for a recoverable help manager initialization error. If a recoverable error is detected, a message box pops up. The message box describes the error and asks if the user wants to retry.
 
=== HelpStubHook ===
Placed in the HK_HELP hook chain to catch the first time that the user presses PF1 or selects a '''Help''' push button. The help instance is then initialized and the user's help request is passed back into the HK_HELP chain again by making a call to the private function WinCallHelpHook().
 
=== InitializeHelp ===
Initializes help. If an attempt to create a help instance has already been made, the function returns immediately.
 
=== PrintFontMem ===
Sends a status page to the printer. The sheet contains the amount of printer memory and the number of suggested fonts for that amount of memory.
 
=== QueryUserForm ===
Retrieves a form name from a given form size. It searches OS2SYS.INI if a form name cannot be found.
 
=== ReleaseHelpStubHook ===
Removes the stub HK_HELP hook from the hook chain, if it has been successfully added via [[00249.htm|SetHelpStubHook]].
 
=== SetHelpStubHook ===
Adds the stub HK_HELP hook to the hook chain. This gives the driver control the first time that the user presses PF1 or selects a '''Help'''push button.
 
=== szDlmCopy ===
Copies a string from the source to the destination. If the string is NULL- terminated, the copy action stops when the terminator is encountered. If the source string encounters a semicolon, the copy action stops; otherwise, the copy action continues for the number of bytes passed in.
 
=== szNewCopy ===
Copies a string from the source to the destination. If the string is NULL- terminated, the copy action stops when the terminator is encountered; otherwise, the copy action continues for the number of bytes passed in.
 
=== sznIsEqual ===
Compares two NULL-terminated strings. This function returns TRUE if the strings match and FALSE if the strings do not match. The comparison is case sensitive.
 
=== ValidFileName ===
Checks if the file name specified in pszBuffer is valid. The check is purely syntactic. No check for the existence of the file is performed. If an error is not discovered in this function, DosOpen can return an error code at a later time.
 
=== DEVBLOCK.C ===
This module contains routines that verify data for the driver and maintain the physical and logical device blocks.
 
=== AllocateLDRIVDATABuffer ===
This function creates an LDRIVDATA structure for output, copies the data from the incoming LDRIVDATA structure (DRIVDATA part only) to the DRIVDATA section, and copies the local CNFDATA structure (allocated in [[00276.htm|prde_FillPdb]]) to the CNFDATA section:
 
=== BuildKeyName ===
Builds the key name in form of:
 
<pre class="western">PM_DD_&lt;printerName&gt;,&lt;deviceDriver&gt;.&lt;deviceName&gt;</pre>
 
The informaton is extracted from the INI file under the key of PM_SPOOLER_ PRINTER. If the information cannot be found, the defaults can be used as long as the type of device is known.
 
=== ClearMem ===
Clears the first cbytes of a buffer (sets all bytes in the buffer to zero).
 
=== CmndInpTray ===
Returns a pointer to the input tray select command.
 
=== CmndPaper ===
Returns the paper select command.
 
=== ConvertColorModel ===
In PPD version 4.2 and later, the UI string &quot;ColorModel&quot; allows the printer to render a job to the supported color or grayscale. This enables the printer to convert jobs to grayscale if selected; the driver can also convert color internally to grayscale if selected. It is preferred that the printer do the conversion because the printer is fine-tuned for better output.
 
In earlier versions of the driver, '''ColorModel''' was not supported and the driver did all the conversion. In order to be backward compatible, this driver needs to know when to let the printer do the conversion or when it should do the conversion.
 
This function is responsible for assuring that the correct flags are set so that the right component does the conversion. This is only needed when printing across the LAN since that is the only case where it should be possible to encounter earlier versions of the driver.
 
=== ConvertUIBitsToStrings ===
With a given list of selected bits from the UI_SEL array in the CNFDATA structure, this function converts the bits to matching strings in the following format:
 
<pre class="western">&quot;KEYWORD1,OPTION1A,OPTION1B,...OPTION1N;KEYWORD2,OPTION2A,...OPTION2N&quot;</pre>
<br />with the KEYWORD being the block name and OPTION being the UI entry corresponding to each bit that was set in the UI_SEL list.
 
The reason for this is to be compatible with other versions of the OS/2 keyword selection. If a printer adds a new keyword name and this is passed across the LAN, no matter what keywords are added, the keyword will always remain the same. If new keywords are added, the comparison will be against the string rather than against the UI_SEL bits (which can change if a new keyword is added). This string buffer is stored in PDV, which is passed onto the spooler.
 
The only exception in this conversion is with the '''*InputSlot'''keyword. The user may have selected '''Auto Tray Select''', meaning that no InputSlot command should be sent. This is so that the printer can select the tray. If this is the case, the UI selection for InputSlot will be -1. If it is -1, the string AUTOTRAYSELECT is inserted. When the function OutputPrinterUIFeatures() (in [[00589.htm|UTLPS.C]]) queries the InputSlot block for AUTOTRAYSELECT, it will return an error indicating that the string could not be found. Therefore, no InputSlot command will be sent out.
 
=== CopyLDRIVDATAToCNFDATA ===
The purpose of this function is to copy the CNFDATA and UI-Selection contents from an LDRIVDATA structure to a CNFDATA structure. LDRIVDATA structure is passed in to FillPhysicalDeviceBlock and is initialized by an outside component. The (output) CNFDATA structure is a locally allocated buffer.
 
=== Exitpdd ===
Called when processes are terminated.
 
The usTermCode parameter specifies the reason the process ended. This parameter can be one of the following values:
 
Value Meaning <br />TC_EXIT Normal exit <br />TC_HARDERROR Hard-error abort <br />TC_KILLPROCESS Un-intercepted DosKillProcess <br />TC_TRAP Trap operation
 
The important reason for using this routine is that the process might have ended unexpectedly, such as by a General Protection fault. If the process is holding a semaphore, it must be released so that the termination of this process does not cause the entire system to lock up while waiting on a semaphore that will never be freed.
 
=== FreeMemory ===
Frees all the memory allocated from heap.
 
=== FreePPBResource ===
This function frees all the buffers allocated in [[00269.htm|LoadPPBResource]].
 
=== ImageCoords ===
Returns a pointer that contains the size, in pels, of the image coordinates.
 
=== LoadCurrentUISelections ===
This function loads the current UI (printer feature) data into the CNFDATA structure. It first looks into the INI file for the selections. If found, they are loaded. If not, the default UI selections are read from the PPB resource (taken from the '''*Default...'''key in the *OpenUI/*CloseUI).
 
=== LoadInfoSegment ===
The printer information data is located in the variable SegName. This routine locates the segment and loads it into memory resident tables. If the load is successful, it returns TRUE; otherwise, it returns FALSE.
 
=== LoadPPBResource ===
With a given device name, this function returns the matching PPB resource.
 
=== LoadProfile ===
Loads the configuration data from OS2SYS.INI.
 
=== MatchHWFontName ===
Scans the list of all fonts offered by the current printer until one is found that matches the requested font. The index of this matching font is then returned. If no match is found, 0 is returned.
 
'''Warnings:'''
 
Fonts have two different names. The FullName is the most complete (for example, &quot;ITC Avant Garde Gothic Book Oblique&quot;). However, the font names used in the printer font list have an abbreviated form, such as &quot;AvantGarde -BookOblique&quot;.
 
=== PaperDimensions ===
Returns a pointer that contains the size, in pels, of the page dimensions.
 
=== PpdDefaults ===
Reads in default values from a PPD information segment into default types if they still do not contain any values.
 
=== prde_DisablePdb ===
Disables the pDeviceBlock subfunction.
 
=== prde_FillLdb ===
This is Enable Subfunction 1 of [[00340.htm|OS2_PM_DRV_ENABLE]].
 
This function sets up the dispatch table for the graphics engine, calls display.dll to get a dispatch table for its entry points, and sets the return flags to tell the engine that:
 
Bit 0 == 1 Each DC requires its own physical device block.
 
Bit 1 == 0 Multiple DCs might coexist.
 
Device/File names in the DevOpenStruc are significant. When the display driver is loaded, the PostScript driver calls the display driver as if the PostScript driver were the graphics engine module. This continues while the PostScript driver is using the display driver as its imaging engine. The display driver sees the DC as a memory DC while the engine sees it as a printer DC.
 
'''Note:''' The initialization process is serialized with semaphores because it is possible for more than one process to have performed an OpenDC at the same time. However, the process must first be placed in the ExitList because when any process grabs a semaphore, the driver must be able to free the semaphore if the process terminates unexpectedly.
 
=== prde_FillPdb ===
The information supplied on this call is required only for Direct and Indirect DCs, but at this stage the DC Type is not known. It is supplied on the Enable DC subfunction.
 
The function acquires pDeviceBlock Instance Data (from the global Device Driver Heap) for all DCs, and (optionally) releases it when the DC Type is known.
 
=== ProfileAllocStringQuery ===
Queries the size, in bytes, of a buffer needed for a string from the OS2. INI file. It then allocates the memory and copies the profile string to the buffer. This is used to retrieve profile strings of variable sizes. This function frees the profile-string buffer if an error occurs, but it is the programmer's responsibility to free the buffer if this function returns successfully. This function uses PSAllocMem() to allocate memory to the buffer, so PSFreeMem() should be used to free memory.
 
=== QueryBlockFromKeyword ===
With a given keyword string, this function finds the matching block for the given keyword. The keyword must be the same keyword that is found in the PPD:
 
<pre class="western">&quot;*OpenUI *keyword&quot;</pre>
<br />except the keyword should not include the asterisk.
 
This function not only returns the pointer to the matching block, but it also returns (if requested) the zero-based offset of the returned block in respect to the location of that block in the list. For example, if the block returned is the first block in the list, 0 is returned; if the block returned is the second block in the list, 1 is returned.
 
=== QueryDefDrivFromQue ===
If a pointer to a DRIVDATA is invalid, this function queries the current queue for the current DRIVDATA.
 
A DRIVDATA is considered invalid if the pointer is NULL or if the size is smaller then the DRIVDATA size of OS/2 version 1.3. In either case, the DRIVDATA from the queue is queried.
 
Memory is allocated to a return pointer and the queue's DRIVDATA is copied.
 
=== QueryEntryFromOption ===
With a given option string, this function finds the matching entry within a given block for the matching option.
 
=== QueryUIOptionString ===
This function retrieves a given keyword (UI block name) and returns the first option (UI entry name) that is selected. For multiple selections, this function can be called in succession; and it returns the next selected option found until the end occurs. This function returns a pointer to the option string. The option string is stored in pdesppd-&gt;pPSStringBuff.
 
=== SaveCurrentUISelections ===
This function saves the current UI selections made by the user. The UI data are stored as strings in the INI file. The key string used for the UI strings is UI.
 
=== ScanString ===
This function searches for a given substring within a string. It returns TRUE if the substring is found.
 
=== SetCanvasMetrics ===
Sets the canvas metrics (size and orientation) for the physical device.
 
=== SetUIOption ===
This function retrieves a given keyword (UI block name) and option string ( UI Entry name) and sets the matching bit in the UI-Selection entry for the given string data.
 
=== szDCopy ===
Duplicates an NULL-terminated or delimiter-terminated string with bounds checking to prevent overflow of the destination buffer.
 
 
 
 
 
=== ValidateDriveData ===
 
Performs some checking to make certain that valid drive data is passed in. This routine returns TRUE if the drive data is valid; otherwise, it returns FALSE.
 
 
 
 
 
=== VerifyUISelectionList ===
 
This function verifies that the data in the UI-Selection list is valid. Each bit in each entry of the UI-Selection list corresponds to a selection that the user has made in '''Job Properties'''. There are at most 32 selections for a given entry. If a bit is 1, the selection was made. This allows a user to make multiple selections (if available) for a given UI entry.
 
 
 
 
 
=== DEVESC.C ===
 
This module contains driver escape routines.
 
 
 
 
 
=== perform_std_spooling ===
 
At the end of spooling activities, this function writes the metafile data to the spooler.
 
 
 
 
 
=== prdq_AbortDoc ===
 
Terminates a document and sends commands to reset the device.
 
 
 
 
 
=== prdq_EndDoc ===
 
Ends a document. This routine is supported only if an OD_QUEUED DC is provided. This routine is used to establish the end of a spooler print job.
 
 
 
 
 
=== prdq_Escape ===
 
Dispatches to the appropriate escape function.
 
 
 
 
 
=== prdq_NewFrame ===
 
Handles the DEVESC_NEWFRAME call (a form feed).
 
 
 
 
 
=== prdq_QueryEscSupport ===
 
Returns TRUE or FALSE, specifying whether the given escape routine is supported by the driver.
 
 
 
 
 
=== prdq_StartDoc ===
 
Starts a document. This routine is only supported if an OD_QUEUED DC is provided. This routine is used to establish the start of a new spooler print job.
 
 
 
 
 
=== DEVMODE.C ===
 
This module contains the function [[00303.htm|OS2_PM_DRV_DEVMODE]]and other functions used to retrieve the printer name.
 
 
 
 
 
=== AllocCNFStructure ===
 
This function allocates memory for the CNFDATA structure. This includes memory allocation for pSourcePaper and the UI-Selection list. The UI- Selection list is a buffer that immediately follows the CNFDATA structure in the buffer.
 
 
 
 
 
=== CheckPrinterName ===
 
Given logical name of printer, this function will check if it has any PostScript printers of the requested type.
 
 
 
 
 
=== CopyCNFData ===
 
This function copies the contents from one CNFDATA structure to another. This copy includes copying data from one pSourcePaper and the UI-Selection buffer to another of their respective buffers. This is providing that there is a buffer to be copied.
 
 
 
 
 
=== FreeCNFStructure ===
 
This function frees the CNF structure and all buffers that are used by pointers within the structure.
 
 
 
 
 
=== GetPrinterName ===
 
Checks the default device, and then all other devices, for the first match of the requested device name.
 
 
 
 
 
=== OS2_PM_DRV_DEVMODE ===
 
The DevPostDeviceModes function causes a device driver to post a dialog box so that the user can set options, such as resolution and font cartridges, for the device.
 
The application can call this function first with a NULL data pointer to determine how much storage is needed for the data buffer. It then calls the function a second time to have the buffer filled with data. The returned data is then passed to the DevOpenDC function as the buffer data pointed to by the pbDriverData parameter.
 
 
 
 
 
=== VerifyLDDCNFStructure ===
 
This function verifies whether or not the contents of the CNFDATA structure within the LDRIVDATA structure are valid. Verification includes whether or not:
 
*The UI-Selection buffer offset (ofsSelectList) contains the current offset value where the UI-Selection buffer is located. This value is the size of the CNFDATA structure.
 
*The UI-Selection buffer contains valid data.
 
 
 
 
 
=== DLG.C ===
 
This file contains common functions accessed by both '''Printer Properties'''and '''Job Properties'''.
 
 
 
 
 
=== ClosePSDlg ===
 
This function closes the dialog box for '''Printer Properties'''and '''Job Properties'''.
 
 
 
 
 
=== DisplayFeaturesUIEntries ===
 
Every time a feature is selected in '''Features''', this function displays the available list of features in the lower listbox. If the feature supports only one selection, the options are displayed in a drop-down listbox. If the features supports multiple selections, the options are displayed in a standard listbox.
 
 
 
 
 
=== DisplayMessageBox ===
 
With a given message ID, this function queries the message and displays a message box with that message string. An optional title ID may be provided. If no title ID is provided, the string Error is displayed as the message- box title.
 
 
 
 
 
=== FillFormList ===
 
This function displays all available form names (both printer-defined and unique forms) in '''Printer Properties'''and '''Job Properties.'''
 
For '''Printer Properties''', it displays all available forms defined by the printer as well as all unique forms (provided that bDisplayUnqForms is TRUE ). For '''Job Properties''', it displays all forms if &quot;Display assigned forms only&quot; is ''not''checked in '''Printer Properties'''. If it is checked, then this function will only display the forms that are mapped to one or more trays. It will also list the default form (provided by pszDefString). If pszDefString is NULL, then no form is highlighted.
 
 
 
 
 
=== FillTrayList ===
 
This function displays all available tray names in '''Printer Properties'''and '''Job Properties.'''
 
For '''Printer Properties''', it displays all available trays defined by the printer. &quot;No Forms Selected&quot; is also on the list for any form that is not mapped to a tray.
 
For '''Job Properties''', it displays all trays that have been mapped to a given form (this mapping is defined in '''Printer Properties'''). If a given form has no (zero) mapped trays or two or more mapped trays, then &quot;Auto Tray Select&quot; is displayed. This allows the printer to decide where to select the form.
 
If a default tray is provided, and a matching tray string is found in the tray list, then the matching tray string is highlighted. If pszDefString is NULL, then no form is highlighted. If a default handle is provided, then all tray entries are set to that handle. If none is provided, then the handle for each tray entry is the zero-based offset of that tray entry as it is found in the PPD. For example, if &quot;Upper&quot; is the first tray in the PPD, then the handle is 0. All trays are listed in the same order as they are found in the PPD.
 
 
 
 
 
=== FreeDialogHeader ===
 
This function frees all memory allocated in [[00313.htm|InitializeDialogHeader]]().
 
 
 
 
 
=== InitializeDialog ===
 
This function initializes the dialog box. This includes inserting the pages into the notebook and setting the title string.
 
 
 
 
 
=== InitializeDialogHeader ===
 
Initializes the DLGHDR structure. This is the dialog header containing data used by the dialog box.
 
 
 
 
 
=== InsertPageInNotebook ===
 
Inserts a dialog into the notebook and sets up the status text line on top of each page. This includes inserting the address of the dialog header in the dialog's reserved doubleword (QWL_USER).
 
 
 
 
 
=== InsertStringInListbox ===
 
This function inserts a given string in the listbox, associates a given handle with the listbox string (if provided), and returns the index in the listbox where the string is located. If a default string is provided and the inserted string matches the default, the string is highlighted.
 
 
 
 
 
=== ListUniqueForms ===
 
This function lists all user-defined and custom forms in the '''Forms'''listbox. It sets the handle of each entry to the offset of where the mapped form is in the UI list. The high word bit is set to 1, however, indicating that the form is a unique form.
 
 
 
 
 
=== QueryMappedTray ===
 
With a given '''UI-Control'''handle, this function returns an address to the '''Dialog Header'''.
 
 
 
 
 
=== SetSysMenuFields ===
 
This function removes the following menu items from the '''System Menu''': '''Restore''', '''Size''', '''Minimize''', '''Maximize''', and '''Hide'''.
 
 
 
 
 
=== SetTabTextSize ===
 
This sets the notebook tab size to the largest tab string used.
 
 
 
 
 
=== VerifyAndSaveSettings ===
 
This function sends a WMPS_VERIFYSETTINGS message to all of the pages in the notebook. If all pages return a successful code (PSDRC_VERIFY_SUCCESS), a WMPS_SAVESETTINGS message is sent to all of the pages. If this function is called from '''Printer Properties''', the UI data is saved in the OS2SYS.INI file.
 
 
 
 
 
=== DOWNLOAD.C ===
 
This module contains functions that are used in downloading fonts.
 
 
 
 
 
=== CopyStr ===
 
Copies a string from the source to the destination.
 
 
 
 
 
=== DefaultFontCount ===
 
Returns the number of default fonts available for given printer memory.
 
 
 
 
 
=== FillOFMFont ===
 
Reads OS2.INI for any OFM fonts and loads their names into memory.
 
 
 
 
 
=== FillSFonts ===
 
Fills in the FNT structure for each of the available soft fonts at the specified address.
 
 
 
 
 
=== GetPM_Fonts ===
 
Retrieves a list of font file names from the OS2.INI file.
 
 
 
 
 
=== isHWFont ===
 
Verifies if a given font name is a printer font. Returns TRUE if the font is a printer font.
 
 
 
 
 
=== IsOFMFile ===
 
Verifies if a file is a valid OFM file by checking for the extension .OFM.
 
 
 
 
 
=== LoadFile ===
 
Opens and reads in a file and returns a pointer to it.
 
 
 
 
 
=== ReadHeader ===
 
Reads the PPB file header. This function returns TRUE if it is valid (and not EOF). Writes out ASCII portion of the PFB structure and the binary part , converting it to hex.
 
 
 
 
 
=== rwASCblock ===
 
Writes out the ASCII part of PFB.
 
 
 
 
 
=== rwBINblock ===
 
Writes out the binary part, converting it to hex.
 
 
 
 
 
=== SendPFB ===
 
Parses and sends a PFB file.
 
 
 
 
 
=== SFDownload ===
 
Downloads a soft font.
 
 
 
 
 
=== SFQueryFonts ===
 
Queries the number of soft fonts available. This function returns the number of soft fonts available, or 0 for an error.
 
 
 
 
 
=== SFReadOFMs ===
 
Acts as combined [[00335.htm|SFQueryFonts]]and [[00325.htm|FillSFonts]], depending on what arguments are passed in. If cFnt is 0, a count is returned. Otherwise, a list of OFM files is received from .INI and the FNT structure is loaded from the OFM files.
 
 
 
 
 
=== ENABLE.C ===
 
This module contains functions that are used when the device context is initialized or disabled.
 
 
 
 
 
=== FreePathBufs ===
 
Frees the path buffer and the clip buffer.
 
 
 
 
 
=== init_semaphores ===
 
Creates semaphores that are used to control access to ports (LPTx and COMx) .
 
 
 
 
 
=== OS2_PM_DRV_ENABLE ===
 
Switches to the required Enable subfunction.
 
The OS2_PM_DRV_ENABLE entry point handles the DC management functions. Those functions can be placed in three categories:
 
*Transactions involved in opening a DC. <br />*Transactions involved in closing a DC. <br />*Other DC functions. This includes SaveDC, RestoreDC, and ResetDC.
 
''Opening and Closing DCs''
 
The open and close transaction sequences are symmetric:
 
Open Transactions Close Transactions <br />FillLogDevBlk No Equivalent <br />FillPhyDevBlk DisablePhyDevBlk <br />EnableDC DisableDC <br />CompleteOpenDC BeginCloseDC
 
Each of the Close Transactions undoes the actions taken by its corresponding Open transaction. For example, the EnableDC function allocates the DDC data area within the driver and returns the HDDC handle to identify that area. The corresponding Disable DC function invalidates the HDDC handle and deallocates the DDC data area.
 
The FillLogDevBlk transaction occurs when some thread of a process opens the first instance of a DC for this driver. During this transaction, a dispatch table will be created for later use by the graphics engine.
 
Except for the OS2_PM_DRV_ENABLE, [[00303.htm|OS2_PM_DRV_DEVMODE]]and [[00530.htm|OS2_PM_DRV_ DEVICENAMES]]calls, all DDI interface calls are dispatched through the function table created here. This means that most calls go directly to the correct function rather than indirectly through a hierarchy of function layers.
 
The FillPhyDevBlk transaction will occur only if the result flags from the FillLogDevBlk transaction indicate that it is necessary. It is used by device drivers that support multiple types of physical devices. It will occur during the DevOpen for the first DC associated with a particular type of physical device.
 
This function is responsible for memory allocations and initializations relating to a physical device.
 
During the EnableDC transaction, the driver will allocate and format the driver-specific data (the DDC) associated with the DC being constructed.
 
At CompleteOpenDC time the DC is completely constructed and initialized. This transaction gives the driver an opportunity to make final adjustments to the DC before the application gains access to it.
 
''Saving and Restoring DCs''
 
These functions manage a stack of entries that correspond to most of the states of a DC. SaveDC pushes an entry on the stack. RestoreDC retrieves one of the pushed entries and uses it to revert the DC back to its earlier saved state. Note that a particular RevertDC call might pop more than one entry from stack of SaveDC entries.
 
''Resetting DCs''
 
This call resets a DC to its original initialized state as it was just after the CompleteOpenDC transaction.
 
 
 
 
 
=== prde_DeleteSavedDCs ===
 
Frees all heap space used by extra DDC structures that were created by Save DC requests.
 
 
 
 
 
=== prde_DisableDC ===
 
Disables the DDC and releases its memory.
 
 
 
 
 
=== prde_EnableDC ===
 
Implements subfunction 5 of the enable entry point called by the engine. This subfunction is called to create a driver device context (DDC). This DDC will be linked to the device descriptor structure (DV) that was already created. Every engine DC will have its own DDC and DV in the driver. Also, a memory DC will be opened in the display driver for use with this DC. The types of DC are:
 
OD_QUEUED Produces spooled output <br />OD_DIRECT Sends output directly to a file <br />OD_INFO Used to retrieve information, but no output is updated. <br />OD_METAFILE Not currently supported <br />OD_MEMORY Uses display driver to manipulate bit maps
 
If this function is called to open a memory DC, only a portion of the DDC structure will be created because the display driver will be doing most of the work.
 
 
 
 
 
=== prde_ResetDC ===
 
This routine is Enable subfunction 9. It resets the DDC state.
 
 
 
 
 
=== prde_RestoreDC ===
 
This routine is the RestoreDC Enable subfunction. It restores the DDC to a previously saved state.
 
 
 
 
 
=== prde_SaveDC ===
 
This routine is the SaveDC Enable subfunction. It saves the DDC state.
 
 
 
 
 
=== prde_SetDDCDefaults ===
 
Initializes the values in the DC instance data structure to their default values.
 
 
 
 
 
=== ERRORCHK.ASM ===
 
This module contains functions that are not used by the 32-bit driver.
 
 
 
 
 
=== FLCHKDLG.C ===
 
This module contains functions that verify PostScript devices and open a dialog box to confirm if the user wants to overwrite an existing PostScript file.
 
 
 
 
 
=== CheckForOverwrite ===
 
Responds to commands received from user input. The user can select '''OK'''or '''Cancel'''and change the file name entry field. If file name is not changed when user selects '''OK''', the dialog box will return the OVERWRITE message to the calling function.
 
 
 
 
 
=== IsFilePipe ===
 
Checks for file pipe.
 
 
 
 
 
=== R3_FileCheckDialogs ===
 
Performs one of the following three actions. The actions depend on various parameters.
 
*If the file to which the PostScript output is destined already exists, a dialog box is displayed that asks if the user wishes to overwrite the displayed file.
 
*If the file name is valid and does not exist, control is returned to the [[00576.htm|OpenChannel]]function where output to the file will continue normally.
 
*If the user specifies an invalid file for output, a dialog box asking the user to enter another file name is displayed.
 
 
 
 
 
=== UserFileInvalid ===
 
Responds to commands received from user input. The user can press '''OK'''or '''Cancel'''and change the file name entry field.
 
 
 
 
 
=== FONTS.C ===
 
This module contains font support functions.
 
 
 
 
 
=== CPDownLoaded ===
 
Returns TRUE if the passed in code page has been downloaded to the printer; otherwise, it returns FALSE.
 
 
 
 
 
=== FontDownload ===
 
Downloads a soft font, if necessary.
 
 
 
 
 
=== MatchFaceName ===
 
Scans the list of all fonts offered by the current printer until one is found whose face name is the same as that requested. The index of this matching font is then returned. If no match is found, -1 is returned.
 
'''Warnings:'''
 
Fonts have two different names. The full name is the most complete (for example, &quot;ITC Avant Garde Gothic Book Oblique&quot;). This is the name used for matching. However, the font names used in the printer font list have an abbreviated form, such as &quot;AvantGarde-BookOblique&quot;.
 
 
 
 
 
=== prda_CountKernPairs ===
 
Counts the number of kerning pairs that are available for the current font and code page. This number can be different from the maximum number of kerning pairs available if some kerned characters are not in the current code page.
 
 
 
 
 
=== prda_DeviceQueryFontAttributes ===
 
Copies the entire FONTMETRICS data structure to a temporary buffer, rescales it, and copies the requested amount to the caller's buffer.
 
'''Warnings:'''
 
A request for more bytes of information than are contained in a FONTMETRICS structure will be silently reduced to a request for exactly as many bytes as are in a FONTMETRICS structure.
 
 
 
 
 
=== prda_DeviceQueryFonts ===
 
Copies the FONTMETRICS data for the requested font to the caller's buffer. If the given face name is null, the data for all fonts will be returned, buffer size permitting.
 
On return, pulNumFonts will have been changed from the maximum number of fonts the caller would like returned to the actual number of fonts returned in the caller's buffer. This will either be zero (an invalid font face name was given), one (a legitimate face name was given), or a larger number. The latter case would occur if the caller gave a null font face name. In that situation as many fonts would be returned as could be fit into the caller's buffer.
 
'''Warnings:'''
 
A request for more bytes of information than are contained in a FONTMETRICS structure will return an error.
 
Because the driver currently does not distinguish between public and private fonts, the options parameter is ignored.
 
 
 
 
 
=== prda_GetCodePage ===
 
Returns the code page that will be used for characters written with the default font.
 
'''Warnings:'''
 
This routine returns the code page only for the default font. If the current font is a logical font, the code page number returned here might not be the same as the code page number currently in use.
 
 
 
 
 
=== prda_GetPairKerningTable ===
 
Copies kerning pairs from the internal table to the caller's buffer.
 
This function scans the internal kerning table and copies entries one at a time to the caller's buffer until it reaches the end of the table or has copied the desired number of pairs. The internal kerning table lists code points in the font's code page (usually extended code page 850). The kerning amount is converted into world coordinates before being returned to the caller.
 
'''Warnings:'''
 
If the font supports extended code page 850 and the caller is using a code page that is a subset of this, it is possible for a kerning pair to refer to a character that does not exist in the caller's code page. Such kerning pairs will not be returned to the caller. Therefore, it is possible for the caller to get back fewer kerning pairs than were requested, even if the caller asked for the exact number of kerning pairs offered by the font.
 
This function does not sort the kerning pairs in any order.
 
 
 
 
 
=== prda_QueryWidthTable ===
 
Returns the widths of characters in the currently selected font. This function copies a portion of the character width table of the currently selected font into the caller's buffer, converting it into world coordinates and translating points into the caller's code page.
 
'''Warnings:'''
 
The width of the default character will be returned in the place of any invalid character. An invalid character is one with a code point less than zero, greater than 255, or outside the range supported by the font.
 
 
 
 
 
=== prda_RealizeFont ===
 
Attempts to match a device font to a requested logical font and returns a LONG handle to the font if successful.
 
'''pfatLogFont'''Pointer to a FATTRS structure containing logical font information if this is a RF_DEVICE_FONT command.
 
'''lFontHandle'''Handle of the logical font to be deleted, if this is an RF_ DELETE_FONT command.
 
'''RF_DEVICE_FONT'''Attempt to match font, return handle.
 
The PostScript driver will always return a matching device font unless a code page is requested that we cannot support. If a legitimate code page is requested but no match is provided and the facename cannot be matched, the default font will be used. The algorithm used is:
 
Check the lMatch field of the FATTRS structure. If it is positive, it is downloaded as a PFB. If it is negative, the font is treated as a device font; otherwise, if a font name is provided, the driver attempts to match it to one of the font names in the list of fonts supported by the current printer. If a match is found, the matched font is selected. If a match is not found or if the font name is null, the default font is chosen.
 
As soon as a font has been chosen, the driver must handle code pages. If the usCodePage field of the FATTRS structure is zero, the driver simply chooses the code page provided by the font. Otherwise, it tries to get a mapping vector from the requested code page to the code page supported by the font. If the driver cannot get such a vector, the font is not realizable, and the driver returns zero to the engine.
 
As soon as a font has been chosen and a suitable code page mapping vector has been found, the driver looks for space in the logical font information table in the PDDC. If an entry is free, the driver allocates it, initializes its records, and returns the negative of the index as the 32- bit handle. If the table is full, an error must be returned. <br />'''RF_LOAD_ENGINE_FONT'''Return 0L, font can't be realized.
 
The driver always returns 0L. <br />'''RF_DELETE_FONT'''Attempt to delete font with handle specified.
 
If the handle provided is legitimate, the driver erases the corresponding font from the logical font information table and returns 1L. Otherwise, it must return an error. If the provided handle corresponds to the logical font currently in use, the driver selects the default font before deleting the logical font.
 
 
 
 
 
=== prda_SetCodePage ===
 
Sets the code page for characters written with the default font.
 
This function stores the requested code page number in the DDC. If the default font is currently selected, the current code page number is changed as well.
 
'''Warnings:'''
 
This routine is only used to change the code page of the default font. A logical font's code page is selected at CreateLogicalFont() time and cannot be changed.
 
 
 
 
 
=== RemapBoldItalic ===
 
Called when the driver is about to realize a font and the BOLD or ITALIC, or both attributes have been set. This routine maps the given font into the appropriate font, depending on which attributes have been set. For example, if the user chooses Courier as the font and has the BOLD attribute set, this routine will select Courier-Bold as the font.
 
 
 
 
 
=== RemapCodePage ===
 
Called by the driver to download a new font definition to the PostScript printer.
 
 
 
 
 
=== szLength ===
 
Calculates the length of a given string, including the terminating NULL.
 
 
 
 
 
=== IMG2BIN.C ===
 
This module reads a file containing a list of PostScript commands for handling images and stores the commands in a binary file which is later added as resource to the driver by the C compiler. Each set of commands in the list is used to tell the device how much image data (in bits) is to be processed at a time.
 
This module contains functions that are used in image handling.
 
 
 
 
 
=== szIsEqual ===
 
Compares two strings (case sensitive). Returns TRUE if the strings are equal; otherwise, it returns FALSE.
 
 
 
 
 
=== JPDLG.C ===
 
This module contains functions needed to maintain the '''Job Properties'''dialog box. The functions are listed below.
 
 
 
 
 
=== DisplayGammaValue ===
 
Displays the gamma value for the &quot;Red&quot;,&quot; Green,&quot; or &quot;Blue&quot; gamma values. Since all gamma values are stored internally in multiples of ten, the values are divided by ten before being displayed. For example, a gamma value of 25 is displayed as &quot;2.5&quot;.
 
 
 
 
 
=== EffectsPageDefaultControls ===
 
Sets all the settings to the default values for the '''Effects'''page. For some controls, the default values are specified in the PPD.
 
 
 
 
 
=== EffectsPageDlgProc ===
 
This is the procedure for the '''Effects'''page in the '''Job Properties'''dialog box .
 
 
 
 
 
=== EffectsPageInitControls ===
 
This function initializes the controls for the '''Effects'''page.
 
 
 
 
 
=== EffectsPageSaveSettings ===
 
This function is only called if the user selects the '''Save'''button. All controls for the '''Effects'''page are saved here.
 
 
 
 
 
=== FeaturePageDefaultControls ===
 
Sets all the settings to the default values for the '''Features'''page. For some controls, the default values are specified in the PPD.
 
 
 
 
 
=== FeaturePageDlgProc ===
 
This function is the procedure for the '''Features'''page of the '''Job Properties'''dialog box.
 
 
 
 
 
=== FeaturePageInitControls ===
 
This function initializes the controls for the '''Features'''page of the '''Job Properties'''dialog box.
 
 
 
 
 
=== FixUpColors ===
 
If the '''Lock Proportions'''check box is selected, this increments or decrements the other two sliders every time one slider is incremented or decremented.
 
 
 
 
 
=== FormPageDefaultControls ===
 
Sets all the settings to the default values for the '''Forms'''page. For some controls, the default values are set as specified in the PPD. For the '''Orientation'''control, '''Portrait'''is set as the default value.
 
 
 
 
 
=== FormPageDlgProc ===
 
This function is the procedure for the '''Forms'''page in the '''Job Properties'''dialog box.
 
 
 
 
 
=== FormPageInitControls ===
 
This function initializes the controls within the '''.Forms'''page in '''Job Properties'''. Initialization includes setting minimum and maximum values as well as setting the intitial settings.
 
 
 
 
 
=== FormPageSaveSettings ===
 
This function is only called if the user selects the '''Save'''button. All the controls in the '''Forms'''page are saved here.
 
 
 
 
 
=== GetAndSaveColorModel ===
 
Sets the current color setting and sets the matching color icon in the '''Status Bar'''. If the color device supports '''ColorModel''', the setting is saved in the User-Interface (UI) selection; otherwise, the setting is saved in the CNFDATA structure.
 
 
 
 
 
=== GetOffset ===
 
Queries the current slider position, and calculates the gamma value from that position.
 
 
 
 
 
=== InsertSliderValues ===
 
Displays the numeric values that are displayed above each slider control.
 
 
 
 
 
=== JobPropertiesDlgProc ===
 
This is the procedure that maintains the '''Job Properties'''dialog box.
 
 
 
 
 
=== OutputPageDefaultControls ===
 
Sets all the settings to the default values for the '''Output'''page. For some controls, the default values are specified in the PPD.
 
 
 
 
 
=== OutputPageDlgProc ===
 
This function is the procedure for the '''Output'''page in the '''Job Properties'''dialog box.
 
 
 
 
 
=== OutputPageInitControls ===
 
This function initializes the controls within the '''Output'''page.
 
 
 
 
 
=== OuputPageSaveSettings ===
 
This function is only called if the user selects the '''Save'''button. This function saves all the settings for the '''Ouput'''page.
 
 
 
 
 
=== QueryFeaturePageLoad ===
 
This function queries the UI list to verify whether or not the '''Features'''page is to be loaded. For '''Printer Properties''', the list is queried to see whether or not there are any installable options. For '''Job Properties''', the list is queried to see whether or not there are any non-predefined or non- OEM features. If any of the above conditions exists, the function returns TRUE; otherwise, FALSE is returned.
 
 
 
 
 
=== SaveGammaVals ===
 
Queries the slider position, and saves the gamma value.
 
 
 
 
 
=== UpdateDuplexSelection ===
 
This function modifies the UI selection for '''duplex'''and modifies the icon for the '''Status Bar'''every time a '''duplex'''option is selected.
 
 
 
 
 
=== UpdateTrayList ===
 
This function updates the tray listbox with trays that were mapped to forms in '''Printer Properties.'''The only trays displayed are the ones that were mapped to the currently selected form in the &quot;Forms&quot; listbox. In addition to the trays, &quot;Manual Feed&quot; is displayed at the bottom of the list. &quot;Auto Tray Select&quot; is displayed at the top of the list ''only''if more than one tray or no trays are mapped to the current form. This is because the driver must be able to display all the forms in '''Job Properties''', whether they are mapped to a tray or not. If a form is selected with no mapped trays, then &quot;Manual Feed&quot; is the only string displayed that will not be highlighted ( unless selected), so the listbox entry field may be empty. To prevent this, &quot;Auto Tray Select&quot; is added to the list.
 
The currently selected tray is retrieved from aTraySelected in CNFDATA and highlighted. If aTraySelected does not contain a string, then the default tray is retrieved from the PPD. If &quot;Auto Tray Select&quot;, &quot;Manual Feed&quot;, and any other tray is not selected for some reason, the first item in the listbox is selected.
 
 
 
 
 
=== MATH.ASM ===
 
This module contains math routines for the driver.
 
 
 
 
 
=== BigMulDiv ===
 
Extended precision multiply-divide routine. The first two long-word parameters are multiplied and the product is divided by the third long-word parameter.
 
 
 
 
 
=== CopyAndNormalize ===
 
Interface between copy_and_normalize and the PostScript code.
 
 
 
 
 
=== LongMulFixed ===
 
Extended precision multiply routine, intended to emulate 80386 mul instruction.
 
 
 
 
 
=== ulNormalize ===
 
Returns the number of shifts needed to shift the passed ULONG number so that the highest order bit is 1.
 
 
 
 
 
=== MEMORY.C ===
 
This file contains memory handling routines for the PostScript printer driver for Presentation Manager (PM). A global heap is created permanently when the logical device block is filled (in [[00275.htm|prde_FillLdb]]). This is a permanent heap because, under OS/2, as soon as a device driver has opened a DC, the driver is loaded in memory until the maching is turned off or restarted. The global heap can also be created by [[00530.htm|OS2_PM_DRV_DEVICENAMES]]and [[00303.htm|OS2_PM_DRV_DEVMODE]]. If the logical device block exists at the time either of these routines is called, no new heap is created. These two routines will just use the global heap created by [[00275.htm|prde_FillLdb]]. If, however , the logical device block does not exist at the time either of these routines is called, they will create and initialize the global heap, and then destroy it.
 
 
 
 
 
=== _DLL_InitTerm ===
 
Called when a process loads or unloads the driver DLL. See the LIBRARY statement in the .DEF file.
 
 
 
 
 
=== CreateDCHeap ===
 
Allocates an object, and then creates the driver's process heap in that segment.
 
 
 
 
 
=== CreateProcessHeap ===
 
Allocates an object, and then creates the driver's process heap in that segment.
 
 
 
 
 
=== ExceptHandler ===
 
Handler for exception management.
 
 
 
 
 
=== GetR3String ===
 
Given a string ID, this function returns to the caller the pointer to that given string. It is called by ring 2 routines, which need to access these ring 3 strings in StringTable.
 
 
 
 
 
=== InitGlobalHeap ===
 
Creates the driver's heap, gets and stores the driver's module handle, and then loads the string table from the resources.
 
 
 
 
 
=== KillGlobalHeap ===
 
Deletes the driver's heap and resets some global heap variables.
 
 
 
 
 
=== KillHeap ===
 
Deletes the driver's heap.
 
 
 
 
 
=== LoadStringTable ===
 
Loads a string table from the resource file into a global data structure.
 
 
 
 
 
=== SetLDBFlag ===
 
Sets the fLogicalDeviceBlock to TRUE, indicating that the logical device block now exists.
 
 
 
 
 
=== MANDFUNC.C ===
 
The functions in this module have been moved to [[00414.htm|NOINSTAL.C]]for the 32-bit driver. For more information about the functions found in this file, see [[00414.htm|NOINSTAL.C]].
 
 
 
 
 
=== NOINSTAL.C ===
 
This module contains functions that hook graphics engine routines. It contains stubs for routines that are not supported by the PostScript driver . These functions will usually return an error or will not perform any processing, except in certain circumstances.
 
 
 
 
 
=== prdb_DeviceCreateBitmap ===
 
Hook function that calls InnerGreCreateBitmap for creating a bit map. PostScript does not support this function call. If InnerGreCreateBitmap is called, the driver will return an error.
 
 
 
 
 
=== prdb_DeviceDeleteBitmap ===
 
Hook function that initializes a bit map and memory DC. PostScript does not support this function call. If InnerGreDeleteBitmap is called, the driver will return an error.
 
 
 
 
 
=== prdb_DeviceSelectBitmap ===
 
Hook function that calls InnerGreSelectBitmap. PostScript does not support this function call. If InnerGreSelectBitmap is called, the driver will return an error.
 
 
 
 
 
=== prdb_GetBitmapBits ===
 
Hook function that retrieves the bit map information and calls InnerGreGetBitmapBits. PostScript does not support this function call. If InnerGreGetBitmapBits is called, the driver will return an error.
 
 
 
 
 
=== prdb_GetPel ===
 
Hook function that calls InnerGreGetPel. PostScript does not support this function call. If InnerGreGetPel is called, the driver will return an error .
 
 
 
 
 
=== prdb_RestoreScreenBits ===
 
Hook function that transfers control to the display driver.
 
 
 
 
 
=== prdb_SaveScreenBits ===
 
Hook function that transfers control to the display driver. PostScript does not support this function call. If InnerGreSaveScreenBits is called, the driver will return an error.
 
 
 
 
 
=== prdb_ScrollRect ===
 
Hook function that transfers control to the display driver.
 
 
 
 
 
=== prdb_SetBitmapBits ===
 
Hook function that calls InnerGreSetBitmapBits. PostScript does not support this function call. If InnerGreSetBitmapBits is called, the driver will return an error.
 
 
 
 
 
=== prdc_RealizeColorTable ===
 
Called to alter the device's hardware color table so that it matches the logical color table. PostScript does not handle this type of call. If this function is called, no processing is performed.
 
 
 
 
 
=== prdc_UnRealizeColorTable ===
 
This function is called to reverse the effects of the RealizeColorTable call. PostScript does not handle this type of call. If this function is called, no processing is performed.
 
 
 
 
 
=== prdd_CharRect ===
 
This function is called if an attempt is made to call GreCharRect. PostScript does not support this function call. If GreCharRect is called, the driver will return an error.
 
 
 
 
 
=== prdd_CharStr ===
 
This function is called if an attempt is made to call GreCharStr. PostScript does not support this function call. If GreCharStr is called, the driver will return an error.
 
 
 
 
 
=== prdd_DeviceInvalidateVisRegion ===
 
This function is called if an attempt is made to call GreDeviceInvalidateVisRegion. PostScript does not support this function call. If GreDeviceInvalidateVisRegion is called, the driver will return an error.
 
 
 
 
 
=== prdd_DeviceSetAVIOFont ===
 
This function is called if an attempt is made to call GreDeviceSetAVIOFont. PostScript does not support this function call. If GreDeviceSetAVIOFont is called, the driver will return an error.
 
 
 
 
 
=== prdd_DeviceSetCursor ===
 
This function is called if an attempt is made to call GreDeviceSetCursor. PostScript does not support this function call. If GreDeviceSetCursor is called, the driver will return an error.
 
 
 
 
 
=== prdd_GetPickWindow ===
 
This function is called if an attempt is made to call GreGetPickWindow. PostScript does not support this function call. If GreGetPickWindow is called, the driver will return an error.
 
 
 
 
 
=== prdd_GetStyleRatio ===
 
This function stores, at the location addressed by pRatio, the style ratio x and y direction step values.
 
 
 
 
 
=== prdd_SetColorCursor ===
 
This function is called if an attempt is made to call GreSetColorCursor. PostScript does not support this function call. If GreSetColorCursor is called, the driver will return an error.
 
 
 
 
 
=== prdd_SetPickWindow ===
 
This function is called if an attempt is made to call GreSetPickWindow. PostScript does not support this function call. If GreSetPickWindow is called, the driver will return an error.
 
 
 
 
 
=== prdd_UpdateCursor ===
 
This function is called if an attempt is made to call GreUpdateCursor. PostScript does not support this function call. If GreUpdateCursor is called, the driver will return an error.
 
 
 
 
 
=== prdg_Death ===
 
Notifies the driver at the termination of a screen group. PostScript does not handle this type of call. If this function is called, no processing is performed.
 
 
 
 
 
=== prdg_ErasePS ===
 
Erases the media. PostScript does not handle this type of call. If this function is called, no processing is performed.
 
 
 
 
 
=== prdg_LockDevice ===
 
Locks out other threads from executing the driver.
 
 
 
 
 
=== prdg_Resurrection ===
 
Notifies the driver when a screen group is reinstored. PostScript does not handle this type of call. If this function is called, no processing is performed.
 
 
 
 
 
=== prdg_UnlockDevice ===
 
Enables other threads that were locked out from [[00438.htm|prdg_LockDevice]].
 
 
 
 
 
=== prdl_DrawConicsInPath ===
 
If the DC is not memory, this function returns an error; otherwise, it calls GreDrawConicsInPath.
 
 
 
 
 
=== prdl_DrawLinesInPath ===
 
If the DC is not memory, this function returns an error; otherwise, it calls GreDrawConicsInPath.
 
 
 
 
 
=== prdm_DisjointLines ===
 
Called if an attempt is made to call GreDisjointLines. If the type of DC is memory, this function calls GreDisjointLines. Otherwise, it reports an error because GreDisjointLines is not supported for a non-memory DC.
 
 
 
 
 
=== prdm_DrawBits ===
 
Called if an attempt is made to call GreDrawBits. If the type of DC is memory, this function calls GreDrawBits. Otherwise, it reports an error because GreDrawBits is not supported for a non-memory DC.
 
 
 
 
 
=== prdm_DrawBorder ===
 
Called if an attempt is made to call GreDrawBorder. If the type of DC is memory, this function calls GreDrawBorder. Otherwise, it reports an error because GreDrawBorder is not supported for a non-memory DC.
 
 
 
 
 
=== prdm_PolyScanline ===
 
Called if an attempt is made to call GrePolyScanLine. If the type of DC is memory, this function calls GrePolyScanLine. Otherwise, it reports an error because GrePolyScanLine is not supported for a non-memory DC.
 
 
 
 
 
=== prdm_PolyShortLine ===
 
Called if an attempt is made to call GrePolyShortLine. If the type of DC is memory, this function calls GrePolyShortLine. Otherwise, it reports an error because GrePolyShortLine is not supported for a non-memory DC.
 
 
 
 
 
=== prdm_QueryDevResource ===
 
Called if an attempt is made to call GreQueryDevResource. If the type of DC is memory, this function calls GreDevResource. Otherwise, it reports an error because GreDevResource is not supported for a non-memory DC.
 
 
 
 
 
=== PATFILL.C ===
 
This module contains the code for pattern filling.
 
 
 
 
 
=== ps_patfill ===
 
Called for all path or area filling in the PostScript driver. If no path is defined, it returns SUCCESS. This routine supports all of the standard PM patterns as well as user-defined bit map patterns.
 
 
 
 
 
=== ps_patfill_base ===
 
Called by several places in [[00450.htm|ps_patfill]]to download PostScript code, common to pattern filling in the PostScript printer.
 
 
 
 
 
=== ps_patfill_common ===
 
Called by several places in [[00450.htm|ps_patfill]]to download PostScript code, common to pattern filling in the PostScript printer.
 
 
 
 
 
=== ps_patfill_font ===
 
Called by [[00450.htm|ps_patfill]]if the pattern to be used is a Logical Font. When used , it will be stored in pddc-&gt;pddcb-&gt;pat.usfFontLoaded.
 
 
 
 
 
=== PATH.C ===
 
This module contains path and area routines.
 
 
 
 
 
=== play_clip_rects ===
 
Replays all the clip rectangles to the current path.
 
 
 
 
 
=== prdl_BeginArea ===
 
Sets the proper flags in the DDC and outputs a new path command to the PostScript printer to indicate that a new area definition is starting.
 
 
 
 
 
=== prdl_BeginPath ===
 
Sets the proper flags in the DDC and outputs a newpath command to the PostScript printer to indicate that a new path definition is starting.
 
 
 
 
 
=== prdl_CloseFigure ===
 
Closes a figure within a path definition. The current figure is closed by appending a straight line from the current position to the starting point of the figure.
 
 
 
 
 
=== prdl_EndArea ===
 
If the cancel flag is set, this function discards the current path without drawing anything. Otherwise, the area is defined because the last BeginArea call is filled, and if requested, stroked. If the area is empty, nothing is done.
 
 
 
 
 
=== prdl_EndPath ===
 
If the cancel flag is set, this function discards the current path. Otherwise, the definition of the current path is ended.
 
 
 
 
 
=== prdl_FillPath ===
 
Given a path, this function fills the interior of the closed figures defined in the path, using the specified rule (even odd or winding) and the current pattern attributes. Before filling the figures, this function closes any open figures within the current path.
 
 
 
 
 
=== prdl_ModifyPath ===
 
Replaces the current path with a path enclosing the shape produced by stroking the path, using the current geometric wide line attribute. Any open figures within the path are not closed.
 
 
 
 
 
=== prdl_MemClipChange ===
 
Sets the clipping region of the shadow memory DC. It copies the DC region of the DC and sets it in the shadow memory DC. As a result, both will be synchronized.
 
 
 
 
 
=== prdl_NotifyClipChange ===
 
Adds rectangles from the clipping region to the current clip path.
 
 
 
 
 
=== prdl_OutlinePath ===
 
Closes a figure within a path definition. The current figure is closed by appending a straight line from the current position to the start point of the figure.
 
 
 
 
 
=== prdl_RestorePath ===
 
Restores the previously saved transform matrix, if the function RestoreDC was called.
 
 
 
 
 
=== prdl_SavePath ===
 
Hooked to GreSavePath because this driver handles all the path processing itself. No processing is performed by this function.
 
 
 
 
 
=== prdl_SelectClipPath ===
 
Creates the clip path by closing any open figures. It then releases any existing clip path (deleting the previous path, if any) and sets the specified path as the clip path. After a path is set as the clip path, it cannot be used again. However, its identifier is free to use for another path.
 
The clip path specifies a path in device space that the system uses to clip output. The clip path includes all points inside and on the boundary of the path specified by idPath. Because the path coordinates are assumed to be device coordinates, no conversion is applied.
 
 
 
 
 
=== prdl_StrokePath ===
 
Strokes the current path with a line width as set by the geometric line width.
 
 
 
 
 
=== rclIsEqual ===
 
Compares two rectangles and returns TRUE if they are equal.
 
 
 
 
 
=== PATH2.C ===
 
This module contains path- and area-related routines.
 
 
 
 
 
=== discard_clip_path_buf ===
 
Discards the clip path buffer.
 
 
 
 
 
=== discard_path_buf ===
 
Discards the current path buffer.
 
 
 
 
 
=== init_clip_path_buf ===
 
Allocates memory for the clip path buffer and copies the current path buffer into it.
 
 
 
 
 
=== init_path_buf ===
 
Allocates and initializes the path buffer.
 
 
 
 
 
=== play_clip_path_buf ===
 
Plays the clip path buffer to the channel.
 
 
 
 
 
=== play_path_buf ===
 
Plays the current path buffer to the channel.
 
 
 
 
 
=== sync_graphic_states ===
 
Resets the correct values in the graphic state of the printer. This function is usually used after a ''grestore''.
 
 
 
 
 
=== POLYSTUF.C ===
 
This module contains routines that support polylines.
 
 
 
 
 
=== LoadMarkerFont ===
 
Downloads the code that defines the marker font to the PostScript printer.
 
 
 
 
 
=== prdb_PolyMarker ===
 
Draws NumberOfPoints markers centered at the positions in the Points array. The marker definitions can be the defaults or a font and are pointed to by the defSet field of the device marker bundle.
 
 
 
 
 
=== prdl_CheckConic ===
 
Given the three vertexes of the conic triangle and the sharpness, this routine converts the conic to a Bezier curve and outputs the appropriate PostScript code to append the conic to the current path.
 
First the conic is subdivided at the parameter t = 1/2. If the sharpness of the subdivided conic is large, it is subdivided further.
 
 
 
 
 
=== prdl_DrawConic ===
 
Given the three vertexes of the conic triangle and the sharpness, this routine converts the conic to a Bezier curve and outputs the appropriate PostScript code to append the conic to the current path. The original conic is bisected into two sub-conics because it is impossible to closely approximate the conics using a single Bezier.
 
 
 
 
 
=== prdl_DrawSubConic ===
 
Given the three vertexes of the conic triangle and the sharpness, this routine converts the conic to a Bezier curve and outputs the appropriate PostScript code to append the conic to the current path.
 
 
 
 
 
=== prdl_GetLineOrigin ===
 
Stores the current line position from the DC instance into a PPOINT structure.
 
 
 
 
 
=== prdl_PolyFillet ===
 
Draws a series of fillets.
 
 
 
 
 
=== prdl_PolyFilletSharp ===
 
Draw a series of conic fillets. The fillet is drawn from point A to point C of triangle ABC with sharpness S.
 
 
 
 
 
=== prdl_PolyLine ===
 
Draws a sequence of one or more lines starting at a certain position. As each line is drawn, its end point becomes the starting point for the next line.
 
 
 
 
 
=== prdl_PolySpline ===
 
Draws a series of connected Bezier curves.
 
 
 
 
 
=== prdl_SetLineOrigin ===
 
Sets the current style state in the PDDC, and in the current position. The style is two SHORTs. If the value of the high short is 0, the first pel is not drawn. If the value of the high short is not 0, the first pel is drawn. The PostScript driver will ignore this information. The low SHORT has 2 parts. The low BYTE is the position in the style mask. The high BYTE is the style error term. The PostScript driver will also ignore the style information, as PostScript strokes the entire path at one time.
 
 
 
 
 
=== PPDLG.C ===
 
This file contains the functions needed to maintain the '''Printer Properties'''dialog box.
 
 
 
 
 
=== CompareStri ===
 
This function compares two strings without regard to whether the strings are in upper or lower case.
 
 
 
 
 
=== DefineFormsDlgProc ===
 
This is the procedure for the dialog box when used to define custom forms. A custom form is a form with a user-defined, unique name. The custom form may also support user-defined form sizes if supported by the device.
 
 
 
 
 
=== EnableDefineFormAddButton ===
 
This function is responsible for enabling or disabling the '''Add Unique Forms'''button. The button is enabled if the number of unique forms defined does not exceed a maximum value.
 
 
 
 
 
=== DisplayMatchingForm ===
 
This function queries the current tray selection and displays the form selected for that tray.
 
 
 
 
 
=== FormDefPageDlgProc ===
 
This is the procedure for the '''Forms'''page in '''Printer Properties'''.
 
 
 
 
 
=== FormPPPageDefaultControls ===
 
This function sets the default control values when the '''Default'''button is pressed. The default values are set in the PPD file.
 
 
 
 
 
=== FormPPPageInitControls ===
 
This function inserts all values into all controls for the '''Forms'''page.
 
 
 
 
 
=== InitializeCustomForms ===
 
This function initializes the data needed to display the '''Display Forms'''dialog box and displays the dialog box. This includes initializing the structure that contains the unique form data.
 
 
 
 
 
=== ModeSwitchDefaultControls ===
 
This function sets the default control values when the '''Default'''button is pressed.
 
 
 
 
 
=== ModeSwitchDlgProc ===
 
This is the dialog procedure for the '''Options'''page.
 
 
 
 
 
=== ModeSwitchInitPage ===
 
This function initializes the controls for the '''Options'''page.
 
 
 
 
 
=== ModeSwitchSaveSettings ===
 
This function saves the current settings in the '''Options'''page.
 
 
 
 
 
=== PrinterPropertiesDlgProc ===
 
This is the main procedure for the '''Printer Properties'''dialog box.
 
 
 
 
 
=== ps_upper ===
 
This function converts a string to uppercase.
 
 
 
 
 
=== QueryAddFormButtonStatus ===
 
This function enables or disables the '''Add Custom Form'''button. The button is enabled if the number of user-defined forms has not exceeded a maximum value. Otherwise, the button is disabled.
 
 
 
 
 
=== VerifyTrayFormMapping ===
 
This function verifies that at least one tray in the '''Trays'''listbox is mapped to a valid form. If a tray is set to a valid form, the function returns TRUE.
 
 
 
 
 
=== VerifyUniqueForm ===
 
With a given user-defined form name, this function queries all form names. This function returns -1 if the user-defined form contains a unique name. A unique name is a name that is not the same as the name of any other form.
 
 
 
 
 
=== PRDEVECT.C ===
 
This module contains routines used in routing tasks to the graphics engine.
 
 
 
 
 
=== EnterDriver ===
 
Locates the DDC structure corresponding to the display HDDC that the engine placed on the stack. It validates the DDC structure and attempts to lock the DDC on behalf of the calling thread. If the DDC is already locked on behalf of some other process ID (pid) or thread ID (tid), it will fail.
 
 
 
 
 
=== ExitDriver ===
 
Performs all necessary cleanup before exiting the driver. Currently, the cleanup consists of decrementing the usage count for the current DDC, and unlocking the DDC if the count becomes zero.
 
 
 
 
 
=== Hook22Calls ===
 
Hooks functions required for the OS/2 graphics engine (version 2.2 and later).
 
 
 
 
 
=== InstallDispatchVectors ===
 
Installs the vectors to the printer function handler routines into the engine's dispatch table. It also retrieves a copy of the vectors to the display driver's function handler routines. These will be used when performing operations on a memory DC.
 
 
 
 
 
=== UnHookBitmapCalls ===
 
Unhooks all bitmap calls, except BitBlt, for the OS/2 graphics engine ( version 2.2 and later).
 
 
 
 
 
=== PROFILE.C ===
 
This module contains the following functions:
 
 
 
 
 
=== LoadUserForms ===
 
This function loads the user-defined forms from the INI file. The key name it searches for is USERFORMS. If that string can not be found, it searches for USERFORMSDEF.
 
 
 
 
 
=== QueryNextSubkey ===
 
This function reads the following INI string format:
 
<pre class="western">&quot;Mainkey1,Subkey1a,Subkey1b,...;Mainkey2,Subkey2a,Subkey2b,...;&quot;</pre>
<br />This function reads the next available string in the above format up to, but not including, the semicolon or comma. The string is copied to another buffer. The pointer to the above string format is incremented to point to the next available string. The function returns a code, indicating whether or not the end of a subkey is found. This is true if a semicolon is found. If a comma is found, the substring still exists.
 
 
 
 
 
=== ReadFormINIData ===
 
This function reads the form data from the INI file. For the form data, the application name is the device name and the key name is PAPERTYPE.
 
 
 
 
 
=== ReadNewOrOldINIString ===
 
This function reads an INI string from the OS2SYS.INI file. The application name is the printer name. The caller must provide the current key name for the application and (optionally) may provide an older key name. The current key profile is read. If the key doesn't exist and the caller provided an older key name, the older key name is read. If an older key name is not provided (NULL), the function returns. The reason for being able to read older INI key data is to provide compatibility with older driver INI strings. Older INI strings contain translation strings that, officially, should not be included in the INI since translation strings can be changed at any time. This also provides backward compatibility so that an older driver can be used-and the older INI key can be accessed-if the user decides to go back to an older version. The older INI data is not modified.
 
 
 
 
 
=== ReadPageOptionData ===
 
This function reads the data that handles display forms for mapped trays. The key name it searches for is INCLUDEMAPPEDFORMS.
 
 
 
 
 
=== ReadTrayPageMapINI ===
 
This function reads the mapped tray and page data from the OS2SYS.INI file. The application name is the printer/device name and the key name is Papertype. The data is stored in the form:
 
<pre class="western">&quot;TRAYNAME1,FORMNAME1;TRAYNAME2,FORMNAME2;...\0&quot;</pre>
<br />where &quot;FORMNAME&quot; is the string name of the form (found in the PPD) that is mapped to TRAYNAME (also found in the PPD). This function parses the INI string data and stores the data in the PSOURCE structure. If a buffer is already provided (pReturnBuffer), the INI data is stored in the return buffer. This function also is backward compatible in regard to the INI string. This function can read previous forms:
 
<pre class="western">&quot;FORMNAME1;FORMNAME2;...;FORMNAMEn&quot;</pre>
<br />In this format, the form names are mapped to tray names that are organized according to the PPD. For example, FORMNAME1 maps to the first tray found in the PPD.
 
 
 
 
 
=== SaveINIGroupData ===
 
This function appends a given string to a buffer in the following format:
 
<pre class="western">STRING11,STRING12,...STRING1N;STRING21,STRING22,...,STRING2N;...</pre>
<br />If a string is provided, a comma is first appended to the end of the buffer to separate the new string. The string is then appended to the buffer. If no string is provided, the semicolon is appended to the string, thereby separating the groups of strings from other groups. The above string is NULL-terminated.
 
 
 
 
 
=== SavePageTrayINIData ===
 
This function saves both the form-tray map string and the mapped form display selection in the OS2SYS.INI file. The form-tray map string is in the form:
 
<pre class="western">&quot;TRAYNAME1,FORMNAME1;TRAYNAME2,FORMNAME2;...\0&quot;</pre>
<br />where &quot;FORMNAME&quot; is the string name of the form (found in the PPD) that is mapped to TRAYNAME (also found in the PPD). This form-tray mapping is set by the user in '''Printer Properties'''. This is saved under the key string PAPERTYPE. The mapped form display selection is set in '''Printer Properties'''. This is the checkbox '''Limit Jobs To Selected Forms'''. If this checkbox is set, 1 is stored as a binary value; otherwise, 0 is stored as a binary value. This is saved under the key string PAPEROPT.
 
 
 
 
 
=== TerminateTranslationString ===
 
This function searches for a slash in a given string. If a slash is found, the slash is replaced with a NULL terminator to separate the name from the translation string.
 
 
 
 
 
=== PSTUNER.C ===
 
This module contains a page tuning function.
 
 
 
 
 
=== QueryTunerProcData ===
 
This function is only used when page-tuning. It returns a pointer to the global TUNERPROCDATA structure, which is defined on a per-process basis. This is used by a profiling hook to determine the minimum number of pages needed by this driver. This function is exported.
 
 
 
 
 
=== QUERY.C ===
 
This module contains routines used to query different information for the driver.
 
 
 
 
 
=== LoadPaperDim ===
 
This routine returns pointers to currently selected paper dimensions. The currently selected paper is indicated by PDDC, the input argument.
 
 
 
 
 
=== NewUserForms ===
 
Returns the number of user-defined forms.
 
 
 
 
 
=== OS2_PM_DRV_DEVICENAMES ===
 
Returns the device names, descriptions, and data types supported by the specified device driver.
 
The application can call OS2_PM_DRV_DEVICENAMES with the pdn and pdt parameters set to zero in order to find how much storage is needed for the data buffers. Having allocated the storage, the application then calls the function a second time in order to have the buffers filled with data.
 
 
 
 
 
=== PageAtPaper ===
 
Given a page number, this routine determines which page is to be printed.
 
 
 
 
 
=== prdq_QueryDeviceBitmaps ===
 
Returns the number of planes and bits per pixel that this device supports.
 
 
 
 
 
=== prdq_QueryDeviceCaps ===
 
Sets the color value for a given pixel.
 
 
 
 
 
=== prdq_QueryHardcopyCaps ===
 
If the application is asking for the number of forms, it will pass in zero as the form count. In this case, the driver just returns the number of forms available on the printer.
 
 
 
 
 
=== szColonCopy ===
 
Duplicates a NULL-terminated or delimiter-terminated string with bounds checking to prevent the overflow of the destination buffer.
 
 
 
 
 
=== QUERYBOX.C ===
 
This module contains support routines for raising Printer configuration dialog box.
 
 
 
 
 
=== b2a ===
 
Convert a binary number to ASCII, stores it in the pointer, and returns the length of stored string.
 
 
 
 
 
=== cvi ===
 
Converts a numeric string into a binary number.
 
 
 
 
 
=== CheckProfileName ===
 
Checks for printer profile data in the INI file under the old application name that was the printer name (for example, QMS PS-810). If the printer profile data is found, the function will move it to a new name format and delete the old one.
 
 
 
 
 
=== CompareRealNames ===
 
Compares two strings that ''might''each contain a translation string. If a translation string exists for either string, the slash that starts the string is temporarily set to 0, making the real name NULL-terminated. Both strings are compared using ''strcmp''. For any string that contains a translation string, the slash is reinserted after the compare. This function returns the return code generated by ''strcmp''.
 
 
 
 
 
=== DisplayTranslationString ===
 
A PPD line may include a combination of a PPD value and a matching translation string in the form &quot;NAME/TRANSLATION STRING&quot;. If the translation string exists, display the translation string only in the specific window (provided by hWnd). This is done by moving pointer to the next character after the forward slash and displaying the string. If there is no translation string or if there is a terminator (0) after the slash, NAME is displayed.
 
 
 
 
 
=== EA_GetVersion ===
 
Retrieves the EA .VERSION from driver file.
 
 
 
 
 
=== FillEffects ===
 
Retrieves effects from OS2.INI into the PCNFDATA structure.
 
 
 
 
 
=== FillPaperNames ===
 
Stores paper names from OS2.INI onto the PCNFDATA structure.
 
 
 
 
 
=== Fraction2A ===
 
Converts a fractional number into a fractional string.
 
 
 
 
 
=== GetDefaultPageSize ===
 
Gets a pointer to the default page size.
 
 
 
 
 
=== GetImageableArea ===
 
Retrieves the imageable area from the currently selected form.
 
 
 
 
 
=== ListUserForms ===
 
Inserts all the user-defined forms into list handle hWnd.
 
 
 
 
 
=== NameWithSC ===
 
Transfers the NULL-terminated string to the destination buffer and returns the length of the string (plus the delimiting semicolon) that was copied.
 
 
 
 
 
=== PostWriteError ===
 
Displays a message indicating that data cannot be written to the OS2.INI file.
 
 
 
 
 
=== ReadProfile ===
 
Reads the textual values of orientation, paper name, paper input tray, paper output tray, and default font and saves the retrieved values in the respective globals.
 
 
 
 
 
=== ScanCustomset ===
 
Scans for the presence of the string szScan in szSource and returns TRUE if it is found.
 
 
 
 
 
=== ShowCursor ===
 
Shows a cursor in the window specified by handle hWnd.
 
 
 
 
 
=== WrtQueryProfile ===
 
Writes the various values of the obtained printer characteristics to OS2. INI.
 
 
 
 
 
=== QUERYCHR.C ===
 
This module contains functions used to query text information.
 
 
 
 
 
=== prdt_QueryCharPositions ===
 
Returns the positions (world coordinates) in which the printer will place each given character, taking into account kerning and extra vectors provided by the caller.
 
 
 
 
 
=== prdt_QueryTextBox ===
 
Processes the specified string as if it were to be drawn, using the current character attributes and returns an array of up to 5 coordinate pairs. The first four coordinate pairs are the coordinates of the top-left, bottom- left, top-right, and bottom-right corners of the parallelogram which encompasses the string when it is drawn. The fifth point is the concatenation point. The points on the borders of the parallelogram are included within the parallelogram.
 
 
 
 
 
=== STUB.ASM ===
 
This module contains functions that perform math functions.
 
 
 
 
 
=== dodiv ===
 
Divides a quad by long.
 
 
 
 
 
=== doimul ===
 
Multiplies 2 longs and places the result in a passed quad.
 
 
 
 
 
=== SURFACE.C ===
 
This module contains functions that perform surface routines.
 
 
 
 
 
=== DevicePalette ===
 
Stub routine for new Warp engine. Returns TRUE in all cases.
 
 
 
 
 
=== LockDevice ===
 
Stub to return NULL to callers.
 
 
 
 
 
=== QueryDeviceSurface ===
 
Required by the OS/2 grapics engine (version 2.2 and later). Gives engine description of raster surface and performs some modifications to the device surface structure.
 
 
 
 
 
=== UTLASM.ASM ===
 
This module contains low-level helper routines for the utilities module.
 
 
 
 
 
=== FractionToDecimal ===
 
Converts the fractional part of a number to a string.
 
 
 
 
 
=== LongShiftRight ===
 
Shifts the bits in a doubleword a specified number of times to the right.
 
 
 
 
 
=== UTLCHNL.C ===
 
This module contains various utilities functions for COM output.
 
 
 
 
 
=== AsciiToBin ===
 
Converts a numeric string to a binary value.
 
 
 
 
 
=== CheckComPortName ===
 
Checks if the passed COM port is any name starting with &quot;COM&quot; and followed with any integer greater than or equal to 1.
 
 
 
 
 
=== CloseChannel ===
 
Closes the printer's output channel. The output channel could be connected to the spooler, or directly to the output port.
 
 
 
 
 
=== Cvi_R2 ===
 
Converts a string of ASCII digits to integer value. The string is in hex.
 
 
 
 
 
=== FlushChannel ===
 
Flushes the buffered output data through the output channel. If any errors occur, the output channel is closed.
 
 
 
 
 
=== HexToChannel ===
 
Given a character string, this function converts each character in the string to its hex equivalent, and then outputs it to the output buffer for the DC instance passed in.
 
 
 
 
 
=== InitializeCommPort ===
 
Attempts to read the COM port settings from the OS2.INI file and fills a private structure containing the information it found. It is assumed that the logical address has been validated prior to calling this function, and that it points to either COM1,COM2, or COM3. FALSE is returned if an error is detected. The format of an OS2.INI entry for a COM port is baud rate; parity;word length;stop bits;handshaking;
 
This function initializes the COM port baud rate, stop bits, and handshaking. It first determines if the logical is address is either COM1, COM2, or COM3. If this is true, get_ini_comm_info is called to fill a structure that contains the information needed to initialize the COM port. If this function is successful, the driver attempts to set up the port.
 
 
 
 
 
=== OpenChannel ===
 
Opens an output I/O channel.
 
 
 
 
 
=== PrintChannel ===
 
Sends formatted output to the output channel. A printf-style format string specifies the format of the output.
 
 
 
 
 
=== WriteChannel ===
 
Sends output data to the spooler or directly to the output port, depending on the state of the spool flag.
 
 
 
 
 
=== WriteModeString ===
 
Writes out the InitPostScriptMode and TermPostScriptMode strings from the PPD file. The string can be the actual characters and escape sequences. The escape sequence is in the form of:
 
<pre class="western">  &lt;value count&gt;</pre>
where it begins with a less than sign followed by the value in hex (for example, ESC = 1B), one space, an optional repeat count in HEX, followed by a closing greater than sign.
 
This code does not perform any error checking because it is in a PPD file that contains data that is assumed to be correct.
 
For example, the string 1b 5b 4b 10 20 00 00 00 can be entered as:
 
<pre class="western">&lt;1b&gt;YK&lt;10&gt; &lt;0 3&gt;</pre>
 
 
 
 
 
 
=== UTLPRINT.C ===
 
This module contains the core code for implementing various printf-style output formatting routines.
 
 
 
 
 
=== kprintf ===
 
This is the printf kernel entry point that is used by all the variations on printf, such as the entry point logging routine. This function performs the formatting of the print string.
 
 
 
 
 
=== PrintBool ===
 
Converts the value of its parameter to a TRUE or FALSE ASCII string.
 
 
 
 
 
=== PrintDecimal ===
 
Converts the value of its parameter to ASCII in decimal format.
 
 
 
 
 
=== PrintFraction ===
 
Converts the fixed point 16.16 value of its parameter into ASCII.
 
 
 
 
 
=== PrintHex ===
 
Converts the value of its parameter to ASCII in hex format.
 
 
 
 
 
=== ScanDigits ===
 
Scans the digit count value in the format string and converts it from ASCII to decimal format.
 
 
 
 
 
=== ScanPercentFormat ===
 
Scans a percent format specifier in a printf style format string.
 
 
 
 
 
=== ScanToken ===
 
Scans a printf style format string and sets the relevant global variables that describe the next format specifier.
 
 
 
 
 
=== UTLPS.C ===
 
This module is the low-level interface to the PostScript machine. The functions in this module mirror the functionality present in PostScript. As calls are made to this module, the state of the PostScript machine is maintained so that redundant output can be eliminated.
 
 
 
 
 
=== DoSelectFont ===
 
Issues commands to the printer that cause the current font stored in the graphics state to be selected.
 
 
 
 
 
=== EatSeper ===
 
Moves the buffer pointer forward to the next non-white character. This routine skips commas.
 
 
 
 
 
=== FindString ===
 
Moves the buffer pointer forward to the character following a specified string. This routine returns TRUE if it is found. Otherwise, it returns FALSE.
 
 
 
 
 
=== GammaAdjust ===
 
Applies the gamma correction to the color passed in.
 
 
 
 
 
=== GetDuplexCommand ===
 
Retrieves the proper duplex command from the PPB and copies it to the supplied buffer.
 
 
 
 
 
=== GetMappedFontName ===
 
When a font is remapped to support various code pages it is necessary to create a pseudonym for the font. This routine creates the pseudo-font-name, based on the font number stored in the DDC.
 
 
 
 
 
=== init_cgs ===
 
Initializes the current graphics state.
 
 
 
 
 
=== InvertTransfer ===
 
Sets the transfer function. For the first page, it sets the boundary to black.
 
 
 
 
 
=== LoadTrayCommand ===
 
Returns pointers to currently selected paper dimensions. The currently selected paper is indicated by PDDC (the input argument). The additional parameters are pointers to the paper command buffer, input tray command buffer, and output tray command buffer. If successful, the routine returns TRUE. Otherwise, it returns FALSE.
 
 
 
 
 
=== MatrixToChannel ===
 
Outputs a transform matrix to the print channel. The first four elements of the matrix are in fixed point (16.16) format and the last two elements ( translation components) are long integers.
 
 
 
 
 
=== ps_clearpath ===
 
Destroys the current path by outputting a ''newpath''command to the printer and setting a flag in the DDC.
 
 
 
 
 
=== ps_clip ===
 
Intersects the current path with the current clipping path and makes this the new clipping path. The winding number rule is used to determine the area clipped.
 
 
 
 
 
=== ps_closepath ===
 
Called by the driver to close the current path.
 
 
 
 
 
=== ps_CosmeticLine ===
 
Writes out the cosmetic line command. If the multiplier is one or zero, it uses the old &quot;wc&quot; command. If the multiplier is greater than 1, it uses the &quot;wcx&quot;, which takes a parameter.
 
 
 
 
 
=== ps_effects ===
 
Sets up the printer for user-selected effects.
 
 
 
 
 
=== ps_enddoc ===
 
Called by the driver when it is finished with the current document. The routine ejects the last page, if it has not already been ejected, and closes the channel.
 
 
 
 
 
=== ps_fill ===
 
Called by the driver to fill the current path using the winding number rule . The current path is automatically closed if it has not been explicitly closed.
 
 
 
 
 
=== ps_grestore ===
 
Called by the driver to restore the current graphics state from the gsave stack.
 
 
 
 
 
=== ps_gsave ===
 
Called by the driver to save the current graphics state.
 
 
 
 
 
=== ps_imagedata ===
 
Outputs a scan line of image data.
 
 
 
 
 
=== ps_init ===
 
Prepares the utlps module for operation.
 
 
 
 
 
=== ps_lineto ===
 
Called by the driver to draw a line from the current point to the new endpoint.
 
 
 
 
 
=== ps_moveto ===
 
Called by the driver to change the logical pen coordinates.
 
If pptl is different from the current position, a MOVETO command is issued and a flag is set indicating that the driver is in a path.
 
 
 
 
 
=== ps_movetoCP ===
 
Checks to see if a path exists. If no path exists, a MOVETO command is output to set the printer's current position equal to that in the PDDC. The driver also sets a flag, stating that a path now exists.
 
 
 
 
 
=== ps_newpath ===
 
Called by the driver to destroy the current path, if it exists.
 
 
 
 
 
=== ps_restoreclipmatrix ===
 
Restores the previously saved transformation matrix.
 
 
 
 
 
=== ps_restorematrix ===
 
Restores the previously saved transformation matrix.
 
 
 
 
 
=== ps_rotatefont ===
 
Called by the driver to specify the font rotation.
 
AngleX, AngleY are the end coordinates of a line originating at (0,0). These new values are saved in ps.gsNew.fxFontAngleX and ps.gsNew. fxFontAngleY, and flag an angle change.
 
 
 
 
 
=== ps_saveclipmatrix ===
 
Saves the current transformation matrix so that it can be restored later.
 
 
 
 
 
=== ps_savematrix ===
 
Saves the current transformation matrix so that it can be restored later.
 
 
 
 
 
=== ps_scalefont ===
 
Called by the driver to specify the font size.
 
 
 
 
 
=== ps_selectfont ===
 
External entry point for the local DoSelectFont routine.
 
 
 
 
 
=== ps_setdash ===
 
Sets the line-type style corresponding to a solid or one of the various dashed line styles.
 
 
 
 
 
=== ps_setdashnow ===
 
Sets dash to the currently defined style.
 
 
 
 
 
=== ps_SetDownloadedFont ===
 
Called by the driver to select a new font that was created and downloaded to the PostScript device.
 
 
 
 
 
=== ps_setfont ===
 
Called by the driver to select a new font name.
 
 
 
 
 
=== ps_setlinecap ===
 
Called by the driver to specify the &quot;linecap&quot; type for lines that are &quot; stroked&quot;. The linecap values are used in PostScript.
 
 
 
 
 
=== ps_setlinejoin ===
 
The driver calls this routine to specify the &quot;linejoin&quot; type for lines that are &quot;stroked&quot;. The linejoin values are used in PostScript.
 
 
 
 
 
=== ps_setlinewidth ===
 
Called by the driver to specify the width of lines that are &quot;stroked&quot;.
 
 
 
 
 
=== ps_setmatrix ===
 
Sets the current transformation matrix.
 
 
 
 
 
=== ps_setrgbcolor ===
 
Called by the driver to set the current color used to perform such functions as draw lines and fill. For non-color printers, it is implemented by converting the RGB color triplet to a gray-level between 0.0 (black) and 1.0 (white).
 
 
 
 
 
=== ps_shearfont ===
 
Called by the driver to specify the font shear.
 
ShearX, ShearY are the end coordinates of a line originating at (0,0). The angle must be computed from the vertical, and this angle must then be multiplied by the current point size (fxHeight).
 
 
 
 
 
=== ps_show ===
 
Called by the driver to output text in the current font.
 
 
 
 
 
=== ps_showpage ===
 
Called by the driver to eject a page from the printer.
 
 
 
 
 
=== ps_startdoc ===
 
Initializes a print job when a document is sent.
 
 
 
 
 
=== ps_status ===
 
Returns either SUCCESS or FAILURE depending on whether an error has occurred on the I/O channel.
 
 
 
 
 
=== ps_stroke ===
 
Called by the driver to stroke the current path using the current pen attributes.
 
 
 
 
 
=== ps_strokecurrentpath ===
 
Strokes the current path using the current pen attributes.
 
 
 
 
 
=== ps_sync_cp ===
 
Called by the driver to change the logical pen coordinates.
 
 
 
 
 
=== ScanInt ===
 
Parses a positive ASCII decimal number from the input file stream and returns its value.
 
 
 
 
 
=== szCopy ===
 
Duplicates a NULL-terminated string with bounds checking to prevent the overflow of the destination buffer.
 
 
 
 
 
=== XFORMS.C ===
 
This module contains PostScript-driver transform code.
 
 
 
 
 
=== prdg_DeviceSetDCOrigin ===
 
Simply returns success. The DC origin is always left at (0,0).
 
 
 
 
 
=== prdg_GetDCOrigin ===
 
Returns the DC origin (always zero).
 
 
 
 
 
=== prdg_NotifyTransformChange ===
 
Called by the engine when the transformation matrix has been changed.
 
 
 
 
 
=== utl_MemIsEqual ===
 
Compares two memory regions.
 
 
 
 
 
=== 32-Bit Plotter Presentation Driver ===
 
The Plotter Presentation Driver is a 32-bit vector graphics driver. Vector graphics drivers use drawing primitives, such as lines, arcs, boxes, circles, and area fills, to draw complex graphics images. The Plotter Presentation Driver relies on the graphics language capabilities of the printer or plotter to do the actual drawing.
 
For example, to draw a circle, the plotter driver sends the circle command with radius information to the printer. The printer has the responsibility of drawing the circle on the device.
 
The vector graphics languages that this driver supports are Hewlett-Packard Graphics Language (HP-GL and HP-GL/2) and IBM Graphics Language (IBM-GL). If the device or graphics language does not support the OS/2 drawing function, the driver will either call back to the graphics engine for simulation or convert the drawing function to a supported primitive. For example, an OS/2 [[01030.htm|FillPath]]call might be converted to a HP-GL/2 FillPolygon.
 
The Plotter Presentation Driver can also support devices that can mix HP-GL /2 and raster data such as laser printers or raster plotters. In the DEBUG version of the driver, a sample PCL laser printer is supported. The RETAIL and DEBUG versions of the driver support raster plotters using the HP-RTL language.
 
The files that comprise the Plotter Presentation Driver are PLOTTERS.DRV and PLOTTERS.HLP. PLOTTERS.DRV is the executable code and data of the driver. The PLOTTERS.DRV file exports [[00340.htm|OS2_PM_DRV_ENABLE]], [[00303.htm|OS2_PM_DRV_DEVMODE]] , and [[00530.htm|OS2_PM_DRV_DEVICENAMES]]entry points. PLOTTERS.DRV has an extended attribute (EA) that must be present for the driver to be installed correctly. The PLOTTERS.HLP file contains the help panels for the '''Job Properties'''and '''Printer Properties'''dialog boxes of the driver.
 
 
 
 
 
=== Generic Printer Library (GenPLib) ===
 
The Generic Printer Library is a set of subroutines that are useful for 32- bit presentation drivers. The Plotter Presentation driver takes advantage of the following GenPLib functions:
 
*Memory management routines <br />*Multi-threading output capabilities <br />*Error and debugging support routines
 
For further information about the Generic Printer Library, see [[00005.htm|Generic Printer Library]].
 
 
 
 
 
=== Font Support ===
 
The example plotter driver code supports only one device font. The HP-GL/2 or IBM-GL font named Stick is the plotter driver's default font. This font is a fixed-spaced, scalable font. A fixed-spaced, scalable font is one that can be scaled to any character width and height by setting the character attribute CBB_BOX. As soon as the font is scaled, the width of all characters will be constant.
 
Changing the code to support another fixed-spaced, scalable font is not difficult and can be achieved through the following steps:
 
1.Add a data structure to [[01034.htm|PLOTTERS.C]]enumerating the FONTMETRICS information of each supported font. <br />2.Change the PlotterClass data structure in [[01034.htm|PLOTTERS.C]]to include a bit fields defining which fonts each device supports and the appropriate default font. <br />3.Modify the [[00859.htm|initialize_pdevice]]() function in [[00849.htm|ENABLE.C]]to set the correct default device font. <br />4.In [[00875.htm|FONT.C]], make [[00878.htm|DeviceQueryFonts]]() return the additional fonts and make [[00887.htm|RealizeFont()]]select the font.
 
Adding proportional-spaced fonts requires the following additional changes:
 
1.In [[00875.htm|FONT.C]], modify [[00876.htm|cpxfm_metrics]]() to scale the width of all the characters in the font. <br />2.Change the character positioning functions [[00885.htm|QueryTextBox]](), [[00886.htm|QueryWidthTable]](), and [[00884.htm|QueryCharPositions()]]to use the proportional font character width and kerning information.
 
 
 
 
 
=== Adding a Device ===
 
The plotter driver uses a combination of the device name and the device class to support printers. The device name is the name of the device that is used to look up the corresponding device class information in the plotter driver's plotter definition table, PlotterDef[].
 
The PlotterClass data structure contains all the information describing the characteristics of the of the device.
 
The plotter driver currently supports the following devices and corresponding device classes:
 
IBM6180 CLASS_HP7440A <br />IBM6182 CLASS_HP7550A <br />IBM6184 CLASS_HP7570A <br />IBM6186 CLASS_HP7595A <br />IBM6186 CLASS_HP7596A <br />IBM7371 CLASS_HP7470A <br />IBM7372 CLASS_HP7475A <br />IBM7374 CLASS_HP7580B <br />IBM7375-1 CLASS_HP7585B <br />IBM7375-2 CLASS_HP7586B <br />HP7440A CLASS_HP7440A <br />HP7470A CLASS_HP7470A <br />HP7475A CLASS_HP7475A <br />HP7550A CLASS_HP7550A <br />HP7570A CLASS_HP7570A <br />HP7580A CLASS_HP7580A <br />HP7580B CLASS_HP7580B <br />HP7585A CLASS_HP7585A <br />HP7585B CLASS_HP7585B <br />HP7586B CLASS_HP7586B <br />HP7595A CLASS_HP7595A <br />HP7596A CLASS_HP7596A <br />PaintJet XL HP-GL/2 CLASS_PAINTJET_XL <br />DesignJet 600 CLASS_DESIGNJET600 <br />DesignJet 650C CLASS_DESIGNJET650 <br />DraftMaster SX CLASS_DRAFTMASTER_SERIES <br />DraftMaster RX CLASS_DRAFTMASTER_SERIES <br />DraftMaster MX CLASS_DRAFTMASTER_SERIES
 
To add a new device that will be supported by an existing class, complete the following steps:
 
1.Add the device name to the PlotterDef[] table in [[01034.htm|PLOTTERS.C]]. <br />2.Add a define in DIALOG.H that defines a numeric constant for your device . The numeric constant will be used to load the device description string that you must add to the PLTUS.RC file.
 
To add a new device class to the plotter driver, complete the following steps:
 
1.Add a new PlotterClass structure to PLOTTERS.C defining your new class. <br />2.Add a define in PLOTTERS.H for the class. <br />3.Add an entry to the PlotterDef[] table along with a device name that uses the class.
 
 
 
 
 
=== Plotter Modules and Functions ===
 
This section provides a layout of the Plotter Presentation Driver source code. Refer the DDK CD for the Plotter Presentation Driver source code and to the &quot;Using Your DDK&quot;, also available on the DDK CD, for a roadmap of the file structure used by the source code.
 
The first part of this section lists in alphabetical order all functions found in the Plotter code. The module in which each function is found is listed next to the function.
 
The second part of this section lists the modules that comprise the Plotter driver and the functions that comprise each module. Each function is followed by a description.
 
 
 
 
 
=== Function List ===
 
 
 
<pre class="western">/-------------------------------------------------------------\
|Function Name                |Module Location              |
|------------------------------+------------------------------|
|AccumulateBounds()            |BOUNDS.C                      |
|------------------------------+------------------------------|
|accumulate_line_bounds        |BOUNDS.C                      |
|------------------------------+------------------------------|
|addfxquad                    |NEW.ASM                      |
|------------------------------+------------------------------|
|add_user_form                |FORMS.C                      |
|------------------------------+------------------------------|
|add_user_forms_to_list        |FORMS.C                      |
|------------------------------+------------------------------|
|adjust_char_attrs            |TEXTOUT.C                    |
|------------------------------+------------------------------|
|apply_clipping()              |CLIP.C                        |
|------------------------------+------------------------------|
|Arc (Exported)                |OUTPARC.C                    |
|------------------------------+------------------------------|
|arc_tan                      |GLIB.ASM                      |
|------------------------------+------------------------------|
|Arctan                        |GLIB.ASM                      |
|------------------------------+------------------------------|
|band()                        |BAND.C                        |
|------------------------------+------------------------------|
|BeginArea                    |PATHS.C                      |
|------------------------------+------------------------------|
|begin_raster_graphics        |BITMAP.C                      |
|------------------------------+------------------------------|
|bin_output_bytes              |BITMAP.C                      |
|------------------------------+------------------------------|
|Bitblt                        |BITMAP.C                      |
|------------------------------+------------------------------|
|bitblt2                      |BITMAP.C                      |
|------------------------------+------------------------------|
|BoxBoth()                    |BOX.C                        |
|------------------------------+------------------------------|
|BoxBoundary                  |BOX.C                        |
|------------------------------+------------------------------|
|BoxInterior                  |BOX.C                        |
|------------------------------+------------------------------|
|build_app_name                |DEVMODE.C                    |
|------------------------------+------------------------------|
|Build_Palette                |BITMAP.C                      |
|------------------------------+------------------------------|
|calc_bounds                  |BOX.C                        |
|------------------------------+------------------------------|
|calc_QTB                      |TEXTOUT.C                    |
|------------------------------+------------------------------|
|CharString                    |TEXTOUT.C                    |
|------------------------------+------------------------------|
|CharStringPos                |TEXTOUT.C                    |
|------------------------------+------------------------------|
|check_area_background_color() |COLOR.C                      |
|------------------------------+------------------------------|
|check_area_color()            |COLOR.C                      |
|------------------------------+------------------------------|
|check_char_background_color  |COLOR.C                      |
|------------------------------+------------------------------|
|check_char_color()            |COLOR.C                      |
|------------------------------+------------------------------|
|check_color_sorting          |COLOR.C                      |
|------------------------------+------------------------------|
|check_fill_type              |OUTPUT.C                      |
|------------------------------+------------------------------|
|check_line_color()            |COLOR.C                      |
|------------------------------+------------------------------|
|check_line_construction      |OUTPUT.C                      |
|------------------------------+------------------------------|
|check_marker_color()          |COLOR.C                      |
|------------------------------+------------------------------|
|check_menuitem                |DEVMODE.C                    |
|------------------------------+------------------------------|
|check_pen                    |DEVMODE.C                    |
|------------------------------+------------------------------|
|check_pens                    |DEVMODE.C                    |
|------------------------------+------------------------------|
|check_string_construction    |OUTPUT.C                      |
|------------------------------+------------------------------|
|choose_endpoints              |CLIP.C                        |
|------------------------------+------------------------------|
|CleanUpHelpStubHook          |DEVMODE.C                    |
|------------------------------+------------------------------|
|clear_entries                |DEVMODE.C                    |
|------------------------------+------------------------------|
|clear_memory                  |UTILS.C                      |
|------------------------------+------------------------------|
|clear_patsym_area            |PATHS.C                      |
|------------------------------+------------------------------|
|clip_char                    |TEXTOUT.C                    |
|------------------------------+------------------------------|
|close_file_or_device          |DOSIO.C                      |
|------------------------------+------------------------------|
|color_distance()              |COLOR.C                      |
|------------------------------+------------------------------|
|compare_memory                |UTILS.C                      |
|------------------------------+------------------------------|
|compress_adaptive            |COMPRESS.C                    |
|------------------------------+------------------------------|
|compress_any_supported_mode  |COMPRESS.C                    |
|------------------------------+------------------------------|
|constrain_hls                |COLOR.C                      |
|------------------------------+------------------------------|
|construct_char()              |CHARGEN.C                    |
|------------------------------+------------------------------|
|construct_chord_tolerance    |OUTPUT.C                      |
|------------------------------+------------------------------|
|construct_fixed              |OUTPUT.C                      |
|------------------------------+------------------------------|
|construct_float              |OUTPUT.C                      |
|------------------------------+------------------------------|
|construct_point              |OUTPUT.C                      |
|------------------------------+------------------------------|
|ConvertArcParams              |OUTPARC.C                    |
|------------------------------+------------------------------|
|convertbgr_to_rgb            |BITMAP.C                      |
|------------------------------+------------------------------|
|convert_color()              |COLOR.C                      |
|------------------------------+------------------------------|
|convert_list                  |FORMS.C                      |
|------------------------------+------------------------------|
|convert_point                |OUTPUT.C                      |
|------------------------------+------------------------------|
|ConvertWithRotation          |UTILS.C                      |
|------------------------------+------------------------------|
|copy_device_info              |PROFILE.C                    |
|------------------------------+------------------------------|
|copymem                      |INIT.ASM                      |
|------------------------------+------------------------------|
|copy_memory                  |UTILS.C                      |
|------------------------------+------------------------------|
|copy_pen_option_info          |PROFILE.C                    |
|------------------------------+------------------------------|
|Cosine                        |GLIB.ASM                      |
|------------------------------+------------------------------|
|cpxfm_metrics                |FONT.C                        |
|------------------------------+------------------------------|
|create_default_color_table()  |COLOR.C                      |
|------------------------------+------------------------------|
|CreateLogColorTable()        |COLOR.C                      |
|------------------------------+------------------------------|
|delete_user_form              |FORMS.C                      |
|------------------------------+------------------------------|
|delete_user_forms_from_list  |FORMS.C                      |
|------------------------------+------------------------------|
|DeviceCreateBitmap()          |BITMAP.C                      |
|------------------------------+------------------------------|
|DeviceDeleteBitmap()          |BITMAP.C                      |
|------------------------------+------------------------------|
|DeviceGetAttributes()        |ATTRIBS.C                    |
|------------------------------+------------------------------|
|devicepalette                |COLOR.C                      |
|------------------------------+------------------------------|
|DeviceQueryFontAttributes()  |FONT.C                        |
|------------------------------+------------------------------|
|DeviceQueryFonts              |FONT.C                        |
|------------------------------+------------------------------|
|DeviceSelectBitmap()          |BITMAP.C                      |
|------------------------------+------------------------------|
|DeviceSetAttributes()        |ATTRIBS.C                    |
|------------------------------+------------------------------|
|DeviceSetCursor()            |BITMAP.C                      |
|------------------------------+------------------------------|
|DeviceSetDCOrigin()          |ATTRIBS.C                    |
|------------------------------+------------------------------|
|DeviceSetGlobalAttribute()    |ATTRIBS.C                    |
|------------------------------+------------------------------|
|disable_dc_begin              |ENABLE.C                      |
|------------------------------+------------------------------|
|disable_dc_complete          |ENABLE.C                      |
|------------------------------+------------------------------|
|disable_pdev                  |ENABLE.C                      |
|------------------------------+------------------------------|
|DisJointLines                |OUTPLINE.C                    |
|------------------------------+------------------------------|
|display_carousel              |DEVMODE.C                    |
|------------------------------+------------------------------|
|display_colors                |DEVMODE.C                    |
|------------------------------+------------------------------|
|display_error                |FORMS.C                      |
|------------------------------+------------------------------|
|display_form_id              |FORMS.C                      |
|------------------------------+------------------------------|
|display_paper_size            |DEVMODE.C                    |
|------------------------------+------------------------------|
|display_pen                  |DEVMODE.C                    |
|------------------------------+------------------------------|
|display_pens                  |DEVMODE.C                    |
|------------------------------+------------------------------|
|display_user_form_paper_size  |FORMS.C                      |
|------------------------------+------------------------------|
|distance                      |UTILS.C                      |
|------------------------------+------------------------------|
|_DLL_InitTerm                |INITTERM.C                    |
|------------------------------+------------------------------|
|download_pattern              |BITMAP.C                      |
|------------------------------+------------------------------|
|DrawBits                      |BITMAP.C                      |
|------------------------------+------------------------------|
|DrawBorder()                  |BITMAP.C                      |
|------------------------------+------------------------------|
|draw_box                      |BOX.C                        |
|------------------------------+------------------------------|
|draw_fullarc                  |OUTPARC.C                    |
|------------------------------+------------------------------|
|DrawImage                    |BITMAP.C                      |
|------------------------------+------------------------------|
|draw_line                    |OUTPUT.C                      |
|------------------------------+------------------------------|
|DrawLinesInPath              |OUTPLINE.C                    |
|------------------------------+------------------------------|
|draw_patsym_diag              |PATHS.C                      |
|------------------------------+------------------------------|
|draw_patsym_horiz            |PATHS.C                      |
|------------------------------+------------------------------|
|draw_patsym_vert              |PATHS.C                      |
|------------------------------+------------------------------|
|draw_pattern_lines            |PATHS.C                      |
|------------------------------+------------------------------|
|draw_point                    |OUTPUT.C                      |
|------------------------------+------------------------------|
|draw_polymarker_circle        |MARKER.C                      |
|------------------------------+------------------------------|
|draw_polymarker_cross        |MARKER.C                      |
|------------------------------+------------------------------|
|draw_polymarker_diamond      |MARKER.C                      |
|------------------------------+------------------------------|
|draw_polymarker_dot          |MARKER.C                      |
|------------------------------+------------------------------|
|draw_polymarker_eightpointstar|MARKER.C                      |
|------------------------------+------------------------------|
|draw_polymarker_plus          |MARKER.C                      |
|------------------------------+------------------------------|
|draw_polymarker_sixpointstar  |MARKER.C                      |
|------------------------------+------------------------------|
|draw_polymarker_solidsquare  |MARKER.C                      |
|------------------------------+------------------------------|
|draw_polymarker_soliddiamond  |MARKER.C                      |
|------------------------------+------------------------------|
|draw_polymarker_square        |MARKER.C                      |
|------------------------------+------------------------------|
|EA_GetVersion                |DEVMODE.C                    |
|------------------------------+------------------------------|
|enable                        |ENABLE.C                      |
|------------------------------+------------------------------|
|enable_dc_begin              |ENABLE.C                      |
|------------------------------+------------------------------|
|enable_dc_complete            |ENABLE.C                      |
|------------------------------+------------------------------|
|end_doc                      |OUTPUT.C                      |
|------------------------------+------------------------------|
|end_job                      |OUTPUT.C                      |
|------------------------------+------------------------------|
|end_page                      |OUTPUT.C                      |
|------------------------------+------------------------------|
|end_raster_graphics          |BITMAP.C                      |
|------------------------------+------------------------------|
|enter_PCL_or_HPRTL            |BITMAP.C                      |
|------------------------------+------------------------------|
|EndArea                      |PATHS.C                      |
|------------------------------+------------------------------|
|EnterDriver                  |LOCKDDC.C                    |
|------------------------------+------------------------------|
|ErasePS()                    |ATTRIBS.C                    |
|------------------------------+------------------------------|
|Escape()                      |ESCQUERY.C                    |
|------------------------------+------------------------------|
|exchange_dispatch()          |DISPATCH.C                    |
|------------------------------+------------------------------|
|f_ldivf                      |XFORMS.C                      |
|------------------------------+------------------------------|
|f_lsqrt                      |XFORMS.C                      |
|------------------------------+------------------------------|
|fill_clip_area                |PATHS.C                      |
|------------------------------+------------------------------|
|fill_ldev                    |ENABLE.C                      |
|------------------------------+------------------------------|
|fill_opt_end                  |UTILS.C                      |
|------------------------------+------------------------------|
|fill_opt_init                |UTILS.C                      |
|------------------------------+------------------------------|
|FillPath                      |PATHS.C                      |
|------------------------------+------------------------------|
|fill_pattern                  |BITMAP.C                      |
|------------------------------+------------------------------|
|fill_pattern_Use_Device      |BITMAP.C                      |
|------------------------------+------------------------------|
|fill_pdev                    |ENABLE.C                      |
|------------------------------+------------------------------|
|fill_pdev_save_dc_data        |ENABLE.C                      |
|------------------------------+------------------------------|
|fill_polygon                  |PATHS.C                      |
|------------------------------+------------------------------|
|fill_the_clip_rectangles      |PATHS.C                      |
|------------------------------+------------------------------|
|find_device_name              |UTILS.C                      |
|------------------------------+------------------------------|
|find_printer_name            |UTILS.C                      |
|------------------------------+------------------------------|
|find_user_form_size          |FORMS.C                      |
|------------------------------+------------------------------|
|FindVectorLength              |FONT.C                        |
|------------------------------+------------------------------|
|flush_opt_buffer              |UTILS.C                      |
|------------------------------+------------------------------|
|frdiv                        |PRDMATH.ASM                  |
|------------------------------+------------------------------|
|free _ memory                      | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| frmul                            | PRDMATH . ASM                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| frsqrt                            | PRDMATH . ASM                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| FullArcBoth                      | OUTPARC . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| FullArcBoundary                  | OUTPARC . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| FullArcInterior                  | OUTPARC . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| fx _ fxmulfx                      | NEW . ASM                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| fxmultiply                      | NEW . ASM                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| fxtofxquad                      | NEW . ASM                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ angle                        | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ angle                        | GLIB . ASM                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ angle _ xform                  | XFORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ arc _ center                  | OUTPARC . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ area _ attr _ bundle ( )          | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ bounds ( )                    | CLIP . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ char _ attr _ bundle ( )          | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ closest _ color ( )              | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ closest _ pen                  | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ closest _ point                | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ color _ group ( )                | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ defaults                    | PROFILE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ device _ id                    | PROFILE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ distance                    | OUTPARC . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ group                        | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ ieee _ addr                    | DOSIO . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ image _ attr _ bundle ( )        | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ ini _ comm _ info                | DOSIO . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ line _ attr _ bundle ( )          | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ line _ intersection          | OUTPARC . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ marker _ attr _ bundle ( )        | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ mod _ handle                  | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ module _ dir                  | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ new _ outbuff                  | DOSIO . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ perpendicular _ bisect        | OUTPARC . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ printer _ name                | PROFILE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ profile                      | PROFILE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ quad _ clip ( )                  | CLIP . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ quadrant                    | GLIB . ASM                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| get _ string                      | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetBitmapBits ( )                  | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetBitmapHandle                  | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetBoundsData ( )                  | BOUNDS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetCodePage                      | TEXTOUT . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetCurrentPosition              | OUTPLINE . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetDCOrigin ( )                    | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetExtraIncrements              | FONT . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetGreyPattern                  | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetHorizTextAlignShift          | FONT . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetLineOrigin                    | OUTPLINE . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetMeasureItemInfo              | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetNextColor                    | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetPageData                      | ESCQUERY . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetPairKerningTable              | TEXTOUT . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetPel ( )                          | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetStandardAlignment            | FONT . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetStyleRatio ( )                  | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| GetVertTextAlignShift          | FONT . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| greyscalesourcebits              | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| HeightNumericSubProc            | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| help _ dialog _ proc                | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| HelpErrorFilter                  | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| HelpStubHook                    | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| Hook _ UnHook                      | DISPATCH . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| icos                              | GLIB . ASM                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| id _ conflicts                    | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| IDNumericSubProc                | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| ImageData ( )                      | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| image _ scan                      | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| ImageScan                        | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| init _ dialog                      | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| initfsrsem                      | LOCKDDC . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| init _ quad _ clip                  | CLIP . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| initialize _ comm _ port            | DOSIO . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| initialize _ ddc ( )                | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| InitializeHelp                  | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| initialize _ outputinfo          | DOSIO . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| initialize _ pdevice              | ENABLE . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| initialize _ user _ forms          | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| Int3                              | INIT . ASM                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| int _ to _ str                      | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| iq _ div                            | PRDMATH . ASM                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| is _ elipse                        | OUTPARC . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| isin                              | GLIB . ASM                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| IsIta _ COM _ Port _ Name              | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| IsIta _ Device _ Name                | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| LeaveDriver                      | LOCKDDC . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| lift _ pen                          | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| list _ pen _ options                | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| list _ pen _ priority                | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| llAddElement                    | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| llCreateElement                  | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| llDeleteElement                  | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| l _ ldivfx                          | NEW . ASM                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| llFindElement                    | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| llFreeAllElements                | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| locate _ HPGL2pen ( )                | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| locate _ pen ( )                    | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| locate _ rfpen                    | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| LockDevice ( )                    | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| lstrcmp                          | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| lstrcpy                          | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| lstrlen                          | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| lstrncmp                          | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| lstrtoksrch                      | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| main _ dialog _ command              | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| main _ dialog _ proc                | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| measurement _ to _ string          | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| merge _ clip _ rect ( )                | CLIP . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| modify _ user _ form                | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| move _ pen                          | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| name _ conflicts                  | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| newton _ f _ lsqrt                  | XFORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| next _ band                        | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| NotifyClipChange ( )              | CLIP . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| NotifyTransformChange          | XFORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| number _ of _ hardcoded _ forms      | ESCQUERY . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| number _ user _ forms _ defined      | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| open _ file _ or _ device              | DOSIO . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| open _ spooler _ queue              | DOSIO . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| options _ dialog _ proc              | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| OS2 _ DevPostDeviceModes          | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| output _ bytes                    | DOSIO . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| output _ clip _ rect ( )              | CLIP . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| output _ comma                    | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| output _ number                    | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| output _ point                    | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| PaintRegion                      | PATHS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| PartialArc                      | OUTPARC . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| pencolor _ dialog _ proc            | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| perform _ std _ spooling            | DOSIO . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| plot _ line                        | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| PolygonSet                      | PATHS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| PolyLine                          | OUTPLINE . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| PolyMarker  ( Exported )          | MARKER . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| PolyScanline ( )                  | OUTPLINE . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| PolyShortLine                    | OUTPLINE . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| PolySpline                      | OUTPARC . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| prdl _ MemClipChange              | CLIP . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| priority _ dialog _ proc            | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| prompt _ for _ carousel              | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| prompt _ for _ page                  | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| PSZ  ENGENTRY  SetMem              | INIT . ASM                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| putbuff _ on _ dataqueue            | DOSIO . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| quad _ square _ root                | NEW . ASM                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| quad _ sort ( )                      | CLIP . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| QueryCharPositions ( )            | FONT . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| QueryColorData ( )                | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| QueryColorIndex ( )                | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| QueryDeviceBitmaps ( )            | ESCQUERY . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| QueryDeviceCaps                  | ESCQUERY . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| QueryDeviceNames ( )              | ESCQUERY . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| QueryDeviceResource              | ESCQUERY . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| querydevicesurface              | ENABLE . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| querydevresource2                | ESCQUERY . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| QueryHardcopyCaps ( )              | ESCQUERY . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| QueryLogColorTable ( )            | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| QueryNearestColor ( )              | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| QueryRealColors ( )                | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| QueryRGBColor ( )                  | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| QueryTextBox                    | FONT . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| QueryWidthTable                  | FONT . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| queue _ opt _ buffer                | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| RealizeColorTable ( )              | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| RealizeFont ( )                    | FONT . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| rectl _ intersect ( )                | CLIP . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| reduce _ angle                    | GLIB . ASM                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| ReleaseHelpStubHook              | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| ResetBounds                      | BOUNDS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| reset _ entries                    | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| reset _ dc _ state                  | ENABLE . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| restore _ dc _ state                | ENABLE . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| RestoreScreenBits ( )              | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| return _ driver _ data              | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| return _ flat _ user _ forms _ list    | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| return _ rf _ fill _ pen              | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| rgb _ to _ hls ( )                    | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| return _ to _ HPGL2                  | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| rotate _ 4bpp _ 90                  | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| rotate _ 8bpp _ 90                  | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| rotate _ bmap _ 90                  | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| round _ divide                    | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| save _ dc _ state                    | ENABLE . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| save _ mod _ handle                  | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| save _ profile                    | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| SaveScreenBits ( )                | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| save _ user _ form                  | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| sdBitBlt                          | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| select _ fill _ pen ( )                | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| select _ fill _ type ( )              | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| select _ HPGL2pen ( )                | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| select _ line _ pen ( )                | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| select _ text _ pen ( )                | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| select _ user _ defined _ pen ( )      | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| send _ header                      | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| send _ trailer                    | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| SetArcParameters                | OUTPARC . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ arc _ scale                    | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ area _ attr _ bundle ( )          | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| SetBitmapBits                    | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ cell _ angle                  | TEXTOUT . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ cell _ shear                  | TEXTOUT . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ cell _ size                    | TEXTOUT . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ char _ angle                  | TEXTOUT . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ char _ attr _ bundle ( )          | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ char _ italic _ bold            | TEXTOUT . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ clip _ rectangle ( )            | CLIP . C                            |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| SetCodePage                      | TEXTOUT . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| SetCurrentPosition              | OUTPLINE . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ default _ p1p2                | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ default _ scale                | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ empty _ rect                  | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ graphics _ position          | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| SetHelpStubHook ( )                | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ HPGL2 _ color _ palette        | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ image _ attr _ bundle ( )        | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ line _ attr _ bundle ( )          | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| SetLineOrigin                    | OUTPLINE . C                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ line _ type                    | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ marker _ attr _ bundle ( )        | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| setmem                            | INIT . ASM                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ mix _ mode                    | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ p1p2                          | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| Set _ Palette                      | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| SetPel                            | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ pen ( )                        | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ pen _ width ( )                  | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ raster _ width _ and _ height    | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| Set _ RFIndex                      | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ rotation                    | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ scale                        | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| SetStyleRatio ( )                  | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| set _ transparency _ mode ( )        | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| setup _ colors                    | ENABLE . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| setup _ raster _ fill _ index        | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| Sine                              | GLIB . ASM                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| square _ root                      | PRDMATH . ASM                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| sroot                            | NEW . ASM                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| start _ color _ sorting ( )          | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| start _ doc                        | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| start _ job                        | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| start _ page                      | OUTPUT . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| stop _ color _ sorting ( )            | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| str _ to _ int                      | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| string _ clip                      | TEXTOUT . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| string _ to _ measurement          | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| StrokePath                      | PATHS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| switchbetween _ rgb _ carousel      | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| szStrCopy                        | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| to _ upper                          | UTILS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| ulNormalize                      | PRDMATH . ASM                      |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| UnlockDevice ( )                  | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| UnrealizeColorTable ( )          | COLOR . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| update _ menu                      | DEVMODE . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| user _ defined _ forms _ dialog _ proc | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| user _ form _ exists _ exists        | FORMS . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| validate _ any _ color ( )            | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| validate _ background _ color ( )    | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| validate _ background _ mix ( )      | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| validate _ foreground _ color ( )    | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| validate _ foreground _ mix ( )      | ATTRIBS . C                        |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| vector _ bitmap                    | BITMAP . C                          |
| ---------- ---------- ---------- + ---------- ---------- ---------- |
| WidthNumericSubProc              | FORMS . C                          |
\ ---------- ---------- ---------- - ---------- ---------- ---------- / </pre>
 
 
 
 
=== Module and Function Descriptions ===
 
This section describes the modules that comprise the Plotter driver and the functions that comprise each module. Each function is followed by a description. The functions in each module are listed in alphabetical order.
 
 
 
 
 
=== ATTRIBS.C ===
 
This module contains plotter driver attributes.
 
 
 
 
 
=== DeviceGetAttributes() ===
 
Gets plotter driver attributes. This function is the entry point for external processes to obtain information about the current attributes of the plotter driver.
 
 
 
 
 
=== DeviceSetAttributes() ===
 
Sets plotter driver attributes. This function is the entry point for external processes to modify the current plotter driver attributes.
 
 
 
 
 
=== DeviceSetDCOrigin() ===
 
Sets the DC origin. The device origin is 0,0 when enabled. The device is responsible for adding this offset to all transformed coordinates. The plotter driver returns errors because SetDCOrigin is not journaled and would cause problems in color-sorting mode.
 
 
 
 
 
=== DeviceSetGlobalAttribute() ===
 
Sets the global attributes of different types of attributes.
 
 
 
 
 
=== ErasePS() ===
 
Resets the presentation space.
 
 
 
 
 
=== get_area_attr_bundle() ===
 
Returns information from the current ''area''attribute bundle according to the ''AttrsMask''parameter.
 
 
 
 
 
=== get_char_attr_bundle() ===
 
Returns information from the current ''character''attribute bundle according to the ''AttrsMask''parameter.
 
 
 
 
 
=== get_image_attr_bundle() ===
 
Returns information from the current ''image''attribute bundle according to the ''AttrsMask''parameter.
 
 
 
 
 
=== get_line_attr_bundle() ===
 
Returns information from the current ''line''attribute bundle according to the ''AttrsMask''parameter.
 
 
 
 
 
=== get_marker_attr_bundle() ===
 
Returns information from the current ''marker''attribute bundle according to the ''AttrsMask''parameter.
 
 
 
 
 
=== GetDCOrigin() ===
 
Gets the Device Context origin. Assigns values to the coordinates.
 
 
 
 
 
=== GetStyleRatio() ===
 
Used for banding printers that use the display driver for writing into bit maps. The plotter returns 1:1.
 
 
 
 
 
=== initialize_ddc() ===
 
Initializes device driver instance. Resets the device driver instance data structure to its base state.
 
 
 
 
 
=== LockDevice() ===
 
Locks a device.
 
 
 
 
 
=== set_area_attr_bundle() ===
 
Sets area attributes.
 
 
 
 
 
=== set_char_attr_bundle() ===
 
Sets information from the current ''character''attribute bundle according to the ''AttrsMask''parameter.
 
 
 
 
 
=== set_image_attr_bundle() ===
 
Sets image attributes.
 
 
 
 
 
=== set_line_attr_bundle() ===
 
Sets line attributes.
 
 
 
 
 
=== set_marker_attr_bundle() ===
 
Sets marker attributes.
 
 
 
 
 
=== SetStyleRatio() ===
 
Sets the style ratio.
 
 
 
 
 
=== UnlockDevice() ===
 
Allows all pending screen input or output operations that were blocked by [[00667.htm|LockDevice()]]to continue.
 
 
 
 
 
=== validate_any_color() ===
 
Validates color.
 
 
 
 
 
=== validate_background_color() ===
 
Validates background color.
 
 
 
 
 
=== validate_background_mix() ===
 
Validates background mix.
 
 
 
 
 
=== validate_foreground_color() ===
 
Validates foreground color.
 
 
 
 
 
=== validate_foreground_mix() ===
 
Validates foreground mix.
 
 
 
 
 
=== BAND.C ===
 
This module contains the callback function passed to GenPLib banding routines.
 
 
 
 
 
=== band() ===
 
Retrieves ''surfacebitmapinfo''and fills the appropriate structures to internally call the [[00711.htm|sdBitBlt]]function to output the surface.
 
 
 
 
 
=== BITMAP.C ===
 
This module contains bit-map related functions.
 
 
 
 
 
=== begin_raster_graphics ===
 
Sends the necessary commands to get into raster graphics transfer mode.
 
'''Note:'''Raster Mode may be either PCL or RTL.
 
 
 
 
 
=== bin_output_bytes ===
 
Outputs binary data by calling the thread code to output the data on the second thread.
 
'''Note:'''This function should only be called after output_bytes has been called at least once. output_bytes makes sure the header information has been sent.
 
 
 
 
 
=== Bitblt ===
 
'''HPGL-1 devices'''
 
Transfers bit maps directly from memory. The plotter driver supports Bitblt only to bypass an optimization in the engine. This optimization causes the engine to use the driver's Bitblt() function to perform area fills. Therefore, you must verify that the function is the area fill (ROP_PATCOPY) , verify the options, and then continue. Anything else is rejected as if the function is not installed.
 
'''Note:'''This function was completely rewritten to support the Raster Operations.
 
'''HPGL-2 devices'''
 
The BitBlt function copies a bitmap from one presentation space to another. It can also modify the bitmap within a rectangle in a presentation space. The exact operation carried out by BitBlt depends on the raster operation specified by the Mix parameter.
 
If Mix directs BitBlt to copy a bitmap, the function copies the bitmap from a source presentation space specified by hdcSrc to a target presentation space specified by hDC. Each presentation space must be associated with a device context for the display, for memory, or for some other suitable raster device. The target and source presentation spaces can be the same if desired. The pXY parameter points to an array of points that specify the corners of a rectangle containing the bitmap in the source presentation space as well as the corners of the rectangle in the target presentation space to receive the bitmap. If the source and target rectangles are not the same, BitBlt stretches or compresses the bitmap to fit the target rectangle.
 
If Mix directs BitBlt to modify a bitmap, the function uses the raster operation to determine how to alter the bits in a rectangle in the target presentation space. Raster operations include changes such as inverting target bits, replacing target bits with pattern bits, and mixing target and pattern bits to create new colors. For some raster operations, the function mixes the bits of a bitmap from a source presentation space with the target and/or pattern bits.
 
 
 
 
 
=== bitblt2 ===
 
This function is hooked for PCL color devices. If bitmap stretching is necessary, this function gets the bits from a bitmap and sends them to the device. If bitmap stretching is not necessary, this function calls back to the engine to get [[00711.htm|sdBitBlt]].
 
 
 
 
 
=== Build_Palette ===
 
Sets the PCL/RTL Palette and outputs the necessary escape sequences to the device to build the Color Palette in the device.
 
 
 
 
 
=== convertbgr_to_rgb ===
 
Converts a source scan line from BGR format and to RGB order.
 
 
 
 
 
=== DeviceCreateBitmap() ===
 
Creates a plotter driver bit map. This function is called to create a bit map of the specified form and to obtain its handle.
 
 
 
 
 
=== DeviceDeleteBitmap() ===
 
Deletes a plotter driver bit map. This function is called to destroy a specified bit map created by [[00689.htm|DeviceCreateBitmap()]].
 
 
 
 
 
=== DeviceSelectBitmap() ===
 
Selects a plotter driver bit map. This function tells the device driver that a new bit map is being selected into the given DC.
 
 
 
 
 
=== DeviceSetCursor() ===
 
Sets the cursor bit map that defines the cursor shape. This function will return an error.
 
 
 
 
 
=== download_pattern ===
 
Downloads a user-defined pattern to the device for area fills. This function is called from [[00790.htm|setup_raster_fill_index]]in [[00751.htm|COLOR.C]].
 
 
 
 
 
=== DrawBits ===
 
Draws a rectangle of bits.
 
 
 
 
 
=== DrawBorder() ===
 
Draws a border inside a rectangle and optionally fills the interior. This is a [[00685.htm|Bitblt]]accelerator and will return an error.
 
 
 
 
 
=== DrawImage ===
 
Projects the image of a rectangle onto the source DC's bit map and onto the printer.
 
 
 
 
 
=== end_raster_graphics ===
 
Sends the necessary commands to get out of raster graphics transfer mode.
 
'''Note:'''Raster Mode may be either PCL or RTL.
 
 
 
 
 
=== enter_PCL_or_HPRTL ===
 
Sends the necessary commands to get the plotter into PCL or HPRTL mode. This is necessary to setup the device for a raster transfer.
 
 
 
 
 
=== fill_pattern ===
 
Called from [[00685.htm|Bitblt]]for ROP_PATCOPY. Fills a rectangle specified by the rclDst with the pattern bits in pBits.
 
 
 
 
 
=== fill_pattern_Use_Device ===
 
Handles both HPGL2 and PCL to fill a rectangle with patterns. This function is called from [[00685.htm|Bitblt]]for ROP_PATCOPY with user pattern.
 
 
 
 
 
=== GetBitmapBits() ===
 
Transfers bit map data from the specified DC to application storage. The DC must be a memory hDC with a bit map currently selected.
 
 
 
 
 
=== GetBitmapHandle ===
 
Returns the bit map handle.
 
 
 
 
 
=== GetGreyPattern ===
 
Returns the pattern byte to the caller.
 
 
 
 
 
=== GetNextColor ===
 
Reads source color bits and determines the number of pels that are the same color as the first pel. This function enables you to greyscale many pels at one time. This function returns the current RGB color and updates the pointers to the source bits, the current pel position, and the total number of continuous pels of the current RGB color.
 
 
 
 
 
=== GetPel() ===
 
Gets a pel from a position specified in world coordinates. This function returns -1 for error. Otherwise, it returns the color table index value for the pel.
 
 
 
 
 
=== greyscalesourcebits ===
 
Takes the current source bit map and converts the bit map into a greyscaled 1,1 bits into pBits.
 
 
 
 
 
=== ImageData() ===
 
Draws a row of image data.
 
 
 
 
 
=== image_scan ===
 
Outputs the commands to transfer data to the device and transfers the data.
 
 
 
 
 
=== ImageScan ===
 
Outputs the commands to transfer data to the device and transfers the data.
 
 
 
 
 
=== locate_rfpen ===
 
Takes a color value in RGB format, looks through the currently defined pens for the color, and returns the pen number. If a pen with the same RGB color is not found, this function defines a new pen for the given color and returns that pen number.
 
 
 
 
 
=== sdBitBlt ===
 
Called from the new raster GRE if we hooked the function [[00860.htm|querydevicesurface]] . This function prints an array of pre-clipped and pre-stretched bit maps.
 
 
 
 
 
=== set_graphics_position ===
 
Sends the necessary commands to set the position while in PCL or HPRTL mode .
 
 
 
 
 
=== set_raster_width_and_height ===
 
Sends the necessary commands to set the source width. The destination width and height will only be set if you are scaling the bitmap.
 
 
 
 
 
=== Set_RFIndex ===
 
Sets the Raster Fill index and the height and width of the rectangle. This function is called from [[00700.htm|fill_pattern_Use_Device]].
 
 
 
 
 
=== RestoreScreenBits() ===
 
Restores a rectangle of bits saved by [[00720.htm|SaveScreenBits()]]. Because this is a printer, the driver logs and error.
 
 
 
 
 
=== return_to_HPGL2 ===
 
Sends the necessary commands to get the plotter back into HPGL mode from raster mode.
 
'''Note:'''Raster Mode may be either PCL or RTL.
 
 
 
 
 
=== rotate_4bpp_90 ===
 
Called from [[00719.htm|rotate_bmap_90]], this function rotates a bitmap 4 bits-per-pel by 90 degrees. This function assumes that the source is byte aligned.
 
 
 
 
 
=== rotate_8bpp_90 ===
 
Called from [[00719.htm|rotate_bmap_90]], this function rotates a bitmap 8 bits-per-pel by 90 degrees. This function assumes that the source is byte aligned.
 
 
 
 
 
=== rotate_bmap_90 ===
 
Depending on the number of bits per pel, this function calls the appropriate function to rotate a bitmap by 90 degrees. This function currently supports only four and eight bit-per-pel bitmaps. This function is called from [[00700.htm|fill_pattern_Use_Device]]and [[00693.htm|download_pattern]].
 
 
 
 
 
=== SaveScreenBits() ===
 
Saves a rectangle of bits from the screen. The plotter driver returns an error.
 
 
 
 
 
=== SetBitmapBits ===
 
Sets a plotter driver bit map. This function transfers bit map data from application storage to the specified DC. The DC must be a memory hDC, with a bit map currently selected.
 
 
 
 
 
=== SetPel ===
 
Sets a pel from a position specified in world coordinates. The plotters driver returns OK for this function.
 
 
 
 
 
=== Set_Palette ===
 
Controls the PCL/RTL palette. This function performs the following:
 
1.Saves the HPGL2 Palette, if it is not already saved. <br />2.Sends the necessary configure image data command to the device. The configure image data command is based on the cBitCount of the bit map. <br />3.Sets the number of bits per index in the Configure Image data command. <br />4.Calls the Build_Palette to build the Palette.
 
 
 
 
 
=== vector_bitmap ===
 
Turns the bitmap into line commands for non-raster devices (pen plotters).
 
 
 
 
 
=== BOUNDS.C ===
 
This module contains functions that control bounds accumulation.
 
 
 
 
 
=== AccumulateBounds() ===
 
Adds the given bounds into the existing bounds.
 
 
 
 
 
=== accumulate_line_bounds ===
 
Determines the bounding box of the line whose end points are passed.
 
 
 
 
 
=== GetBoundsData() ===
 
Returns bounds data to user. The units that are returned are specified by the parameters.
 
 
 
 
 
=== ResetBounds ===
 
Resets either or both sets of bounding data.
 
 
 
 
 
=== BOX.C ===
 
This module contains functions associated with drawing boxes.
 
 
 
 
 
=== BoxBoth() ===
 
Draws the edges of a box and fills the interior. One corner is the current position, the other corner is supplied. The box can have rounded corners.
 
 
 
 
 
=== BoxBoundary ===
 
Draws the boundary lines of a box. The box can have rounded corners.
 
 
 
 
 
=== BoxInterior ===
 
Draws the interior of a box. The box is drawn from the current position to a position supplied to the function. The box can have rounded corners.
 
 
 
 
 
=== calc_bounds ===
 
Determines the bounding rectangle for the array of POINTLs given.
 
 
 
 
 
=== draw_box ===
 
Generates the plotter command to draw a box from the current position to the given end point. The box can be a filled box or a boundary box.
 
 
 
 
 
=== CHARGEN.C ===
 
This module contains output functions for device font characters.
 
 
 
 
 
=== construct_char() ===
 
Generates a sequence of commands to produce the desired character. Any manipulation that is required is performed, including switching to another character set.
 
 
 
 
 
=== CLIP.C ===
 
This module contains clipping routines for the OS/2 Plotter Presentation Driver.
 
 
 
 
 
=== apply_clipping() ===
 
Determines the overall clipping rectangle and returns it to the caller. If the prIn of the passed-in rectangle is not zero, it is included. If the prIn of the passed-in rectangle is zero, it is ignored. The basic clipping information is obtained from the DDC.
 
Following are the three states of the clipping handles:
 
* AC_RECT0 (Effectively) no clipping. prResult untouched. <br />* AC_RECT1 One clip rectangle, returned in prResult. <br />* AC_RECT2 Multiple clipping rectangles.
 
 
 
 
 
=== choose_endpoints ===
 
When this function is given the horizontal components (x) of four co-linear points that intersect a quadrilateral's extended boundary walls, it returns the values of the innermost two (those that span the interior of the figure ).
 
 
 
 
 
=== get_bounds() ===
 
Returns the rectangular bounds (bounding box) of a point list.
 
 
 
 
 
=== get_quad_clip() ===
 
Returns a rectangle of an arbitrary height extending above a given scan line. When bStart is true, the first scan line is processed. When bStart is false, the next scan line is processed.
 
 
 
 
 
=== init_quad_clip ===
 
Initializes the QCINFO structure supplied by the caller.
 
 
 
 
 
=== merge_clip_rect() ===
 
Merges the myriad of clip rectangles to produce the largest single rectangle that covers the area.
 
 
 
 
 
=== NotifyClipChange() ===
 
Called whenever an application requests to change any of the clipping bounds for the current PS/DC pair.
 
 
 
 
 
=== output_clip_rect() ===
 
Sets the current soft clip limits at the plotter device.
 
'''Notes'''
 
1.This routine is called from multiple locations within the driver. It is important not to modify the pClipRect data fields within the pPDevice portion of the driver instance data. <br />2.If ClipComplexity == 0 and pPDevice-&gt;ClipComplexity == 1, the rectangle is a null rectangle.
 
 
 
 
 
=== prdl_MemClipChange ===
 
Sets the clipping region of the shadow memory DC. This function copies the DC region of the DC and sets the same in the shadow memory DC. Therefore, both will be in sync.
 
 
 
 
 
=== quad_sort() ===
 
Sorts the corner points of a quadrilateral into counter-clockwise order. The result is returned in the original array.
 
 
 
 
 
=== rectl_intersect() ===
 
Intersects the last two parameters and returns the result in the first parameter.
 
 
 
 
 
=== set_clip_rectangle() ===
 
Sets the current soft clip limits at the plotter device.
 
 
 
 
 
=== COLOR.C ===
 
This module contains color/pen and pattern support functions for the OS/2 Plotter driver.
 
 
 
 
 
=== check_area_background_color() ===
 
Checks the area background color and validates the capability of the plotter to output the current area fill color.
 
 
 
 
 
=== check_area_color() ===
 
Checks the area color and validates the capability of the plotter to output the current area fill color.
 
 
 
 
 
=== check_char_background_color ===
 
Checks ''char''background color and validates the capability of the plotter to output the current ''char''background fill color.
 
 
 
 
 
=== check_char_color() ===
 
Checks the character color and validates the capability of the plotter to output the current character color.
 
 
 
 
 
=== check_color_sorting ===
 
Determines the available pen color that is nearest to the requested color and uses this pen in direct mode. If you are playing back the journal file, you can only record the information.
 
 
 
 
 
=== check_line_color() ===
 
Checks the line color and validates the capability of the plotter to output the current line color.
 
 
 
 
 
=== check_marker_color() ===
 
Checks the marker color and validates the capability of the plotter to output the current marker color/marker.
 
 
 
 
 
=== color_distance() ===
 
Returns the distance between two colors based on the HLS or RGB squaring system.
 
 
 
 
 
=== constrain_hls ===
 
Constrains an HLS color to certain regions of the color wheel. If the color is grey, it is forced to white or black. If not, it is forced out to the rim of the wheel.
 
 
 
 
 
=== convert_color() ===
 
Accepts a color in the current device format and returns the RGB color.
 
 
 
 
 
=== create_default_color_table() ===
 
Generates the default color table. This function is called at enable_dc time to create the default color table information. It can be called at reset_dc time to reinitialize the color table to its default state.
 
 
 
 
 
=== CreateLogColorTable() ===
 
Creates a logical color table for the current device context.
 
 
 
 
 
=== devicepalette ===
 
This function currently does nothing except return true; however, it must remain hooked for the new graphics engine.
 
 
 
 
 
=== get_closest_color() ===
 
Gets the closest color to the RGB value passed in and returns the closest match currently available.
 
 
 
 
 
=== get_closest_pen ===
 
Returns the stall number of the pen that most closely matches the specified color. If RGBIn == WHITE, it returns 0.
 
 
 
 
 
=== get_color_group() ===
 
Gets the color group and returns information about whether a pen is a paper pen, a transparency pen, or something else.
 
 
 
 
 
=== locate_HPGL2pen() ===
 
Finds the currently defined HPGL2 pen. If the pen is not yet defined, define a new pen. No priority is given to usage. This function should be called only if the user is using application colors (if (pSetup-&gt;usFlags &amp; FL_USEAPPCOLORS) is set.
 
 
 
 
 
=== locate_pen() ===
 
Finds the closest available pen color. Priority is assigned as follows:
 
1.Lines <br />2.Fills <br />3.Text
 
 
 
 
 
=== QueryColorData() ===
 
Queries the current color data and returns information regarding the currently selected color support for the driver.
 
 
 
 
 
=== QueryColorIndex() ===
 
Queries the color index and returns the index of the RGB color value that most closely matches the ''RGBColor''parameter.
 
 
 
 
 
=== QueryLogColorTable() ===
 
Queries the logical color table.
 
 
 
 
 
=== QueryNearestColor() ===
 
Returns the available color nearest to the specified color on the currently associated device even if it is not available in the logical color table.
 
 
 
 
 
=== QueryRealColors() ===
 
Returns an array of the distinct colors available on the device.
 
 
 
 
 
=== QueryRGBColor() ===
 
Returns the actual RBG color that results from the specified index. If the color index is in RGB mode, the nearest RGB color is returned.
 
 
 
 
 
=== RealizeColorTable() ===
 
Realizes the color table.
 
 
 
 
 
=== return_rf_fill_pen ===
 
Returns the pen number for the RF instruction.
 
 
 
 
 
=== rgb_to_hls() ===
 
Converts an RGB color value to HLS format.
 
'''Note:'''Application colors should never be set with color sorting ON.
 
 
 
 
 
=== select_fill_pen() ===
 
Selects the fill pen.
 
 
 
 
 
=== select_fill_type() ===
 
Selects the HPGL fill type that most closely matches the OS/2 pattern. Sets the direction of fill lines if this is supported on the particular plotter. Deciding whether or not to fill depends on the shape of the area being filled and the orientation of the paper. The fill type is a function of the direction to fill, the spacing between lines (currently 0 to default to pen thickness), and the type of line to draw (bi-directional). Bi-directional lines are not as precise as uni-directional, but uni-directional lines are much faster because the pen does not have to be lifted.
 
 
 
 
 
=== select_HPGL2pen() ===
 
Selects the pen using the HPGL2 pens in the Dynamic Pen Palette (not the Carousel pens). This function is called when (pSetup-&gt;usFlags &amp; FL_ USEAPPCOLORS) is set. This function generates the HPGL command to select a specified pen from the palette.
 
 
 
 
 
=== select_line_pen() ===
 
Selects the line pen and returns the stall number of the pen that most closely matches the Color parameter.
 
 
 
 
 
=== select_text_pen() ===
 
Selects the text pen.
 
 
 
 
 
=== select_user_defined_pen() ===
 
Generates the HPGL command to select a specified pen.
 
 
 
 
 
=== set_HPGL2_color_palette ===
 
Called during [[01007.htm|send_header]]processing for HPGL2 devices only. Sets number of pens with the NPn; command, where ''n''is the number of pens in the palette. If ''n''is not a power of 2, the plotter uses the next larger power of 2.
 
 
 
 
 
=== set_mix_mode ===
 
Sets the Merge Control (ROP) in the device.
 
 
 
 
 
=== set_pen() ===
 
Sets the RGB of pen.
 
 
 
 
 
=== set_pen_width() ===
 
Generates the HPGL1 or HPGL2 command to set the pen width for HPGL2 or pen thickness for HPGL1.
 
 
 
 
 
=== set_transparency_mode() ===
 
Checks and sets the transparency mode (TR). TR defines how the white areas of graphics images are plotted. IN (initialize) and DF (default condition) instructions return TR to its default. White is defined as the white reference specified by the CR (color range) instructions.
 
 
 
 
 
=== setup_raster_fill_index ===
 
Determines if the device supports user-defined patterns for area fills. If the device supports these patterns, this function gets the pattern bitmap handle from the graphics engine and calls the appropriate function to download the pattern bitmap to the device for area filling.
 
 
 
 
 
=== start_color_sorting() ===
 
Sets up PLOTTERS to begin color sorting. Ensures the correct mode is not the first pass from spooler queue processor and that the user has selected color_sorting from the dialog box. This function is called to enable journaling for color sorting. It is called at enable time, and at each new page.
 
 
 
 
 
=== stop_color_sorting() ===
 
Stops color sorting. This function is called at the end of a page and the end of a frame. Its basic operation is to replay the journal file and perform only those operations requiring the current pen. Thus, all drawing operations are completed for each pen in one operation, thereby reducing the number of (slow) pen change operations. This function processes the color sorting information and is called at the end of a page. This function will stop journaling, then play the journal file for each pen used in the carousel. It will set the current pen based on lightness to darkness for a given carousel. If an ABORTDOC signal is received, the bEnableOutput flag will be cleared, further output will cease (output_bytes will stop sending) , and the rest of the journal file replay will be skipped.
 
 
 
 
 
=== UnrealizeColorTable() ===
 
Unrealizes the color table.
 
 
 
 
 
=== COMPRESS.C ===
 
This module contains bit-map compression routines.
 
 
 
 
 
=== compress_adaptive ===
 
Block-based adaptive.
 
Compression for RTL.
 
 
 
 
 
=== compress_any_supported_mode ===
 
Row-based compression.
 
Function will select the best compression supported by the device select the mode and output the data. This function will work for both RTL and PCL devices.
 
 
 
 
 
=== DEVMODE.C ===
 
This module contains the functions for the '''Job Properties'''and '''Printer Properties'''dialog boxes.
 
 
 
 
 
=== build_app_name ===
 
Builds the ''app''name from the printer driver and device names. For example, an app name of
 
<pre class="western"> PM_DD_Printer,PLOTTERS.LaserJet 4 HP-GL/2</pre>
is built from:
 
Printer name Printer
 
Driver name PLOTTERS
 
Device name Laserjet 4 HP-GL/2
 
 
 
 
 
=== check_menuitem ===
 
Checks or unchecks a menu item in a menu. If status is TRUE, the menu item is checked. If status is FALSE, the menu item is unchecked.
 
 
 
 
 
=== check_pen ===
 
Sets the check status in the PenColor and Type menu to bStatus. The check status is set only if a single pen is selected in the carousel configuration list box because this is the only time the items in these two pop-up menus will be checked.
 
 
 
 
 
=== check_pens ===
 
Check the currently selected pens to see if the menu items must be enabled or disabled.
 
 
 
 
 
=== CleanUpHelpStubHook ===
 
Exit list routine that ensures the removal of the stub HK_HELP hook before exiting.
 
 
 
 
 
=== clear_entries ===
 
Turns all items in the PenColor, Type, and Options menus to inactive (gray) . This is required either when a new carousel is selected or the user does not have a pen selected in the carousel configuration list box.
 
 
 
 
 
=== display_carousel ===
 
Displays the currently selected carousel information in the static fields.
 
 
 
 
 
=== display_colors ===
 
Determines the allowable colors and types that can be selected in the PenColor and Type pop-up menus. On entry, the menu status table for the PenColor menu is set to all TRUE (indicating any pen can be selected). The Type menu status table is initialized according to the pen types supported by the current plotter. Then, each pen that is selected in the carousel configuration list box is examined. If no pen is in the stall, no operation is performed. Otherwise, all PenColor menu items that the selected pen type does not support are made inactive (grayed). Likewise, all Type menu items that do not support the color of the given pen are made inactive (grayed). Finally the update menu function is called for the '''PenColor'''and '''Type'''pop-up menus.
 
 
 
 
 
=== display_paper_size ===
 
Displays the current paper size in the main dialog box. If the paper size is A thru E or A4 thru A0, the dialog elements for the determination of the roll length are hidden and the current paper size is shown through static text. If the paper size is either a 24-inch or 36-inch roll, the paper size static message is hidden and the dialog elements for the roll length are shown. If roll feed is selected, the input focus of the main dialog is set on the roll length input box. The current paper size is then checked in the pop-up menu.
 
 
 
 
 
=== display_pen ===
 
Displays a pen description for the given pen in the carousel text fields. The pen description consists of the pen color and the pen type.
 
 
 
 
 
=== display_pens ===
 
Resets the contents of the carousel configuration list box for the current carousel. Because the display_pen function inserts its pen description at the specified position, a &quot;dummy&quot; string must be created for the duration of the carousel configuration construction. Once completed, this string is deleted. If any pens were selected prior to this construction, the check marks must be removed from the '''PenColor'''and '''Type'''menus and the '''PenColor''', '''Type''', and '''Options'''pop-up menus must be made inactive (grayed).
 
 
 
 
 
=== EA_GetVersion ===
 
Retrieve the EA .VERSION from driver file.
 
 
 
 
 
=== get_group ===
 
Returns the group in which a pen is classified. (For example, P3 and P7 are paper pens; T3 and T6 are transparency pens.)
 
 
 
 
 
=== get_module_dir ===
 
Returns the size of the directory path.
 
 
 
 
 
=== get_string ===
 
Loads the string number message from the resources file and places it in the message buffer in the DEVMODE structure. Returns the address of the string buffer in DEVMODE.
 
 
 
 
 
=== GetMeasureItemInfo ===
 
Calculates the height and width of the text string for the WM_MEASUREITEM message.
 
 
 
 
 
=== help_dialog_proc ===
 
Dialog procedure for help.
 
 
 
 
 
=== HelpErrorFilter ===
 
Checks for a recoverable help manager initialization error. If a recoverable error is detected, a message box pops up. The message box describes the error and asks if the user wants to retry.
 
 
 
 
 
=== HelpStubHook ===
 
This hook is placed in the HK_HELP hook chain to catch the first time that the user presses PF1 or selects a '''Help'''push button. The driver then initializes the help instance and gets the user's help request passed back into the HK_HELP chain again by making a call to the private function WinCallHelpHook().
 
 
 
 
 
=== init_dialog ===
 
Initializes the main dialog box. This initialization is done upon entry and when the user changes the current plotter. This function performs the following duties:
 
*Sets the window caption to the current plotter and checks it in the Plotter menu. <br />*Checks the current and active carousels and displays the current carousel above the carousel configuration list box. <br />*Initializes the paper feed selections and options. <br />*Initializes the orientation selections. <br />*Displays the current paper size. <br />*Disables the '''PenColor''', '''Type''', and '''Options'''pop-up menus. <br />*Constructs the carousel configuration list box. <br />*Determines paper size support and updates the '''Size'''pop-up menu.
 
 
 
 
 
=== InitializeHelp ===
 
Initializes help. If an attempt to create a help instance has already been made, return immediately.
 
 
 
 
 
=== list_pen_options ===
 
Displays (in the '''Pen Options'''dialog box) the value for the given option for each pen selected from the carousel configuration list box. The following are the available pen options:
 
*Speed <br />*Force <br />*Acceleration
 
Speed and acceleration are true values. Force is an index in a table of values that is dependent upon the current plotter.
 
 
 
 
 
=== list_pen_priority ===
 
Displays (in the '''Pen Options'''dialog box) the priority for each pen selected from the carousel configuration list box. The following are the possible priorities:
 
*NONE <br />*LINE <br />*FILL <br />*TEXT
 
 
 
 
 
=== main_dialog_command ===
 
Handles the user interface of the main dialog box. This dialog box can only be enabled by the exported function DeviceMode. If something is processed, TRUE is returned. If nothing is processed, FALSE is returned.
 
 
 
 
 
=== main_dialog_proc ===
 
Main dialog box window procedure where all window functions are processed. WM_COMMAND type functions are passed to the local function main_dialog_ command.
 
 
 
 
 
=== options_dialog_proc ===
 
Handles the user interface of the pen options display and modification dialog box. The options that apply are:
 
*Speed <br />*Force <br />*Acceleration
 
 
 
 
 
=== OS2_DevPostDeviceModes ===
 
Called by applications that want to change the attributes of the driver, such as the device and pen configuration. OS2_DevPostDeviceModes gets the values based on the pszDeviceName passed from the OS2.INI file. The flags passed in determine the type of operation required by the caller, where bits 0-1 mean the following:
 
%00 Display dialog, no update to the INI file <br />%01 Display dialog, update INI file <br />%10 Do not display dialog, just return INI information <br />%11 reserved
 
 
 
 
 
=== pencolor_dialog_proc ===
 
Handles the user interface for selecting the pen color. Displays a list box of available pen colors and updates the main dialog with the color selection.
 
 
 
 
 
=== priority_dialog_proc ===
 
Handles the user interface for the display and modification of the pen priority. Each pen selected in the carousel configuration list box can be tagged with any of the following priorities:
 
*None <br />*Lines/Text <br />*Fill <br />For all fill output, a pen that has fill priority will be selected over another pen of the same color that does not have fill priority. Likewise, for all lines and text output, a pen that has lines and text priority will be selected over another pen of the same color that does not have lines and text priority.
 
 
 
 
 
=== ReleaseHelpStubHook ===
 
Removes the stub HK_HELP hook from the hook chain, if it has been successfully added via [[00830.htm|SetHelpStubHook()]].
 
 
 
 
 
=== reset_entries ===
 
Updates the '''PenColor'''and '''Type'''pop-up menus through a call to display colors , determines the options supported by the current plotter, and updates the '''Options'''pop-up menu.
 
 
 
 
 
=== save_profile ===
 
Saves the setup data in OS2SYS.INI. The setup data is placed in a private section of PLOTTERS and the record is identified by pszDeviceName. pszLogAddress (for example &quot;IBM6180.PLOTTER1&quot;).
 
 
 
 
 
=== SetHelpStubHook() ===
 
Adds the stub HK_HELP hook to the hook chain. This addition allows the driver to gain control the first time that the user presses PF1 or selects a '''Help'''push button.
 
 
 
 
 
=== switchbetween_rgb_carousel ===
 
Switches between RGB and carousel modes, depending on the user's choice in printer properties dialog box.
 
 
 
 
 
=== szStrCopy ===
 
Copies a string from the source to the destination. If the string is null terminated, the copy stops when the terminator is hit. Otherwise, the copy continues for the number of bytes passed in.
 
 
 
 
 
=== update_menu ===
 
Sets the status of a pop-up menu to the menu status table given by pMenuList. The three pop-up menus with menu status tables are:
 
*PenColor <br />*Type <br />*Options
 
 
 
 
 
=== DISPATCH.C ===
 
This file contains functions and macros that hook and unhook entries in the dispatch table.
 
 
 
 
 
=== exchange_dispatch() ===
 
Modifies the engine-supplied dispatch table.
 
 
 
 
 
=== Hook_UnHook ===
 
UnHooks all the functions that are not mandatory and hooks all the mandatory functions. Provides support for bit map handling and memory DC.
 
 
 
 
 
=== DOSIO.C ===
 
This module contains the high-level output functions that communicate with the output thread code to output data to a file or device. See [[00059.htm|Output- Thread Management]]for further details.
 
 
 
 
 
=== close_file_or_device ===
 
Closes the output device.
 
 
 
 
 
=== get_ieee_addr ===
 
Returns the IEEE address from the argument.
 
 
 
 
 
=== get_ini_comm_info ===
 
Extracts COM port modes from the OS2SYS.INI file.
 
 
 
 
 
=== get_new_outbuff ===
 
Gets an output buffer from the head of the free queue or allocates a new one if no buffers are available on the free queue.
 
 
 
 
 
=== initialize_comm_port ===
 
Sets the COM port to the conditions determined from the OS2.INI file.
 
 
 
 
 
=== initialize_outputinfo ===
 
Initializes ''outputinfo''semaphores.
 
 
 
 
 
=== open_file_or_device ===
 
Opens the file name or device passed in. This file name or device is where the output will go. It can be a COM port, an IEEE port, or a disk file.
 
 
 
 
 
=== open_spooler_queue ===
 
Sets up the connection to the spooler that the output has been sent to.
 
 
 
 
 
=== output_bytes ===
 
This function is a call that the driver uses to output data. This function calls Thread_Fill_Outbuff to put data on the output thread.
 
 
 
 
 
=== perform_std_spooling ===
 
At the end of the spooling activities this function writes the metafile data to the spooler.
 
 
 
 
 
=== putbuff_on_dataqueue ===
 
Puts the buffer on the end of the data queue (OutputInfo.obqData).
 
 
 
 
 
=== ENABLE.C ===
 
This module contains functions that are used when the device context is initialized or disabled.
 
 
 
 
 
=== disable_dc_begin ===
 
This ENABLE subfunction is called before a DC starts its disable process. This function initiates any final clean up prior to the full disable, such as closing journaling, performing color sorting, and closing the spooler.
 
 
 
 
 
=== disable_dc_complete ===
 
This ENABLE subfunction is called when a DC has completed the disable process. This function releases any memory that was allocated for the DC instance (pDDC).
 
 
 
 
 
=== disable_pdev ===
 
This ENABLE subfunction is called when a physical device block is to be deleted. This function releases any memory that was allocated in [[00857.htm|fill_pdev]]and closes the pathway to the device.
 
 
 
 
 
=== enable ===
 
This function is the entry point [[00340.htm|OS2_PM_DRV_ENABLE]]for the plotter driver. This ENABLE function is exported by the device driver and performs the initialization of the device driver, the physical driver, and device contexts.
 
 
 
 
 
=== enable_dc_begin ===
 
This ENABLE subfunction is called each time a DC is created. This is the first time the DC handle is presented and is the time to allocate the DC. The corresponding physical device pointer is the one that was returned in [[00857.htm|fill_pdev]].
 
 
 
 
 
=== enable_dc_complete ===
 
This call informs the driver that the DC has been created by the graphics engine. It is the first time the pDDC that was returned in EnableDC is presented. At this time, this function opens the spooler if it is handling a queued DC. Any metafiles or journaling is started in this function.
 
 
 
 
 
=== fill_ldev ===
 
This ENABLE subfunction is called when the driver is loaded and initializes the logical device block. This initialization includes setting some bits telling the engine that the driver needs a PDEV per DC and hooking the functions the driver will support.
 
 
 
 
 
=== fill_pdev ===
 
This ENABLE subfunction is called each time a DevOpenDC is requested by the application. This function creates and allocates a physical device block, which should contain any information needed to perform I/O to the specified device.
 
 
 
 
 
=== fill_pdev_save_dc_data ===
 
Allocates memory from the pdevice block and saves the spooler parameters ( if they exist) from the enable dc structure.
 
 
 
 
 
=== initialize_pdevice ===
 
Initialize the device instance (PDevice) fields.
 
 
 
 
 
=== querydevicesurface ===
 
This routine is used by the graphics engine to query the device surface information. This function fills the DEVICESURFACE structure to be used by both the graphics engine and the device driver.
 
 
 
 
 
=== reset_dc_state ===
 
This ENABLE subfunction is called to reset a DC to its original initialized state.
 
 
 
 
 
=== restore_dc_state ===
 
This ENABLE subfunction is called when the engine wants the device driver to POP a saved DC or to POP to a specified DC.
 
 
 
 
 
=== save_dc_state ===
 
This ENABLE subfunction is called when the engine wants a device driver to save all DC information. This function can be called multiple times, and the driver should push the DDC in LIFO order.
 
 
 
 
 
=== setup_colors ===
 
This function is called from [[00857.htm|fill_pdev]]and sets up the color information for the selected plotter.
 
 
 
 
 
=== ESCQUERY.C ===
 
This module contains the functions for the exported entry points DevEscape, [[00870.htm|QueryDeviceCaps]], [[00871.htm|QueryDeviceNames()]], and [[00874.htm|QueryHardcopyCaps()]].
 
 
 
 
 
=== Escape() ===
 
Provides device-specific interface to the driver.
 
 
 
 
 
=== GetPageData ===
 
Gets information on the physical page size.
 
Extracts information about the physical page size. ''pPDevice''points to the relevant entry in the PaperResTable and PrintOffTable for this particular plotter. The form is the number for the particular paper size. These range from 0 to 4 for sizes A to E (imperial), 5 to 9 for A4 to A0 (metric), 10 for a 24-inch roll, and 11 for a 36-inch roll.
 
 
 
 
 
=== number_of_hardcoded_forms ===
 
Returns the number of forms available on this particular device.
 
 
 
 
 
=== QueryDeviceBitmaps() ===
 
Returns a list of bit map formats supported by the device. The plotter driver supports no bit maps, so this function sets the return data to zero out the return data area, as required.
 
 
 
 
 
=== QueryDeviceCaps ===
 
Returns information about the device capabilities.
 
Information is returned to the caller in pData. Count items are returned, starting with the value Index. Values that are transform-sensitive are returned in DEVICE UNITS, such as the character size.
 
 
 
 
 
=== QueryDeviceNames() ===
 
Returns information about the device names available from this driver, and about the datatypes handled. QueryDeviceNames() is a direct entry point into the driver. It bypasses the dispatch table mechanism because many applications will call this function without calling the enable functions to initialize the driver.
 
 
 
 
 
=== QueryDeviceResource ===
 
Called by the user at the time of setup to load all pointers and bit maps and called by the engine to load the default fonts, if any. This is a required function. The plotter driver returns zero, for &quot;resource not available&quot;.
 
 
 
 
 
=== querydevresource2 ===
 
This function is called by the user on setup to load all pointers and bitmaps, and by the engine to load the default fonts (if there are any). This is a required function.
 
 
 
 
 
=== QueryHardcopyCaps() ===
 
Returns information about the hardcopy capabilities of the device. Function either returns the number of forms available, or returns information about (selected) forms available.
 
 
 
 
 
=== FONT.C ===
 
This module contains the code and data for font support.
 
 
 
 
 
=== cpxfm_metrics ===
 
Copies fontmetrics from source to destination, up to count bytes. Any required transformations are applied.
 
'''Warning:'''This function overwrites the data at pMetricsSrc. If this data is valuable, it should be copied before this function is called.
 
 
 
 
 
=== DeviceQueryFontAttributes() ===
 
Returns the font metrics for the currently selected font. If this is an engine font, the driver calls back. Otherwise, the driver copies to a local buffer, and then transforms the values from font notational to world space.
 
 
 
 
 
=== DeviceQueryFonts ===
 
Returns information about the plotter's built-in fonts.
 
 
 
 
 
=== FindVectorLength ===
 
Finds the length of a given vector.
 
 
 
 
 
=== GetExtraIncrements ===
 
Calculates the amount of the space to increment between each character in a string. The application must use GpiSetCharExtra or GpiSetCharBreakExtra to enable the extra spacing.
 
 
 
 
 
=== GetHorizTextAlignShift ===
 
Finds the text alignment shift in the horizontal direction, based on the usTextAlignment.
 
 
 
 
 
=== GetStandardAlignment ===
 
Finds the standard text alignment, based on the direction of the text.
 
 
 
 
 
=== GetVertTextAlignShift ===
 
Finds the text alignment shift in the vertical direction, based on the usTextAlignment.
 
 
 
 
 
=== QueryCharPositions() ===
 
Determines the origin of each character in the given string and adjusts for the character direction.
 
 
 
 
 
=== QueryTextBox ===
 
Queries text box for the given char string and returns the coordinate of the text box.
 
 
 
 
 
=== QueryWidthTable ===
 
Returns information about the width of the characters in the currently selected font. If the current font is the hardware font of the plotter, information is returned from QueryWidthTable. Otherwise, the call is passed onto the engine because the engine knows more about fonts than QueryWidthTable.
 
 
 
 
 
=== RealizeFont() ===
 
Performs the following four functions:
 
1.Realizes a device font. <br />2.Realizes an engine font as a device font. <br />3.Deletes a device font. <br />4.Deletes an engine font realized as a device font.
 
 
 
 
 
=== FORMS.C ===
 
This module contains functions that handle user-defined forms.
 
 
 
 
 
=== add_user_form ===
 
Queries the dialog. If the information is valid, it inserts that information into the linked list.
 
 
 
 
 
=== add_user_forms_to_list ===
 
Determines how many user-defined forms exist for an application name, and then inserts each user-defined form name into the given list box. This function also allocates a user-defined form element and associates it to the newly created list box item.
 
 
 
 
 
=== convert_list ===
 
Walks through the linked list and converts the integer measurements into a string form for the user to eventually see.
 
 
 
 
 
=== delete_user_form ===
 
Queries the dialog for the current form, and then searches the linked list for that form. If it finds the form, it will delete it from the linked list .
 
 
 
 
 
=== delete_user_forms_from_list ===
 
Deletes any item that has a handle from the given list box. (Only user- defined forms should have this property.) Any user-defined form will be deleted from the list box and its associated memory will be freed.
 
 
 
 
 
=== display_error ===
 
Displays a message box that contains the string ErrorName with the ID ErrorMessage.
 
 
 
 
 
=== display_form_id ===
 
Given a linked list element, this function updates the window's name with that element's ID.
 
 
 
 
 
=== display_user_form_paper_size ===
 
Given an element in a linked list, this function updates the dialog with the correct information.
 
 
 
 
 
=== find_user_form_size ===
 
Searches the INI file for that user-defined form ID and updates the printable X and Y mm sizes.
 
 
 
 
 
=== HeightNumericSubProc ===
 
Subclassing procedure for an entry field. Its purpose is to allow only numeric input.
 
 
 
 
 
=== id_conflicts ===
 
Walks through the linked list and searches for an element that has the same ID (it will not check against itself). If there is a conflict, it will return that element's form name.
 
 
 
 
 
=== IDNumericSubProc ===
 
Subclassing procedure for an entry field. Its purpose is to allow only numeric input.
 
 
 
 
 
=== initialize_user_forms ===
 
Reads the user-defined forms into a linked list and returns the current unit of measurement and the number of forms that have been defined.
 
 
 
 
 
=== llAddElement ===
 
Adds an element that contains the given information into a linked list. To do this, the function creates an element, copies the information to it, and adds it to the linked list.
 
 
 
 
 
=== llCreateElement ===
 
Allocates a linked list element off the heap in the instance data and initialize that element.
 
 
 
 
 
=== llDeleteElement ===
 
Given a linked list and a pointer to one of its elements, this function deletes that element from the linked list. This function also cleans up any resources used by that element.
 
 
 
 
 
=== llFindElement ===
 
Searches through the linked list for an element whose form name matches the form name that was given. If successful, it returns a pointer to that element.
 
 
 
 
 
=== llFreeAllElements ===
 
Given a linked list, this function deletes every element in that linked list.
 
 
 
 
 
=== measurement_to_string ===
 
Converts an integer (in hundredths of a millimeter) into a string of a real numbers.
 
 
 
 
 
=== modify_user_form ===
 
This function performs the following:
 
1.Queries the dialog for the information that the user has entered <br />2.Validates the information <br />3.Searches the linked list for the form <br />4.Changes the data that was stored in the linked list element to the data that the user has entered.
 
 
 
 
 
=== name_conflicts ===
 
Walks through the linked list and searches for an element that has the same form name (it will not check against itself). If there is a conflict, it will return that element's form name.
 
 
 
 
 
=== number_user_forms_defined ===
 
Searches the OS2SYS.INI for the AppName entry and returns the number of forms that have been defined.
 
 
 
 
 
=== return_flat_user_forms_list ===
 
Searches the OS2SYS.INI for the application name and the user-defined forms entry. If there are no user-defined forms, it will return NULL. Otherwise, it will return the contents of the INI file entry.
 
 
 
 
 
=== save_user_form ===
 
Given a linked list, this function writes out the user-defined forms into the OS2SYS.INI file. If the number of forms is 0, it will delete the user- defined form information from the OS2SYS.INI file.
 
 
 
 
 
=== string_to_measurement ===
 
Converts the string representation of a real number into an integer representation. This integer will be in hundredths of a millimeter.
 
 
 
 
 
=== user_defined_forms_dialog_proc ===
 
This is the dialog procedure for the user-defined forms.
 
 
 
 
 
=== user_form_exists_exists ===
 
Searches the user-defined forms in the INI file under the application name for the given form name.
 
 
 
 
 
=== WidthNumericSubProc ===
 
Subclassing procedure for an entry field. Its purpose is to allow only numeric input.
 
 
 
 
 
=== GLIB.ASM ===
 
This file contains trigonometric functions to calculate the sine, cosine, and arc tangent of an angle.
 
 
 
 
 
=== arc_tan ===
 
Returns the angle of the point in dx,ax in ax scaled by 10. The point is first scaled by Xaxis and Yaxis in order to handle an elliptical arc.
 
 
 
 
 
=== Arctan ===
 
Given an origin and a point this function returns the arc tangent of point to the nearest tenth of a degree.
 
 
 
 
 
=== Cosine ===
 
Given an Angle (0 - 3600) this function returns the cosine of the angle. The angle is assumed to be in tenths of a degree. The calculated cosine is scaled by 16384.
 
 
 
 
 
=== get_angle ===
 
Given a point in ax,dx, this function determines arc tangent or angle of the given point. The angle is returned in ax.
 
 
 
 
 
=== get_quadrant ===
 
Determines the quadrant of ax,dx and returns in cl.
 
 
 
 
 
=== icos ===
 
Given a degree in ''si'', this function returns cosine in ''ax''scaled by 16384. Degrees range from 0 - 3600. bx,cx,dx are destroyed.
 
 
 
 
 
=== isin ===
 
Given a degree in ''si'', this function returns sine in ''ax''scaled by 16384. Degrees range from 0 - 3600. bx,cx,dx are destroyed.
 
 
 
 
 
=== reduce_angle ===
 
Reduces the angle in ''si''to the range 0 - 90 * 10. It also determines the quadrant of the angle which is returned in cl.
 
 
 
 
 
=== Sine ===
 
Given an Angle (0 - 3600) this function returns the sine of the angle. The angle is assumed to be in tenths of a degree. The calculated sine is scaled by 16384.
 
 
 
 
 
=== INIT.ASM ===
 
This file contains ASM utility routines.
 
 
 
 
 
=== copymem ===
 
Copies memory is a manner similar to memcpy();.
 
 
 
 
 
=== Int3 ===
 
Debugging routine to issue a software interrupt 3.
 
 
 
 
 
=== PSZ ENGENTRY SetMem ===
 
Sets memory to a value.
 
 
 
 
 
=== setmem ===
 
The plotter version of memset();.
 
 
 
 
 
=== INITTERM.C ===
 
This module contains the DLL initialization and termination functions.
 
 
 
 
 
=== _DLL_InitTerm ===
 
Initializes the PMPLOT.DRV. Saves the HMODULE assigned from the operating system.
 
 
 
 
 
=== LOCKDDC.C ===
 
This file contains the lock and unlock code for the driver's instance data.
 
 
 
 
 
=== EnterDriver ===
 
Entry to a hooked Gre function. Protects the pDDC while it is in the driver .
 
 
 
 
 
=== initfsrsem ===
 
Initializes the semaphore structure.
 
 
 
 
 
=== LeaveDriver ===
 
Works with EnterDriver to ensure that threads with different IDs are not accessing the same pDDC. Exits from a hooked Gre function.
 
 
 
 
 
=== MARKER.C ===
 
This module contains functions used to draw the supported marker types. Only PolyMarker is exported to the world.
 
 
 
 
 
=== draw_polymarker_circle ===
 
Draws a small filled circle marker.
 
 
 
 
 
=== draw_polymarker_cross ===
 
Draws a crosshaired PolyMarker.
 
 
 
 
 
=== draw_polymarker_diamond ===
 
Draws a diamond PolyMarker.
 
 
 
 
 
=== draw_polymarker_dot ===
 
Draws a small filled circle marker.
 
 
 
 
 
=== draw_polymarker_eightpointstar ===
 
Draws an eight-pointed PolyMarker.
 
 
 
 
 
=== draw_polymarker_plus ===
 
Draws a plus-sign PolyMarker.
 
 
 
 
 
=== draw_polymarker_sixpointstar ===
 
Draws a six-pointed PolyMarker.
 
 
 
 
 
=== draw_polymarker_solidsquare ===
 
Draws a filled square marker.
 
 
 
 
 
=== draw_polymarker_soliddiamond ===
 
Draws a filled diamond marker.
 
 
 
 
 
=== draw_polymarker_square ===
 
Draws a square PolyMarker.
 
 
 
 
 
=== PolyMarker (Exported) ===
 
Draws a series of Markers at the specified locations.
 
 
 
 
 
=== NEW.ASM ===
 
This module contains functions that perform mathematical operations.
 
 
 
 
 
=== addfxquad ===
 
Adds two quad numbers.
 
 
 
 
 
=== fx_fxmulfx ===
 
Prepares the stack for [[00953.htm|fxmultiply]]and calls [[00953.htm|fxmultiply]]to multiply two FIXED numbers.
 
 
 
 
 
=== fxmultiply ===
 
Multiplies two 32-bit fixed point numbers and returns a FIXED. FIXED is a signed 32-bit number with 16-bits of integer and 16-bits of fraction.
 
 
 
 
 
=== fxtofxquad ===
 
Converts a fixed long value to a fixed quad value.
 
 
 
 
 
=== l_ldivfx ===
 
Computes the SIGNED LONG quotient of a SIGNED LONG and a SIGNED FIXED.
 
 
 
 
 
=== quad_square_root ===
 
Approximates the square root of an unsigned BIGFIXED.
 
 
 
 
 
=== sroot ===
 
Returns the square root of the given positive 32-bit value.
 
 
 
 
 
=== OUTPARC.C ===
 
This file contains all the drawing routines used to create arc primitives for the plotter.
 
 
 
 
 
=== Arc (Exported) ===
 
Creates an arc using the current arc parameters and a pointer to two x,y coordinate pairs. The arc is drawn from the current position (a) through the first coordinate pair (b) to the second coordinate pair (c). Upon completion, the current position is updated to the end of the arc (c).
 
 
 
 
 
=== construct_chord_tolerance ===
 
Outputs the chord tolerance for the Circle and Arc commands to the plotter, based on the radius received.
 
 
 
 
 
=== ConvertArcParams ===
 
Converts the lQ and lP arc parameter values using the fixed multiplier and the current transform.
 
 
 
 
 
=== draw_fullarc ===
 
Draws a fullarc (circle or ellipse), given its center point and a radius. If Fill is TRUE, the fullarc is filled. Otherwise, it is outlined. Upon completion, the current physical pen position is at the center of the circle.
 
'''Note:'''This function should only be called for circles and not for ellipses .
 
 
 
 
 
=== FullArcBoth ===
 
Creates a FILLED and OUTLINED full arc with its center at the current position. A multiplier can be specified to apply to the current arc parameters. Upon completion, the current x,y position is not changed.
 
 
 
 
 
=== FullArcBoundary ===
 
Creates an outlined full arc with its center at the current position. A multiplier can be specified to apply to the current arc parameters. Upon completion, the current x,y position is not changed.
 
 
 
 
 
=== FullArcInterior ===
 
Creates a FILLED full arc with its center at the current x,y position. A multiplier might be specified to apply to the current arc parameters. Upon completion, the current x,y position is not changed.
 
 
 
 
 
=== get_angle ===
 
Returns the angle of a line in tenths of a degree.
 
 
 
 
 
=== get_arc_center ===
 
Sets the center point of a circle defined by three points on the circumference of that circle.
 
 
 
 
 
=== get_distance ===
 
Returns the distance, in specified coordinates, between the two given points.
 
 
 
 
 
=== get_line_intersection ===
 
Returns the intersection point of two lines defined by pPtsAB[0], pPtsAB[1] , pPtsCD[0], and pPtsCD[1]. This function returns TRUE if successful. Otherwise, it returns FALSE for &quot;lines are parallel&quot;.
 
 
 
 
 
=== get_perpendicular_bisect ===
 
Returns ''line CD'', which runs perpendicular to and bisects ''line AB''.
 
 
 
 
 
=== is_elipse ===
 
Determines if an ellipse will be drawn instead of a circle.
 
'''Note:'''This code is copied from draw_fullarc. Any changes to draw_fullarc might have to be duplicated here.
 
 
 
 
 
=== PartialArc ===
 
Draws two figures:
 
*A straight line from current position to the starting point of the partial arc <br />*The arc, with its center at the specified point
 
A sweep angle of greater than 360 degrees is valid. After the line is drawn , a full arc is drawn, followed by a partial arc with a sweep angle of ( sweep MOD 360) degrees. The current position is updated to the final point of the arc.
 
 
 
 
 
=== PolySpline ===
 
Draws a sequence of one or more Bezier splines starting at the current position. As each spline is drawn, the specified end point of the spline becomes the start point for the next spline. Upon completion, the current position is the end point of the last spline.
 
 
 
 
 
=== set_arc_scale ===
 
Sets up the scaling for the arc parameters.
 
 
 
 
 
=== SetArcParameters ===
 
Sets the arc parameters for subsequent arc, fullarc, partialarc functions.
 
 
 
 
 
=== OUTPLINE.C ===
 
This file contains all the primitive line drawing functions used by the Plotter.
 
 
 
 
 
=== DisJointLines ===
 
Draws a sequence of disjoint straight lines. This is an optional function.
 
 
 
 
 
=== DrawLinesInPath ===
 
Loops through the given path and draws all lines it finds in that path. This is a required function.
 
 
 
 
 
=== GetCurrentPosition ===
 
Returns the logical pen position to the (X,Y) pointed to by pPts. The physical pen position (the actual location of the pen) might be different.
 
 
 
 
 
=== GetLineOrigin ===
 
Returns the logical pen position to the (X,Y) pointed to by pPts. The physical pen position (the actual location of the pen) might be different.
 
 
 
 
 
=== PolyLine ===
 
Draws a series of connected lines, starting at the current position. The input is in world coordinates and the final position is at the last point.
 
 
 
 
 
=== PolyScanline() ===
 
Fills an area lying between polyshortline pairs by using the current pattern attribute. Notice that coordinates are passed as unclipped screen coordinates. Filling is inclusive at the left boundaries and exclusive at the right boundaries. The scan lines are ordered from bottom-to-top and from left-to-right.
 
 
 
 
 
=== PolyShortLine ===
 
Processes polyshortlines. A pointer to the shortline header is passed. Within the header, start points and stop points are specified. Following the header is an array of Xs (currently 16 bits). The curve starts at x0,y0 and ends at x1,y1. The number of x values is then determined by the absolute value of y1-y1+1. If y1 is greater than y0, y0 is incremented until it equals y1. If y1 is less than y0, y0 is decremented until it equals y1. The current position is not affected by this call.
 
 
 
 
 
=== SetCurrentPosition ===
 
Sets the current position to the supplied position. This value is recorded in both world and device coordinates, so that, if required, the values can be transformed into device coordinates.
 
 
 
 
 
=== SetLineOrigin ===
 
Sets the current position to the supplied position. This value is recorded in both world and device coordinates, so that, if required, the values can be transformed into device coordinates.
 
 
 
 
 
=== OUTPUT.C ===
 
This module contains utility routines for producing output on a vector plotter that supports HPGL.
 
 
 
 
 
=== check_fill_type ===
 
Checks the currently set fill type.
 
 
 
 
 
=== check_line_construction ===
 
Determines if the PS/DC pair has a line currently in construction.
 
 
 
 
 
=== check_string_construction ===
 
Determines if a string label is currently in construction. If so, terminate the string label.
 
 
 
 
 
=== construct_fixed ===
 
Given a fixed point number, this function outputs it as a floating number with up to 4 digits following the decimal point. Trailing zeroes after the decimal point are truncated. A simple 0 is output if the converted number is zero.
 
 
 
 
 
=== construct_float ===
 
Generates a formatted floating point number for output to the plotter as part of command string. The number received by this function can have any number of decimal places. The multiplier parameter will determine the number of decimal places. For example, 2000 with a multiplier of 1000 = 2.0 and 2000 with a multiplier of 10000 = .20.
 
 
 
 
 
=== construct_point ===
 
Outputs an (x,y) coordinate pair to the plotter, applying any needed transformation.
 
 
 
 
 
=== convert_point ===
 
Converts a point to a different coordinate system.
 
 
 
 
 
=== draw_line ===
 
Draws a line.
 
 
 
 
 
=== draw_point ===
 
Draws a single point.
 
 
 
 
 
=== end_doc ===
 
When the end of the current document has been reached, this function sends the necessary sequence of commands to prepare for the next document.
 
 
 
 
 
=== end_job ===
 
When the current plot job has ended, this function closes the relevant path .
 
 
 
 
 
=== end_page ===
 
If the current page of output is full, this function sends the appropriate command sequence to obtain a new page, and initializes it for output.
 
 
 
 
 
=== get_closest_point ===
 
Given the three points A, B, and C, this function determines if B is closer to A than C.
 
 
 
 
 
=== lift_pen ===
 
Lifts the pen if it is not already lifted.
 
 
 
 
 
=== move_pen ===
 
Updates the current physical position of the plotter pen or, if an area fill is being performed, updates the DDC's physical pen position information.
 
 
 
 
 
=== next_band ===
 
Enables a new band or calls end page if on the last band. Only roll feed plotters are banded.
 
 
 
 
 
=== output_comma ===
 
Outputs a comma.
 
 
 
 
 
=== output_number ===
 
Outputs a number (integer implied) to the plotter as part of a command string.
 
 
 
 
 
=== output_point ===
 
Outputs a standard coordinate pair (x,y).
 
 
 
 
 
=== plot_line ===
 
Plots a line from the current physical position or queues the line for later output if an area fill is currently in effect.
 
 
 
 
 
=== send_header ===
 
Sends prerequisite commands to the plotter to initialize the device for the next or new page.
 
 
 
 
 
=== send_trailer ===
 
Sends a command string that terminates a single page of output to the plotter.
 
 
 
 
 
=== set_default_p1p2 ===
 
Initializes the default plotting extents.
 
 
 
 
 
=== set_default_scale ===
 
Sets the default scale for the current hardcopy device and media size.
 
 
 
 
 
=== set_empty_rect ===
 
Initializes a rectangle (RECTL) structure to enclose a null (unit) rectangle.
 
 
 
 
 
=== set_line_type ===
 
Sets up the active line type, such as dot-dash and dash.
 
 
 
 
 
=== set_p1p2 ===
 
Sets the current plotting extents.
 
 
 
 
 
=== set_scale ===
 
Sets the current values for plotter-applied scaling.
 
 
 
 
 
=== set_rotation ===
 
Rotates the plotter coordinate system 90, 180, and 270 degrees.
 
 
 
 
 
=== start_doc ===
 
Sets up the plotter for a new document. This function is called by start page, and is the second highest level initialization call. It initializes the beginning of a document (which is different from the beginning of a page because multiple pages might exist in a document).
 
 
 
 
 
=== start_job ===
 
Sends the necessary command sequence to start a plotter job.
 
 
 
 
 
=== start_page ===
 
Sends the necessary commands to setup the plotter for a new page of output.
 
 
 
 
 
=== PATHS.C ===
 
This module contains path-related functions.
 
 
 
 
 
=== BeginArea ===
 
Indicates the beginning of a set of drawing operations to define an area boundary.
 
 
 
 
 
=== clear_patsym_area ===
 
Called only for HPGL2 devices. This function depends on the code &quot;set_color _palette()&quot; in [[00751.htm|COLOR.C]]to set pen 0 to white. If the area is not complex, it fills the area with a rectangle command. If the area is complex, it draws a series of horizontal white lines into the current clip path.
 
 
 
 
 
=== draw_patsym_diag ===
 
Draws a series of diagonal lines into the current clip path.
 
 
 
 
 
=== draw_patsym_horiz ===
 
Draws a series of horizontal lines into the current clip path and sets up line endpoints, adding 1 to the right and subtracting 1 from the left to ensure that joining lines are clipped out.
 
 
 
 
 
=== draw_patsym_vert ===
 
Draws a series of vertical lines into the current clip path.
 
 
 
 
 
=== draw_pattern_lines ===
 
Draws a series of line patterns.
 
 
 
 
 
=== EndArea ===
 
Indicates the end of the drawing operations defining the area.
 
 
 
 
 
=== fill_clip_area ===
 
Fills the currently selected clip path or clip region.
 
 
 
 
 
=== fill_polygon ===
 
Fills the area by querying the outline of the path and filling the outline as a HPGL polygon. This function only fills the area if:
 
*Clipping is simple. (1 clip) <br />*Fill mode is alternate (FPATH_ALTERNATE) <br />*Engine version is 2.02 or later
 
Current plotters can only handle 1 clip rectangles.
 
'''Notes:'''
 
1.Because older plotters have small polygon buffers, this method might not always work.
 
2.On the 32-bit Engine (version 2.02 or greater), calling GreOutlinePath with the new option (NO_CLIPPING_REQD ) results in a call to the DrawLinesInPath function for each unclipped subpath. On the 16-bit Engine, calling GreOutlinePath results in many calls to the PolyShortLine function for each subpath. Because the end of the subpath is too difficult to predict on the 16-bit engine or older versions of the 32-bit engine, the polygon filling method is used only on engine versions 2.02 or later.
 
 
 
 
 
=== fill_the_clip_rectangles ===
 
Fills the area by filling the clip rectangles.
 
This code improves the speed of filling large simple areas.
 
Six clip rectangles was chosen for plotters because it included wide line boxes which produce four clip rectangles. More complex areas are not filled on plotters because filling an area with boxes does not optimize pen up (PU ) commands on normal plotters.
 
On HPGL2 devices, complex areas are filled entirely with this method.
 
 
 
 
 
=== FillPath ===
 
Fills the path specified by the user.
 
 
 
 
 
=== PaintRegion ===
 
Paints the specified region using the current area foreground and background colors. Mixing is controlled by the area foreground mix only.
 
The driver could handle the PaintRegion by calling GreGetRegionRects and filling the rectangles itself.
 
 
 
 
 
=== PolygonSet ===
 
Draws a set of closed polygons. The polygons are filled using the current AREABUNDLE structure values. For the first polygon, the current position is the first point. For all subsequent polygons, all points that define the polygon are given explicitly. If necessary, the polygons are automatically closed by drawing a line from the last vertex to the first.
 
'''Notes:'''
 
*Polygons can overlap, if necessary. <br />*This is a new function for 2.0. <br />*GrePolygonSet is not valid when the COM_AREA or COM_PATH flag is set.
 
This function is called as a result of GpiPolygonSet and is called internally by DevicePolygonSet.
 
 
 
 
 
=== StrokePath ===
 
Converts the path to a wide line.
 
'''Note:'''The select_pen function in [[00751.htm|COLOR.C]]will set the pen width to the geometric width if the instance varable pDDC-&gt;DCState.bWideLines is true. ''lineend''and ''linejoin''will be set in set_line_type if pDDC-&gt;DCState. bWideLines is set.
 
 
 
 
 
=== PLOTTERS.C ===
 
This module contains definitions of plotter characteristics for all supported plotters. The following structures are included in PLOTTERS.C:
 
*PlotterClass <br />*PlotterDef <br />*usPlotterCount <br />*PrintOffTable <br />*PhysicalPageSize
 
 
 
 
 
=== PRDMATH.ASM ===
 
This file contains ASM functions for data type FIXED point math.
 
 
 
 
 
=== frdiv ===
 
Computes the FIXED quotient of two FIXED numbers.
 
 
 
 
 
=== frmul ===
 
Computes the FIXED product of two FIXED values.
 
 
 
 
 
=== frsqrt ===
 
Computes the Fixed square root of a Fixed. This routine simply pulls the parameter off the stack, puts it in EAX, and calls the square_root function .
 
 
 
 
 
=== iq_div ===
 
Keeps track of the signs and calls idiv to perform the processing.
 
 
 
 
 
=== square_root ===
 
Computes the FIXED square root of a FIXED number.
 
 
 
 
 
=== ulNormalize ===
 
Normalizes a ULONG so that the highest order bit 1 and returns the number of shifts performed. Also returns ZF=1, if the ULONG was zero.
 
 
 
 
 
=== PROFILE.C ===
 
This module is the interface to plotter-specific data. These functions access the information stored in the global data structures defined in PLOTTERS.C and retrieve and store data in the OS/2 INI file.
 
 
 
 
 
=== copy_device_info ===
 
Returns the device characteristics for the requested plotter index.
 
 
 
 
 
=== copy_pen_option_info ===
 
Returns the pen option characteristics for the requested plotter index.
 
 
 
 
 
=== get_defaults ===
 
Fills the default set up data for the given plotter ID.
 
 
 
 
 
=== get_device_id ===
 
Matches the given name with the names of known devices, and then return the desired information.
 
 
 
 
 
=== get_printer_name ===
 
Scans the PM_SPOOLER_PRINTER section of the OS2.INI file, looking for a printer attached to either the queue or logical address pointed to by pszLogAddress, and then looks for the queue name if this is a queued DC.
 
The format of OS2.INI file is:
 
<pre class="western">  Device_name;PORT;Driver.Type;Queue;;</pre>
Where:
 
*device_name is the name in the Control Panel &quot;Printer Connections&quot; section <br />*PORT is the serial/parallel port to which the device is connected, such as COM1 <br />*Driver.Type is the name of the driver (PLOTTERS in our case) <br />*Type is the particular type of plotter, such as IBM6180 <br />*Queue is the name of the spooler queue associated with this device
 
 
 
 
 
=== get_profile ===
 
Looks for the entry pDeviceName.pPrinter in the private section of the OS2SYS.INI file. This function contains initialization data for the particular type of plotter being used. A typical name is &quot;IBM6180.PLOTTER1&quot; .
 
 
 
 
 
=== TEXTOUT.C ===
 
This module contains OS/2 plotter presentation driver text output functions and internal and external text-related output functions.
 
 
 
 
 
=== adjust_char_attrs ===
 
Adjusts the current character size and angles using the currently defined transforms.
 
 
 
 
 
=== calc_QTB ===
 
Computes the character cell size for clipping purposes.
 
 
 
 
 
=== CharString ===
 
Outputs a character string, starting at the current position.
 
 
 
 
 
=== CharStringPos ===
 
Outputs a character string at the specified point.
 
 
 
 
 
=== clip_char ===
 
Handles complex clipping of a single character.
 
 
 
 
 
=== GetCodePage ===
 
Returns the current code page.
 
 
 
 
 
=== GetPairKerningTable ===
 
This function is required to hook, but it is not supported.
 
 
 
 
 
=== set_cell_angle ===
 
Sets the angle character attribute.
 
 
 
 
 
=== set_cell_shear ===
 
Sets the shear angle character attribute.
 
 
 
 
 
=== set_cell_size ===
 
Sets the cell size character attribute.
 
 
 
 
 
=== set_char_angle ===
 
Sets the ''angle''character attribute.
 
 
 
 
 
=== set_char_italic_bold ===
 
Sets the italic and bold character attributes.
 
 
 
 
 
=== SetCodePage ===
 
Sets the current code page.
 
 
 
 
 
=== string_clip ===
 
Determines the clip limits of the supplied string information.
 
 
 
 
 
=== UTILS.C ===
 
UTILS.C is a general utilities module.
 
 
 
 
 
=== clear_memory ===
 
Clears Size bytes of memory.
 
 
 
 
 
=== compare_memory ===
 
Compares memory at address pAddr1 with the memory at pAddr2, for Size bytes .
 
 
 
 
 
=== ConvertWithRotation ===
 
Converts an X length and a Y length, accounting for rotation.
 
 
 
 
 
=== copy_memory ===
 
C function to copy memory.
 
'''Note:'''The Assembler function ''cpymem''is preferred.
 
 
 
 
 
=== distance ===
 
Returns a value proportional to the ''plot distance''between 2 points. The plot distance is defined as the larger of (delta x, delta y). This concept works with plotters because the pen can move in both directions at the same time. Therefore the time to move to a new position is determined solely by the larger of the X or Y distance.
 
 
 
 
 
=== fill_opt_end ===
 
Flushes any remaining buffered lines and releases memory.
 
 
 
 
 
=== fill_opt_init ===
 
Initializes the fill-optimization code.
 
 
 
 
 
=== find_device_name ===
 
Given a logical address (queue name, port name, or file name), this function returns the string containing the spooler's printer name. The caller must free this string (it is allocated off of the heap).
 
 
 
 
 
=== find_printer_name ===
 
Given a logical address (spooler printer name, spooler device name, port name, or a UNC name), this function returns the string containing the spooler's printer name. The caller must free this string (it is allocated off of the heap).
 
 
 
 
 
=== flush_opt_buffer ===
 
Processes the contents of the area fill optimization buffer, drawing a minimal (not minimum) path through the accumulated line segments.
 
 
 
 
 
=== free_memory ===
 
Deallocates memory from the heap or frees the memory from system.
 
'''C/Set Conversion:''' Four extra bytes from memory have been allocated to store a flag and the size of memory required.
 
 
 
 
 
=== get_mod_handle ===
 
Returns the module handle (hModule).
 
 
 
 
 
=== int_to_str ===
 
Converts the given integer to its character representation and returns the length of the string representing the integer. The integer can be positive or negative. The resulting string is assumed to describe a string of a length sufficient to hold the character representation of the integer and a trailing NULL. The resulting string will be at least ''MinDigits''in length.
 
 
 
 
 
=== IsIta_COM_Port_Name ===
 
Checks the physical port name. Any port name that begins with &quot;COM&quot; and is appended with any integer greater than or equal to 1 will be valid.
 
 
 
 
 
=== IsIta_Device_Name ===
 
Checks that the physical device name is supported.
 
 
 
 
 
=== lstrcmp ===
 
Compares the two strings for equality. This function ignores the case.
 
 
 
 
 
=== lstrcpy ===
 
Copies from string pFrom to pTo.
 
 
 
 
 
=== lstrlen ===
 
Returns the length of the NULL-terminated string passed.
 
 
 
 
 
=== lstrncmp ===
 
Compares the two strings for equality for a given length. This function ignores the case.
 
 
 
 
 
=== lstrtoksrch ===
 
Searches for the Char token in the string pointed to by the input pointer, replaces this with a NULL, and updates the pointer past the NULL.
 
 
 
 
 
=== prompt_for_carousel ===
 
Prompts the user to insert the specified carousel.
 
 
 
 
 
=== prompt_for_page ===
 
Prompts the user to insert a sheet of paper.
 
 
 
 
 
=== queue_opt_buffer ===
 
Records a pair of points (line segment) in the area fill optimization buffer for processing when the buffer fills and is flushed.
 
 
 
 
 
=== return_driver_data ===
 
Given a logical address (queue name, port name, or file name), this function searches for a plotter device name. It will place the device name string in pszDeviceName. If multiple plotter devices are attached to the printer (spooler term), the function will return the first one because there is no way to determine the proper one to select.
 
 
 
 
 
=== round_divide ===
 
Divides two numbers and rounds up or down.
 
 
 
 
 
=== save_mod_handle ===
 
Called from the initialize routine when the driver is loaded. Its purpose is to save the handle to the module in a ring 2 data segment.
 
 
 
 
 
=== str_to_int ===
 
Converts an integer string to an integer value. The integer value is passed back through pInt. A pointer to the first position past the integer value in the string is returned as a result. Leading spaces are ignored and overflow is accounted for by this function.
 
 
 
 
 
=== to_upper ===
 
Converts a character from uppercase to lowercase. This function will return valid driver data. It will also allocate a copy of driver data and initialize it to its default state. It is the caller's responsibility to free this data. If driver data was passed in, the function will check to see how much of that data can be copied over its initialized driver data.
 
 
 
 
 
=== XFORMS.C ===
 
This module contains conversion and transformation functions.
 
 
 
 
 
=== f_ldivf ===
 
Divides a long by a FIXED, returning a FIXED.
 
'''Limitations'''This function was written specifically for generating the sine and cosine values in a triangle. As such, it might have restrictions not suitable for general use. The result is assumed to be less than or equal to 1.0000.
 
 
 
 
 
=== f_lsqrt ===
 
Returns the square root of the unsigned long argument. The value is returned as a FIXED number.
 
 
 
 
 
=== get_angle_xform ===
 
Generates a rotation matrix from character direction data.
 
 
 
 
 
=== newton_f_lsqrt ===
 
Evaluates a square root using Newton's approximation method, using a fixed number of guesses.
 
 
 
 
 
=== NotifyTransformChange ===
 
Handles changes to the transformation matrixes as reported from the engine and returns the result of an indirect call to the GreNotifyTransformChange.
 
This function is called when the world-&gt;device transform is changed. Processing is as follows:
 
1.Transform the current position. <br />2.Then, <br />*If it is outside the allowed 16-bit range, return an error. <br />*If the position is OK, call the engine's entry point.
 
The pXformData structure specifies the new transform matrix.
 
 
 
 
 
=== The 42XX Rasterizing Driver ===
 
The 42XX printer driver is a rasterizing driver for Lexmark's 42XX family of printers. It supports the following printer models:
 
*IBM 4201 Proprinter Model 1 (4201-001) <br />*IBM 4201 Proprinter Model 2 (4201-002) <br />*IBM 4201 Proprinter Model 3 (4201-003) <br />*IBM 4202 Proprinter XL Model 1 (4202-001) <br />*IBM 4201 Proprinter II XL Model 2 (4202-002) <br />*IBM 4201 Proprinter III XL Model 3 (4202-003) <br />*IBM 4201 Proprinter X24 Model 1 (4207-001) <br />*IBM 4201 Proprinter X24E Model 2 (4207-002) <br />*IBM 4201 Proprinter XL24 Model 1 (4208-001) <br />*IBM 4201 Proprinter XL24E Model 2 (4208-002) <br />*IBM 4224 - C2 (Color) <br />*IBM 4224 - O1, O2, E3 (Mono) <br />*IBM 2380 Personal Printer Series II (9-narrow) <br />*IBM 2381 Personal Printer Series II (24-wide) <br />*IBM 2390 Personal Printer Series II (24-narrow) <br />*IBM 2391 Personal Printer Series II (24-wide) <br />*IBM 4226 Model 302
 
 
 
 
 
=== Features of the 42XX Driver ===
 
The 42XX driver hooks a number of graphics engine (Gre) functions. Its main features include banding, color support for the IBM 4224 Color printer, and support for system fonts and some device fonts. Each of these features is described in the following sections.
 
 
 
 
 
=== Functions Exported and Hooked by the Driver ===
 
The following table shows the functions that are exported by the driver.
 
<pre class="western">/----------------------------------------------------------------------------------\
|FunctionName                      |ModuleName  |Description                      |
|----------------------------------+------------+----------------------------------|
|Exported Driver Entry Points      |            |                                  |
|----------------------------------+------------+----------------------------------|
|OS2_PM_DRV_DEVICENAMES()          |PRDQNAME.C  |Returns the number and names of  |
|                                  |            |devices and the datatypes that are|
|                                  |            |supported (PM_Q_STD and PM_Q_RAW).|
|----------------------------------+------------+----------------------------------|
|OS2_PM_DRV_DEVMODE()              |PRDMDEV.C  |Controls the window and dialog    |
|                                  |            |boxes that are used to allow the  |
|                                  |            |user to set parameters from the  |
|                                  |            |control panel.                    |
|----------------------------------+------------+----------------------------------|
|OS2_PM_DRV_ENABLE()              |PRDENABL.C  |Supports the full set of enable  |
|                                  |            |subfunctions,                    |
|                                  |            |FillLogicalDeviceBlock,          |
|                                  |            |FillPhysicalDeviceBlock,          |
|                                  |            |DisablePhysicalDeviceBlock,      |
|                                  |            |EnableDeviceContext,              |
|                                  |            |DisableDeviceContext, SaveDCState,|
|                                  |            |RestoreDCState, ResetDCState,    |
|                                  |            |CompleteOpenDC, and BeginCloseDC. |
|----------------------------------+------------+----------------------------------|
|DevEscape Functions              |            |                                  |
|----------------------------------+------------+----------------------------------|
|QueryEscSupport                  |PRDQESC.C  |Returns information concerning    |
|                                  |            |whether an escape code is        |
|                                  |            |supported.                        |
|----------------------------------+------------+----------------------------------|
|StartDoc                          |PRDQEDOC.C  |Prepares for a new document.      |
|----------------------------------+------------+----------------------------------|
|EndDoc                            |PRDQEDOC.C  |Ends a document in the current DC,|
|                                  |            |if one exists.                    |
|----------------------------------+------------+----------------------------------|
|NewFrame                          |PRDQESUB.C  |Calls ProcessPage to output the  |
|                                  |            |page to the printer or spooler.  |
|----------------------------------+------------+----------------------------------|
|AbortDoc                          |PRDQEDOC.C  |Ends a document in the current DC,|
|                                  |            |if one exists.                    |
|----------------------------------+------------+----------------------------------|
|FlushOutput                      |PRDQESUB.C  |Flushes the current band and      |
|                                  |            |restarts the band.                |
|----------------------------------+------------+----------------------------------|
|RawData                          |PRDQESUB.C  |Allows raw data to be sent to the |
|                                  |            |printer.                          |
|----------------------------------+------------+----------------------------------|
|STDJournal      (JournalData())  |PRDQESUB.C  |Writes data to the journal.      |
|----------------------------------+------------+----------------------------------|
|SetMode                          |PRDQESUB.C  |Sets the printer into a particular|
|                                  |            |mode.                            |
|----------------------------------+------------+----------------------------------|
|Line Functions                    |            |                                  |
|----------------------------------+------------+----------------------------------|
|Prdl_GetCurrentPosition()        |PRDLGETC.C  |Returns the current position in  |
|                                  |            |world coordinates.                |
|----------------------------------+------------+----------------------------------|
|Prdl_SetCurrentPosition()        |PRDLSETC.C  |Sets the current position.        |
|----------------------------------+------------+----------------------------------|
|Prdl_PolyLine()                  |PRDLPOLY.C  |Draws a sequence of one or more  |
|                                  |            |lines from the current position.  |
|                                  |            |On completion, the current        |
|                                  |            |position is the end-point of the  |
|                                  |            |last line.                        |
|----------------------------------+------------+----------------------------------|
|Prdl_DrawLinesInPath()            |PRDLDRAW.C  |Draws straight lines in a        |
|                                  |            |completed path definition.        |
|----------------------------------+------------+----------------------------------|
|Prdl_PolyShortLine()              |PRDLSHRT.C  |Draws a series of short lines. The|
|                                  |            |current position is not updated.  |
|----------------------------------+------------+----------------------------------|
|prdl_PolyScanLine                |PRDSPOLY.C  |Fills shapes defined by          |
|                                  |            |PolyShortLines.                  |
|----------------------------------+------------+----------------------------------|
|Prdl_GetLineOrigin()              |PRDLGETO.C  |Gets the line origin in world    |
|                                  |            |coordinates and returns current  |
|                                  |            |style state.                      |
|----------------------------------+------------+----------------------------------|
|Prdl_SetLineOrigin()              |PRDLSETO.C  |Sets the current position and the |
|                                  |            |current style.                    |
|----------------------------------+------------+----------------------------------|
|Text functions                    |            |                                  |
|----------------------------------+------------+----------------------------------|
|Prdt_CharString()                |PRDTCSTR.C  |Calls Prdt_CharStringPos() with no|
|                                  |            |start position.                  |
|----------------------------------+------------+----------------------------------|
|Prdt_CharStringPos()              |PRDTCSTR.C  |Performs error checking. Returns  |
|                                  |            |the call to the Graphics Engine  |
|                                  |            |for simulation if certain        |
|                                  |            |conditions apply.                |
|----------------------------------+------------+----------------------------------|
|prdt_QueryTextBox()              |PRDTQERY.C  |Returns the bounding box for a    |
|                                  |            |string of text.                  |
|----------------------------------+------------+----------------------------------|
|prdt_QueryCharPositions()        |PRDTQERY.C  |Returns the array of coordinates  |
|                                  |            |for each character in a string and|
|                                  |            |also the coordinates for the first|
|                                  |            |character after the string.      |
|----------------------------------+------------+----------------------------------|
|prdt_QueryWidthTable()            |PRDTQERY.C  |Determines the widths of the      |
|                                  |            |current font codepoints.          |
|----------------------------------+------------+----------------------------------|
|Marker Functions                  |            |                                  |
|----------------------------------+------------+----------------------------------|
|Prdb_PolyMarker()                |PRDBMARK.C  |Draws a series of markers at the  |
|                                  |            |positions specified.              |
|----------------------------------+------------+----------------------------------|
|Bit Map Functions                |            |                                  |
|----------------------------------+------------+----------------------------------|
|Prdn_DeviceCreateBitmap()        |NEWBMPS . C    | Creates  a  bit  map .                  |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdb _ DeviceDeleteBitmap ( )          | PRDBDELT . C    | Deletes  a  bit  map .                  |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdb _ DeviceSelectBitmap ( )          | PRDBSELE . C    | Selects  a  new  bit  map  into  the  DC . |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdb _ BitBlt ( )                        | PRDBBLT . C    | Passes  the  call  to  the  engine  if  a |
|                                      |              | simulation  is  required .  Otherwise  |
|                                      |              | calls  prdb _ doblt ( )  to  do  the  BLT .  |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdb _ GetPel ( )                        | PRDBGETP . C    | Returns  the  color  of  the  specified |
|                                      |              | pel .                                  |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdb _ SetPel ( )                        | PRDBSETP . C    | Sets  the  specified  pel  in  the      |
|                                      |              | currently  selected  bit  map .        |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdb _ ImageData ( )                    | PRDBIMAG . C    | Draws  a  row  of  image  data  into  the |
|                                      |              | currently  selected  bit  map .        |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdn _ GetSetBitmapBits ( )              | NEWBMPS . C    | Handles  both  GetBitmapBits  and      |
|                                      |              | SetBitmapBits  functions .            |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
|  Attribute  Functions                |              |                                      |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prda _ DeviceGetAttributes ( )          | PRDASETB . C    | Returns  the  attributes  for  the      |
|                                      |              | current  line ,  character ,  marker ,    |
|                                      |              | pattern ,  or  image .                  |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prda _ GetKerningPairTable ( )          | PRDAKERN . C    | Returns  the  kerning  pairs  for  the  |
|                                      |              | current  font  in  an  array ;  returns  |
|                                      |              | 0  in  case  of  device  fonts .          |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prda _ DeviceSetAttributes ( )          | PRDASETB . C    | Sets  attributes  for  given  line ,    |
|                                      |              | character ,  marker ,  pattern ,  or      |
|                                      |              | image .                                |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prda _ DeviceSetGlobalAttribute ( )    | PRDASETG . C    | Sets  attributes  for  given  line ,    |
|                                      |              | character ,  marker ,  pattern ,  or      |
|                                      |              | image .                                |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Device  Functions                    |              |                                      |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdi _ NotifyClipChange ( )              | PRDICLIPh3 . C | Called  when  there  is  a  change  in    |
|                                      |              | the  clip  region  intersecting  with  |
|                                      |              | the  visible  region .                  |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| prdi _ NotifyTransformChange          | PRDGCONV . C    | Called  whenever  the  PageViewport    |
|                                      |              | transformation  changes .              |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prda _ RealizeFont ( )                  | PRDARFNT . C    | Called  to  realize  or  delete  an      |
|                                      |              | engine  or  device  font .              |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdo _ ErasePS ( )                      | PRDODRAW . C    | Not  implemented .  This  function  is  |
|                                      |              | hooked  because  it  does  not  have  a  |
|                                      |              | default  engine  function .            |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdl _ GetStyleRatio ( )                | PRDLGRAT . C    | Returns  the  style  ratio .            |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdl _ SetStyleRatio ( )                | PRDLGRAT . C    | Sets  the  style  ratio .                |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prda _ DeviceQueryFontAttributes ( )    | PRDAQERY . C    | Returns  the  Font  metrics .          |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prda _ DeviceQueryFonts ( )              | PRDAQERY . C    | Returns  the  font  metrics  for  the    |
|                                      |              | specified  fonts .                    |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdg _ ResetBounds ( )                  | PRDGACCB . C    | Resets  the  current  overall  bounds . |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdg _ GetBoundsData ( )                | PRDGACCB . C    | Converts  the  current  overall        |
|                                      |              | bounds  into  Dword  data .              |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdg _ AccumulateBounds ( )              | PRDGACCB . C    | Converts  the  bounds  rectangle  with |
|                                      |              | coordinates  stored  as  Dwords  to  a  |
|                                      |              | bounds  rectangle  with  coordinates  |
|                                      |              | stored  as  words .                    |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prda _ GetCodePage ( )                  | PRDAPAGE . C    | Returns  the  current  code  page .      |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prda _ SetCodePage ( )                  | PRDAPAGE . C    | Sets  the  specified  code  page .      |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdl _ GetLineOrigin ( )                | PRDLGETO . C    | Returns  the  current  world          |
|                                      |              | coordinates  and  style  state .        |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdl _ SetLineOrigin ( )                | PRDLSETO . C    | Sets  the  current  style  state  and    |
|                                      |              | position  in  world  coordinates .      |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Color  Functions                      |              |                                      |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdc _ QueryColorData ( )                | PRDCQTAB . C    | Returns  the  format  of  the  current  |
|                                      |              | logical  color  table .                |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdc _ QueryLogColorTable ( )          | PRDCQTAB . C    | Returns  the  requested  logical      |
|                                      |              | color  table  entries .                |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdc _ CreateLogColorTable ( )          | PRDCCTAB . C    | Defines  entries  in  the  logical      |
|                                      |              | color  table .                          |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdc _ RealizeColorTable ( )            | PRDCCTAB . C    | Not  supported .                      |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdc _ UnRealizeColorTable ( )          | PRDCCTAB . C    | Not  supported .                      |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdc _ QueryRealColors ( )              | PRDCQERY . C    | Returns  the  real  colors  available  |
|                                      |              | to  the  printer .                      |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdc _ QueryNearestColor ( )            | PRDCQERY . C    | Returns  the  nearest  color          |
|                                      |              | available  on  the  printer  for  the    |
|                                      |              | requested  color .                    |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdc _ QueryColorIndex ( )              | PRDCQERY . C    | Returns  the  index  into  the  LCT  of  |
|                                      |              | the  nearest  color  available  on  the |
|                                      |              | printer .                              |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdc _ QueryRGBColor ( )                | PRDCQERY . C    | Returns  the  RGB  value  of  the  index |
|                                      |              | into  the  specified  LCT .              |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Query  Functions                      |              |                                      |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdq _ QueryDeviceBitmaps ( )          | PRDQQERY . C    | Returns  information  about  the  bit  |
|                                      |              | map  formats  supported  by  the        |
|                                      |              | printer .                              |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdq _ QueryDeviceCaps ( )              | PRDQQERY . C    | Returns  information  about  printer  |
|                                      |              | capabilities .                        |
| ---------- ---------- ---------- ---- + ---------- -- + ---------- ---------- ---------- ---- |
| Prdq _ QueryHardcopyCaps ( )            | PRDQHCC . C    | Returns  information  about  the  hard |
|                                      |              | copy  capabilities  of  the  printer .  |
\ ---------- ---------- ---------- ---- - ---------- -- - ---------- ---------- ---------- ---- / </pre>
 
 
 
 
=== Banding ===
 
The 42XX driver resorts to banding when sufficient memory is not available for the entire page bit map. The driver uses Gre journaling functions for banding.
 
The driver initially tries to acquire memory for one band, which is the size of the entire page. If this fails, the driver successively tries incrementing the number of bands for the page bit map until the request for memory succeeds. The minimum band size supported is 64KB. If a request for 64KB of memory fails, the driver returns an error to the application.
 
Banding is then implemented as follows for each page in the job:
 
*The driver creates a bit map for the first band and asks the graphics engine to start journaling.
 
*The presentation driver interface routines then draw into this band, clipping as necessary.
 
*When the page is completed (indicated by a NewFrame or BeginCloseDC call), the journaling is stopped and the printer control component outputs the band to the printer.
 
*When the first band has been output, it is discarded and a bit map for the second band is created. The journal is then played back to draw those parts of the picture that fall within the second band. This step is repeated until all the bands have been processed and the entire page has been printed.
 
 
 
 
 
=== Color ===
 
The physical color table is used for the band and other internal bit maps. All internal bit maps are held in 1bpp format for mono printers and in 4bpp format for the 4224 color printer. However, the top bit is ignored when raster data is sent to the printer, leading to support for 8 colors for the 2424 Color printer. The physical color tables used by the driver are as follows:
 
*'''Mono printers'''
 
0 Black <br />1 White
 
*'''4224 Color Printer'''
 
0 Black <br />1 Blue <br />2 Red <br />3 Magenta <br />4 Green <br />5 Cyan <br />6 Yellow <br />7 White
 
The driver uses the following types of color conversion methods to move a pel between a source and target bit map or to draw into a target bit map.
 
 
 
 
 
=== Bit-Map Conversion Functions ===
 
The driver supports conversion between any of the standard external formats (1bpp, 4bpp, 8bpp and 24bpp) to the internal bit map format, which is 1bpp for mono and 4bpp for the 4224 Color printer. The functions GetBitmapBits, SetBitmapBits, DeviceCreateBitmap and DeviceDeleteBitmap use a nearest color mapping method, which is based on the square of the distance between the points that two colors represent in RGB space. For 1bpp target bit maps , the driver uses a threshold value of 384 for (R+G+B). Any value above this threshold maps to white and any value below maps to black.
 
 
 
 
 
=== BitBlt ===
 
The Bitblt uses the nearest color mapping method except when:
 
*The blt is from a mono memory bit map to a mono band; and <br />*The memory bit map was created by a DeviceCreateBitmap call which asked for a color bit map, not a mono bit map.
 
In this case, the source bits are mapped as follows:
 
*Source 0 bits map to the background color of the target image bundle. <br />*Source 1 bits map to the foreground color of the target image bundle.
 
 
 
 
 
=== Drawing Functions ===
 
Drawing functions use the nearest color mapping method when drawing into a color bit map or band. When drawing into a mono bit map or band, they use the following method:
 
*If the source is white, draw the pel in white. <br />*If the source is black, draw the pel in black.
 
 
 
 
 
=== Grey Scaling ===
 
The driver uses a grey scaling technique when all of the following conditions are met:
 
*The current printer is a mono printer.
 
*An application is drawing (into the band or a memory bit map) using a Bitblt or PolyScanLine call with any ''raster operation''(ROP) in which the source bit map is not involved.
 
*The pattern set and symbol in the pattern bundle attributes are the default values (for example, solid fill pattern in the default pattern set) .
 
The drawing is then completed using a pattern copy ROP and one of 65 grey scale patterns. These are mono patterns with a width and height of 8; the number of bits set to ''on''ranges from 0 to all 64. The pattern is drawn with ''on''bits as black and ''off''bits as white. The pattern used is always 8x8, regardless of the current resolution.
 
The foreground color from the pattern bundle attributes is used to determine which one of these 65 grey scale patterns to use. A grey scale value is calculated from the R, G, and B components using weighting factors as follows:
 
<pre class="western">                          ((59 x G) + (27 x R) + (14 x B))
    Grey scale value =  ----------------------------------
                                        100</pre>
The resulting grey scale value will lie between 0 and 255. This range is then translated into an index value within the range of 0 to 64 and this index value is then used to extract a grey scale pattern from the grey scale pattern table that represents the grey scale value, as follows:
 
Value Pattern <br />0 64 bits set on (completely black) <br />1 to 3 63 bits set on <br />4 to 7 62 bits set on 248 to 251 1 bit set on <br />252 to 256 0 bits set on (completely white)
 
 
 
 
 
=== Text ===
 
The 42XX driver supports two types of fonts: engine (system) fonts and device (printer) fonts. Engine fonts are owned by the Presentation Manager while device fonts are owned by the printer. Both of these types may be image (bit mapped) or outline (vector) fonts.
 
 
 
 
 
=== Engine Fonts ===
 
The 42XX driver supports image and outline engine fonts. The fonts available to the driver depend on the fonts that have been installed from the Control Panel.
 
 
 
 
 
=== Device Fonts ===
 
Device fonts are classified into the following categories:
 
*'''Resident Fonts'''
 
Resident fonts are those that are defined in the printer ROM.
 
*'''Downloadable Codepage Fonts'''
 
A downloadable code page consists of a set of fonts, each having the same code page, that can be downloaded into printer RAM.
 
*'''Card or Cartridge Fonts'''
 
Some printers have slots for cards or cartridges that contain multiple fonts to be plugged into. In these cases, the corresponding screen font must be installed so that the display output matches printer output.
 
*'''Download Fonts'''
 
Download fonts are single fonts that can be downloaded into printer RAM.
 
The IBM 42XX driver supports resident and downloadable code-page fonts.
 
 
 
 
 
=== 42XX Job States ===
 
The 42XX driver has six states for a print job. These are affected by the following actions:
 
*Enable subfunctions CompleteOpenDC and BeginCloseDC. <br />*DevEscape subfunctions StartDoc, EndDoc, NewFrame, AbortDoc, and RawData. <br />*User selecting CANCEL from a message box when printing a job. <br />*Drawing operations.
 
The six job states are:
 
* WAIT_START Waiting for a StartDoc or BeginCloseDC; the application cannot do any drawing yet.
 
* IMPLICIT Initial state after a CompleteOpenDC.
 
* EXPLICIT During a 'proper' document (one that will not give an abort signal.
 
* PURGE PrtOpen or PrtWrite failed and CANCEL was selected by the user from message box displayed by the driver.
 
* RAW_IMPLICIT Implicit state, after RawData issued.
 
* RAW_EXPLICIT Explicit state, after RawData issued.
 
The initial state, after CompleteOpenDC, is IMPLICIT. The following table shows the possible states of a print job, based on incoming calls to 42XX subfunctions. The actions of the driver are defined after the table. Numbers that appear before the action codes is the initial state after the subfunction. A &quot;-&quot; signifies no state change.
 
<pre class="western">/--------------------------------------------------------------------------------------------\
|Incoming      |WAIT_START 1|IMPLICIT 2  |EXPLICIT 3  |PURGE 4    |RAW_IMPLICIT|RAW_EXPLICIT|
|Subfunction  |            |            |            |            |5          |6          |
|--------------+------------+------------+------------+------------+------------+------------|
|CompleteOpenDC|2 A        |2 A        |2 A        |2 A        |2 A        |2 A        |
|--------------+------------+------------+------------+------------+------------+------------|
|BeginCloseDC  |- B1        |- B2        |- B3        |- B1        |- B2        |- B3        |
|--------------+------------+------------+------------+------------+------------+------------|
|StartDoc      |3 C1        |3 C2        |- C3        |3 C1        |3 C2        |3 C3        |
|--------------+------------+------------+------------+------------+------------+------------|
|EndDoc        |- ERR      |1 D1        |1 D2        |1 OK        |1 D2        |1 D2        |
|--------------+------------+------------+------------+------------+------------+------------|
|NewFrame      |- ERR      |- E1        |- E2        |- OK        |2 ERR      |3 E2        |
|--------------+------------+------------+------------+------------+------------+------------|
|AbortDoc      |- F        |- F        |- F        |- F        |- F        |- F        |
|--------------+------------+------------+------------+------------+------------+------------|
|User Cancel  |-          |4 G        |4 G        |n/a        |4 G        |4 G        |
|--------------+------------+------------+------------+------------+------------+------------|
|RawData      |- ERR      |5 H1        |6 H1        |- OK        |- H2        |- H3        |
|--------------+------------+------------+------------+------------+------------+------------|
|Drawing      |- ERR      |- J        |- J        |- OK        |- J        |- J        |
|Operation    |            |            |            |            |            |            |
\--------------------------------------------------------------------------------------------/</pre>
The actions found in the table are defined below:
 
''ERR''
 
Return ERROR to the application.
 
''OK''
 
Return OK to the application.
 
''A''
 
1.Set up the default attributes and the default font. <br />2.Then, <br />*If a Queued DC, call SplQmOpen. <br />*If a Queued STD DC, call SplSTDOpen. <br />*If not a Queued STD DC, prepare for the new document in the following way: <br />a.Set up the form, band, and default clips. <br />b.Set the number of download fonts to 0.
 
''B1''
 
*If a Queued DC, call SplQmClose. <br />*If a Queued STD DC, call SplSTDCLose.
 
''B2''
 
*If not a Queued STD DC, print the (last) page. <br />*If a Queued DC, call SplQmClose. <br />*If a Queued STD DC, call SplSTDClose.
 
''B3''
 
1.Print the (last) page. <br />2.Then, <br />*If a Queued DC, call SplQmClose. <br />*If a Queued STD DC, call SplSTDClose.
 
''C1''
 
1.Set the DC data to default values. <br />2.Prepare for the new document as follows: <br />a.Set up the form, band and default clips. <br />b.Set the number of download fonts to 0. <br />3.Set up the document name. <br />4.Then, <br />*If a Queued DC, call SplQmStartDoc.
 
''C2''
 
*If not a Queued STD DC, print the last page. <br />1.Set the DC data to default values. <br />2.Prepare for the new document as follows: <br />a.Set up the form, band, and default clips. <br />b.Set the number of download fonts to 0. <br />3.Set up the document name. <br />*If a Queued DC, call SplQmStartDoc.
 
''C3''
 
*If Aborted Flag is set, complete the following actions: <br />1.Call PrtAbort if the function is available. <br />2.Send zeroes to printer to flush the raster command. <br />3.Perform action C1. <br />*Otherwise, return ERROR to the application.
 
''D1''
 
*If a Queued STD DC, return ERROR to the application. <br />*Otherwise, print the last page.
 
''D2''
 
Print the last page.
 
''E1''
 
*If a Queued STD DC then return ERROR to the application. <br />*Otherwise, complete the following actions: <br />1.Print the page. <br />2.Increment the page number. <br />3.Set up the form, bands, and default clips for the next page. <br />4.Set the number of download fonts used to 0.
 
''E2''
 
1.Print the page. <br />2.Increment the page number.
 
<br />3.Set up the form, bands, and default clips for the next page. <br />4.Set the number of download fonts used to 0.
 
''F''
 
1.Set the Aborted Flag. <br />2.Then, <br />*If a direct DC, return OK to the application <br />*Otherwise, complete the following actions: <br />a.Wait for standard thread. <br />b.Do tidy up abort processing. <br />c.Return OK to application.
 
''G''
 
1.Call PrtAbort if the function is available. <br />2.Close the printer. <br />3.Perform clean up abort processing.
 
''H1''
 
*If a Direct DC, open the printer. <br />*Otherwise, call SplQmStartDoc. <br />1.Send initializing escape sequences. <br />2.Send escape sequences to set the default font. <br />3.Send RawData to the spool file or printer.
 
''H2''
 
1.Send initializing escape sequences. <br />2.Send escape sequences to set the default font. <br />3.Send RawData to the spool file or printer.
 
''J''
 
Continue with drawing function.
 
 
 
 
 
=== 42xx Modules and Functions ===
 
This section provides a layout of the 42XX rasterizing driver source code included on the DDK CD-ROM. Refer to the &quot;Using Your DDK&quot;, also available on the DDK CD, for a roadmap of the file structure used by the 42XX source code.
 
The first part of this section lists all functions of 42XX in alphabetical order. The module in which each function is found is listed next to the function.
 
The second part of this section lists the modules that comprise 42XX and the functions that comprise each module. Each function is followed by a description.
 
 
 
 
 
=== Function List ===
 
 
 
<pre class="western">/-----------------------------------------------------------------\
|Function Name                    |Module Location              |
|----------------------------------+------------------------------|
|Big_fix_square_root()            |FONTXFRM.ASM                  |
|----------------------------------+------------------------------|
|Bresenham()                      |PRDLSUBR.C                    |
|----------------------------------+------------------------------|
|CheckBitmap()                    |PRDBGETB.C                    |
|----------------------------------+------------------------------|
|CrLf()                            |PRDZTRAC.C                    |
|----------------------------------+------------------------------|
|CompDeCompBull()                  |NEWBMPS.C                    |
|----------------------------------+------------------------------|
|Convert_ext1_to_int1()            |PRDBEXIN.C                    |
|----------------------------------+------------------------------|
|Convert_ext1_to_int4()            |PRDBEXIN.C                    |
|----------------------------------+------------------------------|
|Convert_ext24_to_int1()          |PRDBEXIN.C                    |
|----------------------------------+------------------------------|
|Convert_ext24_to_int4()          |PRDBEXIN.C                    |
|----------------------------------+------------------------------|
|Convert_ext4_to_int1()            |PRDBEXIN.C                    |
|----------------------------------+------------------------------|
|Convert_ext4_to_int4()            |PRDBEXIN.C                    |
|----------------------------------+------------------------------|
|Convert_ext8_to_int4()            |PRDBEXIN.C                    |
|----------------------------------+------------------------------|
|Convert_ext8_to_int1()            |PRDBEXIN.C                    |
|----------------------------------+------------------------------|
|Convert_int1_to_ext24()          |PRDBINEX.C                    |
|----------------------------------+------------------------------|
|Convert_int1_to_ext8()            |PRDBINEX.C                    |
|----------------------------------+------------------------------|
|Convert_int1_to_ext4()            |PRDBINEX.C                    |
|----------------------------------+------------------------------|
|Convert_int4_to_ext8()            |PRDBINEX.C                    |
|----------------------------------+------------------------------|
|Convert_int4_to_ext1()            |PRDBINEX.C                    |
|----------------------------------+------------------------------|
|Convert_int4_to_ext24()          |PRDBINEX.C                    |
|----------------------------------+------------------------------|
|DrvInstall()                      |PRDMCONV.C                    |
|----------------------------------+------------------------------|
|EDF_DeleteFontHdr()              |PRDFDFNT.C                    |
|----------------------------------+------------------------------|
|EDF_DLFCommand()                  |PRDFDFNT.C                    |
|----------------------------------+------------------------------|
|EDF_EndPage()                    |PRDFDFNT.C                    |
|----------------------------------+------------------------------|
|EDF_Init()                        |PRDFDFNT.C                    |
|----------------------------------+------------------------------|
|EDF_PurgeFont()                  |PRDFDFNT.C                    |
|----------------------------------+------------------------------|
|EDF_Terminate()                  |PRDFDFNT.C                    |
|----------------------------------+------------------------------|
|Far_get_sqr_determinant()        |FONTXFRM.ASM                  |
|----------------------------------+------------------------------|
|Far_get_vector_length()          |FONTXFRM.ASM                  |
|----------------------------------+------------------------------|
|Get_vector_length()              |FONTXFRM.ASM                  |
|----------------------------------+------------------------------|
|LockDevice()                      |PRDODRAW.C                    |
|----------------------------------+------------------------------|
|OS2_PM_DRV_DEVICENAMES()          |PRDQNAME.C                    |
|----------------------------------+------------------------------|
|OS2_PM_DRV_DEVMODE()              |PRDMDEV.C                    |
|----------------------------------+------------------------------|
|OS2_PM_DRV_ENABLE()              |PRDENABL.C                    |
|----------------------------------+------------------------------|
|OutputPair()                      |PRDZTRAC.C                    |
|----------------------------------+------------------------------|
|OutputPrompt()                    |PRDZTRAC.C                    |
|----------------------------------+------------------------------|
|OutputString()                    |PRDZTRAC.C                    |
|----------------------------------+------------------------------|
|OutputStringNoCRLF()              |PRDZTRAC.C                    |
|----------------------------------+------------------------------|
|OutputValue()                    |PRDZTRAC.C                    |
|----------------------------------+------------------------------|
|OutputValueLen()                  |PRDZTRAC.C                    |
|----------------------------------+------------------------------|
|Perform_rip()                    |FONTXFRM.ASM                  |
|----------------------------------+------------------------------|
|Prda_AdjustFaceName()            |PRDAQERY.C                    |
|----------------------------------+------------------------------|
|Prda_AdjustFaceName2()            |PRDAPAGE.C                    |
|----------------------------------+------------------------------|
|Prda_AdjustForCharBox()          |PRDAQERY.C                    |
|----------------------------------+------------------------------|
|Prda_AlterCodePage()              |PRDAPAGE.C                    |
|----------------------------------+------------------------------|
|Prda_ChangeMatchNumber()          |PRDARSUB.C                    |
|----------------------------------+------------------------------|
|Prda_CheckFontValid()            |PRDASETB.C                    |
|----------------------------------+------------------------------|
|Prda_CheckMetrics()              |PRDAPAGE.C                    |
|----------------------------------+------------------------------|
|Prda_CodePageType()              |PRDARSUB.C                    |
|----------------------------------+------------------------------|
|Prda_ConvertOld42XXMatch()        |PRD42SR2.C                    |
|----------------------------------+------------------------------|
|Prda_CopyMetrics()                |PRDAQERY.C                    |
|----------------------------------+------------------------------|
|Prda_DefaultFontSwitch()          |PRDARSUB.C                    |
|----------------------------------+------------------------------|
|Prda_DeviceGetAttributes()        |PRDASETB.C                    |
|----------------------------------+------------------------------|
|Prda_DeviceQueryFontAttributes()  |PRDAQERY.C                    |
|----------------------------------+------------------------------|
|Prda_DeviceQueryFonts()          |PRDAQERY.C                    |
|----------------------------------+------------------------------|
|Prda_DeviceSetAttributes()        |PRDASETB.C                    |
|----------------------------------+------------------------------|
|Prda_DeviceSetGlobalAttribute()  |PRDASETG.C                    |
|----------------------------------+------------------------------|
|Prda_FindDeviceCodePage()        |PRDAPAGE.C                    |
|----------------------------------+------------------------------|
|Prda_GetCodePage()                |PRDAPAGE.C                    |
|----------------------------------+------------------------------|
|Prda_GetCPIndexFromCodePage()    |PRDARSUB.C                    |
|----------------------------------+------------------------------|
|Prda_GetDfltCharBox()            |PRDASETB.C                    |
|----------------------------------+------------------------------|
|Prda_GetKerningPairTable()        |PRDAKERN.C                    |
|----------------------------------+------------------------------|
|Prda_GetNewMatchNumber()          |PRD42SR2.C                    |
|----------------------------------+------------------------------|
|Prda_InfoFromMatchNumber()        |PRDARSUB.C                    |
|----------------------------------+------------------------------|
|Prda_MatchBaseFont()              |PRDARSUB.C                    |
|----------------------------------+------------------------------|
|Prda_MatchEngineAttributes()      |PRDARSUB.C                    |
|----------------------------------+------------------------------|
|Prda_MatchExactCodePage()        |PRDAPAGE.C                    |
|----------------------------------+------------------------------|
|Prda_MatchFaceNames()            |PRDAQERY.C                    |
|----------------------------------+------------------------------|
|Prda_MatchFattrStructure()        |PRDARSUB.C                    |
|----------------------------------+------------------------------|
|Prda_MatchFont()                  |PRDARFNT.C                    |
|----------------------------------+------------------------------|
|Prda_MatchMetrics()              |PRDARSUB.C                    |
|----------------------------------+------------------------------|
|Prda_MultiCodePageSupported()    |PRDAPAGE.C                    |
|----------------------------------+------------------------------|
|Prda_ProcessAttributes()          |PRDAQERY.C                    |
|----------------------------------+------------------------------|
|Prda_RealizeDeviceFont()          |PRDARSUB.C                    |
|----------------------------------+------------------------------|
|Prda_RealizeFont()                |PRDARFNT.C                    |
|----------------------------------+------------------------------|
|Prda_ReturnMetrics()              |PRDAQERY.C                    |
|----------------------------------+------------------------------|
|Prda_SetCodePage()                |PRDAPAGE.C                    |
|----------------------------------+------------------------------|
|Prda_SetImagAttrs()              |PRDASETB.C                    |
|----------------------------------+------------------------------|
|Prda_SetLineAttrs()              |PRDASETB.C                    |
|----------------------------------+------------------------------|
|Prda_SetMarkAttrs()              |PRDASETB.C                    |
|----------------------------------+------------------------------|
|Prda_SetPtrnAttrs()              |PRDASETB.C                    |
|----------------------------------+------------------------------|
|Prda_SetTextAttrs()              |PRDASETB.C                    |
|----------------------------------+------------------------------|
|Prda_SetTextSimlFlag()            |PRDASETB.C                    |
|----------------------------------+------------------------------|
|Prdb_BitBlt()                    |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_CachePattern()              |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_ConvertExttoInt()            |PRDBEXIN.C                    |
|----------------------------------+------------------------------|
|Prdb_ConvertInttoExt()            |PRDBINEX.C                    |
|----------------------------------+------------------------------|
|Prdb_CopyInttoExt()              |PRDBINEX.C                    |
|----------------------------------+------------------------------|
|Prdb_CreateBitmap()              |PRDBCREA.C                    |
|----------------------------------+------------------------------|
|Prdb_DeleteBitmap()              |PRDBSUBR.C                    |
|----------------------------------+------------------------------|
|Prdb_DeviceCreateBitmap()        |PRDBCREA.C                    |
|----------------------------------+------------------------------|
|Prdb_DeviceDeleteBitmap()        |PRDBDELT.C                    |
|----------------------------------+------------------------------|
|Prdb_DeviceSelectBitmap()        |PRDBSELE.C                    |
|----------------------------------+------------------------------|
|Prdb_DoBitBlt()                  |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_DoQuickBlt()                |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_DoQuickRop()                |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_FreeBitmap()                |PRDBSUBR.C                    |
|----------------------------------+------------------------------|
|Prdb_GetBitOffset()              |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_GetByteOffset()              |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_GetDwordBitOffset()          |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_GetFastFlags()              |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_GetGreyScaleInfo()          |PRDBSUBR.C                    |
|----------------------------------+------------------------------|
|Prdb_GetIndices()                |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_GetMasks()                  |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_GetNextColor()              |PRDBGREY.C                    |
|----------------------------------+------------------------------|
|Prdb_GetOffsets()                |PRDBSUBR.C                    |
|----------------------------------+------------------------------|
|Prdb_GetPattern()                |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_GetPatternRow()              |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_GetPel()                    |PRDBGETP.C                    |
|----------------------------------+------------------------------|
|Prdb_GetSetBitmapBits()          |PRDBGETB.C                    |
|----------------------------------+------------------------------|
|Prdb_GetSourceRow()              |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_GreyScaleSourceBitmap()      |PRDBSUBR.C                    |
|----------------------------------+------------------------------|
|Prdb_HugeDecrement()              |PRDBSUBR.C                    |
|----------------------------------+------------------------------|
|Prdb_HugeGetByte()                |PRDBSUBR.C                    |
|----------------------------------+------------------------------|
|Prdb_HugeIncrement()              |PRDBSUBR.C                    |
|----------------------------------+------------------------------|
|Prdb_HugeSetByte()                |PRDBSUBR.C                    |
|----------------------------------+------------------------------|
|Prdb_ImageData()                  |PRDBIMAG.C                    |
|----------------------------------+------------------------------|
|Prdb_MixPel()                    |PRDBSETP.C                    |
|----------------------------------+------------------------------|
|Prdb_Pat11BitAligned()            |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_Pat41BitAligned()            |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_PerformRop()                |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_PolyMarker()                |PRDBMARK.C                    |
|----------------------------------+------------------------------|
|Prdb_QuickBltPossible()          |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_RopManyDwords()              |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_RopOneDword()                |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_RopTwoDwords()              |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_SetExternalColourTable()    |PRDBINEX.C                    |
|----------------------------------+------------------------------|
|Prdb_SetPel()                    |PRDBSETP.C                    |
|----------------------------------+------------------------------|
|Prdb_StartPosAndDir()            |PRDBBLT.C                    |
|----------------------------------+------------------------------|
|Prdb_TableExttoInt()              |PRDBEXIN.C                    |
|----------------------------------+------------------------------|
|Prdb_TransferExttoInt()          |PRDBEXIN.C                    |
|----------------------------------+------------------------------|
|Prdb_TransferInttoExt()          |PRDBINEX.C                    |
|----------------------------------+------------------------------|
|Prdc_ColorDifference()            |PRDCSUBR.C                    |
|----------------------------------+------------------------------|
|Prdc_ColorToPelBits()            |PRDCSUBR.C                    |
|----------------------------------+------------------------------|
|Prdc_ColorToRGBValue()            |PRDCSUBR.C                    |
|----------------------------------+------------------------------|
|Prdc_CreateLogColorTable()        |PRDCCTAB.C                    |
|----------------------------------+------------------------------|
|Prdc_GetSystemColor()            |PRDCSUBR.C                    |
|----------------------------------+------------------------------|
|Prdc_GreyColorToPelBits()        |PRDCSUBR.C                    |
|----------------------------------+------------------------------|
|Prdc_InterpretDfltColor()        |PRDCSUBR.C                    |
|----------------------------------+------------------------------|
|Prdc_NegColorToPelBits()          |PRDCSUBR.C                    |
|----------------------------------+------------------------------|
|Prdc_PhysRGBColorToPelBits()      |PRDCSUBR.C                    |
|----------------------------------+------------------------------|
|Prdc_QueryColorData()            |PRDCQTAB.C                    |
|----------------------------------+------------------------------|
|Prdc_QueryColorIndex()            |PRDCQERY.C                    |
|----------------------------------+------------------------------|
|Prdc_QueryLogColorTable()        |PRDCQTAB.C                    |
|----------------------------------+------------------------------|
|Prdc_QueryNearestColor()          |PRDCQERY.C                    |
|----------------------------------+------------------------------|
|Prdc_QueryRealColors()            |PRDCQERY.C                    |
|----------------------------------+------------------------------|
|Prdc_QueryRGBColor()              |PRDCQERY.C                    |
|----------------------------------+------------------------------|
|Prdc_RealizeColorTable()          |PRDCCTAB.C                    |
|----------------------------------+------------------------------|
|Prdc_RGBColorDiff()              |PRDCSUBR.C                    |
|----------------------------------+------------------------------|
|Prdc_RGBColorToPelBits()          |PRDCSUBR.C                    |
|----------------------------------+------------------------------|
|Prdc_RGBToCLRIndex()              |PRDCSUBR.C                    |
|----------------------------------+------------------------------|
|Prdc_RGBToColIndex()              |PRDCSUBR.C                    |
|----------------------------------+------------------------------|
|Prdc_RGBToPhysIndex()            |PRDCSUBR.C                    |
|----------------------------------+------------------------------|
|Prdc_UnRealizeColorTable()        |PRDCCTAB.C                    |
|----------------------------------+------------------------------|
|Prde_BeginClose()                |PRDEBCLS.C                    |
|----------------------------------+------------------------------|
|Prde_CalcAttrCodePageFonts()      |PRDESUB1.C                    |
|----------------------------------+------------------------------|
|Prde_ChooseForms()                |PRDEFPDB.C                    |
|----------------------------------+------------------------------|
|Prde_CompleteOpen()              |PRDECOPN.C                    |
|----------------------------------+------------------------------|
|Prde_ConvertOldIniEntry()        |PRDESUB3.C                    |
|----------------------------------+------------------------------|
|Prde_CopySplData()                |PRDESUBR.C                    |
|----------------------------------+------------------------------|
|Prde_DisableDC()                  |PRDEDDC.C                    |
|----------------------------------+------------------------------|
|Prde_DisablePdb()                |PRDEDPDB.C                    |
|----------------------------------+------------------------------|
|Prde_DownloadCodePage()          |PRDEFONT.C                    |
|----------------------------------+------------------------------|
|Prde_DownloadFile ( )                  | PRDEFONT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ EnableDC ( )                      | PRDEEDC . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ ExchangeDispatch ( )              | PRDESUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ FillLdb ( )                      | PRDEFLDB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ FillPdb ( )                      | PRDEFPDB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ FindDfltFormNo ( )                | PRDEFPDB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ FindDrvDataFormNo ( )            | PRDEFPDB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ FindFormNumber ( )                | PRDESUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ FindReqdTray ( )                  | PRDESUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ FreeDCItems ( )                  | PRDERSTR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetAppDefaultPrinterName ( )    | PRDESUB2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetAttrsMemory ( )                | PRDEEDC . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetBestFitPrinterName ( )        | PRDESUB2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetCodePageList ( )              | PRDESUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetDefaultPrinter ( )            | PRDESUB3 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetDeviceName ( )                | PRDESUB2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetDriverDataDfltFontInfo ( )    | PRDESUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetFontInfo ( )                  | PRDESUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetFormDimensions ( )            | PRDEFPDB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetIniDfltFontInfo ( )          | PRDESUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetIniVersionType ( )            | PRDESUB3 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetOSVersionNumber ( )          | PRDEFLDB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetOutputType ( )                | PRDEFPDB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetPrinterFromLogAddress ( )    | PRDESUB2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetPrinterInfo ( )                | PRDEFPDB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetPrinterIniInfo ( )            | PRDESUB2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetPrinterName ( )                | PRDESUB2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetPrinterNameEntry ( )          | PRDESUB2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetPrinterNameFromDD ( )        | PRDESUB2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetPrinterTypeEntry ( )          | PRDESUB2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetProcessID ( )                  | PRDEFLDB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetResources ( )                  | PRDESUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetValFromText ( )                | PRDESUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ GetVarSizeMemory ( )              | PRDEEDC . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ InitialiseDownFonts ( )          | PRDEFONT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ InitialisePrinterStateData ( )  | PRDESUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ InitSemaphores ( )                | PRDINIT . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ LoadCodePageMetrics ( )          | PRDEFONT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ LoadResidentFontMetrics ( )      | PRDEFONT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ MakeDefaultFontEngine ( )        | PRDESUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ MatchDirectSpoolerInfo ( )      | PRDESUB2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ MatchQueuedSpoolerInfo ( )      | PRDESUB2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ OpenPort ( )                      | PRDESUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ OpenSpooler ( )                  | PRDESUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ OutputDefaultFontCodes ( )      | PRDECOPN . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ PM _ DD _ Exist ( )                  | PRDESUB3 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ PM _ DD _ Read ( )                    | PRDESUB3 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ ProcessDefaultFont ( )          | PRDESUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ ProcessPPMTrayInfo ( )          | PRDESUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ ProcessPrinterStateData ( )      | PRDESUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ QueryProcessCP ( )                | PRDEEDC . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ ReadFontResource ( )              | PRDEFONT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ ReadHeaderData ( )                | PRDESUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ ReadIniFile ( )                  | PRDESUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ ReadOldConfig ( )                | PRDESUB3 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ ReadPrinterProperties ( )        | PRDESUB3 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ ReadTerminatedWordFromText ( )  | PRDESUB2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ ResetDC ( )                      | PRDERSET . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ RestoreDC ( )                    | PRDERSTR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ SaveDC ( )                        | PRDESAVE . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ SetMachineType ( )                | PRDEFPDB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ SetPageAtts ( )                  | PRDEFPDB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ SetUpPPMFormInfo ( )              | PRDESUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ SetUpPrinterStateData ( )        | PRDESUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ SetupSplData ( )                  | PRDESUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ StringsAreEqual ( )              | PRDESUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ Termination ( )                  | PRDESUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ Termination _ Ring3 _ Stub ( )      | PRDRING3 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ Translate4224Forms ( )          | PRDESUB3 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ TranslateOldBody ( )              | PRDESUB3 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ TranslateOldDriverData ( )      | PRDESUB3 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ TranslateOldDriverDataFrm ( )    | PRDESUB3 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ TranslateOldIniEntry ( )        | PRDESUB2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prde _ WriteHeaderData ( )              | PRDESUB2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ AccumulateBounds ( )              | PRDGACCB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ AddBounds ( )                    | PRDGADDB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ AllocGlobalHeapItem ( )          | PRDGHEAP . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ AllocHeapItem ( )                | PRDGHEAP . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ Convert ( )                      | PRDGCONV . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ CreateHeap ( )                    | PRDGHEAP . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ DeleteHeap ( )                    | PRDGHEAP . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ FastConvert ( )                  | PRDGCONV . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ FreeGlobalHeapItem ( )          | PRDGHEAP . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ FreeHeapItem ( )                  | PRDGHEAP . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ GetBoundingRect ( )              | PRDGACCB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ GetBoundsData ( )                | PRDGACCB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ GetNewGlobalHeap ( )              | PRDGHEAP . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ GetXformMatrix ( )                | PRDGXFRM . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ MatrixScaleDifferent ( )        | PRDGXFRM . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ NotifyTransformChange ( )        | PRDGCONV . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ ParseRawData ( )                  | PRDGPRAW . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ PointToAngle ( )                  | PRDGXFRM . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ ResetBounds ( )                  | PRDGACCB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ ScaleUpPoint ( )                  | PRDGXFRM . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ ScaleValue ( )                    | PRDGXFRM . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdg _ XformPoint ( )                    | PRDGXFRM . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdi _ CacheClipRects ( )                | PRDICLIPh3 . C                    |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdi _ ClipIntSect ( )                  | PRDICLIPh3 . C                    |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdi _ ClipLine ( )                      | PRDILINE . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdi _ DefaultClip ( )                  | PRDICLIPh3 . C                    |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdi _ GetNextClip ( )                  | PRDICLIPh3 . C                    |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdi _ NotifyClipChange ( )              | PRDICLIPh3 . C                    |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdi _ Outcode ( )                      | PRDILINE . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdj _ FreeBand ( )                      | PRDJSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdj _ LastBand ( )                      | PRDJSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdj _ MakeBand ( )                      | PRDJSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdj _ UpdateBandCoordinates ( )        | PRDJSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdl _ DrawLinesInPath ( )              | PRDLDRAW . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdl _ GetCurrentPosition ( )          | PRDLGETC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdl _ GetDCOrigin ( )                  | PRDLGRAT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdl _ GetLineOrigin ( )                | PRDLGETO . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdl _ GetStyleRatio ( )                | PRDLGRAT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdl _ LineSetUp ( )                    | PRDLSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdl _ PolyLine ( )                      | PRDLPOLY . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdl _ PolyShortLine ( )                | PRDLSHRT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdl _ SetCurrentPosition ( )          | PRDLSETC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdl _ SetLineOrigin ( )                | PRDLSETO . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdl _ SetStyleRatio ( )                | PRDLGRAT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdl _ UpdateBoundsRectangle ( )        | PRDLPOLY . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ AddCodePage ( )                  | PRDMCPGE . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ CardFonts ( )                    | PRDMDSUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ CheckDefaultFont ( )              | PRDMDSUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ CheckFileExists ( )              | PRDMFILE . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ CheckFileOKForPrinter ( )        | PRDMFILE . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ CheckMatchParameters ( )        | PRDMDSUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ CodePageDlgProc ( )              | PRDMCPGE . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ ConnDlgProc ( )                  | PRDMCONN . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ ControlProc ( )                  | PRDMMAIN . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ ConvertOldIniToNew ( )          | PRDMCONV . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ CopyFaceNameAcross ( )          | PRDMDFNT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ CopyFile ( )                      | PRDMFILE . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ CopyFMFFiles ( )                  | PRDMFILE . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ DeleteForm ( )                    | PRDMMAIN . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ DevMode ( )                      | PRDMDEV . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ DfltFontDlgProc ( )              | PRDMDFNT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ DfltFontPSzControlProc ( )      | PRDMDSUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ Dialog ( )                        | PRDMDLG . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ DigitToASCII ( )                  | PRDMMAIN . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ DisableHelp ( )                  | PRDMHELP . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ DispConversionMsg ( )            | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ DisplayCodePage ( )              | PRDMCPGE . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ DisplayDefaultFontList ( )      | PRDMDFNT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ DisplayPointSzList ( )          | PRDMDSUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ DispMessageBox ( )                | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ EnableHelp ( )                    | PRDMHELP . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ EnterCodePageValues ( )          | PRDMCPGE . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ EnterConnections ( )              | PRDMCONN . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ EnterFontPointSz ( )              | PRDMDSUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ EnterFontValue ( )                | PRDMDFNT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ EnterJobSetUp ( )                | PRDMJOB . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ EnterValues ( )                  | PRDMENTR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ ExpandFaceName ( )                | PRDMDSUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ FindDfltFormNo ( )                | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ FindFormInfo ( )                  | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ FindFormNumber ( )                | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ FontTableMemory ( )              | PRDMDFNT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ FreeDMDataSegments ( )          | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ GetDeviceName ( )                | PRDMSUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ GetHelpPath ( )                  | PRDMHELP . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ GetPointSzIndex ( )              | PRDMDSUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ HelpMessageProcessing ( )        | PRDMHELP . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ InitDfltFontList ( )              | PRDMDFNT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ InitFormsDlg ( )                  | PRDMMAIN . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ InitFormList ( )                  | PRDMMAIN . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ InitFormListTemplate ( )        | PRDMMAIN . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ InitMainDlg ( )                  | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ InitSourceBoxes ( )              | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ JobSetUpDlgProc ( )              | PRDMJOB . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ LoadDMDataDefaults ( )          | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ LoadMatchParameters ( )          | PRDMDSUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ MainDlgProc ( )                  | PRDMMAIN . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ MoreFontTableMemory ( )          | PRDMDFNT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ PaintForm ( )                    | PRDMMAIN . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ PaintFormTemplate ( )            | PRDMMAIN . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ PM _ DD _ Write ( )                  | PRDMSUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ QueryMainBoxSelections ( )      | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ RadioButtonControl ( )          | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ ReadBodyData ( )                  | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ ReadFileContents ( )              | PRDMFILE . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ ReadFontResource ( )              | PRDMFILE . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ ReadTerminatedWordFromText ( )  | PRDMCONV . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ ReadWordFromDecText ( )          | PRDMMAIN . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ ReadyDMData ( )                  | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ ReleaseFontTableMemory ( )      | PRDMDFNT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ RemoveMenuOptions ( )            | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ ResidentFonts ( )                | PRDMDSUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ SelectOldDriver ( )              | PRDMSUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ SetupSingleFormList ( )          | PRDMJOB . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ StringsAreEqual ( )              | PRDMFILE . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ TextFromNumeric ( )              | PRDMMAIN . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ TranslateOldIniEntry ( )        | PRDMSUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ WriteBodyData ( )                | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ WriteHeaderData ( )              | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdm _ WriteIniEntry ( )                | PRDMSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ AbortTidyUp ( )                  | PRDQEDOC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ BandingDeleteJournal ( )        | PRDPRINT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ BandingStopJournalling ( )      | PRDPRINT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ CheckDrawingState ( )            | PRDNGPIM . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ CloseDevice ( )                  | PRDPWRIT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ ClosePrinter ( )                  | PRDPWRIT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdn _ CreateSTDSpoolFile ( )          | PRDJQSTD . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ DeviceCreateBitmap ( )          | NEWBMPS . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ GetSetBitmapBits ( )              | NEWBMPS . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ InitialisePrinter ( )            | PRDPINIT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ InitPrinterAllPages ( )          | PRDPINIT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ InitPrinterPage1 ( )              | PRDPINIT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ JobEndFeedOrSIC ( )              | PRDPRINT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ OpenPrinter ( )                  | PRDPWRIT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ our _ PrtAbort ( )                  | PRDPWRIT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ PrepareNewDocument ( )          | PRDPPREP . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ PrepareNextPage ( )              | PRDPPREP . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ ProcessLastPage ( )              | PRDPRINT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ ProcessPage ( )                  | PRDPRINT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ PrtWrite ( )                      | PRDPWRIT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ SendInitAndPage ( )              | PRDPRINT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ SetCompleteOpenDCIDefaults ( )  | PRDEEDC . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ SetDCIAttributes ( )              | PRDEEDC . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ SetDCIFlags ( )                  | PRDEEDC . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ SetDCIXform ( )                  | PRDEEDC . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ SetEnableDCIDefaults ( )        | PRDEEDC . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ SetResetDCDCIDefaults ( )        | PRDEEDC . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ SetStartDocDCIDefaults ( )      | PRDEEDC . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ WaitForThread ( )                | PRDQEDOC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdn _ write _ abort _ tidy _ up ( )          | PRDQEDOC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdo _ DrawBorder ( )                    | PRDODRAW . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdo _ ErasePS ( )                      | PRDODRAW . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdo _ SetDCOrigin ( )                  | PRDODC . C                          |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ AddHorizMoveString ( )          | PRDPSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ AddString ( )                    | PRDPSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ CompressG4 ( )                    | PRDPCMPB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ InitialiseCOMPort ( )            | PRDPSTRT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ IntToAsciiDecimal ( )            | PRDPSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ NeedSpacesForMove ( )            | PRDPSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ OutlineFontSizeString ( )        | PRDPSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ OutputRules ( )                  | BITMOUT . ASM                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ Print360by180 ( )                | PRD42SR2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ Print360by360 ( )                | PRD42SR2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ PrintBandRaster ( )              | PRDPRAST . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ PrintError ( )                    | PRDPERR . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ PrintMakeRaster8 ( )              | PRDPRAST . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ PrintMakeRaster24 ( )            | PRDPRAST . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ PrintMakeRasterColor ( )        | PRDPRAST . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ PrintMemory ( )                  | PRDPSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ PrintMoveDown ( )                | PRDPSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ PrintRaster ( )                  | PRDPRAST . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ PrintRasterColor ( )              | PRDPRAST . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ PrintRasterPass ( )              | PRD42SR2 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ PrintSimple ( )                  | PRDPSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ PrintText ( )                    | PRDPTEXT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ SelectFont ( )                    | PRDPTEXT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ SelectAttributes ( )              | PRDPTEXT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ SetUpFont ( )                    | PRDPTEXT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdp _ StrikeOutToBand ( )              | PRDPTEXT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdq _ AbortDoc ( )                      | PRDQEDOC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdq _ EndDoc ( )                        | PRDQEDOC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdq _ Escape ( )                        | PRDQESC . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdq _ FlushOutput ( )                  | PRDQESUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdq _ JournalData ( )                  | PRDQESUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdq _ NewFrame ( )                      | PRDQESUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdq _ QueryDeviceBitmaps ( )          | PRDQQERY . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdq _ QueryDeviceCaps ( )              | PRDQQERY . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdq _ QueryDevResource ( )              | PRDQQERY . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdq _ QueryEscSupport ( )              | PRDQESC . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdq _ QueryHardcopyCaps ( )            | PRDQHCC . C                        |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdq _ RawData ( )                      | PRDQESUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdq _ SetMode ( )                      | PRDQESUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdq _ StartDoc ( )                      | PRDQEDOC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prds _ FastScanLine ( )                  | PRDSSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prds _ GetMask ( )                      | PRDSPOLY . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prds _ GetPattDword ( )                  | PRDSPOLY . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prds _ GetPattern ( )                    | PRDSPOLY . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prds _ InnerScanLine ( )                | PRDSPOLY . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prds _ PolyScanLine ( )                  | PRDSPOLY . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prds _ WriteRow ( )                      | PRDSSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdt _ ChainTextBand ( )                | PRDTSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ CharString ( )                    | PRDTCSTR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ CharStringPos ( )                | PRDTCSTR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ EstablishFont ( )                | PRDTESUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ ExpandMultiCpFMF ( )              | PRDTESUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdt _ FillRectangle ( )                | PRDTSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ GetMultiCpFMFIndex ( )          | PRDTESUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdt _ GetStartPos ( )                  | PRDTSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdt _ GetStrikeoutRect ( )              | PRDTSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdt _ GetStringWidth ( )                | PRDTSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ ImageChar ( )                    | PRDTEFNT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ ImageCharGrey ( )                | PRDTEFNT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ LocateFont ( )                    | PRDTESUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ NextCodePoint ( )                | PRDTESUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ OutlineFontSize ( )              | PRDTESUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdt _ QueryCharPositions ( )          | PRDTQERY . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdt _ QueryTextBox ( )                  | PRDTQERY . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdt _ QueryWidthTable ( )              | PRDTQERY . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdt _ RescaleCharBox ( )                | PRDTXFRM . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdt _ ScaleXMetricToDevice ( )        | PRDTXFRM . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdt _ ScaleYMetricToDevice ( )        | PRDTXFRM . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdt _ SetOpaqueRect ( )                | PRDTSUBR . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ SetUpFMF ( )                      | PRDTESUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ SimulateFont ( )                  | PRDTESUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ TextOutDevFont ( )                | PRDTDFNT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ TextOutEngFont ( )                | PRDTEFNT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ TranslateChar ( )                | PRDTESUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdt _ TranslateWidthTable ( )          | PRDTESUB . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdt _ XformFontValue ( )                | PRDTXFRM . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ abs ( )                            | PRDUTILS . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ AllocPatternMemory ( )          | PRDUPATT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdu _ bitcopy ( )                      | ASMUTILS . ASM                    |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdu _ createraster ( )                  | ASMUTILS . ASM                    |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdu _ dwordset ( )                      | ASMUTILS . ASM                    |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ ExpandPattern ( )                | PRDUPATT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ FreePatternMemory ( )            | PRDUPATT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ GetBitmapPattern ( )              | PRDUPATT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ GetDriverPattern ( )              | PRDUPATT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ GetGreyScaleIndex ( )            | PRDUPATT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ GetPatternInfo ( )                | PRDUPATT . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ lrotl ( )                          | PRDUTILS . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ memcmp ( )                        | PRDUTILS . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ memcpy ( )                        | PRDUTILS . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ memset ( )                        | PRDUTILS . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdu _ mergeraster ( )                  | ASMUTILS . ASM                    |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ strcat ( )                        | PRDUTILS . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ strcmp ( )                        | PRDUTILS . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ strcmpN ( )                      | PRDUTILS . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ strcpy ( )                        | PRDUTILS . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ strcpyN ( )                      | PRDUTILS . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ strlen ( )                        | PRDUTILS . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ stroccur ( )                      | PRDUTILS . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ strupr ( )                        | PRDUTILS . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdu _ tan ( )                            | PRDUTILS . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Prdu _ writerow ( )                      | ASMUTILS . ASM                    |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdz _ EnterDriver ( )                  | PRDZDRIV . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdz _ hex ( )                            | PRDZTRAC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdz _ Init ( )                          | PRDZTRAC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdz _ LeaveDriver ( )                  | PRDZDRIV . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdz _ LogDosErr ( )                    | PRDZTRAC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdz _ LogErr ( )                        | PRDZTRAC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdz _ ProfileInit ( )                  | PRDZTRAC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdz _ ProfileTerm ( )                  | PRDZTRAC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdz _ Ring3LogDosErr ( )                | PRDMSUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdz _ Ring3LogErr ( )                  | PRDMSUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdz _ SSALLOC ( )                      | PRDZTRAC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdz _ SSFREE ( )                        | PRDZTRAC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdz _ Term ( )                          | PRDZTRAC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| prdz _ Trace ( )                          | PRDZTRAC . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Ring3CrLf ( )                          | PRDMSUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Ring3OutputPair ( )                    | PRDMSUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Ring3OutputPrompt ( )                  | PRDMSUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Ring3OutputString ( )                  | PRDMSUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Ring3OutputValue ( )                  | PRDMSUB1 . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| SafeSSALLOCMEM ( )                    | PRDUTILS . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Search _ down ( )                        | BITMOUT . ASM                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Square _ root ( )                        | FONTXFRM . ASM                    |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| UlNormalize ( )                        | FONTXFRM . ASM                    |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| UnlockDevice ( )                      | PRDODRAW . C                      |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| UqNormalize ( )                        | FONTXFRM . ASM                    |
| ---------- ---------- ---------- ---- + ---------- ---------- ---------- |
| Xform _ metrics ( )                      | FONTXFRM . ASM                    |
\ ---------- ---------- ---------- ---- - ---------- ---------- ---------- / </pre>
 
 
 
 
=== Module and Function Descriptions ===
 
This section describes the modules that comprise the 42XX Rasterizing driver and the functions that comprise each module. Each function is followed by a description. The functions in each module are listed in alphabetical order.
 
 
 
 
 
=== ASMUTILS.ASM ===
 
This module contains utility functions.
 
 
 
 
 
=== Prdu_bitcopy() ===
 
Copies bits of data from the source to the target.
 
 
 
 
 
=== Prdu_createraster() ===
 
Creates a vertical raster from the buffer.
 
 
 
 
 
=== Prdu_dwordset() ===
 
Sets the supplied ''Dword''into the bit map ''count''times.
 
 
 
 
 
=== Prdu_mergeraster() ===
 
Merges OutputBuffer1 and OutputBuffer2 into OutputBuffer3.
 
 
 
 
 
=== Prdu_writerow() ===
 
Writes ''Dwords''into the buffer.
 
 
 
 
 
=== BITMOUT.ASM ===
 
This module contains functions that scan and output the bit map.
 
 
 
 
 
=== Prdp_OutputRules() ===
 
Scans the bit map from top to bottom for a nonzero byte.
 
 
 
 
 
=== Search_down() ===
 
Performs a search down function.
 
 
 
 
 
=== FONTXFRM.ASM ===
 
This module contains functions that transform the font metrics.
 
 
 
 
 
=== Big_fix_square_root() ===
 
Approximates the square root of BIGFIXED.
 
 
 
 
 
=== Far_get_sqr_determinant() ===
 
Finds the square root of the determinant of input parameters.
 
 
 
 
 
=== Far_get_vector_length() ===
 
Finds the length of a vector in an array of vectors.
 
 
 
 
 
=== Get_vector_length() ===
 
Finds the length of a vector in an array of vectors.
 
 
 
 
 
=== Perform_rip() ===
 
Passes a given error message to WinSetErrorInfo.
 
 
 
 
 
=== Square_root() ===
 
Computes the fixed square root of a fixed point integer using Newton's method.
 
 
 
 
 
=== UlNormalize() ===
 
Normalizes a ULONG so that the highest order bit is 1.
 
 
 
 
 
=== UqNormalize() ===
 
Normalizes an unsigned quadword so that the highest order bit is 1.
 
 
 
 
 
=== Xform_metrics() ===
 
Transforms the font metrics.
 
 
 
 
 
=== NEWBMPS.C ===
 
This module contains functions that handle the bit map functions.
 
 
 
 
 
=== CompDeCompBull() ===
 
Handles calls from ''createbitmap''and ''getsetbitmapbits''.
 
 
 
 
 
=== Prdn_DeviceCreateBitmap() ===
 
Creates the bit map.
 
 
 
 
 
=== Prdn_GetSetBitmapBits() ===
 
Sets the bit map bits.
 
 
 
 
 
=== PRD42SR2.C ===
 
This module contains functions that handle outputs to the printer.
 
 
 
 
 
=== Prda_ConvertOld42XXMatch() ===
 
Converts old 42XX match number into current match number.
 
 
 
 
 
=== Prda_GetNewMatchNumber() ===
 
Gets the new match number.
 
 
 
 
 
=== Prdp_Print360by180() ===
 
Outputs two 24-bit-deep 360x180 scanline passes to the printer.
 
 
 
 
 
=== Prdp_Print360by360() ===
 
Outputs two 24-bit-deep 360x360 scanline passes to the printer.
 
 
 
 
 
=== Prdp_PrintRasterPass() ===
 
Prepares and outputs the raster to the printer.
 
 
 
 
 
=== PRDAKERN.C ===
 
This module contains functions that return the kerning pairs for the current font.
 
 
 
 
 
=== Prda_GetKerningPairTable() ===
 
Returns the kerning pairs for the current font.
 
 
 
 
 
=== PRDAPAGE.C ===
 
This module contains functions that handle the code page function for the printer.
 
 
 
 
 
=== Prda_AdjustFaceName2() ===
 
Adds a description of the font quality and the font attribute of the face name.
 
 
 
 
 
=== Prda_AlterCodePage() ===
 
Changes the code page function for the default font.
 
 
 
 
 
=== Prda_CheckMetrics() ===
 
Looks for a default font with the new code page.
 
 
 
 
 
=== Prda_FindDeviceCodePage() ===
 
Changes the default font to the requested code page.
 
 
 
 
 
=== Prda_GetCodePage() ===
 
Returns the current code page.
 
 
 
 
 
=== Prda_MatchExactCodePage() ===
 
Looks for a default device font with the new code page.
 
 
 
 
 
=== Prda_MultiCodePageSupported() ===
 
Looks through the global outline code page table.
 
 
 
 
 
=== Prda_SetCodePage() ===
 
Sets the code page to the value passed in ArgCodePage.
 
 
 
 
 
=== PRDAQERY.C ===
 
This module contains functions that prepare the font metrics.
 
 
 
 
 
=== Prda_AdjustFaceName() ===
 
Adds a description of the font quality and the font attribute.
 
 
 
 
 
=== Prda_AdjustForCharBox() ===
 
Scales outline font metrics by the character box.
 
 
 
 
 
=== Prda_CopyMetrics() ===
 
Copies font metrics to the local temporary metric buffer.
 
 
 
 
 
=== Prda_DeviceQueryFontAttributes() ===
 
Returns the current font metrics.
 
 
 
 
 
=== Prda_DeviceQueryFonts() ===
 
Returns the metrics to all fonts.
 
 
 
 
 
=== Prda_MatchFaceNames() ===
 
Matches the font face names.
 
 
 
 
 
=== Prda_ProcessAttributes() ===
 
Processes the input device attributes.
 
 
 
 
 
=== Prda_ReturnMetrics() ===
 
Copies the metrics from the buffer to the return buffer.
 
 
 
 
 
=== PRDARFNT.C ===
 
This module contains functions that find a font.
 
 
 
 
 
=== Prda_MatchFont() ===
 
Finds a font that matches the given attributes.
 
 
 
 
 
=== Prda_RealizeFont() ===
 
Realizes or deletes fonts.
 
 
 
 
 
=== PRDARSUB.C ===
 
This module contains functions that handle code page and font functions.
 
 
 
 
 
=== Prda_ChangeMatchNumber() ===
 
Matches FGID and changes some font information.
 
 
 
 
 
=== Prda_CodePageType() ===
 
Gets the code page number or type.
 
 
 
 
 
=== Prda_DefaultFontSwitch() ===
 
Switches to default font.
 
 
 
 
 
=== Prda_GetCPIndexFromCodePage() ===
 
Gets code page font index.
 
 
 
 
 
=== Prda_InfoFromMatchNumber() ===
 
Determines what type of font is being used.
 
 
 
 
 
=== Prda_MatchBaseFont() ===
 
Matches the base font.
 
 
 
 
 
=== Prda_MatchEngineAttributes() ===
 
Matches the engine attributes structure.
 
 
 
 
 
=== Prda_MatchFattrStructure() ===
 
Matches the font attributes.
 
 
 
 
 
=== Prda_MatchMetrics() ===
 
Matches the font attributes and the target metrics.
 
 
 
 
 
=== Prda_RealizeDeviceFont() ===
 
Realizes a device font.
 
 
 
 
 
=== PRDASETB.C ===
 
This module contains functions that set and return the attributes.
 
 
 
 
 
=== Prda_CheckFontValid() ===
 
Checks if the font is valid.
 
 
 
 
 
=== Prda_DeviceGetAttributes() ===
 
Returns the attributes.
 
 
 
 
 
=== Prda_DeviceSetAttributes() ===
 
Sets various attributes.
 
 
 
 
 
=== Prda_GetDfltCharBox() ===
 
Sets up the default character box dimensions.
 
 
 
 
 
=== Prda_SetImagAttrs() ===
 
Sets the image attributes.
 
 
 
 
 
=== Prda_SetLineAttrs() ===
 
Sets the line attributes.
 
 
 
 
 
=== Prda_SetMarkAttrs() ===
 
Sets the marker attributes.
 
 
 
 
 
=== Prda_SetPtrnAttrs() ===
 
Sets the pattern attributes.
 
 
 
 
 
=== Prda_SetTextAttrs() ===
 
Sets the text attributes.
 
 
 
 
 
=== Prda_SetTextSimlFlag() ===
 
Sets the flags for simulation.
 
 
 
 
 
=== PRDASETG.C ===
 
This module contains a function that sets global attributes.
 
 
 
 
 
=== Prda_DeviceSetGlobalAttribute() ===
 
Sets global attributes.
 
 
 
 
 
=== PRDBBLT.C ===
 
This module contains functions that perform bit logical transfer.
 
 
 
 
 
=== Prdb_BitBlt() ===
 
The hooked function from the dispatch table.
 
 
 
 
 
=== Prdb_CachePattern() ===
 
Sets up a new copy of the pattern which has been expanded to a ''Dword''.
 
 
 
 
 
=== Prdb_DoBitBlt() ===
 
Performs the BLT only after high level checks have been done.
 
 
 
 
 
=== Prdb_DoQuickBlt() ===
 
Implements BLT very fast.
 
 
 
 
 
=== Prdb_DoQuickRop() ===
 
Implements some ROPs very fast.
 
 
 
 
 
=== Prdb_GetBitOffset() ===
 
Returns the bit offset of the ''Dword''with the top 3 bits.
 
 
 
 
 
=== Prdb_GetByteOffset() ===
 
Returns the byte offset of the ''Dword''.
 
 
 
 
 
=== Prdb_GetDwordBitOffset() ===
 
Returns the bit offset of the ''Dword''with the top 5 bits.
 
 
 
 
 
=== Prdb_GetFastFlags() ===
 
Sets up flags to indicate fast paths can be taken in the code.
 
 
 
 
 
=== Prdb_GetIndices() ===
 
Determines the indexes to the source and target bit maps.
 
 
 
 
 
=== Prdb_GetMasks() ===
 
Determines the masks required for the start and end ''Dwords''.
 
 
 
 
 
=== Prdb_GetPattern() ===
 
Sets up the pattern information for the bitblt.
 
 
 
 
 
=== Prdb_GetPatternRow() ===
 
Gets a pattern row.
 
 
 
 
 
=== Prdb_GetSourceRow() ===
 
Gets the row for the source bit map.
 
 
 
 
 
=== Prdb_Pat11BitAligned() ===
 
Gets a pattern row and makes it a ''Dword''aligned with the target.
 
 
 
 
 
=== Prdb_Pat41BitAligned() ===
 
Gets a pattern row and adjusts it with a different pattern.
 
 
 
 
 
=== Prdb_PerformRop() ===
 
Performs the raster operation.
 
 
 
 
 
=== Prdb_QuickBltPossible() ===
 
Decides if the ROPs can be done very quickly.
 
 
 
 
 
=== Prdb_RopManyDwords() ===
 
Performs the raster operation for greater than one DWORD.
 
 
 
 
 
=== Prdb_RopOneDword() ===
 
Performs the raster operation for a single ''Dword''in the row.
 
 
 
 
 
=== Prdb_RopTwoDwords() ===
 
Performs the raster operation for two ''Dwords''in the row.
 
 
 
 
 
=== Prdb_StartPosAndDir() ===
 
Determines the start position and the direction for processing the blt.
 
 
 
 
 
=== PRDBCREA.C ===
 
This module contains functions that create a bit map.
 
 
 
 
 
=== Prdb_CreateBitmap() ===
 
Creates a bit map and sets it to the current background color.
 
 
 
 
 
=== Prdb_DeviceCreateBitmap() ===
 
Creates a bit map according to the parameters.
 
 
 
 
 
=== PRDBCTAB.C ===
 
This module contains three tables for color conversion.
 
 
 
 
 
=== PRDBDATA.C ===
 
This module contains data for the raster operation codes and patterns.
 
 
 
 
 
=== PRDBDELT.C ===
 
This module contains a function that deletes a bit map.
 
 
 
 
 
=== Prdb_DeviceDeleteBitmap() ===
 
Deletes a bit map in the printer drivers bit map list.
 
 
 
 
 
=== PRDBEXIN.C ===
 
This module contains functions that perform bit map conversion.
 
 
 
 
 
=== Convert_ext1_to_int1() ===
 
Transfers one scanline from the external 1bpp to the internal 1bpp.
 
 
 
 
 
=== Convert_ext1_to_int4() ===
 
Transfers one scanline from the external 1bpp to the internal 4bpp.
 
 
 
 
 
=== Convert_ext24_to_int1() ===
 
Transfers one scanline from the external 24bpp to the internal 1bpp.
 
 
 
 
 
=== Convert_ext24_to_int4() ===
 
Transfers one scanline from the external 24bpp to the internal 4bpp.
 
 
 
 
 
=== Convert_ext4_to_int1() ===
 
Transfers one scanline from the external 4bpp to the internal 1bpp.
 
 
 
 
 
=== Convert_ext4_to_int4() ===
 
Transfers one scanline from the external 4bpp to the internal 4bpp.
 
 
 
 
 
=== Convert_ext8_to_int1() ===
 
Transfers one scanline from the external 8bpp to the internal 1bpp.
 
 
 
 
 
=== Convert_ext8_to_int4() ===
 
Transfers one scanline from the external 8bpp to the internal 4bpp.
 
 
 
 
 
=== Prdb_ConvertExttoInt() ===
 
Converts an external bit map to an internal bit map.
 
 
 
 
 
=== Prdb_TableExttoInt() ===
 
Creates a color conversion table for color mapping.
 
 
 
 
 
=== Prdb_TransferExttoInt() ===
 
Transfers data from an external bit map to an internal bit map.
 
 
 
 
 
=== PRDBGETB.C ===
 
This module contains functions that perform get or set bit map bits.
 
 
 
 
 
=== CheckBitmap() ===
 
Performs initial checking of the parameters.
 
 
 
 
 
=== Prdb_GetSetBitmapBits() ===
 
Checks the parameters and decides if the call is a ''get''or a ''set''.
 
 
 
 
 
=== PRDBGETP.C ===
 
This module contains a function that gets the color of the pixel.
 
 
 
 
 
=== Prdb_GetPel() ===
 
Returns the color of the pixel.
 
 
 
 
 
=== PRDBGREY.C ===
 
This module contains a function that determines the color of the first pixel.
 
 
 
 
 
=== Prdb_GetNextColor() ===
 
Returns the current RGB color and updates pointers to the source bit map.
 
 
 
 
 
=== PRDBIMAG.C ===
 
This module contains a function that inputs image data into a bit map.
 
 
 
 
 
=== Prdb_ImageData() ===
 
Draws a row of image data into the currently selected bit map.
 
 
 
 
 
=== PRDBINEX.C ===
 
This module contains functions that perform internal to external conversion of bit maps.
 
 
 
 
 
=== Convert_int1_to_ext24() ===
 
Transfers one scanline from the external 1bpp to the internal 24bpp.
 
 
 
 
 
=== Convert_int1_to_ext4() ===
 
Transfers one scanline from the external 1bpp to the internal 4bpp.
 
 
 
 
 
=== Convert_int1_to_ext8() ===
 
Transfers one scanline from the external 1bpp to the internal 8bpp.
 
 
 
 
 
=== Convert_int4_to_ext1() ===
 
Transfers one scanline from the external 4bpp to the internal 1bpp.
 
 
 
 
 
=== Convert_int4_to_ext24() ===
 
Transfers one scanline from the external 4bpp to the internal 24bpp.
 
 
 
 
 
=== Convert_int4_to_ext8() ===
 
Transfers one scanline from the external 4bpp to the internal 8bpp.
 
 
 
 
 
=== Prdb_ConvertInttoExt() ===
 
Converts an internal bit map to an external bit map.
 
 
 
 
 
=== Prdb_CopyInttoExt() ===
 
Copies data from an internal bit map to an external bit map.
 
 
 
 
 
=== Prdb_SetExternalColourTable() ===
 
Sets up a color table for return.
 
 
 
 
 
=== Prdb_TransferInttoExt() ===
 
Transfers data from an internal bit map to an external bit map.
 
 
 
 
 
=== PRDBMARK.C ===
 
This module contains functions that draw markers at the specified positions .
 
 
 
 
 
=== Prdb_PolyMarker() ===
 
Draws a series of markers.
 
 
 
 
 
=== PRDBSELE.C ===
 
This module contains a function that selects a bit map into the device context.
 
 
 
 
 
=== Prdb_DeviceSelectBitmap() ===
 
Selects a new bit map into the DC.
 
 
 
 
 
=== PRDBSETP.C ===
 
This module contains functions that set the pixel.
 
 
 
 
 
=== Prdb_MixPel() ===
 
Sets the specified pel value.
 
 
 
 
 
=== Prdb_SetPel() ===
 
Sets the pel specified by ArgParm in the currently selected bit map.
 
 
 
 
 
=== PRDBSUBR.C ===
 
This module contains functions that deal with operations on a bit map.
 
 
 
 
 
=== Prdb_DeleteBitmap() ===
 
Deletes the bit map.
 
 
 
 
 
=== Prdb_FreeBitmap() ===
 
Frees a bit map.
 
 
 
 
 
=== Prdb_GetGreyScaleInfo() ===
 
Checks the conditions for grey scaling.
 
 
 
 
 
=== Prdb_GetOffsets() ===
 
Returns an offset in two parts, byte and bit, to the position specified by XCoord and YCoord.
 
 
 
 
 
=== Prdb_GreyScaleSourceBitmap() ===
 
Takes the current source bit map and converts it into a grey scaled bit map .
 
 
 
 
 
=== Prdb_HugeDecrement() ===
 
Handles decrements in OldAddress.
 
 
 
 
 
=== Prdb_HugeGetByte() ===
 
Returns the value at the location.
 
 
 
 
 
=== Prdb_HugeIncrement() ===
 
Handles increments in OldAddress.
 
 
 
 
 
=== Prdb_HugeSetByte() ===
 
Writes a byte at the location.
 
 
 
 
 
=== PRDCCTAB.C ===
 
This module contains functions that define entries for logical color table.
 
 
 
 
 
=== Prdc_CreateLogColorTable() ===
 
Defines the entries in the logical color table.
 
 
 
 
 
=== Prdc_RealizeColorTable() ===
 
Realizes the color table.
 
 
 
 
 
=== Prdc_UnRealizeColorTable() ===
 
Unrealizes the color table.
 
 
 
 
 
=== PRDCQERY.C ===
 
This module contains functions that access the logical color table.
 
 
 
 
 
=== Prdc_QueryColorIndex() ===
 
Returns the index into the logical color table.
 
 
 
 
 
=== Prdc_QueryNearestColor() ===
 
Returns the nearest color available to the printer.
 
 
 
 
 
=== Prdc_QueryRealColors() ===
 
Returns the real colors available to the printer.
 
 
 
 
 
=== Prdc_QueryRGBColor() ===
 
Returns the RGB color.
 
 
 
 
 
=== PRDCQTAB.C ===
 
This module contains functions that query the logical color table.
 
 
 
 
 
=== Prdc_QueryColorData() ===
 
Returns the format of the current logical color table.
 
 
 
 
 
=== Prdc_QueryLogColorTable() ===
 
Returns the logical color table entries.
 
 
 
 
 
=== PRDCSUBR.C ===
 
This module contains functions that access the device color table.
 
 
 
 
 
=== Prdc_ColorDifference() ===
 
Determines the difference between two RGB values.
 
 
 
 
 
=== Prdc_ColorToPelBits() ===
 
Returns an index to the device color table.
 
 
 
 
 
=== Prdc_ColorToRGBValue() ===
 
Returns an RGB value based upon the color parameter.
 
 
 
 
 
=== Prdc_GetSystemColor() ===
 
Calls [[01288.htm|Prdc_InterpretDfltColor()]]to handle the color indexes.
 
 
 
 
 
=== Prdc_GreyColorToPelBits() ===
 
Returns an index to the device color table for the entry.
 
 
 
 
 
=== Prdc_InterpretDfltColor() ===
 
Handles the special default negative color indexes.
 
 
 
 
 
=== Prdc_NegColorToPelBits() ===
 
Handles negative color indexes that have special meanings.
 
 
 
 
 
=== Prdc_PhysRGBColorToPelBits() ===
 
Searches the color table for an exact match to PhysRGBColor.
 
 
 
 
 
=== Prdc_RGBColorDiff() ===
 
Checks whether an entry is the closest entry thus far to RGBColor.
 
 
 
 
 
=== Prdc_RGBColorToPelBits() ===
 
Returns the index to the entry in the device color table.
 
 
 
 
 
=== Prdc_RGBToCLRIndex() ===
 
Returns the index to the entry in DefaultColorTable.
 
 
 
 
 
=== Prdc_RGBToColIndex() ===
 
Returns the index to the entry in DVTHardwarePalette.
 
 
 
 
 
=== Prdc_RGBToPhysIndex() ===
 
Returns the index into the logical color table.
 
 
 
 
 
=== PRDD42FT.C ===
 
This module contains the IBM42XX Font Tables.
 
 
 
 
 
=== PRDD42XX.C ===
 
This module contains the Device Driver Tables (DDTs) for the .
 
 
 
 
 
=== PRDDATA.C ===
 
This module contains the data.
 
 
 
 
 
=== PRDDCPGE.C ===
 
This module contains the Code Page Tables for .
 
 
 
 
 
=== PRDDEST.C ===
 
This module contains the Escape Sequence Tables (ESTs) for the .
 
 
 
 
 
=== PRDDMODE.C ===
 
This module contains the Device Mode Settings.
 
 
 
 
 
=== PRDDNTFT.C ===
 
This module defines font lists for IBM42XX .
 
 
 
 
 
=== PRDDTAB.C ===
 
This module contains the Device Value Tables (DVTs), Device Driver Tables ( DDTs) and Global Descriptor Tables (GDTs) for the .
 
 
 
 
 
=== PRDDYNA.ASM ===
 
This module contains the Dynamic Link Entry Points.
 
 
 
 
 
=== PRDEBCLS.C ===
 
This module contains a function that performs closing the document.
 
 
 
 
 
=== Prde_BeginClose() ===
 
Closes the metafiler and spooler.
 
 
 
 
 
=== PRDECOPN.C ===
 
This module contains functions that complete the preparation of the DC and send the default font sequence to the printer.
 
 
 
 
 
=== Prde_CompleteOpen() ===
 
Finishes preparing the DC.
 
 
 
 
 
=== Prde_OutputDefaultFontCodes() ===
 
Sends the default font escape sequences to the printer.
 
 
 
 
 
=== PRDEDDC.C ===
 
This module contains a function that ends the printer process.
 
 
 
 
 
=== Prde_DisableDC() ===
 
Stops the printer and closes the spool file.
 
 
 
 
 
=== PRDEDPDB.C ===
 
This module contains a function that disables the physical device block.
 
 
 
 
 
=== Prde_DisablePdb() ===
 
Disables the physical device block.
 
 
 
 
 
=== PRDEEDC.C ===
 
This module contains functions that create a heap for a device context.
 
 
 
 
 
=== Prde_EnableDC() ===
 
Creates a heap for a DC.
 
 
 
 
 
=== Prde_GetAttrsMemory() ===
 
Allocates memory on the DC heap for the attribute bundles.
 
 
 
 
 
=== Prde_GetVarSizeMemory() ===
 
Allocates memory on the DC heap for clip rectangles.
 
 
 
 
 
=== Prde_QueryProcessCP() ===
 
Gets the current code page of the process.
 
 
 
 
 
=== Prdn_SetCompleteOpenDCIDefaults() ===
 
Finishes the setup that was begun in [[01323.htm|Prdn_SetEnableDCIDefaults()]].
 
 
 
 
 
=== Prdn_SetDCIAttributes() ===
 
Contains setup attributes and the color table.
 
 
 
 
 
=== Prdn_SetDCIFlags() ===
 
Prepares DC flags for ''startdoc''and ''enableDC''2. Resets DC origin.
 
 
 
 
 
=== Prdn_SetDCIXform() ===
 
Initializes the transform matrix stored in DC instance data.
 
 
 
 
 
=== Prdn_SetEnableDCIDefaults() ===
 
Sets up the DCI attributes and resets various flags.
 
 
 
 
 
=== Prdn_SetResetDCDCIDefaults() ===
 
Sets up the DCI stuff.
 
 
 
 
 
=== Prdn_SetStartDocDCIDefaults() ===
 
Sets up the DCI and resets the Aborted flag.
 
 
 
 
 
=== PRDEFLDB.C ===
 
This module contains utilities functions.
 
 
 
 
 
=== Prde_FillLdb() ===
 
Accesses the printer driver's dispatch table.
 
 
 
 
 
=== Prde_GetOSVersionNumber() ===
 
Returns the OS/2 version.
 
 
 
 
 
=== Prde_GetProcessID() ===
 
Determines the process ID.
 
 
 
 
 
=== PRDEFONT.C ===
 
This module contains functions that perform the initial process for font and code page.
 
 
 
 
 
=== Prde_DownloadCodePage() ===
 
Downloads the code page to the printer.
 
 
 
 
 
=== Prde_DownloadFile() ===
 
Downloads the given file to the printer.
 
 
 
 
 
=== Prde_InitialiseDownFonts() ===
 
Sets up initial download fonts and code pages on the printer.
 
 
 
 
 
=== Prde_LoadCodePageMetrics() ===
 
Gets the code page structure for this resident font and code page.
 
 
 
 
 
=== Prde_LoadResidentFontMetrics() ===
 
Sets up the metrics pointer and the base match number for each resident font.
 
 
 
 
 
=== Prde_ReadFontResource() ===
 
Accesses a font metrics resource.
 
 
 
 
 
=== PRDEFPDB.C ===
 
This module contains functions that perform printer opening and printer device block initialization.
 
 
 
 
 
=== Prde_ChooseForms() ===
 
Chooses the forms and trays for the job and fills the ''PPMInfo''.
 
 
 
 
 
=== Prde_FillPdb() ===
 
Finds and opens the printer, initializes PDB, and keeps track of its state.
 
 
 
 
 
=== Prde_FindDfltFormNo() ===
 
Finds the default form to use and returns the form number.
 
 
 
 
 
=== Prde_FindDrvDataFormNo() ===
 
Matches the form information with the list of forms in ''PrinterIniInfo''.
 
 
 
 
 
=== Prde_GetFormDimensions() ===
 
Sets up the page width and depth and clips fields of the PDB.
 
 
 
 
 
=== Prde_GetOutputType() ===
 
Determines whether the printing is STD or RAW.
 
 
 
 
 
=== Prde_GetPrinterInfo() ===
 
Fills the PDB with information for the printer.
 
 
 
 
 
=== Prde_SetMachineType() ===
 
Sets the machine type, resident font list, and number of resident fonts.
 
 
 
 
 
=== Prde_SetPageAtts() ===
 
Sets the orientation and raster mode into the PDB.
 
 
 
 
 
=== PRDENABL.C ===
 
This module contains one of the printer driver entry points.
 
 
 
 
 
=== OS2_PM_DRV_ENABLE() ===
 
One of the entry points into the printer driver.
 
 
 
 
 
=== PRDERSET.C ===
 
This module contains a function that resets the DC.
 
 
 
 
 
=== Prde_ResetDC() ===
 
Deletes or frees all items referenced by pointers from the DC instance data .
 
 
 
 
 
=== PRDERSTR.C ===
 
This module contains functions that restore the DC.
 
 
 
 
 
=== Prde_RestoreDC() ===
 
Allows a DC to be restored from the stack of DCs.
 
 
 
 
 
=== Prde_FreeDCItems() ===
 
Frees items in the DC instance data.
 
 
 
 
 
=== PRDESAVE.C ===
 
This module contains a function that saves the DC.
 
 
 
 
 
=== Prde_SaveDC() ===
 
Saves a DC by pushing it onto the stack.
 
 
 
 
 
=== PRDESUB1.C ===
 
This module contains functions that perform font and code page data setup.
 
 
 
 
 
=== Prde_CalcAttrCodePageFonts() ===
 
Calculates the total number of attributed fonts in a downloaded code page.
 
 
 
 
 
=== Prde_GetCodePageList() ===
 
Gets the code page list.
 
 
 
 
 
=== Prde_GetDriverDataDfltFontInfo() ===
 
Gets the default font information from the driver data.
 
 
 
 
 
=== Prde_GetFontInfo() ===
 
Sets up metrics and determines the ID number of the default font that was passed in.
 
 
 
 
 
=== Prde_GetIniDfltFontInfo() ===
 
Deals with the default font information from ''PrinterIniInfo''.
 
 
 
 
 
=== Prde_InitialisePrinterStateData() ===
 
Initiates a new block of ''PrinterData''or re-initializes an old block.
 
 
 
 
 
=== Prde_MakeDefaultFontEngine() ===
 
Makes the default font engine.
 
 
 
 
 
=== Prde_ProcessDefaultFont() ===
 
Sets up default font information and default device font information.
 
 
 
 
 
=== Prde_ProcessPrinterStateData() ===
 
Performs various jobs involving fonts that must be performed immediately.
 
 
 
 
 
=== Prde_SetUpPrinterStateData() ===
 
Sets up printer state data.
 
 
 
 
 
=== PRDESUB2.C ===
 
This module contains functions that get the printer name.
 
 
 
 
 
=== Prde_GetPrinterName() ===
 
Gets the printer name.
 
 
 
 
 
=== Prde_GetPrinterNameFromDD() ===
 
Gets the printer name from driver data.
 
 
 
 
 
=== Prde_GetPrinterFromLogAddress() ===
 
Gets the printer name that matches the given ''LogAddress''.
 
 
 
 
 
=== Prde_GetBestFitPrinterName() ===
 
Gets the port or queue associated with the default printer.
 
 
 
 
 
=== Prde_MatchDirectSpoolerInfo() ===
 
Matches the provided printer name and the port.
 
 
 
 
 
=== Prde_MatchQueuedSpoolerInfo() ===
 
Matches the provided printer name and the queue.
 
 
 
 
 
=== Prde_GetAppDefaultPrinterName() ===
 
Queries and returns the printer name.
 
 
 
 
 
=== Prde_ReadTerminatedWordFromText() ===
 
Reads and tests the terminator in text.
 
 
 
 
 
=== Prde_GetDeviceName() ===
 
Determines the printer type.
 
 
 
 
 
=== Prde_GetPrinterIniInfo() ===
 
Points to printer information in the OS2.INI file.
 
 
 
 
 
=== Prde_GetPrinterNameEntry() ===
 
Returns a pointer to the logical printer in the OS2.INI file.
 
 
 
 
 
=== Prde_GetPrinterTypeEntry() ===
 
Gets printer type and returns a pointer to the start of the configuration information.
 
 
 
 
 
=== Prde_TranslateOldIniEntry() ===
 
Finds and translates the driver's old OS2.INI entry into the new format.
 
 
 
 
 
=== Prde_WriteHeaderData() ===
 
Writes the fixed length header data to the OS2.INI entry.
 
 
 
 
 
=== PRDESUB3.C ===
 
This module contains functions that deal with OS2.INI entries and set the default printer.
 
 
 
 
 
=== Prde_ReadPrinterProperties() ===
 
Reads the OS2.INI entry for the ''appname''and returns a pointer to this data.
 
 
 
 
 
=== Prde_GetDefaultPrinter() ===
 
Finds the first selected printer and makes it the default printer.
 
 
 
 
 
=== Prde_PM_DD_Exist() ===
 
Reads the OS2.INI entry and verifies the version existence.
 
 
 
 
 
=== Prde_PM_DD_Read() ===
 
Reads the OS2.INI entry.
 
 
 
 
 
=== Prde_ReadOldConfig() ===
 
Returns an old configuration for the specific printer type and the logical printer.
 
 
 
 
 
=== Prde_ConvertOldIniEntry() ===
 
Converts old format OS2.INI entries to the new format.
 
 
 
 
 
=== Prde_GetIniVersionType() ===
 
Verifies that the OS2.INI entry is the current format, a previous format, or is unusable.
 
 
 
 
 
=== Prde_TranslateOldDriverData() ===
 
Converts the driver data from the previous version into the current format.
 
 
 
 
 
=== Prde_TranslateOldDriverDataFrm() ===
 
Converts the previous version of the driver data forms into the current format.
 
 
 
 
 
=== Prde_TranslateOldBody() ===
 
Reads the body data from the OS2.INI entry and converts the first byte into ASCII.
 
 
 
 
 
=== Prde_Translate4224Forms() ===
 
Prepares and adjusts forms and envelopes.
 
 
 
 
 
=== PRDESUBR.C ===
 
This module contains functions that work on the OS2.INI file.
 
 
 
 
 
=== Prde_ReadIniFile() ===
 
Reads an entry in the OS2.INI file and returns a pointer to a buffer containing the data.
 
 
 
 
 
=== Prde_ExchangeDispatch() ===
 
Substitutes the function address and returns the original contents of the entry in a dispatch table.
 
 
 
 
 
=== Prde_Termination() ===
 
Allows the printer driver to free any semaphores owned by that process.
 
 
 
 
 
=== Prde_ReadHeaderData() ===
 
Reads the fixed length header data from the OS2.INI entry for the given printer.
 
 
 
 
 
=== Prde_GetValFromText() ===
 
Converts a number in the text of the OS2.INI entry into a value.
 
 
 
 
 
=== Prde_FindFormNumber() ===
 
Matches a given form name to the list of forms.
 
 
 
 
 
=== Prde_FindReqdTray() ===
 
Looks through the trays for the current source configuration to find the required form.
 
 
 
 
 
=== Prde_ProcessPPMTrayInfo() ===
 
Sets up part of the PPMInfo structure.
 
 
 
 
 
=== Prde_SetUpPPMFormInfo() ===
 
Sets up the ''FormName''and ''FormInfoPtr''fields in ''PPMInfo''structure.
 
 
 
 
 
=== Prde_StringsAreEqual() ===
 
Compares two strings, ignoring the case of the characters 'a' - 'z'.
 
 
 
 
 
=== Prde_GetResources() ===
 
Gets some resources that will be used in [[01155.htm|PRDAQERY.C]].
 
 
 
 
 
=== Prde_SetupSplData() ===
 
Sets up the parameters and issues the SplQmOpen call.
 
 
 
 
 
=== Prde_CopySplData() ===
 
Copies the given SpoolerData into a local variable.
 
 
 
 
 
=== Prde_OpenSpooler() ===
 
Opens the spooler and sets the pointer to the device information.
 
 
 
 
 
=== Prde_OpenPort() ===
 
Gets the semaphore for the port that is being written to.
 
 
 
 
 
=== PRDFDFNT.C ===
 
This module contains functions that manage the engine font of the printer.
 
 
 
 
 
=== EDF_DeleteFontHdr() ===
 
Deletes all the resources belonging to the font.
 
 
 
 
 
=== EDF_DLFCommand() ===
 
Changes the status of the engine font in the printer.
 
 
 
 
 
=== EDF_EndPage() ===
 
Frees all the engine fonts marked Deleted.
 
 
 
 
 
=== EDF_Init() ===
 
Initializes the pointer to the linked list of downloadable engine font headers.
 
 
 
 
 
=== EDF_PurgeFont() ===
 
Sends a purge command to the printer to purge downloaded engine font.
 
 
 
 
 
=== EDF_Terminate() ===
 
Frees all the resources used for downloading engine fonts.
 
 
 
 
 
=== PRDGACCB.C ===
 
This module contains functions that bound rectangle conversion.
 
 
 
 
 
=== Prdg_AccumulateBounds() ===
 
Converts the given bounds rectangle with coordinates stored in ''Dwords''into ''Words''.
 
 
 
 
 
=== Prdg_GetBoundsData() ===
 
Converts the current overall bounds into a ''Dword''format.
 
 
 
 
 
=== Prdg_ResetBounds() ===
 
Resets the current overall bounds by setting the flag for default bounds to true.
 
 
 
 
 
=== Prdg_GetBoundingRect() ===
 
Returns the bounding rectangle.
 
 
 
 
 
=== PRDGADDB.C ===
 
This module contains a function that incorporates the rectangle into the current overall bounds.
 
 
 
 
 
=== Prdg_AddBounds() ===
 
Incorporates the given rectangle into the current overall bounds.
 
 
 
 
 
=== PRDGCONV.C ===
 
This module contains functions that coordinate conversion.
 
 
 
 
 
=== Prdg_Convert() ===
 
Provides the format of each coordinate pair to ''GreConvert''. Converts and stores in required format.
 
 
 
 
 
=== Prdg_FastConvert() ===
 
Provides a fast conversion between world coordinates and device coordinates .
 
 
 
 
 
=== Prdg_NotifyTransformChange() ===
 
Updates the device coordinate current position and pattern origin.
 
 
 
 
 
=== PRDGHEAP.C ===
 
This module contains functions that manage heaps.
 
 
 
 
 
=== Prdg_CreateHeap() ===
 
Acquires a DOS segment and initializes it as a ''Winthorn Heap''.
 
 
 
 
 
=== Prdg_DeleteHeap() ===
 
Deletes the heap in the segment.
 
 
 
 
 
=== Prdg_AllocHeapItem() ===
 
Allocates space from the heap and returns a pointer to the space allocated.
 
 
 
 
 
=== Prdg_FreeHeapItem() ===
 
Frees the space previously allocated to the item of the heap list.
 
 
 
 
 
=== Prdg_AllocGlobalHeapItem() ===
 
Allocates space from the printer driver's global heap and returns a pointer to the space allocated.
 
 
 
 
 
=== Prdg_FreeGlobalHeapItem() ===
 
Frees the space previously allocated to the item of the global heap.
 
 
 
 
 
=== Prdg_GetNewGlobalHeap() ===
 
Creates a new heap to hold global data.
 
 
 
 
 
=== PRDGPRAW.C ===
 
This module contains a function that performs data parsing.
 
 
 
 
 
=== Prdg_ParseRawData() ===
 
Parses the stream of raw data passed to the printer so that the driver can handle form feeds correctly.
 
 
 
 
 
=== PRDGXFRM.C ===
 
This module contains functions that perform matrix transformation.
 
 
 
 
 
=== Prdg_GetXformMatrix() ===
 
Gets a transform matrix, depending on the given handling flags.
 
 
 
 
 
=== Prdg_ScaleValue() ===
 
Provides more accurate calculation.
 
 
 
 
 
=== Prdg_PointToAngle() ===
 
Converts a point (x,y) to an angle from the x-axis.
 
 
 
 
 
=== Prdg_MatrixScaleDifferent() ===
 
Checks if two matrixes are different.
 
 
 
 
 
=== Prdg_XformPoint() ===
 
Transforms the given point and returns the vector length.
 
 
 
 
 
=== Prdg_ScaleUpPoint() ===
 
Scales the coordinate values until one of the values is greater than the given minimum value.
 
 
 
 
 
=== PRDICLIPh3.C ===
 
This module contains functions that clip the rectangle.
 
 
 
 
 
=== Prdi_NotifyClipChange() ===
 
Stores the clip rectangle in the required format if it is the only one.
 
 
 
 
 
=== Prdi_DefaultClip() ===
 
Sets up the default clip regions for the current DC.
 
 
 
 
 
=== Prdi_ClipIntSect() ===
 
Clips the rectangle to the specified coordinates.
 
 
 
 
 
=== Prdi_GetNextClip() ===
 
Checks if a given clip rectangle is exists.
 
 
 
 
 
=== Prdi_CacheClipRects() ===
 
Assigns the coordinates for the clip rectangle.
 
 
 
 
 
=== PRDILINE.C ===
 
This module contains functions that clip the line to the rectangle.
 
 
 
 
 
=== Prdi_ClipLine() ===
 
Clips the specified line to the specified rectangle.
 
 
 
 
 
=== Prdi_Outcode() ===
 
Sets up and combines the outcode.
 
 
 
 
 
=== PRDINIT.C ===
 
This module contains a function that creates the semaphores.
 
 
 
 
 
=== Prde_InitSemaphores() ===
 
Creates the semaphores.
 
 
 
 
 
=== PRDJQSTD.C ===
 
This module contains a function that creates a standard spool file.
 
 
 
 
 
=== prdn_CreateSTDSpoolFile() ===
 
Closes the metafile associated with the current DC and writes its contents to a standard spool file.
 
 
 
 
 
=== PRDJSUBR.C ===
 
This module contains functions that perform some aspects of banding.
 
 
 
 
 
=== prdj_MakeBand() ===
 
Makes a band based on the size of a page and the number of bands per page.
 
 
 
 
 
=== prdj_FreeBand() ===
 
Deletes the specified band and the bit map, freeing the associated memory.
 
 
 
 
 
=== prdj_UpdateBandCoordinates() ===
 
Updates the field containing the lower limit of the band.
 
 
 
 
 
=== prdj_LastBand() ===
 
Checks if this is the last band.
 
 
 
 
 
=== PRDLDRAW.C ===
 
This module contains a function that draws a straight line.
 
 
 
 
 
=== Prdl_DrawLinesInPath() ===
 
Draws the straight lines in a completed path definition.
 
 
 
 
 
=== PRDLGETC.C ===
 
This module contains a function that returns the current position.
 
 
 
 
 
=== Prdl_GetCurrentPosition() ===
 
Returns the current position.
 
 
 
 
 
=== PRDLGETO.C ===
 
This module contains a function that returns the current coordinates.
 
 
 
 
 
=== Prdl_GetLineOrigin() ===
 
Returns the current style state and the current world coordinates.
 
 
 
 
 
=== PRDLGRAT.C ===
 
This module contains functions that return and store the style ratio and gets the instance data.
 
 
 
 
 
=== Prdl_GetStyleRatio() ===
 
Returns the style ratio.
 
 
 
 
 
=== Prdl_SetStyleRatio() ===
 
Stores the style ratio.
 
 
 
 
 
=== Prdl_GetDCOrigin() ===
 
Gets original DC instance data.
 
 
 
 
 
=== PRDLPOLY.C ===
 
This module contains functions that draw a sequence of lines.
 
 
 
 
 
=== Prdl_UpdateBoundsRectangle() ===
 
Keeps a record of the bounding rectangle of the current set of lines.
 
 
 
 
 
=== Prdl_PolyLine() ===
 
Draws a sequence of one or more lines from the current position.
 
 
 
 
 
=== PRDLSETC.C ===
 
This module contains a function that sets the current position.
 
 
 
 
 
=== Prdl_SetCurrentPosition() ===
 
Sets the current position to the given coordinates.
 
 
 
 
 
=== PRDLSETO.C ===
 
This module contains a function that sets the current line origin.
 
 
 
 
 
=== Prdl_SetLineOrigin() ===
 
Sets the current style state in the DC instance data.
 
 
 
 
 
=== PRDLSHRT.C ===
 
This module contains a function that draws a series of short lines.
 
 
 
 
 
=== Prdl_PolyShortLine() ===
 
Draws a series of short lines as specified.
 
 
 
 
 
=== PRDLSUBR.C ===
 
This module contains functions that return the bit map list entry and series of coordinates for a straight line.
 
 
 
 
 
=== Prdl_LineSetUp() ===
 
Returns the bit map list entry, color, mix, line type, and line type mask.
 
 
 
 
 
=== Bresenham() ===
 
Calculates series of coordinates for points to make a straight line.
 
 
 
 
 
=== PRDMCONN.C ===
 
This module contains functions that sets the connection to the available paper source.
 
 
 
 
 
=== Prdm_ConnDlgProc() ===
 
Specifies the forms that are mounted in each of the available paper sources .
 
 
 
 
 
=== Prdm_EnterConnections() ===
 
Handles manual source.
 
 
 
 
 
=== PRDMCONV.C ===
 
This module contains functions that convert the OS2.INI format.
 
 
 
 
 
=== DrvInstall() ===
 
Accessed from the OS/2 Printer Install or CSD Install.
 
 
 
 
 
=== Prdm_ConvertOldIniToNew() ===
 
Converts the old OS2.INI format to the new format.
 
 
 
 
 
=== Prdm_ReadTerminatedWordFromText() ===
 
Reads characters until it reaches terminators or null values.
 
 
 
 
 
=== PRDMCPGE.C ===
 
This module contains functions that handle the code page.
 
 
 
 
 
=== Prdm_CodePageDlgProc() ===
 
Enables the user to add or delete a code page and to select an initial code page.
 
 
 
 
 
=== Prdm_EnterCodePageValues() ===
 
Allows the user to enter the code page selection.
 
 
 
 
 
=== Prdm_AddCodePage() ===
 
Adjusts the code page list to add a new code page.
 
 
 
 
 
=== Prdm_DisplayCodePage() ===
 
Displays the code page to the user.
 
 
 
 
 
=== PRDMDEV.C ===
 
This module contains the entry point to the .
 
 
 
 
 
=== OS2_PM_DRV_DEVMODE() ===
 
This is an entry point into the device driver. It is accessed from the OS/2 Control Panel.
 
 
 
 
 
=== Prdm_DevMode() ===
 
Calls Prdm_Dialog which manages the window and dialog boxes.
 
 
 
 
 
=== PRDMDFNT.C ===
 
This module contains functions that handle the default font.
 
 
 
 
 
=== Prdm_DfltFontDlgProc() ===
 
Handles default font processing.
 
 
 
 
 
=== Prdm_InitDfltFontList() ===
 
Initializes default font list.
 
 
 
 
 
=== Prdm_DisplayDefaultFontList() ===
 
Displays each font in the default font list, highlighting the default.
 
 
 
 
 
=== Prdm_EnterFontValue() ===
 
Updates default font information in default font list.
 
 
 
 
 
=== Prdm_FontTableMemory() ===
 
Allocates memory for the default font table and sets up the entry zero to be the system font.
 
 
 
 
 
=== Prdm_MoreFontTableMemory() ===
 
Allocates more memory for the Default Font Table.
 
 
 
 
 
=== Prdm_ReleaseFontTableMemory() ===
 
Deallocates the memory allocated for the Default Font Table.
 
 
 
 
 
=== Prdm_CopyFaceNameAcross() ===
 
Parses a face name to change the decimal point character if it is present.
 
 
 
 
 
=== PRDMDLG.C ===
 
This module contains a function that runs the dialog box.
 
 
 
 
 
=== Prdm_Dialog() ===
 
Controls the running of the section of the control panel.
 
 
 
 
 
=== PRDMDSUB.C ===
 
This module contains functions that manage the default font entry.
 
 
 
 
 
=== Prdm_ResidentFonts() ===
 
Adds the match and the description parameters of the current default font list entry.
 
 
 
 
 
=== Prdm_CardFonts() ===
 
Processes all the card fonts.
 
 
 
 
 
=== Prdm_ExpandFaceName() ===
 
Expands the face name for Quiet III cartridge fonts.
 
 
 
 
 
=== Prdm_LoadMatchParameters() ===
 
Copies data from the ''FMF''into the match parameters in the current entry of the default font list.
 
 
 
 
 
=== Prdm_CheckMatchParameters() ===
 
Checks if the current font is valid and is the default font.
 
 
 
 
 
=== Prdm_CheckDefaultFont() ===
 
Tests the current entry in the default font list to determine if it is the default font.
 
 
 
 
 
=== Prdm_DisplayPointSzList() ===
 
List all the point sizes in the point size list box.
 
 
 
 
 
=== Prdm_GetPointSzIndex() ===
 
Finds out the index to the default outline font point size table.
 
 
 
 
 
=== Prdm_EnterFontPointSz() ===
 
Queries the point size selection and finds the point size value.
 
 
 
 
 
=== Prdm_DfltFontPSzControlProc() ===
 
Queries the font selection and displays the point sizes.
 
 
 
 
 
=== PRDMENTR.C ===
 
This module contains a function that enters data into the ''DMData''.
 
 
 
 
 
=== Prdm_EnterValues() ===
 
Writes the data that is currently contained in that dialog box into the ''DMData''.
 
 
 
 
 
=== PRDMFILE.C ===
 
This module contains functions that copy a file.
 
 
 
 
 
=== Prdm_CopyFile() ===
 
Copies a file from the source to the target directory.
 
 
 
 
 
=== Prdm_ReadFileContents() ===
 
Reads the file contents.
 
 
 
 
 
=== Prdm_CheckFileExists() ===
 
Checks if the file exists.
 
 
 
 
 
=== Prdm_CheckFileOKForPrinter() ===
 
Checks if this file is appropriate for this driver and the current printer.
 
 
 
 
 
=== Prdm_CopyFMFFiles() ===
 
Copies a CDF file and its associated ''FMF''files.
 
 
 
 
 
=== Prdm_StringsAreEqual() ===
 
Compares two strings, ignoring the case of the characters 'a' - 'z'.
 
 
 
 
 
=== Prdm_ReadFontResource() ===
 
Reads an ''FMF''resource.
 
 
 
 
 
=== PRDMHELP.C ===
 
This module contains help functions.
 
 
 
 
 
=== Prdm_EnableHelp() ===
 
Prepares for help.
 
 
 
 
 
=== Prdm_DisableHelp() ===
 
Displays the help.
 
 
 
 
 
=== Prdm_GetHelpPath() ===
 
Gets the help path.
 
 
 
 
 
=== Prdm_HelpMessageProcessing() ===
 
Processes the help message.
 
 
 
 
 
=== PRDMJOB.C ===
 
This module contains functions that set up the job for dialog box processing.
 
 
 
 
 
=== Prdm_JobSetUpDlgProc() ===
 
Specifies the printer setup for a single job.
 
 
 
 
 
=== Prdm_EnterJobSetUp() ===
 
Sets up the job according to its type.
 
 
 
 
 
=== Prdm_SetupSingleFormList() ===
 
Displays the available forms in the list box and highlights one according to the driver data.
 
 
 
 
 
=== PRDMMAIN.C ===
 
This module contains functions that perform dialog box processing.
 
 
 
 
 
=== Prdm_MainDlgProc() ===
 
Interprets the users responses to the dialog boxes.
 
 
 
 
 
=== Prdm_ControlProc() ===
 
Performs processing or checking when it receives a message relating to a list box or a text box.
 
 
 
 
 
=== Prdm_InitFormsDlg() ===
 
Sets up the dialog box to the current values.
 
 
 
 
 
=== Prdm_InitFormListTemplate() ===
 
Picks up the names of predefined forms from resources and displays them.
 
 
 
 
 
=== Prdm_InitFormList() ===
 
Makes each form name null-terminated, inserts it, and restores the space.
 
 
 
 
 
=== Prdm_PaintFormTemplate() ===
 
Displays the details of the given form.
 
 
 
 
 
=== Prdm_PaintForm() ===
 
Displays the dimensions for a specified form.
 
 
 
 
 
=== Prdm_DeleteForm() ===
 
Deletes the currently selected form.
 
 
 
 
 
=== Prdm_DigitToASCII() ===
 
Converts the rightmost decimal digit of a number to the ASCII digit 0-9.
 
 
 
 
 
=== Prdm_TextFromNumeric() ===
 
Converts a number into a text string.
 
 
 
 
 
=== Prdm_ReadWordFromDecText() ===
 
Returns the value of a number written as text.
 
 
 
 
 
=== PRDMSUB1.C ===
 
This module contains error log and debug functions.
 
 
 
 
 
=== Prdm_TranslateOldIniEntry() ===
 
Makes new .INI entries from the old version.
 
 
 
 
 
=== prdz_Ring3LogErr() ===
 
LogErr routines.
 
 
 
 
 
=== prdz_Ring3LogDosErr() ===
 
LogErr routines.
 
 
 
 
 
=== Ring3CrLf() ===
 
Writes a carriage return or line feed sequence to the debug terminal.
 
 
 
 
 
=== Ring3OutputValue() ===
 
Writes the value to the debug terminal in the specified base.
 
 
 
 
 
=== Ring3OutputString() ===
 
Outputs the specified string to the debug terminal, followed by a ''CrLf''.
 
 
 
 
 
=== Ring3OutputPrompt() ===
 
Outputs the prompt to the debug terminal.
 
 
 
 
 
=== Ring3OutputPair() ===
 
Outputs the string and digit to the debug terminal.
 
 
 
 
 
=== Prdm_GetDeviceName() ===
 
Determines the printer type.
 
 
 
 
 
=== Prdm_PM_DD_Write() ===
 
Builds an application name using ''LPName'', ''DeviceName''and ''DriverName''.
 
 
 
 
 
=== Prdm_SelectOldDriver() ===
 
Selects the old driver if it exists.
 
 
 
 
 
=== PRDMSUBR.C ===
 
This module contains functions that handle the ''DMData''.
 
 
 
 
 
=== Prdm_WriteHeaderData() ===
 
Writes the fixed length header data from ''DMSettings''to the INI entry.
 
 
 
 
 
=== Prdm_ReadyDMData() ===
 
Clears all the DMData structure pointers to null.
 
 
 
 
 
=== Prdm_FreeDMDataSegments() ===
 
Frees all the segments used by ''DMData''.
 
 
 
 
 
=== Prdm_LoadDMDataDefaults() ===
 
Loads default ''DMData''.
 
 
 
 
 
=== Prdm_QueryMainBoxSelections() ===
 
Queries the box selections.
 
 
 
 
 
=== Prdm_WriteBodyData() ===
 
Writes the variable length body data from ''DMData''to the INI entry.
 
 
 
 
 
=== Prdm_WriteIniEntry() ===
 
Writes the INI entry for the given printer.
 
 
 
 
 
=== Prdm_InitMainDlg() ===
 
Sets up the dialog box to the current values.
 
 
 
 
 
=== Prdm_ReadBodyData() ===
 
Reads the variable length body data from the INI entry to ''DMData''.
 
 
 
 
 
=== Prdm_DispMessageBox() ===
 
Loads the message string from resources for display.
 
 
 
 
 
=== Prdm_DispConversionMsg() ===
 
Loads the driver name and the message string from resources for display.
 
 
 
 
 
=== Prdm_RemoveMenuOptions() ===
 
Turns off menu options.
 
 
 
 
 
=== Prdm_InitSourceBoxes() ===
 
Processes some DDT flags.
 
 
 
 
 
=== Prdm_RadioButtonControl() ===
 
Sets up the control structure for radio buttons.
 
 
 
 
 
=== Prdm_FindFormInfo() ===
 
Looks for the form name, type, and unit from the form data in ''DMData''.
 
 
 
 
 
=== Prdm_FindFormNumber() ===
 
Matches form name, type, and unit to the form data in ''DMData''.
 
 
 
 
 
=== Prdm_FindDfltFormNo() ===
 
Finds the default form index number.
 
 
 
 
 
=== PRDNGPIM.C ===
 
This module contains a function that checks the drawing state before continuing.
 
 
 
 
 
=== Prdn_CheckDrawingState() ===
 
Checks the drawing state.
 
 
 
 
 
=== PRDODC.C ===
 
This module contains a function that sets the DC origin.
 
 
 
 
 
=== Prdo_SetDCOrigin() ===
 
Sets the DC origin and retrieves the set of clip rectangles appropriate to it.
 
 
 
 
 
=== PRDODRAW.C ===
 
This module contains functions that draw borders for frames.
 
 
 
 
 
=== Prdo_DrawBorder() ===
 
Draws a border in a rectangular frame.
 
 
 
 
 
=== LockDevice() ===
 
Returns TRUE.
 
 
 
 
 
=== UnlockDevice() ===
 
Returns TRUE.
 
 
 
 
 
=== Prdo_ErasePS() ===
 
Logs a warning to indicate the function is unsupported.
 
 
 
 
 
=== PRDPCMPB.C ===
 
This module contains a function that is not implemented.
 
 
 
 
 
=== Prdp_CompressG4() ===
 
Not implemented.
 
 
 
 
 
=== PRDPERR.C ===
 
This module contains a function that responds to errors.
 
 
 
 
 
=== Prdp_PrintError() ===
 
Responds to printer errors and reports them to the user using a message box .
 
 
 
 
 
=== PRDPINIT.C ===
 
This module contains functions that perform printer initiation.
 
 
 
 
 
=== Prdn_InitialisePrinter() ===
 
Initializes the printer.
 
 
 
 
 
=== Prdn_InitPrinterPage1() ===
 
Initializes SIC or escape codes.
 
 
 
 
 
=== Prdn_InitPrinterAllPages() ===
 
Performs SICs or whatever must be done between every page.
 
 
 
 
 
=== PRDPPREP.C ===
 
This module contains functions that start metafiling.
 
 
 
 
 
=== Prdn_PrepareNewDocument() ===
 
Starts metafiling if required. Calls ''PrepareNextPage''to ready a page for drawing.
 
 
 
 
 
=== Prdn_PrepareNextPage() ===
 
Called by ''PrepareNewDocument'', ''NewFrame''. Sets up a band, and resets the '''drawn'''flag.
 
 
 
 
 
=== PRDPRAST.C ===
 
This module contains functions that output a band to the printer.
 
 
 
 
 
=== Prdp_PrintBandRaster() ===
 
Outputs a complete band to the printer.
 
 
 
 
 
=== Prdp_PrintMakeRaster8() ===
 
Converts the scanlines into raster scans for 8-wire raster output.
 
 
 
 
 
=== Prdp_PrintMakeRaster24() ===
 
Converts the scanlines into raster scans for 24-wire raster output.
 
 
 
 
 
=== Prdp_PrintMakeRasterColor() ===
 
Produces vertical raster bytes for the printer.
 
 
 
 
 
=== Prdp_PrintRaster() ===
 
Outputs the raster to the printer.
 
 
 
 
 
=== Prdp_PrintRasterColor() ===
 
Sends color output blocks to the printer.
 
 
 
 
 
=== PRDPRINT.C ===
 
This module contains functions that process print page.
 
 
 
 
 
=== Prdn_ProcessPage() ===
 
Outputs a page to the printer or spooler, and performs first page actions.
 
 
 
 
 
=== Prdn_ProcessLastPage() ===
 
Outputs a page to the printer or spooler, and performs opening and closing actions for the first and last pages.
 
 
 
 
 
=== Prdn_SendInitAndPage() ===
 
Outputs initiated codes and the bands to the device.
 
 
 
 
 
=== Prdn_JobEndFeedOrSIC() ===
 
Handles the raw data conditional processing.
 
 
 
 
 
=== Prdn_BandingStopJournalling() ===
 
Stops the journal file when banding.
 
 
 
 
 
=== Prdn_BandingDeleteJournal() ===
 
Deletes the journal file for banding.
 
 
 
 
 
=== PRDPSTRT.C ===
 
This module contains functions that send the port option.
 
 
 
 
 
=== Prdp_InitialiseCOMPort() ===
 
Reads the port options from OS2.INI, converts to binary data, and sends to the port device driver.
 
 
 
 
 
=== PRDPSUBR.C ===
 
This module contains a group of printing steps.
 
 
 
 
 
=== Prdp_PrintSimple() ===
 
Uses the Device Color Table (DCT) to access the EST or uses the EST directly to send issue escape sequences.
 
 
 
 
 
=== Prdp_PrintMemory() ===
 
Prints the current contents of the buffer described by ''pMemory''and ''MemoryIndex''.
 
 
 
 
 
=== Prdp_AddString() ===
 
Adds a string to the buffer and outputs the buffer when it is full.
 
 
 
 
 
=== Prdp_PrintMoveDown() ===
 
Moves the printer head closest to the '''Target'''position and calculates the new error in head position.
 
 
 
 
 
=== Prdp_AddHorizMoveString() ===
 
Makes the horizontal movement of the printer head.
 
 
 
 
 
=== Prdp_NeedSpacesForMove() ===
 
Verifies that the necessary space is available to make the planned movement .
 
 
 
 
 
=== Prdp_OutlineFontSizeString() ===
 
Writes the '''Nominal Vertical'''and '''Horizontal Font Size'''parameters of the FSC command to the printer.
 
 
 
 
 
=== Prdp_IntToAsciiDecimal() ===
 
Writes a decimal ASCII string.
 
 
 
 
 
=== PRDPTEXT.C ===
 
This module contains functions that handle text printing.
 
 
 
 
 
=== Prdp_PrintText() ===
 
Outputs all the entries in the text band.
 
 
 
 
 
=== Prdp_SetUpFont() ===
 
Outputs the escape sequences used in the first stage of selecting the font.
 
 
 
 
 
=== Prdp_SelectFont() ===
 
Sends the escape sequences to select a font on the printer.
 
 
 
 
 
=== Prdp_SelectAttributes() ===
 
Sends the device attribute and engine attribute escape sequences.
 
 
 
 
 
=== Prdp_StrikeOutToBand() ===
 
Loops thru all the text chain entries and adds the strikeout lines to the graphics bit map band.
 
 
 
 
 
=== PRDPWRIT.C ===
 
This module contains functions that access the printer.
 
 
 
 
 
=== Prdn_PrtWrite() ===
 
Performs error checking and retries actions to the printer.
 
 
 
 
 
=== Prdn_OpenPrinter() ===
 
Opens the printer.
 
 
 
 
 
=== Prdn_ClosePrinter() ===
 
Closes the printer.
 
 
 
 
 
=== Prdn_our_PrtAbort() ===
 
Terminates the printer job.
 
 
 
 
 
=== Prdn_CloseDevice() ===
 
Closes the printer or spooler file.
 
 
 
 
 
=== PRDQEDOC.C ===
 
This module contains functions that perform actions on a document.
 
 
 
 
 
=== Prdq_StartDoc() ===
 
Starts a document according the state.
 
 
 
 
 
=== Prdq_EndDoc() ===
 
Ends a document in the current device context.
 
 
 
 
 
=== Prdq_AbortDoc() ===
 
Aborts a document for the printer.
 
 
 
 
 
=== Prdn_WaitForThread() ===
 
Waits for a thread in the current device context.
 
 
 
 
 
=== Prdn_AbortTidyUp() ===
 
Resets the Aborted flag, closes the device, and frees the band.
 
 
 
 
 
=== Prdn_write_abort_tidy_up() ===
 
Writes some zeros and a SIC to the printer, frees the band, closes the printer, resets the Aborted flag.
 
 
 
 
 
=== PRDQESC.C ===
 
This module contains functions that query the escape code.
 
 
 
 
 
=== Prdq_Escape() ===
 
Allows access to driver facilities that are not covered by the GPI calls.
 
 
 
 
 
=== Prdq_QueryEscSupport() ===
 
Finds out whether an escape code is supported.
 
 
 
 
 
=== PRDQESUB.C ===
 
This module contains some output functions of a printer.
 
 
 
 
 
=== Prdq_NewFrame() ===
 
Outputs the page to printer or spooler, and increments ''PageNumber''.
 
 
 
 
 
=== Prdq_FlushOutput() ===
 
Flushes current band without printing it, and restarts the band.
 
 
 
 
 
=== Prdq_RawData() ===
 
Sends raw data to the printer.
 
 
 
 
 
=== Prdq_JournalData() ===
 
Writes the data to the journal.
 
 
 
 
 
=== Prdq_SetMode() ===
 
Sets the printer into a particular mode.
 
 
 
 
 
=== PRDQHCC.C ===
 
This module contains a function that queries the hardcopy capabilities of the printer.
 
 
 
 
 
=== Prdq_QueryHardcopyCaps() ===
 
Returns information about the hardcopy capabilities of the printer.
 
 
 
 
 
=== PRDQNAME.C ===
 
This module contains one of the exported entry points into the driver.
 
 
 
 
 
=== OS2_PM_DRV_DEVICENAMES() ===
 
One of the exported entry points into the driver.
 
 
 
 
 
=== PRDQQERY.C ===
 
This module contains functions that query information about the printer.
 
 
 
 
 
=== Prdq_QueryDeviceBitmaps() ===
 
Returns information about the bit map formats supported by the printer.
 
 
 
 
 
=== Prdq_QueryDevResource() ===
 
Returns information about the resources available in the printer driver.
 
 
 
 
 
=== Prdq_QueryDeviceCaps() ===
 
Returns information about a variety of the printer's capabilities.
 
 
 
 
 
=== PRDRING3.C ===
 
This module contains a function that frees any semaphores owned by this process.
 
 
 
 
 
=== Prde_Termination_Ring3_Stub() ===
 
Calls [[01397.htm|Prde_Termination()]]at Ring 2.
 
 
 
 
 
=== PRDSPOLY.C ===
 
This module contains functions that work on polyscanline code.
 
 
 
 
 
=== Prds_PolyScanLine() ===
 
Fills space between each pair of polyshortlines using the required mix and pattern.
 
 
 
 
 
=== Prds_GetPattern() ===
 
Sets up any pattern required for the ''BLT''.
 
 
 
 
 
=== Prds_GetMask() ===
 
Provides a mask to replace some bits at the left of ''Dword''.
 
 
 
 
 
=== Prds_GetPattDword() ===
 
Constructs the ''Mask''and ''RealPattern Dwords''.
 
 
 
 
 
=== prds_InnerScanLine() ===
 
Implements the non-fast path and (4,1) polyscanline code.
 
 
 
 
 
=== PRDSSUBR.C ===
 
This module contains other polyscanline code functions.
 
 
 
 
 
=== Prds_FastScanLine() ===
 
Implements the fast path polyscanline code.
 
 
 
 
 
=== Prds_WriteRow() ===
 
Writes the final row into the bit map, considering the start and end masks.
 
 
 
 
 
=== PRDTCSTR.C ===
 
This module contains functions that handle the output font for the printer.
 
 
 
 
 
=== Prdt_CharString() ===
 
Calls [[01677.htm|Prdt_CharStringPos()]]to do all the work.
 
=== Prdt_CharStringPos() ===
Performs error checking and some set up and calls [[01679.htm|Prdt_TextOutDevFont()]]and [[01683.htm|Prdt_TextOutEngFont()]].
 
=== PRDTDFNT.C ===
This module contains a function that handles output in a device image font.
 
=== Prdt_TextOutDevFont() ===
Handles output in a device image font.
 
=== PRDTEFNT.C ===
This module contains functions that transfer and output characters from the engine font to the bit map.
 
=== Prdt_ImageChar() ===
Transfers a character from the engine font to the position in the bit map.
 
=== Prdt_ImageCharGrey() ===
Transfers a character from the engine font to the position in the bit map when the engine text foreground color is not black.
 
=== Prdt_TextOutEngFont() ===
Prints a string of characters in engine font to the bit map.
 
=== PRDTESUB.C ===
This module contains functions that work with the font data structure and code point structure.
 
=== Prdt_LocateFont() ===
Sets up the font data structure.
 
=== Prdt_EstablishFont() ===
Sets the initial values in the ''CodePoint''structure held in the font data.
 
=== Prdt_NextCodePoint() ===
Sets up fields in the code point structure.
 
=== Prdt_OutlineFontSize() ===
Sets up the fields ''NHFS''and ''NVFS''in ''FontData''.
 
=== Prdt_SetUpFMF() ===
Updates font information.
 
=== Prdt_ExpandMultiCpFMF() ===
Updates font information to be a valid ''FMF''.
 
=== Prdt_SimulateFont() ===
Takes the font specified in ''FontData''and a code page and transforms the font into the new code page.
 
=== Prdt_TranslateChar() ===
Returns the ASCII value of the character based on the mapping of the root code page to the code page vector table.
 
=== Prdt_TranslateWidthTable() ===
Moves the font width table entries and translates each entry's position through the ''CodePageVectorTable''.
 
=== Prdt_GetMultiCpFMFIndex() ===
Searches through the code page list for the input code page.
 
=== PRDTQERY.C ===
This module contains a set of string manipulation utility programs for the 42XX program.
 
=== prdt_QueryCharPositions() ===
Returns an array of coordinates that gives the positions of each character in the string and the position of the first character after the string.
 
=== prdt_QueryTextBox() ===
Determines the size of the bounding box for the given string of text. Returns all the corners of the box and the position for a further character in the string (allowing for the direction of string).
 
=== prdt_QueryWidthTable() ===
Determines the widths of the current font codepoints.
 
=== PRDTSUBR.C ===
This module contains functions for drawing a rectangle.
 
=== prdt_ChainTextBand() ===
Inserts a graphics text band entry into the chain of graphics text band entries which is anchored in the DC instance data.
 
=== prdt_FillRectangle() ===
Draws a solid rectangle into the bit map. No clipping or bounding is performed on the rectangle.
 
=== prdt_GetStartPos() ===
Returns the start position in world, device, or font coordinates.
 
=== prdt_GetStrikeoutRect() ===
Sets up the four corners of the strikeout rectangle taking into account the angle and shear of the character.
 
=== prdt_GetStringWidth() ===
Returns the string width either in world coordinates or in font coordinates . This function should be used only for device fonts.
 
=== prdt_SetOpaqueRect() ===
Produces an opaque rectangle. Handles clipping and bounds accumulation.
 
=== PRDTXFRM.C ===
This module contains functions that scale the character box.
 
=== prdt_RescaleCharBox() ===
Rescales the character box to the new ''xform''matrix that was passed in.
 
=== prdt_ScaleXMetricToDevice() ===
Scales the X metric value passed in to the character box, converts it to device coordinates, and returns the new value.
 
=== prdt_ScaleYMetricToDevice() ===
Scales the Y metric value passed in to the character box, converts to device coordinates and returns the new value.
 
=== prdt_XformFontValue() ===
Scales a value between font and device coordinates depending on given flags .
 
=== PRDUPATT.C ===
This module contains a set of functions for pattern information manipulation for the driver.
 
=== prdu_AllocPatternMemory() ===
Allocates pattern memory for the device context.
 
=== prdu_ExpandPattern() ===
Sets up the pattern information for a driver defined pattern.
 
=== prdu_FreePatternMemory() ===
Frees up memory attached to the pattern information.
 
=== prdu_GetBitmapPattern() ===
Sets up the pattern information for a bit-map-defined pattern.
 
=== prdu_GetDriverPattern() ===
Sets up the pattern information for a driver-defined pattern.
 
=== prdu_GetGreyScaleIndex() ===
Sets up the index into the grey scale pattern table for the pattern that corresponds to the color passed in.
 
=== prdu_GetPatternInfo() ===
Sets up the pattern information into the supplied pattern data structure.
 
=== PRDUTILS.C ===
This module contains a set of string manipulation utility programs for the 42XX program.
 
=== SafeSSALLOCMEM() ===
If the Size parameter is equal to 0, a whole segment is created by ''SSAllocMem()''and an error is returned.
 
=== prdu_abs() ===
Returns the absolute value of its argument.
 
=== prdu_lrotl() ===
Rotates an input value left ''n''positions.
 
=== prdu_memcmp() ===
Compares count bytes of memory at two locations.
 
=== prdu_memcpy() ===
Copies ''n''bytes of memory from one location to another.
 
=== prdu_memset() ===
Sets a character into ''n''bytes.
 
=== prdu_strcat() ===
Concatenates one string to another.
 
=== prdu_strcmp() ===
Compares two strings.
 
=== prdu_strcmpN() ===
Compares two strings up to ''n''characters.
 
=== prdu_strcpy() ===
Copies one string to another.
 
=== prdu_strcpyN() ===
Copies one string to another, up to ''n''characters.
 
=== prdu_strlen() ===
Returns the length of a string.
 
=== prdu_stroccur() ===
Returns '''True'''if the given character occurs in a string or if the character is null.
 
=== prdu_strupr() ===
Converts a string to capital letters.
 
=== prdu_tan() ===
Returns ''tangent*1000''for the given angle.
 
=== PRDZDRIV.C ===
This module contains the printer driver entry and exit routines.
 
=== prdz_EnterDriver() ===
Locks the DC for the current thread if it is not already locked and returns OK.
 
=== prdz_LeaveDriver() ===
Decrements the lock count by 1 for the DC and releases the lock if the lock count is equal to zero.
 
=== PRDZTRAC.C ===
This module contains the trace routines for the 42XX program.
 
=== CrLf() ===
Writes a carriage return or line feed sequence to the debug terminal.
 
=== OutputPair() ===
Writes the specified string and the corresponding value in the given base, binary, decimal, or hexadecimal, followed by a carriage return or line feed sequence.
 
=== OutputPrompt() ===
Writes the specified string to the debug terminal, followed by a ''CrLf''and waits for input.
 
=== OutputString() ===
Writes the specified string to the debug terminal, followed by a ''CrLf''.
 
=== OutputStringNoCRLF() ===
Writes the specified string to the debug terminal, without a ''CrLf''.
 
=== OutputValue() ===
Writes the value to the debug terminal, in the specified base, binary, decimal, or hexadecimal.
 
=== OutputValueLen() ===
Writes the value and length to the debug terminal.
 
=== prdz_Init() ===
Initializes the trace level and opens trace file.
 
=== prdz_LogDosErr() ===
Writes the function name, the accompanying text, and the error return code to the debug terminal.
 
=== prdz_LogErr() ===
Writes the function name, the accompanying text, and the error return code to the debug terminal.
 
=== prdz_ProfileInit() ===
Initializes the Profile array.
 
=== prdz_ProfileTerm() ===
Outputs the Profile array to a file.
 
=== prdz_SSALLOC() ===
Allocates memory and writes the result to the debug terminal.
 
=== prdz_SSFREE() ===
Frees the requested memory and writes the output to the debug terminal.
 
=== prdz_Term() ===
Closes the trace file.
 
=== prdz_Trace() ===
Outputs the trace message and the trace data to the trace file.
 
=== prdz_hex() ===
Converts a ''long''to a hexidecimal ASCII string.
 
=== 32-bit Omni Presentation Driver ===
Omni is a 32-bit raster-graphics driver developed in conjunction with the OS/2 Warp graphics engine and The Generic Printer Library. The Omni model was designed to provide Independent Hardware/Software Suppliers with a device-driver model that allows them to easily create raster OS/2 Printer Drivers.
 
Omni driver code consists of two major functional groups. The first group is a generic, core set of functions that are typical to most OS/2 presentation device drivers. These core functions manage the following:
 
*Printer driver enabling and disabling <br />*Device context (DC) initialization <br />*Job and printer property user-interface
 
The second set of functions are &quot;plug-in&quot; routines that support specific raster languages and printers. Each module requires that a developer need only supply a few functions and fill out a few tables to describe the language and characteristics for the specified printer models. The plug-in functions include the following:
 
*Device query <br />*Job initialization <br />*Page/band rasterization <br />*Job pagination <br />*Job termination <br />*Job abort
 
The plug-in tables describe the following:
 
*Supported trays <br />*Supported paper sizes <br />*Supported media types <br />*Supported resolutions <br />*Supported print modes (i.e. 1,8,24-bit image formats)
 
Omni code has been organized into core and plug-in functional groups to simplify a developer's initial attempt to create an OS/2 raster printer driver. However, developers can modify the core Omni code to achieve better support for their devices.
 
The time required to develop plug-in modules will vary based on the printer language and the developer's experience. On printer models that utilize popular languages, a device can be added in as little as a few hours. Development time will increase in proportion to the level of customizing and extending required for the driver and for the user-interface. Common examples include modifying the user-interface to match another manufacturer 's user-interface and adding support for device or downloadable fonts.
 
The plug-in module can be designed to &quot;hook out&quot; and provide the functions required for the level of control that best utilizes the printer through its native language and capabilities. Examples of optionally hooked functions include the following:
 
*Subclass all spooler calls (Spl calls) <br />*Subclass all port driver calls (Prt calls)
 
=== Generic Printer Library (GenPLib) ===
The Generic Printer Library is a set of subroutines developed in conjunction with the Omni driver for OS/2 Warp. These routines are useful when developing 32-bit printer presentation drivers.
 
The Omni driver is the only driver on the DDK that utilizes all of the Generic Printer Library functions in its source code. That makes the Omni code a valuable example for anyone using GenPLib to develop a 32-bit OS/2 Printer Presentation Driver.
 
All code samples for GenPLib subroutines are a direct excerpt from the Omni driver source code. For further information about the Generic Printer Libaray, see [[00005.htm|Generic Printer Library]].
 
=== Building the Omni Driver ===
Refer to the "Using Your DDK", available on the DDK CD, for a roadmap of the file structure used by the Omni Driver. The &quot;Using Your DDK&quot; roadmap also shows how to build the source code. The location for the core and plug -in code will look similar to the following:
 
<pre class="western">  src\osdd\omni        - Core Omni driver files and makefile
  src\osdd\omni\devices - Plug-in Omni driver files
  src\osdd\omni\icons  - Omni driver icon and graphics</pre>
 
=== Adding a Device ===
The following information takes you through the sections in the plug-in modules you will need to modify for your specific printer.
 
It is relatively easy to add a device that uses one of the printer languages supported by any of the sample plug-in modules. Begin by changing to the directory in which the Omni driver source code is located (refer to the &quot;Using Your DDK&quot;, available on the DDK CD, for file locations). All code in the &quot;omni&quot; directory is considered core Omni driver code.
 
The &quot;devices&quot; subdirectory, located below the &quot;omni&quot; directory, contains the plug-in modules that provide code for specific printer models and their languages.
 
The following sample plug-in modules are provided with the DDK:
 
samp_pcl.c - sample PCL language module <br />samp_eps.c - sample ESC/P(2) language module <br />tiff.c - sample TIFF language module (with G3/G4 compression)
 
All plug-in modules are currently included by the core omni driver file, driver.c. (#include driver.c), and the finished driver currently consists only of the file &quot;omni.drv&quot;.
 
=== Modifying Plug-in Modules ===
The plug-in module is a 'C' source code module that will include any needed header files as well as any definitions, macros, or IDs specifically required to compile.
 
Proceed to the following sections for a description of the plug-in modules that are typically included in every plug-in module.
 
*[[01761.htm|Feature ID Section]]<br />*[[01770.htm|Device Handle Section]]<br />*[[01771.htm|Function Section]]<br />*[[01772.htm|Tables Section]]<br />*[[01782.htm|Supported Features Section]]<br />*[[01783.htm|Devices Section]]<br />*[[01784.htm|Driver Section]]
 
=== Feature ID Section ===
This section contains all the unique IDs that can reference unique printer models and specific features of individual printer models.
 
If two different printer models have the same capability, they can reference the same ID, such as printers within a printer &quot;family&quot; that support the same paper sizes, trays, and so on.
 
Once a feature ID has been added and shipped with a printer, do not change it. This could cause cross-network printing to fail. For example, two different versions of the same printer drivers must use the same feature ID on both networked systems to successfully communicate.
 
Each group of IDs should have the default option for that group assigned the ID == 0 (zero). This helps the core driver to fail invalid IDs and to pick 0 (zero) as a default fallback in an emergency. Proceed to the following sections for a description of the feature IDs:
 
*[[01762.htm|Printer Model IDs]]<br />*[[01763.htm|Print Qualitiy IDs]]<br />*[[01764.htm|Print Mode IDs]]<br />*[[01765.htm|Device Font IDs]]<br />*[[01766.htm|Paper Tray IDs]]<br />*[[01767.htm|Form Size IDs]]<br />*[[01768.htm|Media Type IDs]]<br />*[[01769.htm|Form Connection IDs]]
 
=== Printer Model IDs ===
Assign a unique internal model ID for each new printer you add.
 
The following example shows how to define IDs for three printer models:
 
<pre class="western">#define PRN_ID_MODEL_500        2000
#define PRN_ID_MODEL_500_SX    2001
#define PRN_ID_MODEL_510        2002</pre>
 
=== Print Qualitiy IDs ===
Assign a unique internal print quality ID for each quality setting available on your printer models. A unique print quality typically corresponds to each of your printer settings. This allows you to control the resolution and the number of print head passes for each scanline, such as draft, letter quality, fine.
 
The following example shows how to define IDs for three quality settings:
 
<pre class="western">#define RES_ID_DRAFT          0  // 150 dpi
#define RES_ID_NORMAL        1  // 300 dpi
#define RES_ID_PRESENTATION  2  // 600 dpi</pre>
 
=== Print Mode IDs ===
Assign a unique internal print mode ID for each bitmap format you want to support. You can use your rendering software or the functions provided in GenPLib to render each bitmap format.
 
The following example shows how to define IDs for three bitmap formats:
 
<pre class="western">#define PRINT_MODE_ID_MONOCHROME      0  // 1 bit/pel format
#define PRINT_MODE_ID_COLOR_8_BPP    1  // 8 bit/pel format
#define PRINT_MODE_ID_COLOR_24_BPP    2  // 24 bit/pel format</pre>
'''Note:'''Available formats that work on OS/2 Warp include the following:
 
*8 bit/pel logical on a 1 bit/pel physical bitmap (256 grayscale) <br />*8 bit/pel logical on a 8 bit/pel physical bitmap (256 color) <br />*24 bit/pel logical on a 24 bit/pel physical bitmap (16.7 million color)
 
=== Device Font IDs ===
You can see the ''planned'', but not yet implemented, device fonts in the &quot;samp _eps.c&quot; plug-in module. This module has a sample Epson 24-pin printer that supports several DBCS Japanese fonts and codepages.
 
=== Paper Tray IDs ===
Assign a new unique internal tray ID for each physical tray your printer models support.
 
The following example shows how to define four tray IDs:
 
<pre class="western">#define TRAY_ID_SHEET_FEEDER    0
#define TRAY_ID_ENVELOPE        1
#define TRAY_ID_AUTO            2  // automatic sheet feeder
#define TRAY_ID_MANUAL          3  // manual sheet feeder</pre>
 
=== Form Size IDs ===
Assign a unique ID for each unique paper size supported by your printer models.
 
Different printer models within a printer family can have different margins for the same paper size. To accommodate this variation, you can create multiple form definitions for the same paper size. For example, three form size IDs can exist for the size &quot;letter&quot;. Each would represent &quot;letter&quot; with a different margin.
 
In addition, different margins can be used on one form size &quot;letter&quot; within the same printer model, depending on which tray or printhead is used.
 
The following example shows how to define five form size IDs:
 
<pre class="western">#define FORM_ID_LETTER          0  // Letter-sized form
#define FORM_ID_LEGAL            1
#define FORM_ID_A4              2
#define FORM_ID_C10_ENVELOPE    3
#define FORM_ID_LETTER_2        4  // Letter size with margins
                                    // different from FORM_ID_LETTER</pre>
 
=== Media Type IDs ===
Assign a new unique internal media type ID for each different media type your printer models support.
 
The following example shows how to define four media type IDs:
 
<pre class="western">#define MEDIA_ID_PLAIN      0  // Normal copier paper
#define MEDIA_ID_TRANS      1  // Transparency paper
#define MEDIA_ID_GLOSSY      2  // Chrome Coated paper
#define MEDIA_ID_SPECIAL    3  // Coated Paper</pre>
 
=== Form Connection IDs ===
Assign a unique internal form connection ID for each different combination of tray, form, and media type a user can select. The following are examples :
 
The following example shows how to define four form connection IDs:
 
<pre class="western">#define CONN_ID_1      0  // auto, letter, plain
#define CONN_ID_2      1  // auto. letter. manual
#define CONN_ID_3      2  // manual, C10,  plain
#define CONN_ID_4      3  // manual, A4, transparency</pre>
'''Note:'''Because the user can define uncommon combinations from the Omni Printer Property panels, every permutation need not be displayed.
 
=== Device Handle Section ===
The device handle is a data structure that is unique to a specific plug-in module. A pointer to this data area can be given to the core Omni driver, and this sample pointer will be passed as an input parameter to all functions the plug-in module will subclass. This is an efficient place to put state data and variables that are re-used by the plug-in module while rendering a print job.
 
It is standard practice to put the count of bytes for the entire structure in the first field of the structure, and a 4 character signature that uniquely identifies the structure in the second field of the structure, as follows:
 
<pre class="western"> #define SAMPLE_SIG  0x5350434C      // 'SAMP'
 
typedef struct _SampleHandle {
    ULONG        cb;        // Count of bytes
    ULONG        ulSig;    // Signature
    // Place more variables here as desired
} SAMPHANDLE, *PSAMPHANDLE;</pre>
 
=== Function Section ===
This section contains all prototypes and functions used by the plug-in module either for private use or to be placed in the function hook table.
 
The following example shows the function the core Omni driver code calls at the beginning of each print job:
 
<pre class="western">// Function called at beginning of each print job subclassed
// from the Omni core driver code.
 
BOOL  _System SampleBeginJob( PVOID pv, PVOID pvHandle )
{
  PDDC          pddc      = (PDDC)pv;
  PDEVICEINFO    pDevice    = pddc-&gt;pdb-&gt;pDevice;
  PSAMPPCLHANDLE pHandle  = (PSAMPPCLHANDLE)pvHandle;
 
  // If this printer has defined an Initialization command in the
  // plug-in command table.
  if (pDevice-&gt;pCmds-&gt;ulCmdInit)
  {
      // Send Initialize printer escape codes to output thread
      GplThreadWriteBlock (pddc-&gt;pdb-&gt;hThread,
                          pDevice-&gt;pCmds-&gt;pszCmdInit,
                          pDevice-&gt;pCmds-&gt;ulCmdInit);
  } /* end if */
 
  // NOTE: Send other escape codes to initialize printer here
 
  // Set printer's physical head position in our core Omni DDC
  pddc-&gt;ptlPrintHead.x = 0;
 
  // Initialize absolute pel position in core Omni based on orientation
  if (ORIENTATION_PORTRAIT == pddc-&gt;pdb-&gt;pJobProperties-&gt;ulOrientation)
      pddc-&gt;ptlPrintHead.y = pddc-&gt;pdb-&gt;pFormInfo-&gt;hcInfo.yPels-1;
  else
      pddc-&gt;ptlPrintHead.y = pddc-&gt;pdb-&gt;pFormInfo-&gt;hcInfo.xPels-1;
 
  // Reset flags for beginning of a new (next) page
 
  // Reset rendering flag used by GENPLIB dithering code
  // inside DITHERREQUEST structure we store in our Device Handle
  pHandle-&gt;Req.SrcOptions.fStartOfPage = TRUE;
 
  // Initialize a state flag in our Device Handle to indicate
  // Graphics state on printer has not yet been initialized
  pHandle-&gt;fHaveSetupPrinter = FALSE;
 
  return TRUE;
 
} /* end SampleBeginJob */</pre>
'''Note:''' Tailor the required escape codes and variables to your specific printer models.
 
=== Tables Section ===
In this section, you fill out tables that represent the features available on your printer models. The structures that define a feature, such as a paper size or tray, are all defined in the core Omni driver file, device.h. A table exists for each of the feature ID types, and there will be a unique entry in a table for each feature ID declared. Proceed to the following sections for a description of the tables.
 
*[[01773.htm|Print Quality Table]]<br />*[[01774.htm|Print Mode Tables]]<br />*[[01775.htm|Tray Definition Tables]]<br />*[[01776.htm|Form Definition Tables]]<br />*[[01777.htm|Media Definition Tables]]<br />*[[01778.htm|Feature Support Table]]<br />*[[01779.htm|Form Connection Tables]]<br />*[[01780.htm|Command Support Table]]<br />*[[01781.htm|Subclassed Function Table]]
 
=== Print Quality Table ===
Fill in table for all print qualities supported by all printer models supported in this module. This table is comprised from RESINFO structures in the device.h file.
 
The following is an example of a print quality table with a &quot;draft&quot; print- mode entry:
 
<pre class="western">    RESINFO SAMPLE_pRes[] =
    {
      {  RES_ID_DRAFT,                  // ulResID;
        RES_STRING_DRAFT,              // ulNameID (ID from file omni.rc)
        &quot;&quot;,                            // szResName[32];
                                        // (if not in omni.rc)
        150,                          // ulXRes;
        150,                          // ulYRes;
        5,                            // usCmdLength;
        _ESC_&quot;*r1Q&quot;,                  // szCmdSelectRes[32];
        0,                            // ulCapabilities
        0,                            // ulReserved
        0,                            // usPrintMethod;
        0,                            // usNumPhysicalPins;
        0,                            // bAdjacentDotPrinting;
        1,                            // usDotsPerColumn;
        0,                            // usBytesPerColumn;
        0,                            // usLenLineSpacing;
        _NUL_,                        // szCmdLineSpacing[8];
        0,                            // ulUnitsLineSpacing;
        0,                            // usLenVerticalDensity;
        _NUL_,                        // szCmdVerticalDensity[8];
        0,                            // ulUnitsVerticalDensity;
 
      } /* end draft table entry */
 
    } /* end table */</pre>
 
=== Print Mode Tables ===
Fill in table for all print modes supported by all printer models supported in this module. This table is comprised from PRINTMODE structures in the device.h file.
 
The following is an example of a print mode table with an 8 bit/pel print- mode entry:
 
<pre class="western">    PRINTMODE SAMPLE_pPrintModes[] =
    {
      {
        PMODE_ID_COLOR_8_BPP,          // ulPrintModeID;
        COLOR_TECH_CMY,                // ulColorTechnology;
        PRINT_MODE_STRING_COLOR_ONLY,  // ulNameID; (from omni.rc)
        &quot;&quot;,                            // szPrintMode[32];
                                        // (if not in omni.rc)
        8,                              // Physical bit count
        8,                              // Logical  bit count
        1,                              // # color planes (always 1 for OS/2)
        0,                              // reserved
      } /* end 8 bit/pel print mode */
    }; /* end Print Modes */</pre>
 
=== Tray Definition Tables ===
Fill in table for all paper trays supported by all printer models supported in this module. This table is comprised from TRAYINFO structures in the device.h file.
 
The following is an example of a tray definition table with an &quot;automatic&quot; tray entry:
 
<pre class="western">    TRAYINFO SAMPLE_pTrays[] =
    {
      {
        TRAY_ID_AUTO,        // ulTrayID;
        TRAY_SHEET_FEEDER,    // ulTrayCapability
        DJP_TRY_AUTO,        // ulDJPid; Dynamic Job Property
        TRAY_STRING_AUTO,    // ulNameID;
        &quot;&quot;,                  // pszTrayName;
        TRAY_TYPE_AUTO,      // ulTrayType;
        5,                    // ulCmdSelectTray;
        _ESC_ &quot;&amp;l1H&quot;,        // szCmdSelectTray;
        0,                    // reserved1
        (PULONG)NULL          // reserved2
      } /* end tray auto */
    } /* end tray table */</pre>
 
=== Form Definition Tables ===
Fill in table for all paper sizes supported by all printer models supported in this module. This table is comprised from FORMINFO2 structures in the device.h file.
 
The following is an example of a form definition table with a &quot;letter&quot; form -size entry:
 
<pre class="western">    FORMINFO2 SAMPPCL_pForms[] =
    {
      {
        FORM_ID_LETTER,            // ulFormID;
        FORM_LETTER,                // ulFormCap;
        DJP_PSI_LETTER,            // ulDJPid;
        FORM_CLASS_SHEET_PAPER,    // ulFormClass;
        FORM_STRING_LETTER,        // ulNameID;
        5,                          // usLenCmdSelectForm;
        { _ESC_ &quot;&amp;l2A&quot; },          // szCmdSelectForm[LEN_CMD];
        {                          // hcInfo
          &quot;&quot;,                      // szFormname[32] optional
          US_LETTER_WIDTH,          // cx; (100ths of mm)
          US_LETTER_HEIGHT,        // cy; (100ths of mm)
          630,                      // xLeftClip; (100ths of mm)
          1490,                    // yBottomClip; (100ths of mm)
          US_LETTER_WIDTH-630,      // xRightClip; (100ths of mm)
          US_LETTER_HEIGHT,        // yTopClip; (100ths of mm)
          0,                        // xPels; (pels)
          0,                        // yPels; (pels)
          0                        // flAttributes;
        },
        FALSE                      // bHasBeenSetup;
      } /* end papaer size letter */
    } /* end paper size table */</pre>
'''Note:'''xPels or yPels are not filled in, in this structure. These values are determined dynamically based on current resolution. HCAPS_SELECTABLE and CURRENT are also determined dynamically from printer and job props.
 
=== Media Definition Tables ===
Fill in table for all Media Types supported by all printer models supported in this module. This table is comprised from MEDIAINFO structures in the device.h file.
 
The following is an example of a media definition table with a &quot;plain&quot; media-type entry:
 
<pre class="western">    MEDIAINFO SAMPLE_pMedias[] =
    {
      {
        MEDIA_ID_PLAIN,              // ulMediaID;
        MEDIA_TYPE_PLAIN,            // ulMediaCap;
        DJP_MED_PLAIN,                // ulDJPid;
        MEDIA_STRING_PLAIN,          // ulNameID;
        &quot;&quot;,                          // szMediaName[LEN_MEDIANAME];
        5,                            // ulCmdSelectMedia
        _ESC_ &quot;&amp;l0M&quot;,                // szMediaTypeCmd;
        FALSE,                        // ulColorAdjustRequired
        HEAVY_ABSORPTION,            // ulAbsorptionAdjust
      }, /* end Plain media */
    } /*end media table */</pre>
 
=== Feature Support Table ===
This table indicates whether the core Omni driver should allow the user to add their own trays, paper sizes, fonts and form connections.
 
If a field is set to TRUE, the Printer Property panels will allow users to define new features of that particular type. If a field is set to FALSE, the Printer Property panel will not allow users to enter new features of that type. A standard way of filling this table in follows:
 
<pre class="western">    FEATUREINFO SAMPLE_Features =
    {
      FALSE,              // bSupUserDefTrays; (no user trays)
      TRUE,                // bSupUserDefForms; (allow user forms/margins)
      FALSE,              // bSupUserDefFonts; (no user fonts)
      TRUE                // bSupUserDefConnects; (allow user connections)
    }; /* end SAMPPCL_Features */</pre>
 
=== Form Connection Tables ===
Fill in table for all Form Connections supported by all printer models supported in this module. These are unique combinations of Tray, Paper Size , and Media type. This table is comprised from FORMCONNECTION structures in the device.h file.
 
The following is an example of a form connection table with two connection entries. The first connection is comprised of an automatic tray, an A4 form size, and a plain media type. The second connection is comprised of an manual tray, an A4 form size, and a transparency media type.
 
<pre class="western">    FORMCONNECTION SAMPLE_pConnects[] =
    {
      { CONN_ID_1,  TRAY_ID_AUTO,    FORM_ID_A4,  MEDIA_ID_PLAIN  },
      { CONN_ID_2,  TRAY_ID_MANUAL,  FORM_ID_A4,  MEDIA_ID_TRANS  },
    } /* end Form Connection Table */</pre>
 
=== Command Support Table ===
This table contains an extensive list of commands typically used by printers. Find the most logical entry for the commands you want to use, and fill them in appropriately.
 
'''Note:''' The Omni core driver does not utilize this table and does not expect any command to be filled in.
 
=== Subclassed Function Table ===
This table should contain the default function the plug-in module will attempt to subclass to generate a print job. Although the Omni driver does not require any function to be subclassed, the Omni core driver default action is to do nothing for these calls.
 
The core Omni driver will allow you to dynamically modify this table in the &quot;device query&quot; function for printers that require special handling.
 
The following is an example of a subclassed function table with six functions subclassed. The functions that appear in this table would typically be coded in [[01771.htm|Function Section]].
 
<pre class="western">    FNSUBCLASS SAMPLE_Subclassed_Functions =
    {
        SampleBeginJob,        // pfnInitJob; -subclassed
        SampleChooseRasterize,  // pfnRasterizeBand; -subclassed
        SampleNewFrame,        // pfnNextPage; -subclassed
        SampleEndJob,          // pfnTermJob; -subclassed
        SampleAbortJob,        // pfnAbortJob; -subclassed
        SampleDeviceQuery,      // pfnDeviceQuery; -subclassed
        NULL,                  // pfnQueryFonts;
        NULL,                  // pfnDeviceOpen;
        NULL,                  // pfnDeviceClose;
        NULL,                  // pfnDeviceWrite;
        NULL,                  // pfnSpoolerOpen;
        NULL,                  // pfnSpoolerStartJob;
        NULL,                  // pfnSpoolerEndJob;
        NULL,                  // pfnSpoolerClose;
    }; /* end Subclassed_Functions */</pre>
 
=== Supported Features Section ===
This section defines arrays of feature IDs that reference the feature tables (refer to [[01772.htm|Tables Section]]). Each array is designed around a particular printer model and contains only those feature IDs for the features supported by that particular model.
 
The feature tables can be thought of as supersets of available features and the arrays as subsets of those supersets. Each array subset defines features for a particular printer model. The types of arrays directly correlate to the following feature tables types:
*Print Qualities
*Print Modes
*Device Fonts
*Paper Trays
*Form Sizes
*Media Types
*Form Connections
 
The first value in an array is the default value for device, in case a mismatch or an error occurs.
 
=== Devices Section ===
All the feature arrays that you have defined to describe a particular model will be combined with other information to describe an Omni driver plug-in device. The plug-in device will in turn be combined to define the array of devices that your plug-in module will support.
 
The structure that needs to be filled in to describe a device is the DEVICEINFO structure defined in the device.h file.
 
The following is an example of a device array with a single &quot;Sample Printer Model 500&quot; device entry:
 
<pre class="western">    DEVICEINFO SAMPLE_pDevices[] =
    {
      {
        PRN_ID_SAMPLE_500,
        &quot;Sample Printer Model 500&quot;,                  // pszDeviceName;
        &quot;Sample Printer Model 500&quot;,                  // pszDeviceDesc;
        &quot;IBM&quot;,                                        // pszDeviceVendor;
        1,                                            // usDeviceMajorVersion;
        0,                                            // usDeviceMinorVersion;
        CAPS_TECH_RASTER_PRINTER,                    // ulOS2DeviceTechnology;
        OMNI_CAP_MONO,                                // ulOmniDeviceTechnology;
        DEV_FUNC_RASTER,                              // ulDeviceFunctions;
        RASTER_TOP_TO_BOTTOM,                        // Raster info
        DEV_MIRROR,                                  // ulDeviceBits;
        SAMPPCL_RLLDELTAROW,                          // compression supported
        &amp;SampleMemory,                                // pMemory;
        &amp;SAMPLE_Commands,                            // pCommands;
        &amp;SAMPLE_Sub_Functions,                        // pSubclassedFunctions;
        &amp;SAMPLE_Features,                            // pFeatures;
        //----------------------------
        // Feature arrays
        //----------------------------
        SAMPLE_SUPPORTED_RESOLUTIONS,                // usNumRes;
        SAMPLE_pulResolutions,                        // pulRES;
        0,                                            // usNumFonts;
        NULL,                                        // pFONTS;
        SAMPLE_SUPPORTED_TRAYS,                      // usNumTrays;
        SAMPLE_pulTrays,                              // pTRAYS;
        SAMPLE_DEFINED_FORMS,                        // ulNumForms;
        SAMPLE_pForms,                                // pFORMS;
        SAMPLE_SUPPORTED_MEDIAS,                      // ulNumMedias;
        SAMPLE_pulMedias,                            // pulMedias;
        NULL,                                        // pInkInfo;
        SAMPLE_SUPPORTED_CONNECTIONS,                // usNumConnects;
        SAMPLE_pulConnects,                          // pConnects;
        SAMPLE_SUPPORTED_PRINT_MODES,
        SAMPLE_pulPrintModes,
        //----------------------------
        // HSV color model modifers
        //----------------------------
        0,                                            // ulNumModifiers;
        (PTRIPLETMODIFIERS)NULL,                      // pTripletModifiers;
        &amp;SAMPLE_UserData,
        //------------------------------------------------
        // Default Job Property settings for this printer
        // used in User interface (refer to the device.h file
        // for values).
        //------------------------------------------------
        {
          0,                        // cb        ***IGNORED***
          {0},                      // achDriver ***IGNORED***
          0,                        // ulSig    ***IGNORED***
          ORIENTATION_PORTRAIT,      // ulOrientation
          1,                        // cCopies
          CONN_ID_1,                // ulDefConnID
          CONN_ID_5,                // ulDefNonMetricConnID;
          0,                        // ulDefFontID
          RES_ID_DRAFT,              // ulDefResID
          PRINT_MODE_ID_COLOR_8BPP  // ulDefPrintModeID
          SAMPPCL_RLLDELTAROW,      // compression supported
          COLOR_BLACK,              // usForeground = COLOR_BACK
          COLOR_WHITE,              // usBackground = COLOR_WHITE
          IMAGE_OPTION_NOMIRROR,    // OR options together
          HT_MAGIC_SQUARES,          // Magic Square halftone as default algorithm
          127,                      // Default for HT_LEVEL HaftTone Algorithm
          0,                        // lHue;    // % deviation along circle
          0,                        // lSaturation;// % deviation along radius
          0,                        // lValue;  // % deviation darkness value
          0,                        // lDarkness;// % deviation darkness value
          FF_CTL_NONE,              // bFFControlType
          0,                        // ulJobPhaseControl
          0L,                        // Gamma Adjustment Red
          0L,                        // Gamma Adjustment Green
          0L,                        // Gamma Adjustment Blue
          0L,                        // Bias of Red Gamma
          0L,                        // Bias of Green Gamma
          0L,                        // Bias of Blue Gamma
          0L,                        // Duplex Options
          0,                        // Black Gamma Adjustment
          0,                        // Bias of Black Gamma
          0,                        // Black Reduction %
        }
      } /* end Sample Printer model 500 */
      , // repeat DEVICEINFO structure to define other printer models
 
    }; /* end SAMPLE_pDevices block */</pre>
 
=== Driver Section ===
The final section of the plug-in module will contain the structure that describes your overall driver. This will include all the feature tables you defined and the array of supported devices (DEVICEINFO structures) you defined.
 
The DRIVERINFO structure is defined in the file device.h. The following is an example of a driver structure:
 
<pre class="western">    DRIVERINFO pSAMPLEDriver[] =
    {
      {
        &quot;Sample Printer Driver&quot;,        // pszDriverName;
        &quot;IBM&quot;,                          // pszDriverVendor;
        0x0210,                          // usDriverVersion;
        SAMPLE_DEFINED_RESOLUTIONS,      // usNumRes;
        SAMPLE_pRes,                    // pRES; (Print Mode Table)
        0,                              // usNumFonts;
        NULL,                            // pFONTS; (Font Table)
        SAMPLE_DEFINED_TRAYS,            // usNumTrays;
        SAMPLE_pTrays,                  // pTRAYS; (Tray Table)
        SAMPLE_DEFINED_FORMS,            // usNumForms;
        SAMPLE_pForms,                  // pFORMS; (Form Table)
        SAMPLE_DEFINED_MEDIAS,          // ulNumMedias;
        SAMPLE_pMedias,                  // pMEDIAS; (Media Type Table)
        SAMPLE_DEFINED_CONNECTIONS,      // usNumConnects;
        SAMPLE_pConnects,                // pCONNECTS; (Form Connection Table)
        SAMPLE_DEFINED_PRINT_MODES,      // usNumPrintModes;
        SAMPLE_pPrintModes,              // pPrintModes; (Print Mode Table)
        SAMPLE_SUPPORTED_DEVICES,        // usNumDevices;
        SAMPLE_pDevices,                // pDEVICES;  (Device Array)
        SAMPLE_pGammas,                  // pGammaTables;
      } /* end logical block */
 
    }; /* end Driver block */</pre>
 
=== Preparing Driver for Shipping ===
You must rename the driver and prepare it for shipping. This helps to ensure that your driver will be unique and not be in conflict with other drivers developed from this same source code. Proceed to the following sections for guidelines.
 
*[[01786.htm|Renaming the Driver]]<br />*[[01787.htm|Including Only Your Plug-In Modules]]<br />*[[01788.htm|Changing Global Semaphore Name]]<br />*[[01789.htm|Modify Application Name Used in INI files]]<br />*[[01790.htm|Changing User Interface]]<br />*[[01790.htm|Changing User Interface]]
 
=== Renaming the Driver ===
To rename the driver, do the following:
 
1.In the Omni driver makefile, the MACRO for the driver name is &quot;omni&quot;. Change the driver name to the name you want to use. For example, replace DRIVER = OMNI with DRIVER = &lt;''your_name''&gt;.
 
For systems that use FAT file structure, you must use the 8.3 file naming convention.
 
2.Rename the files: omni.rc, omni.dlg, omni.ipf to the same name you used in step 1. Leave the renamed files in the same directory in which the original files were found. For example, rename: omni.rc to &lt;''your_name''&gt;.rc.
 
3.Repeat this for omni.dlg and omni.ipf.
 
=== Including Only Your Plug-In Modules ===
The Omni driver can include plug-in modules for all the printers and languages you want it to support. To limit those plug-in modules to just the ones you need for supporting your printers, modify the #include lines in the Omni core file driver.c. as follows:
 
1.Look for the following lines at the top of the driver.c. file.
 
<pre class="western">      #else  // this is a DDKBLD
        #include &quot;devices\samp_pcl.c&quot;
        #include &quot;devices\samp_eps.c&quot;
        #include &quot;devices\tiff.c&quot;          // TIFFDEVICE
      #endif</pre>
2.Change the #include lines between the #else and #endif bracket to include only those plug-in files you have written and want to ship in your driver.
 
=== Changing Global Semaphore Name ===
The Omni driver utilizes a named global semaphore that should remain unique within the operating system. If you do not change this semaphore name, the drivers can attempt to use the same semaphore name at the same time which will lock (deadlock) the operating system. The printer driver is a &quot;trusted &quot; extension of the base operating system and should behave with multi- tasking in mind.
 
To change the Omni driver's global semaphore name, do the following:
 
1.Look for the following lines in the driver.c file that define Omni's global data:
 
<pre class="western">      GLOBALS  globals =
      {
        0L,
        (HMODULE) 0,                    // supplied on first load in INITTERM.C
        ....,
      #ifndef DDKBLD
        &quot;\\SEM32\\OMNI\\GLOBAL\\SEM&quot;,  // pointer to string containing the name
                                        // of the global sem (OMNI)
      #else
        &quot;\\SEM32\\SAMP\\GLOBAL\\SEM&quot;,  // pointer to string containing the name
      #endif                            // of the global sem (DDK)
 
      };</pre>
2.Replace the line between the #else and the #endif line with a semaphore name that will be unique to your driver. The easiest do this is to replace the portion of the name that reads &quot;SAMP&quot; with the name of your new driver.
 
=== Modify Application Name Used in INI files ===
The Omni driver stores user defined features and printer properties in a named location in the OS/2 system INI file. You must change the name of this location, as follows, to avoid conflicts with the Omni driver.
 
1.In the file driver.h, look for the following lines:
 
<pre class="western">        #ifndef DDKBLD
        #define APPNAME_DEBUGINFO        &quot;OmniDriver&quot;
        #else
        #define APPNAME_DEBUGINFO        &quot;SampDriver&quot;
        #endif</pre>
2.Replace the name &quot;SampDriver&quot; with the name you want information to be stored under in the OS/2 system INI file for your driver.
 
3.In the file driver.h, look for the following lines:
 
<pre class="western">        #else // this is a DDKBLD
        PDRIVERINFO Drivers[]  = {
            pSAMPPCLDriver    ,
            pSAMPEPSONDriver  ,
            pTIFFDriver        ,
        };
        #endif</pre>
4.Replace the DRIVERINFO pointers, such as pSAMPPCLDriver and pSAMPEPSDriver, to include only the pointer to the DRIVERINFO structure you declared in your plug-in module.
 
=== Changing User Interface ===
The Omni driver has a generic user-interface, stringtable, and help panels that can be modified to better represent your driver.
 
Many hardware companies choose to (and can) modify the user interface to appear the same as that user interface may appear on other operating system platforms. Also, many companies wish to add their corporate logos to many of the printer panels for brand recognition. The names of particular printer model features and options may not appear in the Omni driver stringtable and can be customized with new strings. Often copyrighted names are added when modifying the driver.
 
It is beneficial to use the original Omni driver files, omni.rc, omni.dlg, and omni.ipf, because IBM has translated these files into 13 or more country-specific languages, and these files are available to you through the Driver Development Support Center (DDSC) and the DUDE bulletin board system.
 
=== Printer Bidirectional Communications ===
This chapter discusses OS/2 communications for bidirectional printers.
 
=== Introduction ===
The OS/2 print spooler and print object take advantage of the features of bidirectional printing. The ''IBM Developer Connection Device Driver Kit for OS/2''(DDK) now provides the following in support of bidirectional printers:
 
1.Spooler Prt API interface that enables bidirectional communications with printers-this is bidirectional-software protocol independent.
 
2.Presentation Manager (PM) port-driver interface that enables bidirectional communications with printers-this is also bidirectional- software protocol independent.
 
3.Bidirectional protocol router layer that routes generic printer queries/ control commands to the correct bidirectional protocol converter.
 
4.Print object that takes advantage of the features of bidirectional printers.
 
5.Network-independent API interface that allows remote printer queries and effective printer-alert handling.
 
All OS/2 printer drivers developed with a prior DDK version should work without modification when printing to a bidirectional printer.
 
PM port drivers developed with a prior DDK version should work without modification, but they will not provide bidirectional communication.
 
The changes to the OS/2 print subsystem:
 
*provide precise printer warnings/errors to users <br />*keep print jobs until they appear in an output bin <br />*provide remote control panel functions for certain printers
 
=== Overview ===
The OS/2 print subsystem has a set of APIs that applications and OS/2 printer drivers can use to communicate bidirectionally with printers. The application interface consists of PrtXXXX APIs supported by the spooler. These APIs support generic query and set commands that allow OS/2 applications to get information about any type of supported printer without having to know the printer's specific command language.
 
From the set of PrtXXXX APIs, the spooler calls PM port drivers written to support bidirectional printers. The port driver is then responsible for sending data across the physical medium to the printer. A port driver can be written to support a parallel-port attached printer, a network-wire attached printer, or a printer attached in any other way.
 
Many printers use the same command language and structure for query and response information. In order to limit the amount of code required by new port-driver interfaces, the OS/2 print subsystem allows port drivers to use bidirectional protocol converters to formulate the commands necessary to query and set information in the printer. These protocol converters assist port drivers by interpreting data received by the printer and converting generic query as well as set commands into commands that the printer understands.
 
<pre class="western">                /----------------\
                |    OS/2      |
                | Printer Driver |
                \----------------/
                        �
                        |
                        �
                  /--------------\          /---------------\
                  | OS/2 Spooler |---------�| Bidirectional |
                  \--------------/          |  Protocol    |
                    �        �            |  Converter  |
                    |        |            | (PJL or NPAP) |
                    |        |            \---------------/
                    |    /---+---------------/  |
                    �    |  �                  |
        /--------------\  | /---------------\    |
        | Network Port |�-/ | Parallel Port |    |
        |    Driver    |    |    Driver    |�----/
        \--------------/    \---------------/
                �                  �
                |                  |
                �                  �
            /---------\      /-------------\      /---------------\
            | Network |      |    OS/2    |      | OS/2 Parallel |
            \---------/      | File System |�----�|  Port Driver  |
                �            \-------------/      |    Driver    |
                |                                \---------------/
                |                                        �
                |                                        |
                �                                        �
            /---------\                              /---------\
            | Printer |                              | Printer |
            \---------/                              \---------/</pre>
 
=== Spooler Print APIs ===
See the ''OS/2 Presentation Device Driver Reference'' for detailed information on these APIs, their syntax, and their parameters.
 
PrtOpen Opens a device for output. Routed to the SplPdOpen() routine in the port driver.
 
PrtClose Routed to port-driver SplPdClose to close a device connection.
 
PrtAbort Routed to port driver SplPdAbortDoc to abort operations to the device connection.
 
PrtAbortDoc Routed to SplPdAbortDoc for document abort processing.
 
PrtResetAbort Routed to SplPdResetAbort to reset an aborted print job to allow a print driver to send multiple reset sequences to the printer.
 
PrtWrite Routed to SplPdWrite to write print job data to the device.
 
PrtDevIOCtl Passes device-specific commands to the print device.
 
PrtNewPage Routed to port-driver SplPdNewPage to signal the beginning of a new output page.
 
PrtQuery Routed to port-driver SplPdQuery or protocol-converter SplProtSendCmd to get information about the print device.
 
PrtSet Routed to port-driver SplPdSet or protocol-converter SplProtSendCmd to set printer device information.
 
=== Presentation Manager Port-Driver Interface ===
A port driver is responsible for transmitting data to a printer and receiving data from a printer. The port driver does not need to know the format of the data-a protocol converter handles the command language for bidirectional printers.
 
The following API definitions are exported by bidirectional PM port drivers :
 
*SplPdOpen <br />*SplPdClose <br />*SplPdAbortDoc <br />*SplPdResetAbort <br />*SplPdWrite <br />*SplPdNewPage <br />*SplPdQuery <br />*SplPdSet <br />*SplPdEnumPort <br />*SplPdGetPortIcon <br />*SplPdInstallPort <br />*SplPdRemovePort <br />*SplPdSetPort <br />as well as (optionally):
 
*SplPdRemoteSetPort <br />*SplPdSendCmd
 
If SplPdOpen is exported by a port driver, then the spooler no longer calls SplPdInitPort or SplPdTermPort for port initialization/termination.
 
If SplPdSendCmd is exported, the spooler may call the bidirectional- software protocol converter directly, instead of calling SplPdQuery/ SplPdSet first. The protocol converter then calls SplPdSendCmd to pass the command data to the printer.
 
The spooler handles all inter-process communication for the port driver. All calls for sending print jobs, querying, or setting printer configurations are done from the single spooler process.
 
All structures returned by PrtQuery or passed into PrtSet must use offsets from the beginning of the buffer instead of imbedded pointers. This is done to allow the spooler to perform more efficient inter-process communications .
 
The following is the flow when a port driver exports SplPdSendCmd:
 
<pre class="western">              |
              � PrtSet
          /---------\
          | Spooler |-----------\
          \---------/          |
                                � SplProtSendCmd
                          /---------------\
                          | Bidirectional |
                          |    Protocol  |
                          |  Converter  |
                          \---------------/
                  /-------------/
                  |
                  � SplPdSendCmd
          /-------------\
          | Port Driver |
          \-------------/</pre>
The following is the flow when a port driver does not export SplPdSendCmd:
 
<pre class="western">      |
      � PrtSet
  /---------\
  | Spooler |            Send set command to port driver
  \---------/
      |
      � SplPdSet
  /-------------\
  | Port Driver |        Gives port driver's SendCmd function address to converter
  \-------------/
      |
      � SplProtSendCmd
  /---------\
  | Spooler |            Routes to correct bidirectional protocol converter
  \---------/
      |
      � SplProtSendCmd
  /--------------------\
  | Protocol Converter | Generates command string, and sends it to port driver
  \--------------------/
      |
      � SendCmd
  /-------------\
  | Port Driver |        Sends protocol-specific commands to printer
  \-------------/
      |
      /
      /
      |
  /---------\
  |        |
  | Printer |
  |        |
  \---------/</pre>
<br />See the ''OS/2 Presentation Device Driver Reference''for detailed information on these APIs, their syntax, and their parameters.
 
SplPdOpen Called by PrtOpen to open a device for output.
 
SplPdClose Called by PrtClose to close a device connection and free the handle.
 
SplPdAbortDoc Called by PrtAbort and PrtAbortDoc for document-abort processing.
 
SplPdResetAbort Called by PrtResetAbort to reset an aborted device handle to allow writes again.
 
SplPdWrite Called by PrtWrite and SplProtWrite to write data to the device.
 
SplPdNewPage Called by PrtNewPage to signal the beginning of a new output page.
 
SplPdQuery Called by PrtQuery to get information about the print device.
 
SplPdSet Called by PrtSet to set printer device information.
 
SplPdSendCmd Called by SplProtSendCmd to send protocol-specific commands to the printer.
 
SplPdEnumPort Called by the print object to enumerate ports supported by this port driver when the port driver does not export the default install- port extended attribute.
 
SplPdGetPortIcon Returns the resource ID of the icon that represents the ports supported by this port driver.
 
SplPdInstallPort Called by the print object when the user elects to install a new printer port.
 
SplPdRemovePort Called by the print object when the user elects to delete an existing printer port.
 
SplPdSetPort Called by the print object when the user elects to open the settings on a printer port.
 
SplPdRemoteSetPort Called by the network print object when an administrator elects to open the settings on a server's printer port from a client machine.
 
=== Port-Driver Extended Attributes ===
Port-driver files (with a .PDR extension) can have the following extended attributes to assist the print object in installing the port driver:
 
DEFAULT_PORT (Optional) Name of default output port to install from this port driver.
 
The format is default-port name followed by a semi-colon and the default- port name's description.
 
For example, &quot;MyPort;A default port called MyPort&quot;.
 
This makes enumerating ports to install from the print object more efficient. Without this EA, the print object has to load and call the port driver's SplPdEnumPort API to display the list of ports available to install.
 
VENDORNAME (Optional) Vendor name of the port driver.
 
This is used to specify the subdirectory from /OS2/DLL in which to install the port driver. If not given, the port driver is installed in the /OS2/DLL directory.
 
REQUIREDVENDORFILES (Optional unless other files are required) Comma- separated list of extra files required for correct operation of the driver.
 
These files are copied into the VENDORNAME directory. If this EA is not given, only the port-driver file (.PDR) is copied into the /OS2/DLL directory when installing the port driver.
 
For example, REQUIREDVENDORFILES=MYHELPER.DLL,MYNET.HLP.
 
OPTIONALDRIVERFILES (Optional) Names of extra files that are optional-that is, files not required for correct operation, such as OPTIONALDRIVERFILES= LASERJET.SYM, LASERJET.MAP.
 
These files are copied into the driver directory, which is a subdirectory under /OS2/DLL.
 
REQUIREDDRIVERFILES (Required for multi-file drivers) Names of extra files required by the driver for correct operation, such as REQUIREDDRIVERFILES= LASERJET.DRV.
 
These files are copied into the driver directory, which is a subdirectory under /OS2/DLL.
 
CLASSNAME (Optional) Name of the output stream created by the hardcopy driver, such as CLASSNAME=PCL.
 
REQUIREDCLASSFILES (Optional unless the driver requires other files) Names of extra files required for correct operation by the driver files in the CLASSNAME directory, such as REQUIREDCLASSFILES=GENERIC.DLL.
 
These files are copied into the CLASSNAME directory.
 
OPTIONALCLASSFILES (Optional) Names of extra files that are optional, that is, files not required for correct operation, such as OPTIONALCLASSFILES=*. FNT, GENERIC.SYM, GENERIC.MAP.
 
These files are copied into the CLASSNAME directory.
 
OPTIONALVENDORFILES (Optional) Comma-separated list of extra files that are not required for correct driver operation.
 
These files are copied into the VENDORNAME directory.
 
For example, OPTIONALVENDORFILES=MYNET.SYM.
 
.ICON (Optional) Gives the icon definition used by the workplace shell to display the port objects for this port driver.
 
This extended attribute is automatically created during the build process if the ICON keyword is used with a resource identifier of 1 or if the DEFAULTICON keyword is used in the RC file for the port driver.
 
For example, .ICON 1 PORT.ICO.
 
.VERSION (Optional) Can be used to indicate the version number of a port driver.
 
For example, .VERSION=30.001.
 
=== Port-Installation Steps ===
The user opens an existing print object's settings notebook's &quot;Output Port&quot; settings page to install a new port or port driver or to update an existing port driver. This settings page has two buttons-one for installing a new port, and the other for updating an existing port driver.
 
To update an existing port driver, the following steps are taken:
 
1.If the &quot;Update Port Driver&quot; button is selected, the print object checks for the spooler being enabled.
 
2.If the spooler is enabled, the user
 
*is told that port drivers cannot be updated while the spooler is enabled <br />*is asked if they want to disable the spooler at this time.
 
3.If the spooler is disabled, the user:
 
*is asked for the path to an updated port driver <br />*must select a port driver from the list of port drivers that exist on that path.
 
To install a new printer port, the following steps are taken:
 
1.If the user selects the &quot;Install New Port&quot; pushbutton or selects the &quot; Install&quot; menu item from an existing port object, a dialog box appears listing all ports available to be installed by the existing port drivers. Each port driver can export the extended attribute DEFAULT_PORT-whose contents are the port name followed by a semi-colon and the port description. This is the name and description of a default new port to install for this port driver.
 
If the port driver does not have this extended attribute, the print object calls SplPdEnumPort to list ports available to be installed for this port driver.
 
The port driver can also export the extended attribute &quot;.ICON&quot;-which contains the port driver's icon for the new port to install. This avoids loading and calling a port driver just to display the ports available to be installed by the port driver.
 
There are two radio buttons in this install dialog box. The default is selected to install a new port from an existing port driver, the other button is selected to install a new port driver. If the &quot;Install New Portdriver&quot; is selected, the user is prompted for the path to the new port driver. The print object uses the above method to determine the installable ports.
 
2.When the user selects a port object to install, the print object installs the port driver-if it is a new port driver, by copying the port driver and its files and then adding the port driver entry to the system initialization file.
 
3.The print object calls the port driver's SplPdInstallPort API with the default port name selected by the user.
 
The port driver can display a configuration dialog to the user at this time . This configuration dialog can be similar to the one displayed by SplPdSetPort. The print object does '''not'''call SplPdSetPort during port installation; it is up to each port driver to decide whether or not a configuration dialog is needed when installing a new port.
 
If the port driver decides to display a configuration dialog during SplPdInstallPort, the port driver may need to add a &quot;virtual&quot; port name to the system. This is needed to allow PrtQuery and PrtSet commands to be sent to the port-driver code running under the spooler process. It is suggested that the port driver start a background thread to issue the PrtQuery and PrtSet commands, since the port driver might not even be initialized under the spooler process yet.
 
Once the configuration dialog is complete, the port name configured by the user can be installed and the virtual port can be removed by the port driver.
 
At this point, the port selected by the user is installed and ready to connect to a print object.
 
=== Virtual-Printer Ports ===
The spooler allows applications and port drivers to communicate with printers that are not connected to the print subsystem in OS/2. This is done by allowing the port driver to use a virtual port to connect to non-OS /2 printers. This allows query and set commands to be sent to these printers, but the OS/2 print subsystem is not allowed to select these printer ports for output.
 
An application can add a virtual-printer port by calling SplCreatePort. The application must know extra information about the port driver to be allowed to create a virtual port-such as the network adapter address-and this information is passed into SplCreatePort.
 
When SplCreatePort is called with a unique port name, the spooler calls the port driver with command BIDI_ADD_VIRTUAL_PORT, passing the data buffer supplied by the application. If this is the first port installed by the port driver, the port driver is first called with BIDI_INIT_PORTDRV to allow the port driver to initialize. If this is successful, the port driver is called to add the virtual port.
 
Once the virtual port is created, the application can issue queries to the printer using the virtual-port name. When the application no longer needs a virtual port, the application should remove the port by calling SplDeletePort. This causes the spooler to call the port driver with command BIDI_DEL_VIRTUAL_PORT.
 
Virtual ports allow use of the existing port-driver and protocol-converter interfaces while not allowing the user to select the virtual port as an output port. These virtual ports do not get stored in the INI file, and they are deleted when the spooler is disabled or when the system is rebooted.
 
See the ''OS/2 Presentation Device Driver Reference''for detailed information on these APIs, their syntax, and their parameters.
 
SplCreatePort Called to create a printer port. <br />SplDeletePort Called to remove a printer port.
 
=== Sample Bidirectional Infrared Port Driver ===
A port driver is only responsible for transmitting data to and from the printer; it is not responsible for interpreting the information being sent to or returned by the printer. A PM port driver is a DLL that is used to communicate with a printer. The PM port-driver interface now passes all print job data to the port driver and allows the port driver to return information sent by the printer. Example port drivers are the:
 
*/OS2/DLL/PARALLEL.PDR for parallel attached printers
*/OS2/DLL/SERIAL.PDR for COM devices
 
While different manufacturers may use unique protocols to connect to their printers, developers can write a port driver for a set of printers that use a unique communications mechanism. For example, a port driver can be written for network-wire attached printers.
 
Our sample infrared port driver, when compiled with the target BIDIDBG, logs informational messages into a file called "C:\ALERT.INF". This is to help with debugging only. To disable logging to this file, change the makefile so that it no longer defines compile-flag DEBUG_ALERT.
 
The sample infrared port driver can be changed to support a different communications media. Make copies of our port-driver makefile and source; then, change the string &quot;INFRARED&quot; in the names of these files to a string that matches the new port driver being developed-e.g., &quot;MYDRIVER&quot;.
 
Here is a code roadmap:
 
help.c Initializes and calls help functions. To enable easier loading, this dynamically loads HELPMGR.DLL instead of linking to the help manager.
 
infrared.c Handles all communication with the infrared device. This code uses some callback functions to interface with the LMDLL.DLL infrared helper DLL. This should be replaced with code specific to the communications media used by your new port driver.
 
init.c Contains DLL initialization and port-driver initialization routines. This code loads LMDLL.DLL when needed by the port driver.
 
pdrapi.c Public-entry points for port driver. This contains all the public SplPd APIs for the port driver.
 
util.c Utility functions for the port driver, including memory-allocation and global semaphore-access routines.
 
=== Sample Bidirectional Parallel Port Driver ===
A port driver is only responsible for transmitting data to and from the printer; it is not responsible for interpreting the information being sent to or returned by the printer. A PM port driver is a DLL that is used to communicate with a printer. The PM port-driver interface now passes all print job data to the port driver and allows the port driver to return information sent by the printer. Example port drivers are the:
 
*\OS2\DLL\PARALLEL.PDR for parallel attached printers
 
*\OS2\DLL\SERIAL.PDR for COM devices
 
While different manufacturers may use unique protocols to connect to their printers, developers can write a port driver for a set of printers that use a unique communications mechanism. For example, a port driver can be written for network wire-attached printers.
 
Our sample parallel port driver, when compiled with the target BIDIDBG, logs informational messages to the debug terminal if the flag /C1 (or /C2 for COM2) is added to the &quot;DEVICE=X:\OS2\PMDD.SYS&quot; statement in CONFIG.SYS. This is to help with debugging only. To disable logging to this file, change the makefile so that it no longer defines compile flag DEBUG_ALERT.
 
The sample parallel port driver can be changed to support a different communications media. Make copies of the port-driver makefile and source; then, change the string &quot;PARALLEL&quot; in the names of these files to a string that matches the new port driver being developed, for example, &quot;MYDRIVER&quot;.
 
Here is a code roadmap:
 
help.c Initializes and calls help functions. To enable easier loading, this dynamically loads HELPMGR.DLL instead of linking to the help manager.
 
par1284.c Handles all communication with the parallel attached printer. This code uses IOCtls supported by the PAR1284.SYS bidirectional parallel device driver. This should be replaced with code specific to the communications media used by your new port driver.
 
For more information on the IOCtl commands supported, refer to the Category 05H Parallel Port Control IOCtl Commands found in the ''Physical Device Driver Reference.''
 
init.c Contains DLL initialization and port-driver initialization routines.
 
pdrapi.c Public entry points for port driver. This contains all the public SplPd APIs for the port driver.
 
util.c Utility functions for the port driver, including memory-allocation and global semaphore-access routines.
 
=== Bidirectional Protocol Converters ===
A protocol converter is responsible for generating the commands to issue to the printer and for being able to interpret data sent by the printer.
 
The spooler(PMSPL.DLL) exports two new entry points, as does each bidirectional protocol converter:
 
*SplProtSendCmd-route generic Query or Set request to bidirectional- software protocol-specific converter to create command, send command to printer, and wait for printer response.
 
*SplProtXlateCmd-convert printer to host message into generic bidirectional command/response packets.
 
Protocol converters may optionally export SplProtWrite if they need to wrap print job data in a bidirectional-software protocol header.
 
The spooler handles all inter-process communication for the protocol converter. All calls for sending print jobs, querying, or setting printer configurations are done from the single spooler process.
 
See the ''OS/2 Presentation Device Driver Reference''for detailed information on these APIs, their syntax, and their parameters.
 
SplProtSendCmd Called by PrtQuery, PrtSet, SplPdQuery, or SplPdSet to convert generic commands and pass bidirectional protocol-specific commands to the printer.
 
SplProtXlateCmd Called only by port drivers when processing the BIDI_WAIT_ ALERT(8016h) command to convert a protocol specific message received from the printer into a generic command structure that can be used by the port driver and spooler.
 
SplProtWrite Optional API called by PrtWrite to put a bidirectional protocol wrapper around print data being sent to the printer.
 
=== Protocol-Converter Extensions ===
The spooler allows protocol converters to be written that make use of a converter already installed on the system. These are extensions to the base protocol converters, and they are called before the base converter is called to allow the extension converters to handle specific printers better than the base converter.
 
A protocol extension is installed by writing the following to the system INI file:
 
<pre class="western">ApplicationName  =  &quot;PM_PROTOCOL_EXTENSION&quot;
KeyName          =  Name of new protocol converter;  ex: &quot;MYNPAEXT&quot;
KeyValue        =  Base protocol converter name followed by a comma
                    and the path to this new protocol converter.
                    ex: &quot;NPAP,C:\OS2\DLL\MYNPAEXT.CNV&quot;</pre>
 
The initialization sequence for protocol-converter extensions is as follows:
# Spooler sends BIDI_Q_PORT to port driver.
# Spooler determines base converter to use based on PRTPORT structure.
# Spooler starts BIDI_WAIT_ALERT thread for port driver (if none started for the port driver yet).
# Spooler sends BIDI_INIT_PROTCNV to base protocol converter.
# Spooler calls each extension to the base protocol converter with BIDI_ INIT_PROTCNV. If the extension converter supports this specific printer model, it returns 0 for success; otherwise, it returns ERROR_NOT_SUPPORTED.
 
The spooler uses the first extension to the base protocol converter that returns success. The sequence of calling protocol-converter extensions is indeterminate.
 
Once an extension converter is loaded for a port, all protocol-converter commands go to the extension converter. The extension converter has the option of calling the base protocol converter to process the command.
 
=== Sample Protocol Converter ===
A protocol converter is a DLL written to support printers capable of returning information to the host PC. A protocol converter is responsible for understanding the control language of the printer. Example control languages are Network Printer Alliance Protocol (NPAP), Printer Job Language (PJL), and Simple Network Management Protocol (SNMP). The protocol converter does not get involved in the physical transmission of commands or data to the printer. The converter generates appropriate printer commands to send to the printer, and the converter is able to translate data sent from the printer to the host PC.
 
Developers can write a usable protocol converter if they have a port driver that can communicate with a set of printers.
 
Our sample protocol converter does not support any control language. It uses strings as examples of data sent and received from a printer. An actual protocol converter would use printer control-language commands to query or set information in the printer.
 
Make copies of our protocol-converter makefile and source; then, change the string &quot;PROTCNV&quot; in the names of these files to a string that matches the new protocol converter being developed-e.g., &quot;MYCNV&quot;. The OS2SYS.INI entry to install the sample protocol converter is:
 
<pre class="western">  Application - &quot;PM_PROTOCOL_CONVERTER&quot;
  KeyName    - &quot;PROTCNV&quot;                  // Change to new converter name
  KeyValue    - &quot;C:\OS2\DLL\PROTCNV.CNV&quot;  // Change to path of new converter</pre>
Here is a code roadmap:
 
buildcmd.c Routines to build commands to send to the printer.
 
cache.c Routines to store information returned by the printer in the protocol converter's cache.
 
getcmd.c Routines to get response data from the protocol converter's cache.
 
init.c DLL initialization and termination routines.
 
passthru.c Routines to handle a bidirectional passthru session.
 
proctype.c Routines to process the ulType field to determine whether to get data from the cache or to ask the printer for the information.
 
sendcmd.c Exports SplProtSendCmd API, which is the main entry point for the protocol converter. For each command, this generates the control-language buffer to send to the port driver for transmission to the printer.
 
util.c Utility functions for the converter, including memory-allocation and global semaphore-access routines.
 
xlatecmd.c Exports SplProtXlateCmd API, which the port driver calls when data is received from the printer. These routines interpret the data coming from the printer and look for threads that may be waiting for this data.
 
=== Calling Sequence ===
<pre class="western">                                                      Route Alert /---�
                                                /----------------------\
      /------------------\                      |        /--------/    |
      | Printer Driver  |                      | Spooler|Alert Thread |
      | (or Application) |                      |        |            |
      \------------------/                      \----------------------/
          |    �                                    |  �
PrtQuery |    | Query response                      |  | Returned alert
          �    |                            PrtQuery |  |
        /----------\                                  �  |
        |      \--|�----------------------\      /---------\
        | Spooler  |-------\              |      | Spooler |
        \----------/      |              |      \---------/
                          |              |          |  �
                          |              |          \---+-------\
                          �              |              |      �
                        /--------------------------------------------\
                        | Protocol    Wait for    Cache Data Clear |
                        | Converter    Response    Waiting Threads  |
                        |              (Alert)                      |
        SplPdSendCmd    \--------------------------------------------/
          /---------------/              �              �    /--/
          |                              |              \--------\
          �  /---------------------------/                  |  |
      /-------------\                                          �  |
      | Port Driver |                                    /-------------\
      \-------------/                                    | Port Driver |
          |  �                                          \-------------/
  DosWrite |  |                                              |  | Returned
      /------------\                                DosRead  |  | Alert data
      | FileSystem |                                          �  |
      \------------/                                      /------------\
          |  �                                          | FileSystem |
          |  |                                          \------------/
          �  |                                              |  �
      /---------------\                                        |  |
      |    Kernal    |                                        �  |
      | Device Driver |                                  /---------------\
      \---------------/                                  |    Kernal    |
                                                          | Device Driver |
                                                          \---------------/</pre>
For a query request, the following happens:
 
<pre class="western">  PrtQuery( BIDI_Q_INPUTBINS )
 
    SplProtSendCmd()                                        // Spooler calls bidirectional
                                                            // converter directly.
 
      if( InputBins information is cached in protocol converter )
 
        return( cached information )
 
      do
 
        Create command sequence to query printer
 
        SplPdSendCmd( in port driver ) to send query command to printer
 
          DosWrite( send command sequence to printer )
 
        do
 
          wait on alert thread
 
        while( response not yet received )
 
        At this point, the information requested from printer is in
        the protocol converter's information cache.
 
      while( more commands need to be issued to satisfy query )
 
      copy cached information into SplProtSendCmd buffer and return</pre>
 
 
The following is the initialization sequence for a bidirectional printer port:
 
<pre class="western">        --- Spooler thread 1 ---
 
  SplPdSet( BIDI_INIT_PORTDRV )            // Initialize port driver.
                                          // If it fails, the port driver is unloaded.
                                          // Network port drivers can open the
                                          // network adapter at this time.
 
  SplPdQuery( BIDI_Q_PORT )                // Initialize port driver for this port and
                                          // get device ID and protocol used by the printer.
 
  if query successful and printer is bidirectional capable
 
    Create Spooler thread 2 to wait for alerts from the port driver
 
    SplProtSendCmd( BIDI_INIT_PROTCNV )    // Initializes protocol converter.
 
    SplPdSet( BIDI_RESPONSE_FMT )          // Tell port driver the format of
                                          // printer-to-host messages.
 
    SplProtSendCmd( BIDI_Q_RESPONSE_FMT )  // Get format of printer-to-host
                                          // messages from protocol converter.
 
    SplProtSendCmd( BIDI_Q_SW )            // Get bidirectional-software characteristics.
 
    SplPdSet( BIDI_SET_SW )                // Tell port driver the bidirectional capabilities.
 
    SplProtSendCmd( BIDI_ENABLE_ALERT )    // Enable core printer alerts.
 
    SplPdSendCmd()                        // Port driver sends alert-enable commands
                                          // that were generated by the protocol converter.
 
    SplPdSet( BIDI_NOTIFY_PORT_SELECTED )  // Tell port driver that this port
                                          // is connected to a print queue.
 
    ....</pre>
 
 
<pre class="western">        --- Spooler thread 2 (one instance per port driver) ---
 
    do
 
      PrtQuery( BIDI_WAIT_ALERT )                  // Single spooler thread to get all alerts.
 
        SplPdQuery( BIDI_WAIT_ALERT )              // PM port driver called to wait for
                                                  // data from any of its printer ports.
 
          SplProtXlateCmd( in PMSPL.DLL )          // Port driver calls protocol-converter
                                                  // routine to translate alert data received
                                                  // from printer.
 
            SplProtXlateCmd( protocol converter )  // Translate software protocol-specific
                                                  // alert data into generic alert structure.
 
              Convert to generic-alert structure
 
              Update protocol converter's information cache
 
              if any thread is waiting on response for this port
 
                Clear Protocol Converter's Port wait semaphore
 
              return PRTALERT structure to Port Driver, then to spooler
 
      if Alert
 
        call alert handling routines in PMSPL
 
          pass alert to registered applications, take action on the alert, etc...
 
    while( port driver assigned to printer port )</pre>
 
 
The following is the termination sequence when the spooler is disabled:
 
<pre class="western">  SplProtSendCmd( BIDI_SHUTDOWN )      // Tell protocol converter that the
                                      // spooler is being shutdown.
 
  SplPdSet( BIDI_SHUTDOWN )            // Tell port driver that the
                                      // spooler is being shutdown.</pre>
 
 
The following is the sequence when a printer port is removed:
 
<pre class="western">  SplProtSendCmd( BIDI_DEL_PORT )      // Tell protocol converter that
                                      // the port has been removed.
 
  SplPdSet( BIDI_DEL_PORT )            // Tell port driver that
                                      // port has been removed.</pre>
 
 
=== Control-Panel Functions ===
The print object adds a menu item to the print object and port object to display a control panel if the support for the control panel is in the system. The following APIs add the support for control panels.
 
See the ''OS/2 Presentation Device Driver Reference'' for detailed information on these APIs, their syntax, and their parameters.
 
SplRegisterControlPanel Registers a DLL with the spooler that can display a control panel for printers.
 
SplGetControlPanelList Queries installed control panel DLLs and protocol converters for support for the printer attached to the given port.
 
SplQueryControlPanel Queries specific control panel DLL or protocol converter for support for the printer attached to the given port.
 
SplDisplayControlPanel Displays a control panel for a printer.
 
=== Separator-Page Processing ===
The spooler alters the PRTOPENSTRUCT0-&gt;ulSpoolerJobID by adding the value 0x10000 to the spooler job ID when sending the separator page. This gives the protocol converter a unique spooler job ID with the separator print job . This is done to assist the protocol converter in choosing a unique printer job ID in case the printer does not support printer job IDs.
 
=== Alert Handling ===
There are two types of alerts that can be returned by the printer:
*core alerts
*extended alerts
 
Core alerts are those alerts that the OS/2 print subsystem can understand and take action on when encountered. These include cover open, out of paper , and job completed printing.
 
Extended alerts are those alerts that the print subsystem either does not understand or is incapable of responding to. These alerts often have very specific information sent by the printer to the host PC.
 
The spooler, by default, enables the core alerts when printing to a bidirectional-capable printer. This allows the spooler to take advantage of the capabilities of the advanced printer. Other applications might be interested in these core alerts.
 
Applications might also be written that can request additional status or information from a particular set of printers. This additional information can be considered an extended alert. The application must know what extended alerts are supported, and this is done by calling PrtQuery( BIDI_Q _CONVERTER_INFO ) to determine the protocol converter being used. It is up to the protocol converter to publish any extended-alert definitions it wants to make available to applications or printer drivers.
 
When an application registers for an alert, the spooler enables that alert in the printer by calling PrtSet( BIDI_ENABLE_ALERT ). When the alert is generated, the spooler posts a message to those applications that have registered for the alert. If the alert is an extended alert, the application must call PrtQuery( BIDI_READ_ALERT ) to get the extended-alert information. The format of this returned information is defined by the protocol converter supporting the extended alert.
 
The spooler mediates what alerts are activated on the printer when multiple clients have applications that register for alerts from the same printer. The spooler only posts an alert to those applications that request the particular alert.
 
Once an extended alert is activated (by an application calling SplRegister) , if an event occurs that causes the extended alert:
 
*the spooler posts the application that the extended alert has occurred <br />*the application must use the command BIDI_READ_ALERT to get the alert data <br />The spooler issues BIDI_READ_ALERT to save the alert data until the registered application(s) ask for the alert. However, this data is not be kept indefinitely by the spooler.
 
The following is done to handle printer alerts:
 
*SplRegister API available to request alert notification from the spooler.
 
*SplUnRegister API available to terminate alert notification from the spooler.
 
*PrtQuery( BIDI_READ_ALERT ) available to applications to read extended- alert information.
 
When an application calls SplRegister, the spooler determines whether or not the alert being registered is enabled. If it is not enabled yet, the spooler calls the protocol converter with BIDI_ENABLE_ALERT to enable the alert.
 
When an application calls SplUnRegister, the spooler determines whether or not the alert being unregistered should be disabled. If another application has registered for this alert, the spooler keeps the alert enabled; otherwise, the spooler calls the protocol converter with BIDI_ DISABLE_ALERT to disable the alert.
 
See the ''OS/2 Presentation Device Driver Reference''for detailed information on these APIs, their syntax, and their parameters.
 
SplRegister Allows applications to register for notification of events about printers.
 
SplUnRegister Allows applications to deregister for notification of events about printers.
 
=== Bidirectional Command Structures Format ===
All structures used by PrtQuery and PrtSet use offsets into the return buffer for variable-length data instead of returning pointers. This is done to make transmission of these bidirectional structures easier between processes and machines.
 
An example would be a structure that returns a description string. The field that references the storage location of this string would be a ULONG. If zero, then that string was not returned. If non-zero, the field is the offset, from the beginning of the output buffer, to the description string.
 
All structures with variable-length data should pack this data immediately following all the fixed-length structures. This way, *pcbOutData contains the number of bytes to copy from the beginning of the pOutData buffer.
 
'''Note:''' All returned structure offset fields are offsets from the beginning of the output buffer given, '''not''' offsets from the beginning of the structure .
 
=== Bidirectional Command Flow ===
The following are tables of query and set command flows, showing which part of the system gets called for each command.
 
A '''First''' a '''Second'''
 
These lists assume that the port driver exports SplPdSendCmd.
 
<pre class="western">/---------------------------------------------------------------------------------------------\
|Query Command          |Command  |Sent to  |Sent to  |Initial  |Description            |
|                        |Code (Hex)|Port      |Protocol  |Sequence  |                        |
|                        |          |Driver    |Converter |Number    |                        |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_CONVERTER_INFO  |8021      |          |First    |          |Requests                |
|                        |          |          |          |          |protocol-converter      |
|                        |          |          |          |          |information.            |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_DEVICE          |800D      |Second    |First    |          |Requests printer device |
|                        |          |          |          |          |characteristics. Returns|
|                        |          |          |          |          |capabilities and        |
|                        |          |          |          |          |characteristics of the  |
|                        |          |          |          |          |printer.                |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_FONTS            |8012      |Second    |First    |          |Requests list of fonts  |
|                        |          |          |          |          |for a particular        |
|                        |          |          |          |          |interpreter.            |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_INPUTBINS        |800F      |Second    |First    |          |Queries input bins.    |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_INTERPRETER      |800E      |Second    |First    |          |Requests information on |
|                        |          |          |          |          |interpreters available  |
|                        |          |          |          |          |in the printer.        |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_JOBID            |8017      |          |First    |          |Requests printer job ID |
|                        |          |          |          |          |for job being sent to  |
|                        |          |          |          |          |port.  Issued by the    |
|                        |          |          |          |          |spooler during PrtOpen  |
|                        |          |          |          |          |after a successful      |
|                        |          |          |          |          |SplPdOpen to the port  |
|                        |          |          |          |          |driver so that the      |
|                        |          |          |          |          |spooler can synchronize |
|                        |          |          |          |          |the printer job ID with |
|                        |          |          |          |          |the spooler job ID.    |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_JOBS_COMPLETE    |8013      |Second    |First    |          |Requests list of        |
|                        |          |          |          |          |completed jobs known to |
|                        |          |          |          |          |the printer.            |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_JOBS_QUEUED      |8014      |Second    |First    |          |Requests list of queued |
|                        |          |          |          |          |jobs known to the      |
|                        |          |          |          |          |printer.                |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_OUTPUTBINS      |8010      |Second    |First    |          |Queries output bins.    |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_PORT            |800B      |First    |          |2        |Requests information    |
|                        |          |          |          |          |about port configuration|
|                        |          |          |          |          |from port driver.      |
|                        |          |          |          |          |Returns bidirectional  |
|                        |          |          |          |          |capabilities of the port|
|                        |          |          |          |          |and                    |
|                        |          |          |          |          |bidirectional-software  |
|                        |          |          |          |          |protocol of attached    |
|                        |          |          |          |          |printer.                |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_PORTDRV          |8019      |First    |          |          |Requests information on |
|                        |          |          |          |          |port driver's          |
|                        |          |          |          |          |configuration for the  |
|                        |          |          |          |          |port. Free-format      |
|                        |          |          |          |          |buffer.                |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_RESPONSE_FMT    |8018      |          |First    |5        |Requests format of      |
|                        |          |          |          |          |printer-to-host        |
|                        |          |          |          |          |messages.              |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_SPOOLER_VERSION  |8022      |          |          |          |Requests spooler-version|
|                        |          |          |          |          |information. Handled by |
|                        |          |          |          |          |spooler.                |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_STATUS          |8015      |Second    |First    |          |Queries protocol        |
|                        |          |          |          |          |converter for the      |
|                        |          |          |          |          |current status of the  |
|                        |          |          |          |          |print device.          |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_STORAGE          |8023      |Second    |First    |          |Returns printer        |
|                        |          |          |          |          |storage-media          |
|                        |          |          |          |          |information.            |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_Q_SW              |800C      |          |First    |7        |Requests information on |
|                        |          |          |          |          |bidirectional-software  |
|                        |          |          |          |          |capabilities. Passed to |
|                        |          |          |          |          |the bidirectional      |
|                        |          |          |          |          |protocol converter to  |
|                        |          |          |          |          |tell the system what    |
|                        |          |          |          |          |bidirectional          |
|                        |          |          |          |          |capabilities are        |
|                        |          |          |          |          |available in the        |
|                        |          |          |          |          |printer.                |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_READ_ALERT        |801D      |          |First    |          |Requests extended alert |
|                        |          |          |          |          |information from the    |
|                        |          |          |          |          |protocol converter.    |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_READ_PASSTHRU      |8001      |          |First    |          |Send protocol-specific  |
|                        |          |          |          |          |command to the printer. |
|------------------------+----------+----------+----------+----------+------------------------|
|BIDI_WAIT_ALERT        |8016      |First    |          |3        |Wait for an alert. One  |
|                        |          |          |          |          |thread per port driver. |
\---------------------------------------------------------------------------------------------/</pre>
 
 
<pre class="western">/-----------------------------------------------------------------------------------------------\
|Set Command              |Command  |Sent to  |Sent to  |Initial  |Description            |
|                          |Code (Hex)|Port      |Protocol  |Sequence  |                        |
|                          |          |Driver    |Converter |Number    |                        |
|--------------------------+----------+----------+----------+----------+------------------------|
|BIDI_ADD_VIRTUAL_PORT    |26        |First    |          |          |Add a virtual-printer  |
|                          |          |          |          |          |port.                  |
|--------------------------+----------+----------+----------+----------+------------------------|
|BIDI_CANCELJOB            |6        |Second    |First    |          |Cancel job in printer.  |
|--------------------------+----------+----------+----------+----------+------------------------|
|BIDI_DEL_PORT            |28        |Second    |First    |          |Sent to the protocol    |
|                          |          |          |          |          |converter and port      |
|                          |          |          |          |          |driver after a spooler  |
|                          |          |          |          |          |port has been removed.  |
|--------------------------+----------+----------+----------+----------+------------------------|
|BIDI_DEL_VIRTUAL_PORT    |27        |First    |          |          |Delete a virtual-printer|
|                          |          |          |          |          |port.                  |
|--------------------------+----------+----------+----------+----------+------------------------|
|BIDI_DISABLE_ALERT        |25        |Second    |First    |          |Disable alerts for a    |
|                          |          |          |          |          |printer.                |
|--------------------------+----------+----------+----------+----------+------------------------|
|BIDI_ENABLE_ALERT        |24        |Second    |First    |9        |Enable alerts for a    |
|                          |          |          |          |          |printer.                |
|--------------------------+----------+----------+----------+----------+------------------------|
|BIDI_END_PASSTHRU        |1B        |          |First    |          |Terminate a passthru    |
|                          |          |          |          |          |reading session.        |
|--------------------------+----------+----------+----------+----------+------------------------|
|BIDI_ENDJOB              |3        |Second    |First    |          |Issued by port driver  |
|                          |          |          |          |          |during SplPdClose to    |
|                          |          |          |          |          |signal the end of the  |
|                          |          |          |          |          |print job being sent to |
|                          |          |          |          |          |the printer.            |
|--------------------------+----------+----------+----------+----------+------------------------|
|BIDI_HOLDJOB              |4        |Second    |First    |          |Hold job in printer.    |
|--------------------------+----------+----------+----------+----------+------------------------|
|BIDI_INIT                |B        |First    |          |          |Set printer in          |
|                          |          |          |          |          |bidirectional mode.    |
|--------------------------+----------+----------+----------+----------+------------------------|
|BIDI_INIT_PORTDRV        |8        |First    |          |1        |Initialize a port      |
|                          |          |          |          |          |driver. Once per        |
|                          |          |          |          |          |PortDRV.                |
|--------------------------+----------+----------+----------+----------+------------------------|
|BIDI_INIT_PROTCNV        |F        |          |First    |4        |Initialize protocol    |
|                          |          |          |          |          |converter for a port.  |
|                          |          |          |          |          |Given Q_PORT for each  |
|                          |          |          |          |          |port.                  |
|--------------------------+----------+----------+----------+----------+------------------------|
|BIDI_NOTIFY_ENDJOBCONNECT  | 2          | First      |            |            | Notify  port  driver  that  |
|                              |            |            |            |            | a  job  connection  is  not  |
|                              |            |            |            |            | needed .                    |
| ---------- ---------- ------ + ---------- + ---------- + ---------- + ---------- + ---------- ---------- ---- |
| BIDI _ NOTIFY _ PORT _ RELEASED  | 22          | First      |            |            | Notify  port  driver  that  |
|                              |            |            |            |            | a  port  is  no  longer      |
|                              |            |            |            |            | selected  in  a  print      |
|                              |            |            |            |            | object .                    |
| ---------- ---------- ------ + ---------- + ---------- + ---------- + ---------- + ---------- ---------- ---- |
| BIDI _ NOTIFY _ PORT _ SELECTED  | 21          | First      |            | 10          | Notify  port  driver  that  |
|                              |            |            |            |            | a  port  is  selected  in  a  |
|                              |            |            |            |            | print  object .              |
| ---------- ---------- ------ + ---------- + ---------- + ---------- + ---------- + ---------- ---------- ---- |
| BIDI _ PACKET _ SIZE            | E          | Second      | First      |            | Define  printer - to - host    |
|                              |            |            |            |            | maximum  packet  size .      |
| ---------- ---------- ------ + ---------- + ---------- + ---------- + ---------- + ---------- ---------- ---- |
| BIDI _ RELEASEJOB              | 5          | Second      | First      |            | Release  job  held  in      |
|                              |            |            |            |            | printer .                  |
| ---------- ---------- ------ + ---------- + ---------- + ---------- + ---------- + ---------- ---------- ---- |
| BIDI _ RESET                  | 9          | Second      | First      |            | Reset  the  printer .        |
| ---------- ---------- ------ + ---------- + ---------- + ---------- + ---------- + ---------- ---------- ---- |
| BIDI _ RESPONSE _ FMT          | D          | First      |            | 6          | Set  format  of              |
|                              |            |            |            |            | printer - to - host          |
|                              |            |            |            |            | messages .                  |
| ---------- ---------- ------ + ---------- + ---------- + ---------- + ---------- + ---------- ---------- ---- |
| BIDI _ SEND _ PASSTHRU          | 1          | Second      | First      |            | Issue  protocol - specific  |
|                              |            |            |            |            | command  to  printer .      |
| ---------- ---------- ------ + ---------- + ---------- + ---------- + ---------- + ---------- ---------- ---- |
| BIDI _ SET _ DEVICE _ ID          | 23          | First      |            |            | Set  printer ' s  device  ID . |
| ---------- ---------- ------ + ---------- + ---------- + ---------- + ---------- + ---------- ---------- ---- |
| BIDI _ SET _ PORTDRV            | 19          | First      |            |            | Store  port - driver        |
|                              |            |            |            |            | configuration  data .      |
|                              |            |            |            |            | Free - format  buffer .      |
| ---------- ---------- ------ + ---------- + ---------- + ---------- + ---------- + ---------- ---------- ---- |
| BIDI _ SET _ SW                  | 10          | First      |            | 8          | Tell  the  port  driver  the |
|                              |            |            |            |            | bidirectional  software    |
|                              |            |            |            |            | capabilities  of  the      |
|                              |            |            |            |            | printer .                  |
| ---------- ---------- ------ + ---------- + ---------- + ---------- + ---------- + ---------- ---------- ---- |
| BIDI _ SHUTDOWN                | A          | Second      | First      |            | Release  all  threads      |
|                              |            |            |            |            | waiting  for  this          |
|                              |            |            |            |            | protocol  converter  and    |
|                              |            |            |            |            | port  driver .  Sent  to      |
|                              |            |            |            |            | both  CNV  and  PDR .        |
| ---------- ---------- ------ + ---------- + ---------- + ---------- + ---------- + ---------- ---------- ---- |
| BIDI _ STARTJOB                | 2          | Second      | First      |            | Called  during  SplPdOpen  |
|                              |            |            |            |            | to  signal  the  protocol    |
|                              |            |            |            |            | converter  about  the      |
|                              |            |            |            |            | start  of  the  print  job .  |
| ---------- ---------- ------ + ---------- + ---------- + ---------- + ---------- + ---------- ---------- ---- |
| BIDI _ START _ PASSTHRU        | 1A          |            | First      |            | Start  a  passthru  reading |
|                              |            |            |            |            | session .                  |
| ---------- ---------- ------ + ---------- + ---------- + ---------- + ---------- + ---------- ---------- ---- |
| BIDI _ TERM                    | C          | Second      | First      |            | Set  printer  in            |
|                              |            |            |            |            | unidirectional  mode .      |
\ ---------- ---------- ------ - ---------- - ---------- - ---------- - ---------- - ---------- ---------- ---- / </pre>
 
=== Font Test 32-Bit Printing Utility ===
Font Test is a 32-bit Presentation Manager application that is used to browse and print text files on local or remote print queues using many formatting options. Font Test also allows you to view various capabilities of the printer attached to a selected print queue including font and hardcopy (form) information.
 
Font Test provides a way to invoke OS/2 application program interface (API) calls that query presentation drivers for information such as:
 
[[01825.htm|DevQueryCaps]]General device information <br />[[01826.htm|DevQueryHardcopyCaps]]Device hardcopy information <br />[[01827.htm|GpiQueryFontmetrics]]Device font information <br />[[01828.htm|GpiQueryWidthTable]]Current width table information <br />[[01829.htm|GpiQueryKerningPairs]]Current kerning pair table information
 
Font Test can be used to test presentation drivers because it follows application printing conventions outlined in &quot;Print Job Submission and Manipulation&quot; in the ''OS/2 Programming Guide, Volume 3.''Font Test also performs error assertion on every PM API call that is handled by the presentation driver.
 
The application printing conventions that Font Test follows include:
 
*Providing a dialog box that allows the user to enumerate and print to OS/2 Print Objects.
 
*Providing a dialog box that allows the user to select the page format.
 
*Providing a dialog box that allows the user to select any public System or Device fonts.
 
*Providing a dialog box that allows the user to change Job Properties for each print job and view information about the device being used for output.
 
*Performing queued PM printing by opening the device context (DC) OD_QUEUED using the standard data format PM_Q_STD.
 
*Performing ''WYSIWYG''printing of text for system fonts.
 
*Printing using a separate thread.
 
'''Notes:'''
 
1.Font Test is 32-bit code requiring OS/2 2.0 or later to run. <br />2.WYSIWIG output is achieved when system fonts (of matching resolution) are selected on the '''Font'''page of the '''Program Settings'''notebook. When device fonts are selected, they will be simulated to the screen using a system Courier font and scaled to the correct point size. <br />3.Extensive online help is provided with Font Test.
 
=== Printing a File ===
To print a file using Font Test, complete the following steps:
 
1.Select '''Open File'''from the '''File'''menu. <br />2.Use the dialog box that opens to select a file. Font Test will display the selected file in the main window. <br />3.Select '''Program Settings'''from the '''File'''menu. <br />4.Select the '''Printer'''notebook tab and select a print queue that is connected to the output device on which you will print. <br />5.Select the '''Font'''notebook tab and select a font for displaying and printing the file. <br />6.Click on the '''OK'''push button to close the '''Program Settings'''notebook and save your changes for this printout. <br />7.Select '''Print File'''from the '''File'''menu. <br />8.The '''Confirm Print Information'''dialog box will open. <br />9.Click on the '''OK'''push button to print the file.
 
'''Notes'''
 
1.If you do not have any print queues (printer drivers) installed, a message that informs you that none exist will be displayed. Create a print queue under OS/2 and try to print again. <br />2.If your font appears the wrong size, make sure that the font you chose is a scalable font or a font whose resolution matches your printer's.
 
Font Test can also be invoked to print a file from the OS/2 command line using queue and print options that were saved from Font Test's interface. The command line syntax is:
 
<pre class="western">  FT32 [drive:][directory][filename] /? /p</pre>
 
=== Using Font Test ===
This section describes the menu structure, push buttons, and dialog boxes of Font Test.
 
=== Menu Structure ===
Following is the menu structure of Font Test. Most menu options open dialog boxes. Refer to each menu and dialog box description for detailed information about the functions they perform.
 
'''File Menu'''
 
Open File... <br />Program Settings... <br />Printer <br />Font <br />Colors <br />Page Format <br />Default Settings <br />Print File...
 
'''Query Menu'''
 
[[01825.htm|DevQueryCaps]]... <br />[[01826.htm|DevQueryHardcopyCaps]]... <br />[[01827.htm|GpiQueryFontmetrics]]... <br />[[01828.htm|GpiQueryWidthTable]]... <br />[[01829.htm|GpiQueryKerningPairs]]...
 
'''Search Menu'''
 
Search for Text...
 
'''Help Menu'''
 
Using Help... <br />Help Index... <br />Extended Help... <br />Special Keys... <br />About Program...
 
=== Push Buttons ===
The following push buttons are used in Font Test.
 
Cancel Exits a dialog box without performing the specified task.
 
Done Closes the dialog box after you have completed viewing the information .
 
Help Opens the online help to provide information about the current dialog box.
 
OK Confirms the selections in the dialog box and begins processing.
 
Select the OK pushbutton to close the notebook and save any changes made to any page in the notebook. All changes will be applied to the program after the notebook is closed.
 
The '''OK'''push button differs from the '''Save'''push button because changes made are lost when the program is closed.
 
Open Confirms the selection of a file to be opened.
 
Save Saves the selections in the dialog box as the defaults that will be used for all subsequent invocations of Font Test until the defaults are changed.
 
Search Begins searching for a specified text string.
 
=== File Menu ===
The '''File'''menu provides functions that allow you to open a file to browse, choose formatting and printer options, and print.
 
=== Open File ===
'''Open File'''allows you to open any file accessible to the workstation so that it can be browsed by Font Test.
 
To open a file into Font Test:
 
1.Select the drive containing the file you want to open from the '''Drive'''list. <br />2.Select the directory containing the file you want to open from the '''Directory'''list. <br />3.Select the file name of the file you want to open from the '''File'''list. <br />4.Click on the '''Open'''push button to open the file.
 
or
 
1.Enter the drive, path, and file name of the file in the '''Open Filename'''field. <br />2.Click on the '''Open'''push button to open the file.
 
or
 
To pass a file name into Font Test from the OS/2 command line and automatically load the file into the browse window, type:
 
<pre class="western">  FT32 &lt;filename&gt;</pre>
 
=== Program Settings ===
'''Program Settings'''contains a notebook with pages that represent all changeable program settings and preferences.
 
=== Printer ===
The '''Printer''' notebook page provides a list of all available Print Queues on your workstation. By selecting a print queue, you are selecting a printer driver and model represented by that queue. The printer driver and model selected will be used as the destination for printouts from the program.
 
'''''Printer'''''''Notebook Page Options''
 
'''Available Print Queues'''This field contains a list of all print queues found on or attached to your workstation (local or network accessible).
 
Print Queues are set up with a printer driver, printer model and an output port (for example, LPT1, COM2, or file). The printer driver (assigned to a print queue) can be queried for the printer model's abilities (for example, forms, fonts, or color) and used to format a program's printouts for that model.
 
Print queues are used as a &quot;holding area&quot; for printouts from any OS/2, DOS, or Windows application running under OS/2. Using OS/2's multitasking, these applications run and can print at the same time. The print queue's holding area ensures that only one printout is sent to the printer port at one time .
 
To select a print queue, scroll through the '''Available Print Queues'''list and click on the appropriate printer.
 
When a Print Queue is selected the '''Attached Printer Driver'''and '''Attached Device Name'''are shown on the page representing the printer driver and model for that queue.
 
'''Job Properties'''Selecting this button opens a dialog box that displays the changeable job options for the printer model. Any changes made to a printer model's job property dialog box or other program settings in the notebook will be saved and applied to any printouts from Font Test.
 
The OS/2 API that causes job properties to be displayed is ''DevPostDeviceModes()''.
 
'''Note:'''Changing the Job Properties in Font Test has no effect on the Job Properties used for any other program.
 
'''Other Destination'''Some network attached Print Queues available for output are not always listed because some networks may not have notified OS/2 that an attached resource (server) has an output queue.
 
Use the '''Other Destination'''push button to select such a queue.
 
'''Attached Printer Driver'''This field shows the name of the printer driver installed in the Print Queue selected from the '''Available Print Queues'''list.
 
'''Attached Device Name'''This field shows the name of the printer device support that is selected for the printer driver installed in the Print Queue selected from the '''Available Print Queues'''list.
 
'''Note:'''The attached device can be one of many output devices.
 
=== Font ===
The '''Font'''notebook page provides a list of all available fonts on your workstation (system and display fonts) and any printer fonts available for the currently selected print queue's printer.
 
Changing the font, attributes, or point size from this panel, causes the '''Font Sample Text'''window to update its sample text to reflect how the text will look.
 
'''''Font'''''''Notebook Page Options''
 
Available Fonts This list box lists all fonts available from OS/2 and the intended printer or output device.
 
Selecting one of the fonts displayed will format a text file for output. When a font is selected, its font metrics are displayed and nominal point size, font attributes, and other characteristics are updated.
 
To select a font, scroll through the '''Available Fonts'''list and select the appropriate font.
 
'''Notes:'''
 
1.Select fonts with resolutions that match your printer's resolution, or the fonts will be printed in the incorrect size. <br />2.When a new font is selected, its nominal point size is shown in the point size spin button. <br />3.If a device font is chosen, 8 point Courier will be used for simulating the font in Font Test's file display window.
 
'''Select Attributes'''You can select any combination of attribute check boxes to apply to the currently selected font.
 
The following attributes are available:
 
*Italic <br />*Underline <br />*Strikeout <br />*Bold
 
'''Designer Font Metrics'''This box displays measures and attributes that describe the currently selected font. These font metrics display all values in design units for the selected font.
 
'''Point Size'''This box displays the current point size of the font. The font can be scalable or fixed. The spinbutton value can be changed for scalable fonts, but not for fixed fonts.
 
Scalable Point Size This title appears when the selected font can be scaled (point size can be changed) between an upper an lower limit determined by the font's designer. This font type is often called an ''outline font''.
 
The font can be scaled because the system knows every line and curve needed to draw every character of the font. Scalable fonts can be resized easily for different resolution devices so that they appear the same on the display and the printer.
 
Fixed Point Size This title appears when the selected font can not be scaled because it is made up of bitmaps of each character in the font and designed for a specific resolution. This font type is often called a ''bitmap font''.
 
Fixed point fonts are often designed for use with the current display driver at a certain resolution. When printed, these fonts cannot be scaled to match the resolution of the printer and will appear to be the incorrect size (often much smaller).
 
If a ''fixed''point size (bitmap) font is used, the resolution of the font must match the resolution of the intended output device or the font will appear to come out the incorrect size (display and printer resolution must match).
 
'''Font Sample Text'''This box displays a preview of what the currently selected font will look like when used to display a text file.
 
=== Colors ===
This notebook page allows you to choose the colors that Font Test will use when printing and displaying text files.
 
'''''Colors'''''''Notebook Page Options''
 
'''Select Item'''This list box displays all program items with changeable colors .
 
These items include:
 
'''Window Text'''Color of browse window's text <br />'''Window Background'''Color of browse window's background <br />'''Printed Text'''Color of printed text output <br />'''Printed Background'''Color to fill background of paper (currently not implemented) <br />'''Text Border'''Color of border that is drawn around each page of text output <br />'''Trailer Information'''Color of filename, page numbers, date and time <br />'''Title Text'''Color of printed page title
 
'''Select Item's Color'''This color palette allows you to choose a color for the selected item in the '''Select Item'''list. The colors in this area represent the 16 predefined OS/2 colors that are used by many applications.
 
'''Changing an Item's Colors'''The following steps explain how to change the colors of the elements in Font Test:
 
1.Select an item from the '''Select Item'''list. The '''Select Item's Color'''color palette will show the current color for Window Text.
 
2.Select the color from the '''Select Item's Color'''color palette.
 
3.Click on the '''OK'''push button below the notebook.
 
=== Page Format ===
This notebook page allows you to select text format options that will be applied on a per-page basis to your text file when it is printed.
 
'''''Page Format'''''''Notebook Page Options''
 
'''Text Format Options'''The '''Text Format Options'''window lists all the text format options that are applied to printouts. Multiple items in the list can be selected. If an entry is highlighted it is considered selected. The following list explains the options that are available in this list box.
 
'''Print Character Boxes'''Prints character boxes for each character.
 
'''Note:'''Selecting this option causes printing time to increase considerably and should only be used to test new fonts to determine whether their characters will be printed correctly when clipping is applied (clipping text is based on character boxes).
 
'''Print Current Date'''Prints the current system date at the bottom of each page of output.
 
'''Print Current Time'''Causes the current system time to be printed at the bottom of each page of output.
 
'''Print Dual Column'''Prints text output in two columns. This is also called ''2- up''printing.
 
'''Recommendations:'''
 
1.Select ''Landscape''paper orientation from the job properties for the printer queue (object) being used.
 
Select ''8 pt font''(or less) so that 80 column text files will print in dual column mode without truncation.
 
'''Print File Name'''Prints the file name at the bottom of each page of output.
 
'''Note:'''When '''Print Dual Column'''is selected, two logical pages are printed on one piece of paper. Therefore, the file name will be printed on both of the logical pages.
 
'''Page Numbers'''Prints the page number at the bottom of each page of output.
 
'''Note:'''When '''Print Dual Column'''is selected, two logical pages are printed on one piece of paper. Therefore, a page number will be printed on both of the logical pages.
 
'''Text Border'''Draws a box around each page of output.
 
'''Note:'''When '''Print Dual Column'''is selected, two logical pages are printed on one piece of paper. Therefore, the text border will be printed on both of the logical pages.
 
'''Line Number'''Creates and prints a line number for each line of printed text output.
 
'''Title Text'''Prints a title at the top of each page.
 
'''Note:'''When '''Print Dual Column'''is selected, two logical pages are printed on one piece of paper. Therefore, a title will be printed on both of the logical pages.
 
'''Title Text'''When the '''Title Text'''option is selected in the '''Text Format Options'''list, you can type a title in this entry field. This title will be printed on the top of each logical page.
 
'''Title Alignment'''Use the '''Title Alignment'''buttons to control the placement of the title at the top of each logical page printed.
 
=== Default Settings ===
Use the '''Default Settings''' menu item to reset all saved Program Settings to their defaults.
 
'''Printer''' Uses the default print queue that is checked in the '''Set Default'''option accessed from the context menu of any OS/2 print queue.
 
'''Font''' Defaults to a scalable, 8 point Courier font (or the closest match).
 
'''Colors''' Defaults the window to black text on a white background and defaults printing to black text on a white background.
 
'''Format''' Defaults all page format options to disabled (off).
 
=== Print File ===
This menu choice opens a dialog box that allows you to review the file you are going to print and the details of the output device on which it will be printed.
 
This dialog box provides you with a final opportunity to modify job properties, text format, and color options that will be applied to the file when it is printed. If you want to change any of the option, select the '''Review Settings''' push button to display the '''Program Settings''' dialog box.
 
=== Query Menu ===
The '''Query''' menu displays the names of OS/2 API calls that query the currently selected print queue for information about the attached printer. Selecting any of the APIs listed will cause Font Test to execute the API call to the selected output device and display the results in a dialog box.
 
=== DevQueryCaps ===
DevQueryCaps is an OS/2 API call that queries many different capabilities of an output device such as resolution and color capabilities. Select this menu item to query the device connected to the selected output queue for its capabilities.
 
Following are some examples of the capabilities that can be queried:
 
'''CAPS_DRIVER_VERSION'''Version of device driver <br />'''CAPS_TECHNOLOGY'''Raster, vector, or PostScript device <br />'''CAPS_COLORS'''Number of colors supported by the device
 
=== DevQueryHardcopyCaps ===
DevQueryHardcopyCaps is an OS/2 API call that queries an output device for information on what types of output media are available for hardcopy output . Select this menu item to query the device connected to the selected output queue for its hardcopy capabilities.
 
A dialog box that lists the forms available on your output device and displays size information about the currently selected form will open.
 
Examples of hardcopy types include:
 
'''Paper'''Typical output for printer and plotters. <br />'''Transparencies'''Supported on some printers and many plotters. <br />'''Image File'''Supported by some programs whose output device is the screen. Bit maps are an example. <br />'''Film'''Film recorders. <br />'''Circuit boards'''Laser etching machines.
 
=== GpiQueryFontmetrics ===
GpiQueryFontMetrics is an OS/2 API call that is used to query the current printer and display drivers for the font metrics (measurements) that would be used when printing or displaying the current font. Select this menu item to query the currently realized font metrics information of the file.
 
These font metrics represent any changes made to the font from the '''Font'''page of the '''Program Settings'''notebook
 
The Font Metrics displayed in the '''Font'''page are really displaying designer units. Designer units are the height and width values for a font if it is realized at its nominal point size. Outline fonts can be realized at any point size between their minimum and maximum point sizes, and their heights and widths are scaled accordingly.
 
=== GpiQueryWidthTable ===
GpiQueryWidthTable is an OS/2 API call that queries the current printer for the widths of all characters that make up the current font. These widths reflect the individual space each character in the font's character set will occupy. These values reflect any changes to the font's point size or font attributes. Select the '''GpiQueryWidthTable'''menu item to query the current font's character width table.
 
=== GpiQueryKerningPairs ===
GpiQueryKerningPairs is an OS/2 API call that queries the current printer for any kerning pairs defined for the current font. These kerning pairs reflect adjustments to character widths that are made when certain characters are printed next to each other. Select the '''GpiQueryKerningPairs'''menu item to query the current font's kerning pair table. This table shows adjustments made to characters when they appear next to another character when displayed or printed to make the combination more visually appealing.
 
=== Search ===
The '''Search'''displays a the '''Search for Text''' menu item.
 
=== Search for Text ===
Use '''Search for Text''' to display a dialog box in which you can enter a text string to search for in the open file. If the search string is found, the text line it is found on will be advanced to the top line in the window.
 
The default search is case-insensitive and can be changed to case-sensitive . Check the '''Case Sensitive''' check box to perform a case-sensitive search.
 
Use '''Ctrl-F''' to find next occurrence of same search string.
 
=== Help ===
Font Test help can be obtained in three ways:
 
*Press the '''F1'''key. <br />*Select the '''Help'''button from any panel where it appears to open the online help for that topic. <br />*Select the '''Help'''menu for different types of help.
 
=== Using Help ===
Select this menu item to for an explanation of how to obtain help.
 
=== Help Index ===
Select this menu item to view a list of all available help topics.
 
=== Extended Help ===
Select this menu item to view the main help panel for using Font Test.
 
=== Keys Help ===
Select this menu item for an explanation of all keys that have special functions under Font Test.
 
The following keys/key combinations have special meanings to Font Test.
 
'''F1'''Displays help topic for selected item <br />'''F3'''Ends Font Test <br />'''CTRL-O'''Brings up Open File dialog <br />'''CTRL-P'''Prints currently opened file <br />'''SHIFT-PrintScreen'''Prints currently opened file <br />'''CTRL-S'''Brings up Text Search dialog <br />'''CTRL-F'''Searches for the next occurrance of the search string
 
=== About ===
Select this menu item to view information about Font Test including author, icon, abstract, and copyright.
 
=== Driver Details ===
This section provides specific information about how Font Test handles printing and queues, job properties, and call sequences. It also describes how you can modify the source code of Font Test to add functionality and how to debug your additions.
 
=== Printing and Queues ===
The use of print objects (queues) offers the most flexibility to users printing Presentation Manager applications under OS/2.
 
For example, although a user may have only one printer and one port, two print objects can be created under OS/2, each with a separate set of job and printer properties. One queue could be created for portrait printing and the other for landscape printing. The user can name the queues &quot;My Printer Portrait&quot; and &quot;My Printer Landscape&quot;. From an application, the user will see both queues as possible output destinations. Simple dynamic switching between portrait or landscape printing can be achieved by selecting the queue that will produce the desired orientation.
 
Because of print queues, the user need not change job properties or change hardware switches on the printer to change printing orientation.
 
The Font Test function FillQueNameListBox(), located in FT32HELP.C, shows one method of enumerating and displaying all local and network OS/2 print objects (queues).
 
'''Note:'''The queue description displayed under each print object can be changed by the user. The update will not be reflected in ''pszComment''field of the PRQINFO structure, but the actual queue name (pszName) in the structure will always remain the same. Therefore, from invocation to invocation, applications should store and reference the real name instead of the comment name.
 
When a queue is selected, an application must retrieve information about the target printer driver prior to printing or querying device capabilities .
 
The Font Test function [[GetQueueData]]() shows how this data is retrieved as soon as a print object name has been selected by a user. If the user has not selected a specific queue or if a print object is not found, the queue data for the system default print object is retrieved in the function [[01846.htm|GetDefaultQueueData]]().
 
'''Note:''' Only one system default print object (queue) exists.
 
=== Handling Job Properties ===
Job properties are unique settings that tell an OS/2 printer driver how to format a print job. The job properties are not directly manipulated by an application because the format of job property data varies among print drivers (and devices within drivers).
 
Managing job properties from an application should begin with the print object. Knowing what print object a user intends to use for printing allows a developer to retrieve the job properties that have already been selected by the user for that print object (queue). Using these job properties as a starting point, the application can call the DevPostdeviceModes(); to cause the printer driver to display its unique job property panels. The queues' job property data can be passed into this call so that the panels resemble what would be seen from the queue.
 
Assuming that the user probably wants to use these settings whenever the application prints, the application can be written in such a way as to store these job properties in an INI file upon returning from the call to DevPostdeviceModes();.
 
The Font Test functions [[01847.htm|GetQueueData]]() and [[01845.htm|AccessDevice]](); show how these job property manipulations are handled.
 
'''Notes:'''
 
1.Job property data is significant both for printing to and querying information from an OS/2 printer driver. Therefore, the job property data that will be used for printing should be passed in even on queries to an OS /2 driver. This information can help the printer driver provide the most accurate answers to an application's query.
 
2.Applications should never call DevPostDeviceModes() to display or alter Printer Properties because the changes affected by such a call are system wide and could alter another applications behavior. Only Print object should call DevPostDeviceModes().
 
=== Call Sequences ===
The function [[AccessDevice]]() provides an example of all the OS/2 APIs that must be called to correctly open a device context (DC) for an OS/2 presentation driver.
 
This function can be reused whenever an application must query device capabilities, query a device for fonts, query a device for form information, query or display job properties, and print.
 
The following Font Test functions call AccessDevice():
 
<pre class="western">/--------------------------------------------------------------------------\
|Function    |DC Type          |Action                |Description      |
|            |(INFO/QUEUED)    |                      |                |
|-------------+------------------+-----------------------+-----------------|
|ClientWndProc|INIT_DLG          |ACTION_QUERY_FORM_INFO |Used to query    |
|            |OD_INFO          |                      |printer driver  |
|            |                  |                      |about what types |
|            |                  |                      |of forms it      |
|            |                  |                      |supports for    |
|            |                  |                      |output, their    |
|            |                  |                      |sizes and        |
|            |                  |                      |availabilities.  |
|-------------+------------------+-----------------------+-----------------|
|            |IDM_QUERY_CAPS    |ACTION_QUERY_CAPS      |Used to query    |
|            |OD_INFO          |                      |device          |
|            |                  |                      |capabilities such|
|            |                  |                      |as resolution    |
|            |                  |                      |(dpi) colors    |
|            |                  |                      |supported etc.  |
|-------------+------------------+-----------------------+-----------------|
|            |IDMB_QUERY_HCCAPS |ACTION_QUERY_HCCAPS    |Used to query the|
|            |IDM_QUERY_HCCAPS  |                      |printer driver  |
|            |OD_INFO          |                      |about what types |
|            |                  |                      |of forms it      |
|            |                  |                      |supports for    |
|            |                  |                      |output and the  |
|            |                  |                      |sizes and        |
|            |                  |                      |availabilities of|
|            |                  |                      |the forms.      |
|-------------+------------------+-----------------------+-----------------|
|            |IDMB_QUERY_METRICS|ACTION_QUERY_METRICS  |Used to query    |
|            |IDM_QUERY_METRICS |                      |fontmetrics of  |
|            |OD_INFO          |                      |the font        |
|            |                  |                      |currently        |
|            |                  |                      |selected in the  |
|            |                  |                      |printer for its  |
|            |                  |                      |size information.|
|-------------+------------------+-----------------------+-----------------|
|PrintThread  |OD_QUEUED        |ACTION_PRINT_FILE_NO_PM|Used to print a  |
|            |                  |                      |file from the    |
|            |                  |                      |command line.    |
|-------------+------------------+-----------------------+-----------------|
|            |OD_QUEUED        |ACTION_PRINT_FILE      |Used to print a  |
|            |                  |                      |file from Font  |
|            |                  |                      |Test's PM        |
|            |                  |                      |interface.      |
|-------------+------------------+-----------------------+-----------------|
|FontThread  |OD_INFO          |ACTION_QUERY_FONT      |Used to query    |
|            |                  |                      |printer driver  |
|            |                  |                      |for all the fonts|
|            |                  |                      |and designer    |
|            |                  |                      |fontmetrics      |
|            |                  |                      |supported by the |
|            |                  |                      |current device.  |
\--------------------------------------------------------------------------/</pre>
 
=== Adding New Tests ===
The function [[AccessDevice]](); provides a generic way of opening a printer DC . As soon as this printer DC is opened, drawing and querying to that printer is possible through Gpi and Dev API calls.
 
Currently, Font Test uses AccessDevice to print text files and to query forms, fonts, and capabilities by passing in &quot;ACCESS_&quot; flags and executing different sets of code.
 
For example, AccessDevice() can be called with the flag &quot;ACTION_PRINT_FILE&quot; . Within AccessDevice(), the flag &quot;ACTION_PRINT_FILE&quot; causes the function PrintTextFile() to be called. PrintTextFile() uses Gpi commands to draw to the printer DC.
 
Additional printing routines and queries within the AccessDevice() code can be added in a similar way. For example, you can add a test that allows the user to print a bit map. The following procedure provides an example of how to add this test.
 
1.Provide a method for the user to invoke this new function, such as a menu item.
 
2.Create a new ACTION_ flag, such as ACTION_PRINT_BITMAP, to pass into AccessDevice whenever the new bit-map function is invoked.
 
3.Write a new function, such as PrintBitmapFile();.
 
4.Add a check to AccessDevice for the ACTION_PRINT_BITMAP flag that calls the PrintBitmapFile(); function.
 
5.Within the new function PrintBitmapFile(), make use of GpiWCBitBlt() to draw a bit map to the printer DC.
 
After creating the new test, you can alter the PaintClientWindow() function to display the same bit map to the user on the screen.
 
'''Note:''' GpiWCBitBlt() is preferred over GpiBitBlt() because GPiWCBitBlt is always metafiled, but only one GpiBitBlt() can be metafiled per document.
 
=== Debugging ===
Font Test's makefile creates a debug version by default when '''nmake''' is entered from an OS/2 command line.
 
The debug version is created with debug and codeview options so that 32-bit debuggers, such as IPMD, can be used to source-level debug Font Test.
 
In general, Font Test asserts every return code from every Win, GPI, and Dev call. If the return code indicates some type of failure, an OS/2 message box is displayed. The message box lists the failing API, the return code, the result of WinGetLastError(), and an interpretation of the failure if possible.
 
The error assertion routine is called PMAssert(); and is located in the module FT32HELP.C. This routine can be modified to include other debug information.
 
To create a "retail" or non-debug version of Font Test enter '''nmake ndebug=1''' from an OS/2 command line.
 
'''Note:''' The error code displayed from WinGetLastError() corresponds to named errors that are defined in PMERR.H from the OS/2 Toolkit and documented in the ''OS/2 PM Programming Reference Volume 3''.
 
=== Important Functions ===
Three functions are described here because of their importance in Font Test . Each function contains a description and a control flow. The control flow is pseudo code that explains the structure and implementation of major function calls.
 
=== AccessDevice ===
'''AccessDevice''' is the main function allowing access to a device. This access allows printing text files, querying device fonts, querying device caps, and querying device hardcopy caps.
 
'''Control Flow'''
 
#Call [[GetQueueData]](); to get driver data.
#If printing from Presentation Manager, display the '''Confirm Print Information'''dialog box to verify queue, font, color, and text format options.
#Call DevOpenDC(); to open the output device.
#Query device or print to it based on input parameter "usActionType".
 
Possible Actions <br />*ACTION_PRINT_FILE <br />Print text file from PM interface. <br />Call DevEscape( DEVESC_STARTDOC ). <br />Call PrintTextFile(). <br />Call DevEscape( DEVESC_ENDDOC ). *ACTION_PRINT_FILE_NO_PM. <br />Print text file from an OS/2 command line. <br />Call DevEscape( DEVESC_STARTDOC ). <br />Call PrintTextFile(). <br />Call DevEscape( DEVESC_ENDDOC ). *ACTION_QUERY_FONT <br />Call GpiQueryFonts(). <br />Display the '''Font''' notebook page. *ACTION_QUERY_CAPS <br />Call [[01825.htm|DevQueryCaps]](). <br />Display '''Device Capabilities''' dialog box. *ACTION_QUERY_HCCAPS <br />Call [[01826.htm|DevQueryHardcopyCaps]](). <br />Display '''Device Form Information''' dialog box. *ACTION_QUERY_FORM_INFO <br />Call [[01826.htm|DevQueryHardcopyCaps]](). <br />Return index of HCCAPS_CURRENT form in HCINFO structure. *ACTION_QUERY_METRICS <br />Call [[01827.htm|GpiQueryFontmetrics]](); for currently realized font. Display '''Current Font Metrics'''dialog box. 5.Call DevCloseDC(); to close device context.
 
=== GetDefaultQueueData ===
If the user never selects a queue, this routine will be called to search the OS2.INI file for the system default queue.
 
'''Control Flow'''
 
Query OS2.INI for default queue information.
 
=== GetQueueData ===
This function is called to access a device on a queue to retrieve all details, such as the driver printer names, about that queue.
 
'''Control Flow'''
 
# Call [[GetDefaultQueueData]](); if no queue is selected.
# Check for server information.
# Call SplQueryQueue(); to get driver data from queue.
 
=== Printer Test Tool (PTT) ===
The ''Printer Test Tool (PTT)''is a Presentation Manager application that enables the user to select one or more tests and execute them.
 
==== Overview ====
The PTT provides a mechanism for testing s by calling graphics programming interface (GPI) functions. Each call, on execution, produces quantifiable output by which the test can be measured. As each test is run, the PTT monitors the return codes from the GRE calls and writes the results to a log file. The current log file can be displayed at any time during manual testing.
 
==== PTT Architecture ====
The PTT is comprised of two major components:
*A PM master program (PTT.EXE) that provides the user interface for test selection and execution.
*Test-case dynamic-link libraries (DLLs) that contain the actual test-case executable code.
 
==== PTT Master Program ====
PTT.EXE enables the user to do the following:
*Select one or more tests from the test cases available.
*Execute the selected test cases on demand.
*Specify a test-case PM environment (PS units, PS types, and so forth).
*Display the PTT test log.
*Set the PTT test-logging level.
*Display the PTT release level.
*Exit PTT.
 
Command-line options enable the user to specify the following:
*Output log file name
*Level of logging to capture
*Search patterns for DLLs to be preloaded.
 
=== Test-Case DLLs ===
Each test-case DLL contains tests for a ''family'' of GPI calls. See [[GPI Function Tests (32-Bit)]] for descriptions of the supplied test-case DLLs and the GPI functions called.
 
'''Note:''' The test-case DLLs must reside in the same directory as the PTT executable.
 
=== Operating PTT ===
The PTT can be started from the command line in either an OS/2 window or a full-screen session. The PTT can also be started from the OS/2 Desktop or any other folder by using its icon. When using an icon, command-line options are specified in the '''Optional Parameters'''field of the Settings menu for the icon.
 
=== Specifying Command Options ===
All command-line options are specified with a hyphen (-), followed by a case-sensitive alphabetic character. The alpha character is followed immediately by the parameter value, if any, with no intervening spaces. Following are examples of PTT command lines.
 
<pre class="western">Load all DLLs in the current directory and set the logging level to 8:
 
    PTT -T*.DLL -L8
 
Preload the GRELINE DLL.
(Search LIBPATH to locate the DLLs.)
 
    PTT -Tgreline.dll</pre>
 
Executing PTT with the -? command-line option displays a list of the valid command-line options.
 
<pre class="western">PTT -?</pre>
 
=== Menu Selections ===
The following options are available on the PTT menu:
 
''Testcases''
 
Test Groups Lists all DLLs loaded. <br />Test Cases Lists all test cases available for the selected Test Groups. <br />Add Match Adds the selected match pattern from the chosen list. <br />Save Saves the entries selected. <br />Cancel Cancels this action and returns to the main options. <br />Delete Match Deletes the selected match pattern from the test case list. <br />Help Not available.
 
''Actions''
 
Display to Screen Displays the output of the test case to the screen. <br />Start Printing Prints the test case to an attached printer.
 
''Options''
 
Configuration Configures printer, DC, data type, PS Units, PS type. See &quot; Configuring the Device Context and Presentation Space&quot; for more information about configuring PTT DLLs.
 
Display Log Window Displays PASS/FAIL logging window.
 
Change Log Window Selects a level (1 - 9).
 
''Help''
 
Help Not available.
 
About Displays an application message and version number. There is no on- line Help with PTT.
 
''Exit''
 
( No drop-down ) Exits PTT. (Available only when using a mouse.) Use the accelerator key, '''Alt+F4'''.
 
=== Locating, Preloading, and Loading Test-Case DLLs ===
Each test case DLL passes a list of its test cases to PTT when PTT initializes the DLL after loading. A test-case index file associates each test-case name with the DLL that contains it. When duplicate test cases are encountered while loading DLLs and test-case index files, only the first instance of a test case is retained.
 
PTT locates the test cases using the following sequence:
 
1.DLLs specified using the -T command-line option are preloaded during PTT startup. Preloaded DLLs remain resident for the duration of the PTT session .
 
The -T command-line option specifies a search pattern for locating the test -case DLLs to be preloaded. The -T option value can contain global file- name characters (''wildcards'') in the file name. Following is an example of the command used to preload DLLs:
 
<pre class="western">Preload all DLLs in the PTT\DLL directory on the current drive.
 
  PTT -T\PTT\DLL\*.DLL</pre>
The -T command-line option can be specified multiple times (on the command line) with different paths to the DLLs.
 
2.At this point, if no test cases have been identified to PTT, PTT attempts to preload all the test-case DLLs it can locate using a *.DLL search pattern. This searches the current directory.
 
3.If PTT fails to locate any test-case DLLs in the current directory, a message to that effect is issued.
 
An '''OK'''check box in the informational window permits the user to continue bringing up PTT.
 
=== PTT Log File ===
PTT writes information to a log file. The information to be logged is determined by the current ''logging level'', which is hierarchical. At any given logging level, all information at that level and below is logged.
 
=== Specifying the PTT Log File Name ===
A path and file name for the PTT log file can be specified on the PTT command line using the -F option. If no log file name option is given on the command line, the default file name, PTT_LOG in the current directory, is used. If a log file does not exist when PTT is started, the log file is created automatically. If the log file does exist, the new log is appended to the existing log file.
 
=== Specifying the PTT Logging Levels ===
The PTT logging level can be specified on the PTT command line or changed from the Options pull-down menu after PTT has started. To set the logging level on the command line, specify a -L''x''option, where ''x''is the desired logging level, using a number in the range 1-9. To change the logging level after PTT has started, select ''Change logging level''from the Options pull- down menu or use the accelerator key, '''Alt+L'''. The default PTT logging level is '''1, L_HDR'''
 
The following table describes the logging levels supported by PTT:
 
<pre class="western">/--------------------------------------------------------------\
|Level  |Level Name          |Description                    |
|--------+--------------------+--------------------------------|
|1      |L_HDR              |Test Pass/Fail logging only.    |
|--------+--------------------+--------------------------------|
|2      |L_ABORT            |Test case failed. Test is      |
|        |                    |incomplete.                    |
|--------+--------------------+--------------------------------|
|3      |Reserved.          |Do not use.                    |
|--------+--------------------+--------------------------------|
|4      |L_FAIL              |Internal test-case failure. An  |
|        |                    |interface other than the call  |
|        |                    |currently being tested has      |
|        |                    |experienced a functional or    |
|        |                    |other type of failure.          |
|--------+--------------------+--------------------------------|
|5      |Reserved            |Do not use.                    |
|--------+--------------------+--------------------------------|
|6      |L_WARN              |Warning The presentation space  |
|        |                    |is improperly configured for the|
|        |                    |test case (or a similar error). |
|--------+--------------------+--------------------------------|
|7      |L_TRACE            |Trace commands, incorrect      |
|        |                    |values, or other unexpected    |
|        |                    |results.                        |
|--------+--------------------+--------------------------------|
|8      |L_LOTRACE          |Location trace.  Log entries and|
|        |                    |exits of internal test-case    |
|        |                    |routines.                      |
|--------+--------------------+--------------------------------|
|9      |L_DEBUG            |Debugging. Test-case debugging  |
|        |                    |information, internal test-case |
|        |                    |results, errors, and other      |
|        |                    |information.                    |
\--------------------------------------------------------------/</pre>
 
=== Displaying the PTT Log File ===
To display the PTT log file for the current session, select '''Display log window'''from the '''Options'''menu or use '''Alt+D'''.
 
=== Configuring the Device Context and Presentation Space ===
PTT enables you to specify the device context, presentation-space type, and presentation-space units to use when executing test cases. These parameters can be changed during testing. To change the configuration manually, select '''Configuration'''from the '''Options'''pull-down menu or use '''Alt+C'''.
 
=== Setting the Device Driver ===
To set or change the device driver, select one of the optional s available in the Printer Queue, Printer Name, and Printer Port window by clicking the mouse on the desired driver. If a device driver is installed after PTT is initiated, the user can select ''Refresh Printer Driver List''to list the other optional device drivers.
 
=== Setting the Device Context ===
To set or change the device context, select one of the following options from the Device Context section of the PTT Configuration dialog panel:
 
OD_QUEUED Output is to be queued. (This is the default.) This option is for hardcopy drivers only. The driver opens a spool file and uses the spooler's Spl interface to send output to that file. The driver must consider the data type if this option is chosen. The following data types are available:
 
PM_Q_STD The hardcopy driver uses the spooler to create a device- independent spool file using the Spl interfaces. See [[01865.htm|Setting the Data Type]] .
 
PM_Q_RAW The hardcopy driver processes the GRE functions to generate device -specific output data. This data is written to a spool file using the spooler Spl interfaces. See [[01865.htm|Setting the Data Type]].
 
OD_DIRECT Output is not queued. The presentation driver processes the GRE routines to generate device-specific data. Hardcopy drivers use the Prt interface routines to pass the output to the physical device driver.
 
OD_INFO The presentation driver does not generate any output. The information device context is used only to retrieve information.
 
OD_METAFILE The device context is used to write a metafile. The option is handled by PMGPI and never is passed to the device driver.
 
OD_METAFILE_NOQUERY This is the same as OD_METAFILE, except querying of attributes is not permitted. The option is handled by PMGPI and never is passed to the device driver.
 
OD_MEMORY This is a device context that is used to contain a bit map. The device driver processes the output data the same as for an OD_DIRECT device type, except the output is written to a bit map that is compatible with the physical device. (PTT creates the bit map and associates it with the device context.)
 
=== Setting the Queue Processor ===
To select the data type to be used when executing test cases, use the mouse to click on the queue processor that is available in the window.
 
=== Setting the Data Type ===
To select the data type to be used when executing test cases, select one of the following options in the '''Data Type'''check box of the PTT Configuration dialog panel:
 
PM_Q_RAW Raw data. <br />PM_Q_STD Metafile-formatted data. (This is the default.)
 
=== Setting the Presentation-Space Type ===
To select the presentation-space type to be used when executing test cases, choose one of the following options from the '''PS Type'''section of the PTT Configuration dialog panel:
 
GPIT_MICRO Micro-presentation space. <br />GPIT_NORMAL Normal presentation space. (This is the default.)
 
=== Setting Presentation-Space Units ===
To set the presentation page-size units for test-case execution, select one of the following from the '''PS Units'''section of the PTT Configuration dialog panel:
 
PU_ARBITRARY Application-convenient units. <br />PU_PELS Pel coordinates. (This is the default.) <br />PU_LOMETRIC Units of 0.1 mm. <br />PU_HIMETRIC Units of 0.01 mm. <br />PU_LOENGLISH Units of 0.01 inch. <br />PU_HIENGLISH Units of 0.001 inch. <br />PU_TWIPS Units of 1/1440 inch.
 
=== Selecting and Executing Test Groups and Test Cases ===
The test cases to be executed are selected from the Test Case Selection dialog panel. Select '''Testcase'''from the PTT menu bar or use '''ALT+T'''. One or more test cases can be selected for execution during manual operation.
 
=== Test Group Selection ===
There is a 1:n relationship between test groups and test-case DLLs. Each test group represents a specific DLL. Before a test case can be selected, the test group containing the test case must be selected from the '''Test Groups'''section of the PTT Test Case Selection dialog panel. When you select a test group, the list of test cases it contains is added to the Test Cases section of the dialog panel. De-selecting a test group removes the list of test cases it contains from the Test Cases section.
 
'''Note:''' Test groups must be de-selected specifically. PTT never de-selects a test group automatically.
 
=== Test Case Selection ===
Once the test groups are selected, the individual test cases can be selected from the '''Test Cases'''section of the PTT Test Case Selection dialog panel. Test cases can be selected and de-selected individually, or groups of test cases can be selected with the match patterns provided using the '''Add Match'''and '''Delete Match'''push buttons.
 
'''Note:'''Test cases must be de-selected specifically unless the user's test group is de-selected. When that happens, all test cases are de-selected and made unavailable. The PTT never de-selects a test case automatically.
 
=== Saving Selected Test Cases ===
After selecting one or more test cases, use the '''Save'''push button or '''Alt+S'''to close the Test Case Selection dialog panel.
 
=== Executing Test Cases ===
After selecting and saving one or more test cases, select ''Display to Screen''from the '''Action'''topic of the PTT menu bar, or use '''Alt+S'''to begin test-case execution to the monitor or display output device. To send the output of the test case to the printer, select '''Start Printing'''from the '''Action'''topic of the PTT menu bar. Each test case selected is executed in the order it appeared in the Test Cases section of the Test Case Selection dialog panel.
 
During test execution, ***** Printer Test Tool: Test Running ***** appears in the PTT window title bar. When the test is complete, the name of the individual test selected reappears in the title bar if a single test was selected. Printer Test Tool: MULTIPLE TESTS SELECTED appears if more than one test is selected.
 
=== Displaying the PTT Release and Revision Levels ===
To display the current PTT release and revision levels, select '''About'''from the PTT menu bar or use '''ALT+A'''.
 
=== Exiting PTT ===
To terminate PTT, select '''Exit'''from the PTT menu bar or use '''ALT+F4'''from the keyboard.
 
=== GPI Function Tests (32-Bit) ===
This section shows the GPI calls made by the Printer Test Tool's test groups. The following tables are organized by test group. Each table lists the test cases in the group and the functions tested by each test case. '''Configuration Settings'''describes settings that must be selected in the '''Configuration'''dialog box to run the test. If no Configurations Settings are specified, use the default settings of OD_QUEUED, PM_Q_STD, GPIT_MICRO, and PU_PELS.
 
'''Note:''' These tables represent GPI calls for the 32-bit PTT.
 
=== GPIARC Test Group ===
The GpiArc test case verifies printer drivers' arc-related functionality. This test case consists of precision, functionality, and exhaustive tests.
 
The precision tests verify the GPI Arc APIs for page positioning and different arc shapes sizing. The functionality test verifies the GPI Arc APIs as they function together and with other GPI APIs such as GpiBeginPath and GpiEndPath. Exhaustive testing of the GPI Arc APIs involves verifying the functionality of a given API with respect to the print driver.
 
This table lists the test cases and the functions called by each test case in the GpiArc test group. The GpiArc test group is found in GPIARC.DLL.
 
<pre class="western">/----------------------------------------------------------------------\
|Test Case                |GPI Functions Called      |Configuration  |
|                          |                          |Settings        |
|--------------------------+--------------------------+----------------|
|GpiArcPre1                |GpiFullArc                |                |
|                          |GpiMove                  |                |
|                          |GpiPartialArc            |                |
|                          |GpiPointArc              |                |
|                          |GpiSetArcParams          |                |
|--------------------------+--------------------------+----------------|
|GpiArcPre2                |GpiMarker                |                |
|                          |GpiMove                  |                |
|                          |GpiPolyFillet            |                |
|                          |GpiPolyFilletSharp        |                |
|                          |GpiPolySpline            |                |
|                          |GpiSetArcParams          |                |
|--------------------------+--------------------------+----------------|
|GpiArcApp                |GpiMove                  |                |
|                          |GpiPartialArc            |                |
|                          |GpiPointArc              |                |
|                          |GpiPolyFillet            |                |
|                          |GpiPolyFilletSharp        |                |
|                          |GpiPolySpline            |                |
|                          |GpiQueryCurrentPosition  |                |
|                          |GpiSetArcParams          |                |
|                          |GpiSetPattern            |                |
|--------------------------+--------------------------+----------------|
|GpiSetArcParamsExh1      |GpiFullArc                |                |
|                          |GpiMove                  |                |
|                          |GpiPartialArc            |                |
|                          |GpiPointArc              |                |
|                          |GpiQueryArcParams        |                |
|                          |GpiSetArcParams          |                |
|--------------------------+--------------------------+----------------|
|GpiSetArcParamsExh2      |GpiBeginArea              |                |
|                          |GpiBeginArea              |                |
|                          |GpiEndArea                |                |
|                          |GpiFullArc                |                |
|                          |GpiLine                  |                |
|                          |GpiMove                  |                |
|                          |GpiPartialArc            |                |
|                          |GpiQueryArcParams        |                |
|                          |GpiSetArcParams          |                |
|                          |GpiSetPattern            |                |
|--------------------------+--------------------------+----------------|
|GpiSetDefArcParamsExh1    |GpiFullArc                |                |
|                          |GpiMove                  |                |
|                          |GpiPartialArc            |                |
|                          |GpiPointArc              |                |
|                          |GpiQueryDefArcParams      |                |
|                          |GpiResetPS                |                |
|                          |GpiSetDefArcParams        |                |
|--------------------------+--------------------------+----------------|
|GpiSetDefArcParamsExh2    |GpiBeginArea              |                |
|                          |GpiEndArea                |                |
|                          |GpiFullArc                |                |
|                          |GpiMove                  |                |
|                          |GpiPartialArc            |                |
|                          |GpiQueryDefArcParams      |                |
|                          |GpiResetPS                |                |
|                          |GpiSetArcParams          |                |
|                          |GpiSetDefArcParams        |                |
|                          |GpiSetPa                  |                |
|--------------------------+--------------------------+----------------|
|GpiFullArcExh            |GpiFullArc                |                |
|                          |GpiMove                  |                |
|                          |GpiSetArcParams          |                |
|                          |GpiSetPattern            |                |
|--------------------------+--------------------------+----------------|
|GpiPartialArcExh          |GpiMove                  |                |
|                          |GpiPartialArc            |                |
|                          |GpiSetArcParams          |                |
|                          |GpiSetPattern            |                |
|--------------------------+--------------------------+----------------|
|GpiPointArcExh            |GpiMove                  |                |
|                          |GpiPointArc              |                |
|--------------------------+--------------------------+----------------|
|GpiPolyFilletExh          |GpiMove                  |                |
|                          |GpiPolyFillet            |                |
|--------------------------+--------------------------+----------------|
|GpiPolyFilletSharpExh    |GpiMove                  |                |
|                          |GpiPolyFilletSharp        |                |
|--------------------------+--------------------------+----------------|
|GpiPolySplineExh          |GpiMarker                |                |
|                          |GpiMove                  |                |
|                          |GpiPolySpline            |                |
\----------------------------------------------------------------------/</pre>
 
=== GpiArea Test Group ===
The GpiArea test group tests area manipulation functions. All tests include a basic functionality test and an exhaustive (test all return codes at the lowest level) test.
 
This table lists the test cases and the functions called by each test case in the GpiArea test group. The GpiArc test group is found in GPIAREA.DLL.
 
<pre class="western">/------------------------------------------------------------------------------\
|Test Case                        |GPI Functions Called        |Configuration  |
|                                |                            |Settings      |
|---------------------------------+----------------------------+---------------|
|GpiAreaApp                      |GpiBox                      |              |
|                                |GpiMove                    |              |
|                                |GpiSetPattern              |              |
|---------------------------------+----------------------------+---------------|
|GpiBeginAreaExh                  |GpiBeginArea                |              |
|                                |GpiEndArea                  |              |
|                                |GpiMove                    |              |
|                                |GpiPolyLine                |              |
|                                |GpiSetPattern              |              |
|---------------------------------+----------------------------+---------------|
|GpiSetAndQryPatternExh          |GpiBox                      |              |
|                                |GpiCharStringAt            |              |
|                                |GpiEndArea                  |              |
|                                |GpiFullArc                  |              |
|                                |GpiMove                    |              |
|                                |GpiPolyLine                |              |
|                                |GpiQueryPattern            |              |
|                                |GpiSetArcParams            |              |
|                                |GpiSetPattern              |              |
|---------------------------------+----------------------------+---------------|
|GpiSetAndQryPatternSetExh        |GpiBeginArea                |Direct and    |
|                                |GpiBox                      |Standard or    |
|                                |GpiDeleteSetId              |Queued and Raw |
|                                |GpiEndArea                  |              |
|                                |GpiFullArc                  |              |
|                                |GpiMove                    |              |
|                                |GpiPolyLine                |              |
|                                |GpiQueryBitmapParameters    |              |
|                                |GpiQueryPatternSet          |              |
|                                |GpiSetArcParams            |              |
|                                |GpiSetBitmapId              |              |
|                                |GpiSetCharSet              |              |
|                                |GpiSetPatternSet            |              |
|---------------------------------+----------------------------+---------------|
|GpiSetAndQryPatternRefPointExh  |GpiBeginArea                |              |
|                                |GpiBox                      |              |
|                                |GpiEndArea                  |              |
|                                |GpiFullArc                  |              |
|                                |GpiMove                    |              |
|                                |GpiPolyLine                |              |
|                                |GpiQueryPatternRefPoint    |              |
|                                |GpiSetArcParams            |              |
|                                |GpiSetAttrMode              |              |
|                                |GpiSetPattern              |              |
|                                |GpiSetPatternRefPoint      |              |
|---------------------------------+----------------------------+---------------|
|GpiPaintRegionExh                |GpiBeginPath                |              |
|                                |GpiCreateRegion            |              |
|                                |GpiDestroyRegion            |              |
|                                |GpiEndPath                  |              |
|                                |GpiMove                    |              |
|                                |GpiPaintRegion              |              |
|                                |GpiPolyFillet              |              |
|                                |GpiPolyLine                |              |
|                                |GpiSetColor                |              |
|                                |GpiSetLineWidthGeom        |              |
|                                |GpiSetPattern              |              |
|                                |GpiStrokePath              |              |
\------------------------------------------------------------------------------/</pre>
 
=== GpiBitmaps Test Group ===
The GpiBitmaps test group tests bit map manipulation functions. These functions include creating, deleting, querying, selecting, and manipulating bit maps.
 
All tests include a basic functionality test and an exhaustive (test all return codes at the lowest level) test.
 
'''Limitations''': All hard-copy vector devices will fail on all bit map operation since it is impossible to translate bit maps to vectors.
 
This table lists the test cases and the functions called by each test case in the GpiBitmaps test group. The GpiBitmaps test group is found in GPIBTMP.DLL.
 
<pre class="western">/--------------------------------------------------------------------------------\
|Test Case                        |GPI Functions Called          |Configuration  |
|                                |                              |Settings      |
|---------------------------------+------------------------------+---------------|
|GpiBitPre1                      |GpiDeleteBitmap              |              |
|                                |GpiDestroyPS                  |              |
|                                |GpiSetColor                  |              |
|                                |GpiWCBitBlt                  |              |
|---------------------------------+------------------------------+---------------|
|GpiBitPre2                      |GpiBitBlt                    |Direct        |
|                                |GpiBitBlt                    |              |
|                                |GpiConvert                    |              |
|                                |GpiConvert                    |              |
|                                |GpiCreateBitmap              |              |
|                                |GpiCreatePS                  |              |
|                                |GpiDeleteBitmap              |              |
|                                |GpiDestroyPS                  |              |
|                                |GpiQueryDevice                |              |
|                                |GpiSetBitmap                  |              |
|                                |GpiSetColor                  |              |
|---------------------------------+------------------------------+---------------|
|GpiBitApp1                      |GpoBitmapFormats              |Direct        |
|                                |GpiBeginArea                  |              |
|                                |GpiBitBlt                    |              |
|                                |GpiBox                        |              |
|                                |GpiCreateBitmap              |              |
|                                |GpiCreatePS                  |              |
|                                |GpiDeleteBitmap              |              |
|                                |GpiDestroyPS                  |              |
|                                |GpiEndArea                    |              |
|                                |GpiErase                      |              |
|                                |GpiMove                      |              |
|                                |GpiPolyLine                  |              |
|                                |GpiQueryBitmapParameters      |              |
|                                |GpiQueryDevice                |              |
|                                |GpiSetBitmap                  |              |
|                                |GpiSetBitmapBits              |              |
|                                |GpiSetColor                  |              |
|                                |GpiSetPattern                |              |
|---------------------------------+------------------------------+---------------|
|GpiBitApp2                      |GpiPtVisible                  |              |
|                                |GpiQueryPel                  |              |
|                                |GpiSetColor                  |              |
|                                |GpiSetPel                    |              |
|---------------------------------+------------------------------+---------------|
|GpiBitApp3                      |GpiBox                        |Direct        |
|                                |GpiCreateBitmap              |              |
|                                |GpiDeleteBitmap              |              |
|                                |GpiDeleteSetId                |              |
|                                |GpiMove                      |              |
|                                |GpiQueryBitmapHandle          |              |
|                                |GpiSetBackMix                |              |
|                                |GpiSetBitmapId                |              |
|                                |GpiSetColor                  |              |
|                                |GpiSetPatternSet              |              |
|                                |GpiSetPatternSet              |              |
|---------------------------------+------------------------------+---------------|
|GpiBitApp4                      |GpiDeleteBitmap              |Direct        |
|                                |GpiLoadBitmap                |              |
|                                |GpiQueryBitmapParameters      |              |
|                                |GpiWCBitBlt                  |              |
|---------------------------------+------------------------------+---------------|
|GpiSetPelExh                    |GpiPtVisible                  |              |
|                                |GpiQueryPel                  |              |
|                                |GpiSetColor                  |              |
|                                |GpiSetPel                    |              |
|---------------------------------+------------------------------+---------------|
|GpiBitBltExh                    |GpiBitBlt                    |Direct        |
|                                |GpiCreateBitmap              |              |
|                                |GpiCreatePS                  |              |
|                                |GpiDeleteBitmap              |              |
|                                |GpiDestroyPS                  |              |
|                                |GpiQueryDevice                |              |
|                                |GpiSetBitmap                  |              |
|                                |GpiSetBitmapBits              |              |
|---------------------------------+------------------------------+---------------|
|GpiSetBitmapBitsExh              |GpiBitBlt                    |Direct        |
|                                |GpiCreatePS                  |              |
|                                |GpiDeleteBitmap              |              |
|                                |GpiDestroyPS                  |              |
|                                |GpiQueryBitmapBits            |              |
|                                |GpiQueryDevice                |              |
|                                |GpiSetBitmap                  |              |
|                                |GpiSetBitmapBits              |              |
|---------------------------------+------------------------------+---------------|
|GpiSetBitmapIdExh                |GpiBox                        |Direct        |
|                                |GpiCreateBitmap              |              |
|                                |GpiDeleteBitmap              |              |
|                                |GpiDeleteSetId                |              |
|                                |GpiMove                      |              |
|                                |GpiQueryBitmapHandle          |              |
|                                |GpiSetBitmapId                |              |
|                                |GpiSetColor                  |              |
|                                |GpiSetPatternSet              |              |
|---------------------------------+------------------------------+---------------|
|GpiWCBitBltExh                  |GpiCreateBitmap              |              |
|                                |GpiDeleteBitmap              |              |
|                                |GpiSetColor                  |              |
|                                |GpiWCBitBlt                  |              |
|---------------------------------+------------------------------+---------------|
|GpiSetBitmapDimensionExh        |GpiDeleteBitmap              |              |
|                                |GpiQueryBitmapDimension      |              |
|                                |GpiSetBitmapDimension        |              |
|---------------------------------+------------------------------+---------------|
|GpiLoadBitmapExh                |GpiBitBlt                    |Direct        |
|                                |GpiCreatePS                  |              |
|                                |GpiDeleteBitmap              |              |
|                                |GpiDestroyPS                  |              |
|                                |GpiLoadBitmap                |              |
|                                |GpiQueryBitmapParameters      |              |
|                                |GpiQueryDevice                |              |
|                                |GpiSetBitmap                  |              |
|---------------------------------+------------------------------+---------------|
|GpiQueryDeviceBitmapFormatsExh  |GpiQueryDeviceBitmapFormats  |              |
|---------------------------------+------------------------------+---------------|
|GpiQueryBitmapParametersExh      |GpiCreateBitmap              |              |
|                                |GpiDeleteBitmap              |              |
|                                |GpiQueryBitmapParameters      |              |
\--------------------------------------------------------------------------------/</pre>
 
=== GpiChar Test Group ===
 
The GpiChar test group tests GPI text functions that:
 
*Set and query the current value of the baseline angle.
 
*Set and query the current value of the character box attribute.
 
*Set and query the current value of the character direction attribute.
 
*Set and query the current value of the character-mode attribute.
 
*Set and query the current value of the character-shear angle.
 
*Draw a character string at the current character position.
 
*Draw a character string at a specified character position.
 
*Set and query the position at which each character in a string is drawn with positioning controls.
 
*Set and query the position at which each character in a positioned string is drawn with positioning controls.
 
*Query the size of the default graphics character box.
 
*Query the relative coordinates of the four corners of a text box.
 
This testcase includes application tests that test the behavior of these character functions with other GPIs.
 
This table lists the test cases and the functions called by each test case in the GpiChar test group. The GpiChar test group is found in GPICHAR.DLL.
 
<pre class="western">/--------------------------------------------------------------------------\
|Test Case                        |GPI Functions Called    |Configuration  |
|                                |                        |Settings      |
|---------------------------------+------------------------+---------------|
|GpiCharTestPre1                  |GpiCharStringPos        |              |
|                                |GpiCharStringPosAt      |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiMove                |              |
|                                |GpiSetCharAngle        |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
|---------------------------------+------------------------+---------------|
|GpiCharTestPre2                  |GpiCharStringAt        |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiSetCharSet          |              |
|---------------------------------+------------------------+---------------|
|GpiCharTestApp1                  |GpiCharString          |              |
|                                |GpiCharStringAt        |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiMove                |              |
|                                |GpiPolyLine            |              |
|                                |GpiQueryFontMetrics    |              |
|                                |GpiSetCharAngle        |              |
|                                |GpiSetCharBox          |              |
|                                |GpiSetCharDirection    |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
|                                |GpiSetCharShear        |              |
|---------------------------------+------------------------+---------------|
|GpiSetAndQryCharAngleExh        |GpiCharStringAt        |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiSetCharAngle        |              |
|                                |GpiSetCharBox          |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
|---------------------------------+------------------------+---------------|
|GpiSetAndQryCharBoxExh          |GpiCharString          |              |
|                                |GpiCharStringAt        |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiMove                |              |
|                                |GpiQueryCharBox        |              |
|                                |GpiSetCharBox          |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
|---------------------------------+------------------------+---------------|
|GpiSetAndQryCharDirExh          |GpiCharStringAt        |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiQueryCharDirection  |              |
|                                |GpiQueryCharDirection  |              |
|                                |GpiSetCharBox          |              |
|                                |GpiSetCharDirection    |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
|---------------------------------+------------------------+---------------|
|GpiSetAndQryCharModeExh          |GpiCharStringAt        |              |
|                                |GpiCharStringAt        |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiQueryCharMode        |              |
|                                |GpiSetCharAngle        |              |
|                                |GpiSetCharBox          |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
|---------------------------------+------------------------+---------------|
|GpiSetAndQryCharShearExh        |GpiCharStringAt        |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiQueryCharShear      |              |
|                                |GpiQueryDefCharBox      |              |
|                                |GpiSetCharBox          |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
|                                |GpiSetCharShear        |              |
|---------------------------------+------------------------+---------------|
|GpiCharStringExh                |GpiCharString          |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiMove                |              |
|                                |GpiQueryDefCharBox      |              |
|                                |GpiQueryDevice          |              |
|                                |GpiQueryFontMetrics    |              |
|                                |GpiSetCharAngle        |              |
|                                |GpiSetCharBox          |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
|---------------------------------+------------------------+---------------|
|GpiCharStringAtExh              |GpiCharString          |              |
|                                |GpiCharStringAt        |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiMove                |              |
|                                |GpiQueryDefCharBox      |              |
|                                |GpiQueryDevice          |              |
|                                |GpiQueryFontMetrics    |              |
|                                |GpiSetCharAngle        |              |
|                                |GpiSetCharBox          |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
|---------------------------------+------------------------+---------------|
|GpiCharStringPosAndQryExh        |GpiCharString          |              |
|                                |GpiCharStringPos        |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiMove                |              |
|                                |GpiQueryDefCharBox      |              |
|                                |GpiQueryDevice          |              |
|                                |GpiQueryFontMetrics    |              |
|                                |GpiQueryTextBox        |              |
|                                |GpiSetCharAngle        |              |
|                                |GpiSetCharBox          |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
|---------------------------------+------------------------+---------------|
|GpiCharStringPosAndQryShadeExh  |GpiCharString          |              |
|                                |GpiCharStringPos        |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiMove                |              |
|                                |GpiQueryDefCharBox      |              |
|                                |GpiQueryDevice          |              |
|                                |GpiQueryFontMetrics    |              |
|                                |GpiQueryTextBox        |              |
|                                |GpiSetBackColor        |              |
|                                |GpiSetCharAngle        |              |
|                                |GpiSetCharBox          |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
|---------------------------------+------------------------+---------------|
|GpiCharStringPosAndQryBoxExh    |GpiCharString          |              |
|                                |GpiCharStringPos        |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiLine                |              |
|                                |GpiMove                |              |
|                                |GpiQueryDefCharBox      |              |
|                                |GpiQueryFontMetrics    |              |
|                                |GpiQueryTextBox        |              |
|                                |GpiSetCharAngle        |              |
|                                |GpiSetCharBox          |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
|---------------------------------+------------------------+---------------|
|GpiCharStringPosAtAndQryExh      |GpiCharString          |              |
|                                |GpiCharStringPos        |              |
|                                |GpiCharStringPosAt      |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiMove                |              |
|                                |GpiQueryDefCharBox      |              |
|                                |GpiQueryDevice          |              |
|                                |GpiQueryFontMetrics    |              |
|                                |GpiQueryTextBox        |              |
|                                |GpiSetCharAngle        |              |
|                                |GpiSetCharBox          |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
|---------------------------------+------------------------+---------------|
|GpiCharStringPosAtAndQryShdExh  |GpiCharString          |              |
|                                |GpiCharStringPos        |              |
|                                |GpiCharStringPosAt      |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiMove                |              |
|                                |GpiQueryDefCharBox      |              |
|                                |GpiQueryDevice          |              |
|                                |GpiQueryFontMetrics    |              |
|                                |GpiQueryTextBox        |              |
|                                |GpiSetBackColor        |              |
|                                |GpiSetCharAngle        |              |
|                                |GpiSetCharBox          |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
|---------------------------------+------------------------+---------------|
|GpiCharStringPosAtAndQryBoxExh  |GpiCharString          |              |
|                                |GpiCharStringPos        |              |
|                                |GpiCharStringPosAt      |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiLine                |              |
|                                |GpiMove                |              |
|                                |GpiQueryDefCharBox      |              |
|                                |GpiQueryDevice          |              |
|                                |GpiQueryFontMetrics    |              |
|                                |GpiQueryTextBox        |              |
|                                |GpiSetCharAngle        |              |
|                                |GpiSetCharBox          |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
|---------------------------------+------------------------+---------------|
|GpiQryDefCharBoxExh              |GpiCharStringAt        |              |
|                                |GpiQueryCharBox        |              |
|                                |GpiQueryDefCharBox      |              |
|                                |GpiSetCharBox          |              |
|---------------------------------+------------------------+---------------|
|GpiQryTextBoxExh                |GpiCharStringAt        |              |
|                                |GpiDeleteSetId          |              |
|                                |GpiMove                |              |
|                                |GpiPolyLine            |              |
|                                |GpiQueryTextBox        |              |
|                                |GpiSetCharAngle        |              |
|                                |GpiSetCharBox          |              |
|                                |GpiSetCharMode          |              |
|                                |GpiSetCharSet          |              |
\--------------------------------------------------------------------------/</pre>
 
=== GpiClip Test Group ===
The GpiClip test group tests the GPI clipping visible APIs. The following APIs are tested:
 
*GpiExcludeClipRectangle <br />*GpiIntersectClipRectangle <br />*GpiOffsetClipRegion <br />*GpiSetClipRegion <br />*GpiSetClipPath <br />*GpiQueryClipBox <br />*GpiQueryClipRegion <br />*GpiPtVisible <br />*GpiRectVisible
 
This table lists the test cases and the functions called by each test case in the GpiClip test group. The GpiClip test group is found in GPICLIP.DLL.
 
<pre class="western">/----------------------------------------------------------------------\
|Test Case                |GPI Functions Called      |Configuration  |
|                          |                          |Settings      |
|--------------------------+---------------------------+---------------|
|GpiClipPre                |GpiCreateRegion            |Direct        |
|                          |GpiDestroyRegion          |              |
|                          |GpiSetClipRegion          |              |
|--------------------------+---------------------------+---------------|
|GpiClipApp                |GpiCreateRegion            |Direct        |
|                          |GpiDestroyRegion          |              |
|                          |GpiExcludeClipRectangle    |              |
|                          |GpiIntersectClipRectangle  |              |
|                          |GpiOffsetClipRegion        |              |
|                          |GpiPtVisible              |              |
|                          |GpiQueryClipBox            |              |
|                          |GpiSetClipRegion          |              |
|--------------------------+---------------------------+---------------|
|GpiPtVisibleExh          |GpiCreateRegion            |Direct        |
|                          |GpiDestroyRegion          |              |
|                          |GpiPtVisible              |              |
|                          |GpiSetClipRegion          |              |
|--------------------------+---------------------------+---------------|
|GpiRectVisibleExh        |GpiCreateRegion            |Direct        |
|                          |GpiDestroyRegion          |              |
|                          |GpiRectVisible            |              |
|                          |GpiSetClipRegion          |              |
|--------------------------+---------------------------+---------------|
|GpiQueryClipBoxExh        |GpiCreateRegion            |Direct        |
|                          |GpiDestroyRegion          |              |
|                          |GpiQueryClipBox            |              |
|                          |GpiSetClipRegion          |              |
|--------------------------+---------------------------+---------------|
|GpiQueryClipRegionExh    |GpiCombineRegion          |Direct        |
|                          |GpiCreateRegion            |              |
|                          |GpiDestroyRegion          |              |
|                          |GpiPaintRegion            |              |
|                          |GpiQueryClipRegion        |              |
|                          |GpiSetClipRegion          |              |
|                          |GpiSetPattern              |              |
|--------------------------+---------------------------+---------------|
|GpiSetClipPathExh        |GpiCreateRegion            |Queued        |
|                          |GpiDestroyRegion          |              |
|                          |GpiQueryClipBox            |              |
|                          |GpiSetClipRegion          |              |
|--------------------------+---------------------------+---------------|
|GpiExcludeClipRectExh    |GpiCreateRegion            |Direct        |
|                          |GpiDestroyRegion          |              |
|                          |GpiExcludeClipRectangle    |              |
|                          |GpiSetClipRegion          |              |
|--------------------------+---------------------------+---------------|
|GpiIntersectClipRectExh  |GpiCreateRegion            |Direct        |
|                          |GpiDestroyRegion          |              |
|                          |GpiIntersectClipRectangle  |              |
|                          |GpiSetClipRegion          |              |
|--------------------------+---------------------------+---------------|
|GpiOffsetClipRegionExh    |GpiCreateRegion            |Direct        |
|                          |GpiDestroyRegion          |              |
|                          |GpiOffsetClipRegion        |              |
|                          |GpiSetClipRegion          |              |
\----------------------------------------------------------------------/</pre>
 
=== GpiColor Test Group ===
The GpiColor test group tests the GPI Color API, GpiSetColor.
 
This table lists the test cases and the functions called by each test case in the GpiColor test group. The GpiColor test group is found in GPICOLOR. DLL.
 
<pre class="western">/-------------------------------------------------------------------------\
|Test Case                    |GPI Functions Called      |Configuration  |
|                              |                          |Settings      |
|------------------------------+--------------------------+---------------|
|GpiColorApp1                  |GpiSetColor              |              |
|                              |GpiSetPattern            |              |
|------------------------------+--------------------------+---------------|
|GpiColorApp2                  |GpiSetColor              |              |
|------------------------------+--------------------------+---------------|
|GpiColorApp3                  |GpiBeginArea              |              |
|                              |GpiBox                    |              |
|                              |GpiEndArea                |              |
|                              |GpiFullArc                |              |
|                              |GpiLine                  |              |
|                              |GpiMove                  |              |
|                              |GpiPointArc              |              |
|                              |GpiSetArcParams          |              |
|                              |GpiSetBackMix            |              |
|                              |GpiSetColor              |              |
|------------------------------+--------------------------+---------------|
|GpiSetColorExh                |GpiLine                  |              |
|                              |GpiMove                  |              |
|                              |GpiSetColor              |              |
|------------------------------+--------------------------+---------------|
|GpiSetMixExh1                |GpiBeginArea              |              |
|                              |GpiEndArea                |              |
|                              |GpiMove                  |              |
|                              |GpiPolyLine              |              |
|                              |GpiQueryDevice            |              |
|                              |GpiQueryMix              |              |
|                              |GpiSetColor              |              |
|                              |GpiSetMix                |              |
|                              |GpiSetPattern            |              |
|------------------------------+--------------------------+---------------|
|GpiSetMixExh2                |GpiBeginArea              |              |
|                              |GpiEndArea                |              |
|                              |GpiMove                  |              |
|                              |GpiPolyLine              |              |
|                              |GpiQueryDevice            |              |
|                              |GpiQueryMix              |              |
|                              |GpiSetColor              |              |
|                              |GpiSetMix                |              |
|                              |GpiSetPattern            |              |
|------------------------------+--------------------------+---------------|
|GpiSetMixExh3                |GpiBeginArea              |              |
|                              |GpiEndArea                |              |
|                              |GpiMove                  |              |
|                              |GpiPolyLine              |              |
|                              |GpiQueryDevice            |              |
|                              |GpiQueryMix              |              |
|                              |GpiSetColor              |              |
|                              |GpiSetMix                |              |
|                              |GpiSetPattern            |              |
|------------------------------+--------------------------+---------------|
|GpiSetMixExh4                |GpiBeginArea              |              |
|                              |GpiEndArea                |              |
|                              |GpiMove                  |              |
|                              |GpiPolyLine              |              |
|                              |GpiQueryDevice            |              |
|                              |GpiQueryMix              |              |
|                              |GpiSetColor              |              |
|                              |GpiSetMix                |              |
|                              |GpiSetPattern            |              |
|------------------------------+--------------------------+---------------|
|GpiSetBackColorExh            |GpiBox                    |              |
|                              |GpiMove                  |              |
|                              |GpiQueryBackColor        |              |
|                              |GpiSetBackColor          |              |
|                              |GpiSetBackMix            |              |
|                              |GpiSetColor              |              |
|                              |GpiSetPattern            |              |
|------------------------------+--------------------------+---------------|
|GpiSetBackMixExh              |GpiBeginArea              |              |
|                              |GpiEndArea                |              |
|                              |GpiMove                  |              |
|                              |GpiPolyLine              |              |
|                              |GpiQueryBackMix          |              |
|                              |GpiQueryDevice            |              |
|                              |GpiSetBackColor          |              |
|                              |GpiSetBackMix            |              |
|                              |GpiSetColor              |              |
|                              |GpiSetMixExh1            |              |
|                              |GpiSetPattern            |              |
|------------------------------+--------------------------+---------------|
|GpiCreateLogColorTableExh1    |GpiBox                    |              |
|                              |GpiCreateLogColorTable    |              |
|                              |GpiLine                  |              |
|                              |GpiMove                  |              |
|                              |GpiQueryDevice            |              |
|                              |GpiQueryLogColorTable    |              |
|                              |GpiSetColor              |              |
|                              |GpiSetPattern            |              |
|                              |GpiSetPatternSet          |              |
|                              |GpiUnrealizeColorTable    |              |
|------------------------------+--------------------------+---------------|
|GpiCreateLogColorTableExh2    |GpiBox                    |              |
|                              |GpiCreateLogColorTable    |              |
|                              |GpiLine                  |              |
|                              |GpiMove                  |              |
|                              |GpiQueryDevice            |              |
|                              |GpiSetColor              |              |
|                              |GpiSetPattern            |              |
|------------------------------+--------------------------+---------------|
|GpiQueryColorDataExh          |GpiCreateLogColorTable    |              |
|                              |GpiLine                  |              |
|                              |GpiMove                  |              |
|                              |GpiQueryColorData        |              |
|                              |GpiSetColor              |              |
|                              |GpiSetPattern            |              |
|------------------------------+--------------------------+---------------|
|GpiQueryColorIndexExh        |GpiBox                    |              |
|                              |GpiCreateLogColorTable    |              |
|                              |GpiLine                  |              |
|                              |GpiMove                  |              |
|                              |GpiQueryColorIndex        |              |
|                              |GpiQueryDevice            |              |
|                              |GpiSetColor              |              |
|------------------------------+--------------------------+---------------|
|GpiQueryNearestColorExh      |GpiBox                    |              |
|                              |GpiCreateLogColorTable    |              |
|                              |GpiLine                  |              |
|                              |GpiMove                  |              |
|                              |GpiQueryDevice            |              |
|                              |GpiQueryNearestColor      |              |
|                              |GpiSetColor              |              |
|                              |GpiSetPattern            |              |
|------------------------------+--------------------------+---------------|
|GpiQueryRealColorsExh        |GpiBox                    |              |
|                              |GpiCreateLogColorTable    |              |
|                              |GpiLine                  |              |
|                              |GpiMove                  |              |
|                              |GpiQueryDevice            |              |
|                              |GpiQueryRealColors        |              |
|                              |GpiSetColor              |              |
|                              |GpiSetPattern            |              |
|------------------------------+--------------------------+---------------|
|GpiQueryRGBColorExh          |GpiBox                    |              |
|                              |GpiLine                  |              |
|                              |GpiMove                  |              |
|                              |GpiQueryDevice            |              |
|                              |GpiQueryRGBColor          |              |
|                              |GpiSetColor              |              |
|                              |GpiSetPattern            |              |
\-------------------------------------------------------------------------/</pre>
 
=== GpiElement Test Group ===
This testcase is designed to test the GPI element functions that:
 
*Open an element bracket. <br />*Close an element bracket. <br />*Delete the element referenced by the current value of the element pointer. <br />*Delete a section of elements inclusively delimited by element pointer values. <br />*Delete a section of elements exclusively delimited by labels. <br />*Add a single element to the current segment. <br />*Query the graphics orders for a single element. <br />*Get the graphics orders for a specified segment. <br />*Add a buffer of graphics orders to the current segment. <br />*Insert a label into the current segment. <br />*Move the element pointer by a specified increment. <br />*Query information associated with the current element. <br />*Set the current edit mode to either insert or replace. <br />*Query the current edit mode setting. <br />*Set the value of the element pointer. <br />*Query the value of the element pointer. <br />*Set the value of the element pointer to point at a specified label.
 
This testcase includes application tests that are designed to test the behavior of these character functions with other GPIs.
 
'''Limitations:''' All exhaustive element functions must be executed within a normal PS.
 
This table lists the test cases and the functions called by each test case in the GpiElement test group. The GpiElement test group is found in GPIELMNT.DLL.
 
<pre class="western">/-------------------------------------------------------------------------------------\
|Test Case                        |GPI Functions Called              |Configuration  |
|                                  |                                  |Settings      |
|----------------------------------+----------------------------------+---------------|
|GpiElementTestApp1                |GpiDrawSegment                    |Normal        |
|                                  |GpiQueryPS                        |              |
|                                  |GpiSetDrawContro                  |              |
|                                  |GpiSetDrawingMode                |              |
|----------------------------------+----------------------------------+---------------|
|GpiElementTestApp2                |GpiDrawSegment                    |Normal        |
|                                  |GpiQueryPS                        |              |
|                                  |GpiSetDrawControl                |              |
|                                  |GpiSetDrawingMode                |              |
|----------------------------------+----------------------------------+---------------|
|GpiBeginAndEndElementExh          |GpiBeginElement                  |Normal        |
|                                  |GpiCloseSegment                  |              |
|                                  |GpiDrawSegment                    |              |
|                                  |GpiEndElement                    |              |
|                                  |GpiLine                          |              |
|                                  |GpiMove                          |              |
|                                  |GpiOpenSegment                    |              |
|                                  |GpiQueryPS                        |              |
|                                  |GpiSetColor                      |              |
|                                  |GpiSetDrawControl                |              |
|                                  |GpiSetDrawingMode                |              |
|----------------------------------+----------------------------------+---------------|
|GpiDeleteElementExh              |GpiCloseSegment                  |Normal        |
|                                  |GpiDeleteElement                  |              |
|                                  |GpiOffsetElementPointer          |              |
|                                  |GpiOpenSegment                    |              |
|                                  |GpiQueryPS                        |              |
|                                  |GpiSetDrawControl                |              |
|                                  |GpiSetDrawingMode                |              |
|                                  |GpiSetElementPointerAtLabel      |              |
|----------------------------------+----------------------------------+---------------|
|GpiDeleteElementRangeExh          |GpiCloseSegment                  |Normal        |
|                                  |GpiDeleteElementRange            |              |
|                                  |GpiDrawSegment                    |              |
|                                  |GpiOpenSegment                    |              |
|                                  |GpiQueryElementPointer            |              |
|                                  |GpiQueryPS                        |              |
|                                  |GpiSetDrawControl                |              |
|                                  |GpiSetDrawingMode                |              |
|                                  |GpiSetElementPointerAtLabel      |              |
|----------------------------------+----------------------------------+---------------|
|GpiDeleteElmntsBetweenLabelsExh  |GpiCloseSegment                  |Normal        |
|                                  |GpiDeleteElement                  |              |
|                                  |GpiDeleteElementsBetweenLabels    |              |
|                                  |GpiDrawSegment                    |              |
|                                  |GpiOpenSegment                    |              |
|                                  |GpiQueryPS                        |              |
|                                  |GpiSetDrawControl                |              |
|                                  |GpiSetDrawingMode                |              |
|----------------------------------+----------------------------------+---------------|
|GpiElementAndQryExh              |GpiBeginElement                  |Normal        |
|                                  |GpiCloseSegment                  |              |
|                                  |GpiComment                        |              |
|                                  |GpiDrawSegment                    |              |
|                                  |GpiElement                        |              |
|                                  |GpiEndElement                    |              |
|                                  |GpiMove                          |              |
|                                  |GpiOpenSegment                    |              |
|                                  |GpiPolyLine                      |              |
|                                  |GpiQueryElement                  |              |
|                                  |GpiQueryElementType              |              |
|                                  |GpiQueryPS                        |              |
|                                  |GpiSetDrawControl                |              |
|                                  |GpiSetDrawingMode                |              |
|                                  |GpiSetModelTransformMatrix        |              |
|----------------------------------+----------------------------------+---------------|
|GpiGetAndPutDataExh              |GpiCloseSegment                  |Normal        |
|                                  |GpiDrawSegment                    |              |
|                                  |GpiGetData                        |              |
|                                  |GpiLabel                          |              |
|                                  |GpiOpenSegment                    |              |
|                                  |GpiPutData                        |              |
|                                  |GpiQueryPS                        |              |
|                                  |GpiSetDrawControl                |              |
|                                  |GpiSetDrawingMode                |              |
|----------------------------------+----------------------------------+---------------|
|GpiLabelAndSetElmtPtrAtLabelExh  |GpiCloseSegment                  |Normal        |
|                                  |GpiLabel                          |              |
|                                  |GpiOpenSegment                    |              |
|                                  |GpiQueryElementPointer            |              |
|                                  |GpiQueryPS                        |              |
|                                  |GpiSetDrawingMode                |              |
|                                  |GpiSetElementPointer              |              |
|                                  |GpiSetElementPointerAtLabel      |              |
|----------------------------------+----------------------------------+---------------|
|GpiOffsetElementPointerExh        |GpiCloseSegment                  |Normal        |
|                                  |GpiLabel                          |              |
|                                  |GpiOffsetElementPointer          |              |
|                                  |GpiOpenSegment                    |              |
|                                  |GpiQueryElementPointer            |              |
|                                  |GpiQueryPS                        |              |
|                                  |GpiSetDrawingMode                |              |
|                                  |GpiSetElementPointer              |              |
|----------------------------------+----------------------------------+---------------|
|GpiQueryElementTypeExh            |GpiCallSegmentMatrix              |Normal        |
|                                  |GpiCharString                    |              |
|                                  |GpiCharStringAt                  |              |
|                                  |GpiCloseSegment                  |              |
|                                  |GpiElement                        |              |
|                                  |GpiFullArc                        |              |
|                                  |GpiImage                          |              |
|                                  |GpiLine                          |              |
|                                  |GpiMove                          |              |
|                                  |GpiOffsetElementPointer          |              |
|                                  |GpiOpenSegment                    |              |
|                                  |GpiPolyFillet                    |              |
|                                  |GpiPolyFilletSharp                |              |
|                                  |GpiPolyMarker                    |              |
|                                  |GpiPolySpline                    |              |
|                                  |GpiQueryDefAttrs                  |              |
|                                  |GpiQueryElement                  |              |
|                                  |GpiQueryElementType              |              |
|                                  |GpiQueryPS                        |              |
|                                  |GpiSetAttrs                      |              |
|                                  |GpiSetDrawingMode                |              |
|                                  |GpiSetElementPointer              |              |
|                                  |GpiSetSegmentAttrs                |              |
|----------------------------------+----------------------------------+---------------|
|GpiSetAndQryEditModeExh          |GpiCloseSegment                  |Normal        |
|                                  |GpiDrawSegment                    |              |
|                                  |GpiLabel                          |              |
|                                  |GpiOffsetElementPointer          |              |
|                                  |GpiOpenSegment                    |              |
|                                  |GpiQueryEditMode                  |              |
|                                  |GpiQueryPS                        |              |
|                                  |GpiRotate                        |              |
|                                  |GpiSetDrawControl                |              |
|                                  |GpiSetDrawingMode                |              |
|                                  |GpiSetEditMode                    |              |
|                                  |GpiSetElementPointerAtLabel      |              |
|                                  |GpiSetModelTransformMatrix        |              |
|----------------------------------+----------------------------------+---------------|
|GpiSetAndQryElementPointerExh    |GpiCloseSegment                  |Normal        |
|                                  |GpiLabel                          |              |
|                                  |GpiOpenSegment                    |              |
|                                  |GpiQueryPS                        |              |
|                                  |GpiSetDrawingMode                |              |
|                                  |GpiSetElementPointer              |              |
\-------------------------------------------------------------------------------------/</pre>
 
=== GpiFont Test Group ===
The GpiFont test group tests GPI text functions including:
 
*Determine whether a given file is a font resource file.
 
*Query the font metrics for the current logical font.
 
*Query the font metrics for all available fonts, or for the fonts specified by facename.
 
*Load one or more fonts from the specified resource file.
 
*Unload fonts previously loaded from the resource file.
 
*Create a logical definition of a font that an application requires to use.
 
*Query kerning pair information for the logical font identified by the current value of the character set attribute.
 
*Set the current value of the character-set attribute.
 
*Query the character-set lcid.
 
*Sets the code page ID for graphics characters for the default font.
 
*Query the currently selected graphics code page.
 
*Query the fonts that have been created by GpiCreateLogFont, and tagged bit maps.
 
*Query the number of local identifiers currently in use, referring to fonts or bit maps.
 
*Delete a logical font or bit-map tag.
 
*Query width table information for the logical font identified by the value of the character-set attribute.
 
*Query the device characteristics.
 
This table lists the test cases and the functions called by each test case in the GpiFont test group. The GpiFont test group is found in GPIFONT.DLL.
 
<pre class="western">/----------------------------------------------------------------------------------\
|Test Case                        |GPI Functions Called          |Configuration  |
|                                  |                              |Settings      |
|----------------------------------+-------------------------------+---------------|
|GpiFontApp1                      |GpiCharStringAt                |              |
|                                  |GpiCreateLogFont              |              |
|                                  |GpiDeleteSetId                |              |
|                                  |GpiQueryCharSet                |              |
|                                  |GpiQueryDevice                |              |
|                                  |GpiQueryFontFileDescriptions  |              |
|                                  |GpiQueryFonts                  |              |
|                                  |GpiQueryNumberSetIds          |              |
|                                  |GpiQueryWidthTable            |              |
|                                  |GpiSetCharSet                  |              |
|----------------------------------+-------------------------------+---------------|
|GpiFontApp2                      |GpiQueryDevice                |              |
|                                  |GpiQueryFontMetrics            |              |
|                                  |GpiSetCharSet                  |              |
|----------------------------------+-------------------------------+---------------|
|GpiQueryFontFileDescriptionsExh  |GpiDeleteSetId                |              |
|                                  |GpiQueryDevice                |              |
|                                  |GpiQueryFontFileDescriptions  |              |
|                                  |GpiSetCharSet                  |              |
|----------------------------------+-------------------------------+---------------|
|GpiQueryFontMetricsExh            |GpiDeleteSetId                |              |
|                                  |GpiQueryFontMetrics            |              |
|                                  |GpiSetCharSet                  |              |
|----------------------------------+-------------------------------+---------------|
|GpiQueryFontsExh                  |GpiDeleteSetId                |              |
|                                  |GpiLoadFonts                  |              |
|                                  |GpiQueryFonts                  |              |
|                                  |GpiSetCharSet                  |              |
|                                  |GpiUnloadFonts                |              |
|----------------------------------+-------------------------------+---------------|
|GpiCreateLogFontExh              |GpiDeleteSetId                |              |
|                                  |GpiResetPS                    |              |
|                                  |GpiSetCharSet                  |              |
|----------------------------------+-------------------------------+---------------|
|GpiQueryKerningPairsExh          |GpiDeleteSetId                |              |
|                                  |GpiQueryDevice                |              |
|                                  |GpiQueryFontMetrics            |              |
|                                  |GpiQueryKerningPairs          |              |
|                                  |GpiSetCharSet                  |              |
|----------------------------------+-------------------------------+---------------|
|GpiSetAndQueryCpExh              |GpiCharString                  |              |
|                                  |GpiMove                        |              |
|                                  |GpiQueryCp                    |              |
|                                  |GpiQueryCp                    |              |
|                                  |GpiSetCp                      |              |
|----------------------------------+-------------------------------+---------------|
|GpiSetAndQueryCharSetExh          |GpiDeleteSetId                |              |
|                                  |GpiQueryCharSet                |              |
|                                  |GpiSetCharSet                  |              |
|----------------------------------+-------------------------------+---------------|
|GpiQueryNumberSetIdsExh          |GpiDeleteSetId                |              |
|                                  |GpiQueryNumberSetIds          |              |
|                                  |GpiSetCharSet                  |              |
|----------------------------------+-------------------------------+---------------|
|GpiDeleteSetIdExh                |GpiDeleteSetId                |              |
|                                  |GpiSetCharSet                  |              |
|----------------------------------+-------------------------------+---------------|
|GpiQueryWidthTableExh            |GpiDeleteSetId                |              |
|                                  |GpiQueryDevice                |              |
|                                  |GpiQueryFontMetrics            |              |
|                                  |GpiQueryWidthTable            |              |
|                                  |GpiSetCharSet                  |              |
|----------------------------------+-------------------------------+---------------|
|GpiLoadFontsExh                  |GpiLoadFonts                  |              |
|                                  |GpiQueryFonts                  |              |
|                                  |GpiUnloadFonts                |              |
|----------------------------------+-------------------------------+---------------|
|GpiUnloadFontsExh                |GpiLoadFonts                  |              |
|                                  |GpiQueryFonts                  |              |
|                                  |GpiUnloadFonts                |              |
\----------------------------------------------------------------------------------/</pre>
 
=== GpiImage Test Group ===
This module is called by PTT to test the GPI Image APIs. This GPI is used to display raster (bit map) images. The functionality of this GPI and all the error codes that may be returned by this GPI will be tested.
 
'''Limitations:''' GpiImage cannot be used to load bitmaps that a pixel is represented by more than one bit.
 
This table lists the test cases and the functions called by each test case in the GpiImage test group. The GpiImage test group is found in GPIIMAGE. DLL.
 
<pre class="western">/---------------------------------------------------------------------\
|Test Case                |GPI Functions Called      |Configuration  |
|                          |                          |Settings      |
|--------------------------+--------------------------+---------------|
|GpiImagePre              |GpiImage                  |              |
|                          |GpiMove                  |              |
|                          |GpiSetColor              |              |
|--------------------------+--------------------------+---------------|
|GpiImageApp              |GpiBox                    |              |
|                          |GpiImage                  |              |
|                          |GpiMove                  |              |
|                          |GpiRestorePS              |              |
|                          |GpiSetColor              |              |
|                          |GpiSetPattern            |              |
|--------------------------+--------------------------+---------------|
|GpiImageExh              |GpiImage                  |              |
|                          |GpiMove                  |              |
|                          |GpiSetColor              |              |
\---------------------------------------------------------------------/</pre>
 
=== GpiLine Test Group ===
The GpiLine test group tests the line and polyline APIs with respect to line characteristics and precision.
 
This table lists the test cases and the functions called by each test case in the GpiLine test group. The GpiLine Test Group is found in GPILINE.DLL.
 
<pre class="western">/---------------------------------------------------------------------\
|Test Case                |GPI Functions Called      |Configuration  |
|                          |                          |Settings      |
|--------------------------+--------------------------+---------------|
|GpiLinePre                |GpiBeginPath              |              |
|                          |GpiBox                    |              |
|                          |GpiCloseFigure            |              |
|                          |GpiEndPath                |              |
|                          |GpiFillPath              |              |
|                          |GpiLine                  |              |
|                          |GpiMove                  |              |
|                          |GpiPolyLine              |              |
|                          |GpiSetPattern            |              |
|--------------------------+--------------------------+---------------|
|GpiLineApp                |GpiBeginPath              |              |
|                          |GpiBox                    |              |
|                          |GpiCloseFigure            |              |
|                          |GpiEndPath                |              |
|                          |GpiFillPath              |              |
|                          |GpiLine                  |              |
|                          |GpiMove                  |              |
|                          |GpiPolyLine              |              |
|                          |GpiSetPattern            |              |
|--------------------------+--------------------------+---------------|
|GpiBoxExh                |GpiBox                    |              |
|                          |GpiMove                  |              |
|                          |GpiQueryCurrentPosition  |              |
|                          |GpiSetPattern            |              |
|--------------------------+--------------------------+---------------|
|GpiLineExh                |GpiLine                  |              |
|                          |GpiQueryLineType          |              |
|                          |GpiSetCurrentPosition    |              |
|                          |GpiSetLineType            |              |
|--------------------------+--------------------------+---------------|
|GpiPolyLineExh            |GpiMove                  |              |
|                          |GpiPolyLine              |              |
\---------------------------------------------------------------------/</pre>
 
=== GpiMarker Test Group ===
The GpiMarker test group covers the GPI Marker APIs with respect to precision, size, and variation.
 
This table lists the test cases and the functions called by each test case in the GpiMarker test group. The GpiMarker test group is found in GPIMARKER .DLL.
 
<pre class="western">/---------------------------------------------------------------------\
|Test Case                |GPI Functions Called      |Configuration  |
|                          |                          |Settings      |
|--------------------------+--------------------------+---------------|
|GpiMarkerPre              |GpiMarker                |              |
|                          |GpiPolyMarker            |              |
|                          |GpiSetMarker              |              |
|--------------------------+--------------------------+---------------|
|GpiMarkerApp              |GpiDeleteSetId            |Direct and    |
|                          |GpiMarker                |Standard or    |
|                          |GpiPolyMarker            |Queued and Raw |
|                          |GpiQueryMarker            |              |
|                          |GpiQueryMarkerBox        |              |
|                          |GpiQueryMarkerSet        |              |
|                          |GpiSetMarker              |              |
|                          |GpiSetMarkerBox          |              |
|                          |GpiSetMarkerSet          |              |
|--------------------------+--------------------------+---------------|
|GpiMarkerExh              |GpiMarker                |Direct and    |
|                          |GpiQueryMarker            |Standard or    |
|                          |GpiQueryMarkerBox        |Queued and Raw |
|                          |GpiQueryMarkerSet        |              |
|                          |GpiSetMarker              |              |
|                          |GpiSetMarkerBox          |              |
|                          |GpiSetMarkerSet          |              |
|--------------------------+--------------------------+---------------|
|GpiPolyMarkerExh          |GpiPolyMarker            |              |
|                          |GpiQueryMarker            |              |
|                          |GpiQueryMarkerBox        |              |
|                          |GpiQueryMarkerSet        |              |
|                          |GpiSetCharDirection      |              |
|                          |GpiSetMarker              |              |
|                          |GpiSetMarkerBox          |              |
|                          |GpiSetMarkerSet          |              |
\---------------------------------------------------------------------/</pre>
 
=== GpiMeta Test Group ===
The GpiMeta test group covers the GPI Meta APIs and tests the loading, copying, playing, deletion, and querying of meta files.
 
This table lists the test cases and the functions called by each test case in the GpiMeta test group. The GpiMeta test group is found in GPIMETA.DLL.
 
<pre class="western">/-------------------------------------------------------------------------\
|Test Case                    |GPI Functions Called      |Configuration  |
|                              |                          |Settings      |
|------------------------------+--------------------------+---------------|
|GpiMetaApp1                  |GpiLoadMetaFile          |Raw            |
|                              |GpiPlayMetaFile          |              |
|------------------------------+--------------------------+---------------|
|GpiMetaApp2                  |GpiLoadMetaFile          |Raw            |
|                              |GpiPlayMetaFile          |              |
|------------------------------+--------------------------+---------------|
|GpiCopyMetaFileExh            |GpiAssociate              |Raw            |
|                              |GpiCharString            |              |
|                              |GpiCopyMetaFile          |              |
|                              |GpiCreatePS              |              |
|                              |GpiDestroyPS              |              |
|                              |GpiLoadMetaFile          |              |
|                              |GpiMove                  |              |
|                              |GpiPlayMetaFile          |              |
|                              |GpiSaveMetaFile          |              |
|------------------------------+--------------------------+---------------|
|GpiDeleteMetaFileExh          |GpiAssociate              |Raw            |
|                              |GpiCharString            |              |
|                              |GpiCreatePS              |              |
|                              |GpiDeleteMetaFile        |              |
|                              |GpiDestroyPS              |              |
|                              |GpiLoadMetaFile          |              |
|                              |GpiMove                  |              |
|                              |GpiPlayMetaFile          |              |
|                              |GpiSaveMetaFile          |              |
|------------------------------+--------------------------+---------------|
|GpiLoadPlayMetaFileExh1      |GpiLoadMetaFile          |Raw            |
|                              |GpiPlayMetaFile          |              |
|------------------------------+--------------------------+---------------|
|GpiLoadPlayMetaFileExh2      |GpiCharString            |Raw            |
|                              |GpiLoadMetaFile          |              |
|                              |GpiMove                  |              |
|                              |GpiPlayMetaFile          |              |
|------------------------------+--------------------------+---------------|
|GpiLoadPlayMetaFileExh3      |GpiCharString            |Raw            |
|                              |GpiLoadMetaFile          |              |
|                              |GpiMove                  |              |
|                              |GpiPlayMetaFile          |              |
|------------------------------+--------------------------+---------------|
|GpiQueryMetaFileLengthExh    |GpiCharString            |Raw            |
|                              |GpiLoadMetaFile          |              |
|                              |GpiMove                  |              |
|                              |GpiQueryMetaFileLength    |              |
|------------------------------+--------------------------+---------------|
|GpiQuerySetMetaFileBitsExh    |GpiLoadMetaFile          |Raw            |
|                              |GpiPlayMetaFile          |              |
|                              |GpiQueryMetaFileBits      |              |
|                              |GpiQueryMetaFileLength    |              |
|                              |GpiSetMetaFileBits        |              |
|------------------------------+--------------------------+---------------|
|GpiSaveMetaFileExh            |GpiAssociate              |Raw            |
|                              |GpiCharString            |              |
|                              |GpiCharString            |              |
|                              |GpiCreatePS              |              |
|                              |GpiDestroyPS              |              |
|                              |GpiLoadMetaFile          |              |
|                              |GpiMove                  |              |
|                              |GpiSaveMetaFile          |              |
\-------------------------------------------------------------------------/</pre>
 
 
 
 
=== GpiPath Test Group ===
 
Paths are used to draw and fill lines and non-rectangular areas. This testcase covers the accuracy of the path limits, the basic functionality of path GPIs and each of the path drawing functions in detail.
 
'''Limitations:''' This testcase does not cover the use of paths for clipping purposes. See the test group GpiClip.
 
This table lists the test cases and the functions called by each test case in the GpiPath test group. The GpiPath test group is found in GPIPATH.DLL.
 
<pre class="western">/---------------------------------------------------------------------\
|Test Case                |GPI Functions Called      |Configuration  |
|                          |                          |Settings      |
|--------------------------+--------------------------+---------------|
|GpiPathPre                |GpiBeginPath              |              |
|                          |GpiCloseFigure            |              |
|                          |GpiEndPath                |              |
|                          |GpiFillPath              |              |
|                          |GpiMove                  |              |
|                          |GpiOutlinePath            |              |
|                          |GpiPolyLine              |              |
|                          |GpiSetLineWidthGeom      |              |
|                          |GpiSetPattern            |              |
|                          |GpiStrokePath            |              |
|--------------------------+--------------------------+---------------|
|GpiPathApp                |GpiBeginPath              |              |
|                          |GpiEndPath                |              |
|                          |GpiFillPath              |              |
|                          |GpiFullArc                |              |
|                          |GpiModifyPath            |              |
|                          |GpiMove                  |              |
|                          |GpiOutlinePath            |              |
|                          |GpiPointArc              |              |
|                          |GpiPolyFillet            |              |
|                          |GpiPolyLine              |              |
|                          |GpiSetLineEnd            |              |
|                          |GpiSetLineJoin            |              |
|                          |GpiSetLineWidthGeom      |              |
|                          |GpiSetPattern            |              |
|                          |GpiStrokePath            |              |
|--------------------------+--------------------------+---------------|
|GpiFillPathExh            |GpiBeginPath              |              |
|                          |GpiEndPath                |              |
|                          |GpiFillPath              |              |
|                          |GpiModifyPath            |              |
|                          |GpiMove                  |              |
|                          |GpiPolyLine              |              |
|                          |GpiSetLineWidthGeom      |              |
|                          |GpiSetPattern            |              |
|--------------------------+--------------------------+---------------|
|GpiOutlinePathExh        |GpiBeginPath              |              |
|                          |GpiCloseFigure            |              |
|                          |GpiEndPath                |              |
|                          |GpiMove                  |              |
|                          |GpiOutlinePath            |              |
|                          |GpiPolyLine              |              |
|                          |GpiSetLineWidth          |              |
|--------------------------+--------------------------+---------------|
|GpiStrokePathExh          |GpiBeginPath              |              |
|                          |GpiCloseFigure            |              |
|                          |GpiEndPath                |              |
|                          |GpiMove                  |              |
|                          |GpiPolyLine              |              |
|                          |GpiSetLineWidthGeom      |              |
|                          |GpiSetPattern            |              |
|                          |GpiStrokePath            |              |
|--------------------------+--------------------------+---------------|
|GpiSetLineExh            |GpiBeginPath              |              |
|                          |GpiEndPath                |              |
|                          |GpiMove                  |              |
|                          |GpiPolyLine              |              |
|                          |GpiQueryLineJoin          |              |
|                          |GpiQueryLineWidthGeom    |              |
|                          |GpiSetLineEnd            |              |
|                          |GpiSetLineJoin            |              |
|                          |GpiSetLineWidthGeom      |              |
|                          |GpiSetPattern            |              |
|                          |GpiStrokePath            |              |
\---------------------------------------------------------------------/</pre>
 
 
 
 
=== GpiPathclip Test Group ===
 
The GpiPathClip test group exhaustively tests the GPI Set Clip Path API.
 
This table lists the test cases and the functions called by each test case in the GpiPathclip test group. The GpiPathclip test group is found in GPIPATH.DLL.
 
 
 
<pre class="western">/---------------------------------------------------------------------\
|Test Case                |GPI Functions Called      |Configuration  |
|                          |                          |Settings      |
|--------------------------+--------------------------+---------------|
|GpiSetClipPathPre        |GpiBeginPath              |              |
|                          |GpiBox                    |              |
|                          |GpiCharStringAt          |              |
|                          |GpiEndPath                |              |
|                          |GpiMove                  |              |
|                          |GpiSetClipPath            |              |
|--------------------------+--------------------------+---------------|
|GpiSetClipPathApp1        |GpiBeginPath              |              |
|                          |GpiCharStringAt          |              |
|                          |GpiCreateLogFont          |              |
|                          |GpiEndPath                |              |
|                          |GpiQueryFonts            |              |
|                          |GpiSetCharBox            |              |
|                          |GpiSetCharSet            |              |
|                          |GpiSetClipPath            |              |
|--------------------------+--------------------------+---------------|
|GpiSetClipPathApp2        |GpiBeginPath              |              |
|                          |GpiBox                    |              |
|                          |GpiEndPath                |              |
|                          |GpiMove                  |              |
|                          |GpiPolySpline            |              |
|                          |GpiSetClipPath            |              |
|                          |GpiSetPattern            |              |
|--------------------------+--------------------------+---------------|
|GpiSetClipPathApp3        |GpiBeginPath              |              |
|                          |GpiCharStringAt          |              |
|                          |GpiCreateLogFont          |              |
|                          |GpiEndPath                |              |
|                          |GpiQueryFonts            |              |
|                          |GpiSetCharSet            |              |
|                          |GpiSetClipPath            |              |
|--------------------------+--------------------------+---------------|
|GpiSetClipPathExh1        |GpiBeginPath              |              |
|                          |GpiCharStringAt          |              |
|                          |GpiEndPath                |              |
|                          |GpiSetClipPath            |              |
|--------------------------+--------------------------+---------------|
|GpiSetClipPathExh2        |GpiBeginPath              |              |
|                          |GpiCharStringAt          |              |
|                          |GpiEndPath                |              |
|                          |GpiSetClipPath            |              |
|--------------------------+--------------------------+---------------|
|GpiSetClipPathExh3        |GpiBeginPath              |              |
|                          |GpiCharStringAt          |              |
|                          |GpiEndPath                |              |
|                          |GpiSetClipPath            |              |
|--------------------------+--------------------------+---------------|
|GpiSetClipPathExh4        |GpiBeginPath              |              |
|                          |GpiCharStringAt          |              |
|                          |GpiEndPath                |              |
|                          |GpiSetClipPath            |              |
|--------------------------+--------------------------+---------------|
|GpiSetClipPathExh5        |GpiBeginPath              |              |
|                          |GpiCharStringAt          |              |
|                          |GpiEndPath                |              |
|                          |GpiSetClipPath            |              |
|--------------------------+--------------------------+---------------|
|GpiSetClipPathExh6        |GpiBeginPath              |              |
|                          |GpiCharStringAt          |              |
|                          |GpiEndPath                |              |
|                          |GpiSetClipPath            |              |
\---------------------------------------------------------------------/</pre>
 
=== GpiRegion Test Group ===
The GpiRegion test case tests the GPI Region APIs.
 
This table lists the test cases and the functions called by each test case in the GpiRegion test group. The GpiRegion test group is found in GPIREGN. DLL.
 
<pre class="western">/---------------------------------------------------------------------\
|Test Case                |GPI Functions Called      |Configuration  |
|                          |                          |Settings      |
|--------------------------+--------------------------+---------------|
|GpiRegionApp1            |GpiBox                    |Direct        |
|                          |GpiCharStringAt          |              |
|                          |GpiCombineRegion          |              |
|                          |GpiCreateRegion          |              |
|                          |GpiMove                  |              |
|                          |GpiPaintRegion            |              |
|                          |GpiPtInRegion            |              |
|                          |GpiRectInRegion          |              |
|                          |GpiSetPattern            |              |
|--------------------------+--------------------------+---------------|
|GpiCombineRegionExh1      |GpiBox                    |Direct        |
|                          |GpiCombineRegion          |              |
|                          |GpiCreateRegion          |              |
|                          |GpiDestroyRegion          |              |
|                          |GpiMove                  |              |
|                          |GpiPaintRegion            |              |
|                          |GpiSetPattern            |              |
|--------------------------+--------------------------+---------------|
|GpiCombineRegionExh2      |GpiCombineRegion          |              |
|                          |GpiCreateRegion          |              |
|                          |GpiDestroyRegion          |              |
|                          |GpiPaintRegion            |              |
|                          |GpiSetPattern            |              |
|--------------------------+--------------------------+---------------|
|GpiCreateRegionExh        |                          |              |
|--------------------------+--------------------------+---------------|
|GpiEqualRegionExh        |GpiCreateRegion          |              |
|                          |GpiDestroyRegion          |              |
|                          |GpiEqualRegion            |              |
|                          |GpiPaintRegion            |              |
|                          |GpiSetPattern            |              |
|--------------------------+--------------------------+---------------|
|GpiOffsetRegionExh        |GpiCreateRegion          |              |
|                          |GpiDestroyRegion          |              |
|                          |GpiOffsetRegion          |              |
|                          |GpiPaintRegion            |              |
|                          |GpiSetPattern            |              |
|--------------------------+--------------------------+---------------|
|GpiPtInRegionExh          |GpiCharStringAt          |              |
|                          |GpiCreateRegion          |              |
|                          |GpiDestroyRegion          |              |
|                          |GpiPaintRegion            |              |
|                          |GpiPtInRegion            |              |
|                          |GpiSetPattern            |              |
|--------------------------+--------------------------+---------------|
|GpiRectInRegionExh        |GpiBox                    |              |
|                          |GpiCreateRegion          |              |
|                          |GpiDestroyRegion          |              |
|                          |GpiMove                  |              |
|                          |GpiPaintRegion            |              |
|                          |GpiRectInRegion          |              |
|                          |GpiSetPattern            |              |
|--------------------------+--------------------------+---------------|
|GpiSetRegionExh          |GpiCreateRegion          |              |
|                          |GpiDestroyRegion          |              |
|                          |GpiPaintRegion            |              |
|                          |GpiSetPattern            |              |
|                          |GpiSetRegion              |              |
|--------------------------+--------------------------+---------------|
|GpiQueryRegionBoxExh      |GpiCreateRegion          |              |
|                          |GpiPaintRegion            |              |
|                          |GpiQueryRegionBox        |              |
|                          |GpiSetPattern            |              |
\---------------------------------------------------------------------/</pre>
 
 
 
 
=== GpiSegment Test Group ===
 
The GpiSegment test case tests the GPI functions associated with segments, including: opening, drawing, deleting, and closing.
 
This table lists the test cases and the functions called by each test case in the GpiSegment test group. The GpiSegment test group is found in GPISEG. DLL.
 
<pre class="western">/-----------------------------------------------------------------------------------\
|Test Case                        |GPI Functions Called            |Configuration  |
|                                  |                                |Settings      |
|----------------------------------+--------------------------------+---------------|
|GpiOpenSegmentExh                |GpiDeleteSegments              |Normal        |
|                                  |GpiDrawChain                    |              |
|                                  |GpiQueryDrawingMode            |              |
|                                  |GpiQueryPS                      |              |
|                                  |GpiQuerySegmentNames            |              |
|                                  |GpiResetPS                      |              |
|                                  |GpiSetColor                    |              |
|                                  |GpiSetDrawingMode              |              |
|----------------------------------+--------------------------------+---------------|
|GpiDeleteSegmentExh              |GpiCharStringAt                |Normal        |
|                                  |GpiCloseSegment                |              |
|                                  |GpiDeleteSegment                |              |
|                                  |GpiDeleteSegments              |              |
|                                  |GpiDrawChain                    |              |
|                                  |GpiDrawSegment                  |              |
|                                  |GpiOpenSegment                  |              |
|                                  |GpiQueryPS                      |              |
|                                  |GpiResetPS                      |              |
|                                  |GpiSetDrawingMode              |              |
|                                  |GpiSetInitialSegmentAttrs      |              |
|----------------------------------+--------------------------------+---------------|
|GpiDeleteSegmentsExh              |GpiDeleteSegments              |Normal        |
|                                  |GpiDrawSegment                  |              |
|                                  |GpiQueryPS                      |              |
|                                  |GpiSetDrawingMode              |              |
|----------------------------------+--------------------------------+---------------|
|GpiDrawChainExh1                  |GpiBeginArea                    |Direct and    |
|                                  |GpiCallSegmentMatrix            |Normal        |
|                                  |GpiCharStringAt                |              |
|                                  |GpiCloseSegment                |              |
|                                  |GpiDeleteSegments              |              |
|                                  |GpiDrawChain                    |              |
|                                  |GpiEndArea                      |              |
|                                  |GpiMove                        |              |
|                                  |GpiOpenSegment                  |              |
|                                  |GpiPolyFillet                  |              |
|                                  |GpiPolyLine                    |              |
|                                  |GpiQueryPS                      |              |
|                                  |GpiSetColor                    |              |
|                                  |GpiSetDrawingMode              |              |
|                                  |GpiSetPattern                  |              |
|----------------------------------+--------------------------------+---------------|
|GpiDrawChainExh2                  |GpiQueryPS                      |Normal        |
|----------------------------------+--------------------------------+---------------|
|GpiDrawAndRemoveDynamicsExh      |GpiDrawChain                    |Normal        |
|                                  |GpiDrawDynamics                |              |
|                                  |GpiQueryPS                      |              |
|                                  |GpiRemoveDynamics              |              |
|                                  |GpiResetPS                      |              |
|                                  |GpiSetSegmentTransformMatrix    |              |
|----------------------------------+--------------------------------+---------------|
|GpiDrawFromExh1                  |GpiCharStringAt                |Direct and    |
|                                  |GpiCloseSegment                |Normal        |
|                                  |GpiDeleteSegment                |              |
|                                  |GpiDeleteSegments              |              |
|                                  |GpiDrawChain                    |              |
|                                  |GpiDrawForm                    |              |
|                                  |GpiDrawSegment                  |              |
|                                  |GpiDrawSegments                |              |
|                                  |GpiLine                        |              |
|                                  |GpiMove                        |              |
|                                  |GpiOpenSegment                  |              |
|                                  |GpiQueryPS                      |              |
|                                  |GpiResetPS                      |              |
|                                  |GpiSetColor                    |              |
|                                  |GpiSetDrawingMode              |              |
|----------------------------------+--------------------------------+---------------|
|GpiDrawFromExh2                  |GpiBeginArea                    |Normal        |
|                                  |GpiCloseSegment                |              |
|                                  |GpiDeleteSegment                |              |
|                                  |GpiDeleteSegments              |              |
|                                  |GpiDrawChain                    |              |
|                                  |GpiDrawSegment                  |              |
|                                  |GpiDrawSegments                |              |
|                                  |GpiEndArea                      |              |
|                                  |GpiMove                        |              |
|                                  |GpiPolyLine                    |              |
|                                  |GpiQueryPS                      |              |
|                                  |GpiSetAttrMode                  |              |
|                                  |GpiSetColor                    |              |
|                                  |GpiSetDrawControl              |              |
|                                  |GpiSetDrawingMode              |              |
|                                  |GpiSetPattern                  |              |
|----------------------------------+--------------------------------+---------------|
|GpiDrawSegmentExh                |GpiBeginArea                    |Normal        |
|                                  |GpiCloseSegment                |              |
|                                  |GpiDeleteSegment                |              |
|                                  |GpiDeleteSegments              |              |
|                                  |GpiDrawSegment                  |              |
|                                  |GpiDrawSegments                |              |
|                                  |GpiEndArea                      |              |
|                                  |GpiMove                        |              |
|                                  |GpiPolyLine                    |              |
|                                  |GpiQueryPS                      |              |
|                                  |GpiSetDrawControl              |              |
|                                  |GpiSetPattern                  |              |
|----------------------------------+--------------------------------+---------------|
|GpiEraseExh                      |GpiBeginPath                    |Direct,        |
|                                  |GpiCloseSegment                |Standard, and  |
|                                  |GpiCreateRegion                |Normal or      |
|                                  |GpiDrawSegment                  |Queued, Raw,  |
|                                  |GpiEndPath                      |and Normal    |
|                                  |GpiErase                        |              |
|                                  |GpiFullArc                      |              |
|                                  |GpiMove                        |              |
|                                  |GpiOpenSegment                  |              |
|                                  |GpiQueryPS                      |              |
|                                  |GpiSetArcParams                |              |
|                                  |GpiSetClipPath                  |              |
|                                  |GpiSetClipRegion                |              |
|                                  |GpiSetDefaultViewMatrix        |              |
|                                  |GpiSetDrawingMode              |              |
|                                  |GpiSetGraphicsField            |              |
|                                  |GpiSetModelTransformMatrix      |              |
|                                  |GpiSetPageViewport              |              |
|                                  |GpiSetViewingLimits            |              |
|----------------------------------+--------------------------------+---------------|
|GpiResetAndQryBoundaryDataExh    |GpiBox                          |Normal        |
|                                  |GpiCharStringAt                |              |
|                                  |GpiConvert                      |              |
|                                  |GpiDrawFrom                    |              |
|                                  |GpiMove                        |              |
|                                  |GpiQueryBoundaryData            |              |
|                                  |GpiQueryPS                      |              |
|                                  |GpiResetBoundaryData            |              |
|                                  |GpiResetPS                      |              |
|                                  |GpiSetDrawControl              |              |
|----------------------------------+--------------------------------+---------------|
|GpiSetAndQryInitSegmentAttrsExh  |GpiQueryInitialSegmentAttrs    |Normal        |
|                                  |GpiQueryPS                      |              |
|                                  |GpiQuerySegmentAttrs            |              |
|                                  |GpiSetInitialSegmentAttrs      |              |
|                                  |GpiSetSegmentAttrs              |              |
|----------------------------------+--------------------------------+---------------|
|GpiSetAndQrySegmentAttrsExh      |GpiCloseSegment                |Normal        |
|                                  |GpiDeleteSegment                |              |
|                                  |GpiDrawChain                    |              |
|                                  |GpiOpenSegment                  |              |
|                                  |GpiQueryPS                      |              |
|                                  |GpiQuerySegmentAttrs            |              |
|                                  |GpiSetDrawingMode              |              |
|                                  |GpiSetSegmentAttrs              |              |
|----------------------------------+--------------------------------+---------------|
|GpiQuerySegmentNamesExh          |GpiCloseSegment                |Normal        |
|                                  |GpiDeleteSegments              |              |
|                                  |GpiOpenSegment                  |              |
|                                  |GpiQueryPS                      |              |
|                                  |GpiQuerySegmentNames            |              |
|                                  |GpiSetDrawingMode              |              |
|----------------------------------+--------------------------------+---------------|
|GpiSetAndQrySegmentPriorityExh    |GpiDrawChain                    |Normal        |
|                                  |GpiQueryPS                      |              |
|                                  |GpiQuerySegmentPriority        |              |
|                                  |GpiResetPS                      |              |
|                                  |GpiSetSegmentPriority          |              |
|----------------------------------+--------------------------------+---------------|
|GpiSetAndQryStopDrawExh          |GpiQueryPS                      |Normal        |
|                                  |GpiQueryStopDraw                |              |
|                                  |GpiSetSegmentAttrs              |              |
|                                  |GpiSetStopDraw                  |              |
\-----------------------------------------------------------------------------------/</pre>
 
=== GpiShade Test Group ===
 
The GpiShade test group tests Pel spacing and shading, vertical box overlapping in Overpaint mode, circle shading in Fill and Outline mode, and FM_OR shading against the color table.
 
This table lists the test cases and the functions called by each test case in the GpiShade test group. The GpiShade test group is found in GPISHADE. DLL.
 
<pre class="western">/---------------------------------------------------------------------\
|Test Case                |GPI Functions Called      |Configuration  |
|                          |                          |Settings      |
|--------------------------+--------------------------+---------------|
|GpiShadePelSpace          |GpiBox                    |              |
|                          |GpiCharString            |              |
|                          |GpiMove                  |              |
|                          |GpiSetColor              |              |
|--------------------------+--------------------------+---------------|
|GpiShadeOverlapBox        |GpiBox                    |              |
|                          |GpiCharString            |              |
|                          |GpiMove                  |              |
|                          |GpiSetColor              |              |
|--------------------------+--------------------------+---------------|
|GpiShadeOverlapCircle1    |GpiFullArc                |              |
|                          |GpiMove                  |              |
|                          |GpiSetArcParams          |              |
|                          |GpiSetColor              |              |
|--------------------------+--------------------------+---------------|
|GpiShadeORing-1          |GpiBox                    |              |
|                          |GpiCharString            |              |
|                          |GpiMove                  |              |
|                          |GpiSetColor              |              |
|                          |GpiSetColor              |              |
|                          |GpiSetMix                |              |
|--------------------------+--------------------------+---------------|
|GpiShadeORing-2          |GpiBox                    |              |
|                          |GpiCharString            |              |
|                          |GpiMove                  |              |
|                          |GpiSetColor              |              |
|                          |GpiSetMix                |              |
|--------------------------+--------------------------+---------------|
|GpiShadeORing-3          |GpiBox                    |              |
|                          |GpiCharString            |              |
|                          |GpiMove                  |              |
|                          |GpiSetColor              |              |
|                          |GpiSetMix                |              |
|--------------------------+--------------------------+---------------|
|GpiShadeORing-4          |GpiBox                    |              |
|                          |GpiCharString            |              |
|                          |GpiFullArc                |              |
|                          |GpiMove                  |              |
|                          |GpiSetArcParams          |              |
|                          |GpiSetColor              |              |
|                          |GpiSetMix                |              |
|--------------------------+--------------------------+---------------|
|GpiShadeBlue              |GpiBox                    |              |
|                          |GpiCharStringAt          |              |
|                          |GpiCreateLogColorTable    |              |
|                          |GpiMove                  |              |
|                          |GpiSetColor              |              |
|--------------------------+--------------------------+---------------|
|GpiShadeGreen            |GpiBox                    |              |
|                          |GpiCharStringAt          |              |
|                          |GpiCreateLogColorTable    |              |
|                          |GpiMove                  |              |
|                          |GpiSetColor              |              |
|--------------------------+--------------------------+---------------|
|GpiShadeRed              |GpiBox                    |              |
|                          |GpiCharStringAt          |              |
|                          |GpiCreateLogColorTable    |              |
|                          |GpiMove                  |              |
|                          |GpiSetColor              |              |
|--------------------------+--------------------------+---------------|
|GpiShadeGray              |GpiBox                    |              |
|                          |GpiCharStringAt          |              |
|                          |GpiCreateLogColorTable    |              |
|                          |GpiMove                  |              |
|                          |GpiSetColor              |              |
|--------------------------+--------------------------+---------------|
|GpiShadeAll              |GpiBox                    |              |
|                          |GpiCharStringAt          |              |
|                          |GpiCreateLogColorTable    |              |
|                          |GpiMove                  |              |
|                          |GpiSetColor              |              |
|--------------------------+--------------------------+---------------|
|GpiShadeOverlapCircle2    |GpiFullArc                |              |
|                          |GpiMove                  |              |
|                          |GpiSetArcParams          |              |
|                          |GpiSetColor              |              |
|--------------------------+--------------------------+---------------|
|GpiShadeOverlapBox2      |GpiBox GpiCharString      |              |
|                          |GpiMove GpiSetColor      |              |
\---------------------------------------------------------------------/</pre>
 
=== GpiStandard Test Group ===
This module is called by the PTT to test GPI Standard Precision.
 
This testcase consists of the drawing of a set of grids, using GPI functions, and measuring their accuracy in printed form. This is a visual test; therefore, logging is minimal.
 
'''Limitations:''' The GPI APIs used to draw the grids are not tested for functionality and exhaustive return codes in this testcase. They are covered in the GpiLine test group.
 
This table lists the test cases and the functions called by each test case in the GpiStandard test group. The GpiStandard test group is found in GPISTD.DLL.
 
<pre class="western">/---------------------------------------------------------------------\
|Test Case                |GPI Functions Called      |Configuration  |
|                          |                          |Settings      |
|--------------------------+--------------------------+---------------|
|GpiStandardPre1          |GpiCharStringAt          |              |
|                          |GpiLine                  |              |
|                          |GpiSetCurrentPosition    |              |
|--------------------------+--------------------------+---------------|
|GpiStandardPre2          |GpiLine                  |              |
|                          |GpiSetCurrentPosition    |              |
|--------------------------+--------------------------+---------------|
|GpiStandardPre3          |GpiLine                  |              |
|                          |GpiSetCurrentPosition    |              |
\---------------------------------------------------------------------/</pre>
 
=== GpiTransform Test Group ===
The GpiTransform test group tests:
 
*The Page Viewpoint functions <br />*Common support functions to set up a transform matrix <br />*That all transform GPI work together. <br />*Manipulates the transform GPI relationships and combination possibilities <br />*Modal transforms <br />*Segment transforms <br />*The Default View Matrix <br />*The Viewing transform GPIs
 
This table lists the test cases and the functions called by each test case in the GpiTransform test group. The GpiTransform test group is found in GPIXFORM.DLL.
 
<pre class="western">/---------------------------------------------------------------------------------\
|Test Case                      |GPI Functions Called            |Configuration  |
|                                |                                |Settings      |
|--------------------------------+--------------------------------+---------------|
|GpiSetAndQryPageViewportPre    |GpiBox                          |Direct        |
|                                |GpiMove                        |              |
|                                |GpiQueryDevice                  |              |
|                                |GpiQueryPageViewport            |              |
|                                |GpiQueryPS                      |              |
|                                |GpiSetPageViewport              |              |
|                                |GpiSetPattern                  |              |
|--------------------------------+--------------------------------+---------------|
|GpiSetAndQryModelXformMatPre    |GpiBox                          |Direct        |
|                                |GpiMove                        |              |
|                                |GpiQueryModelTransformMatrix    |              |
|                                |GpiSetModelTransformMatrix      |              |
|                                |GpiSetPattern                  |              |
|--------------------------------+--------------------------------+---------------|
|GpiSetAndQrySegmentXformMatPre  |GpiBox                          |Normal        |
|                                |GpiCloseSegment                |              |
|                                |GpiDrawSegment                  |              |
|                                |GpiMove                        |              |
|                                |GpiOpenSegment                  |              |
|                                |GpiQueryPS                      |              |
|                                |GpiQuerySegmentTransformMatrix  |              |
|                                |GpiSetDrawingMode              |              |
|                                |GpiSetDrawingMode              |              |
|                                |GpiSetInitialSegmentAttrs      |              |
|                                |GpiSetPattern                  |              |
|                                |GpiSetSegmentTransformMatrix    |              |
|--------------------------------+--------------------------------+---------------|
|GpiCallSegmentMatrixPre        |GpiBox                          |Direct and    |
|                                |GpiCallSegmentMatrix            |Normal        |
|                                |GpiCloseSegment                |              |
|                                |GpiMove                        |              |
|                                |GpiOpenSegment                  |              |
|                                |GpiQueryPS                      |              |
|                                |GpiSetDrawingMode              |              |
|                                |GpiSetInitialSegmentAttrs      |              |
|                                |GpiSetModelTransformMatrix      |              |
|                                |GpiSetPattern                  |              |
|--------------------------------+--------------------------------+---------------|
|GpiSetAndQryDefViewMatrixPre    |GpiBox                          |              |
|                                |GpiMove                        |              |
|                                |GpiQueryDefaultViewMatrix      |              |
|                                |GpiSetDefaultViewMatrix        |              |
|                                |GpiSetPattern                  |              |
|--------------------------------+--------------------------------+---------------|
|GpiSetAndQryViewingXformMatPre  |GpiBox GpiCloseSegment          |Normal        |
|                                |GpiDrawSegment                  |              |
|                                |GpiMove                        |              |
|                                |GpiOpenSegment                  |              |
|                                |GpiQueryPS                      |              |
|                                |GpiQueryViewingTransformMatrix  |              |
|                                |GpiSetDrawingMode              |              |
|                                |GpiSetPattern                  |              |
|                                |GpiSetViewingTransformMatrix    |              |
|--------------------------------+--------------------------------+---------------|
|GpiTransformApp                |GpiBox                          |Direct and    |
|                                |GpiCallSegmentMatrix            |Normal        |
|                                |GpiCloseSegment                |              |
|                                |GpiDrawSegment                  |              |
|                                |GpiMove                        |              |
|                                |GpiOpenSegment                  |              |
|                                |GpiQueryDefaultViewMatrix      |              |
|                                |GpiQueryModelTransformMatrix    |              |
|                                |GpiQueryPageViewport            |              |
|                                |GpiQueryPS                      |              |
|                                |GpiQuerySegmentTransformMatrix  |              |
|                                |GpiQueryViewingTransformMatrix  |              |
|                                |GpiSetDefaultViewMatrix        |              |
|                                |GpiSetDrawingMode              |              |
|                                |GpiSetInitialSegmentAttrs      |              |
|                                |GpiSetModelTransformMatrix      |              |
|                                |GpiSetPageViewport              |              |
|                                |GpiSetPattern                  |              |
|                                |GpiSetSegmentTransformMatrix    |              |
|                                |GpiSetViewingTransformMatrix    |              |
|--------------------------------+--------------------------------+---------------|
|GpiSetAndQryPageViewportExh    |GpiBox                          |Direct        |
|                                |GpiMove                        |              |
|                                |GpiQueryDevice                  |              |
|                                |GpiQueryPageViewport            |              |
|                                |GpiSetPageViewport              |              |
|                                |GpiSetPattern                  |              |
|--------------------------------+--------------------------------+---------------|
|GpiSetAndQryModelXformMatExh    |GpiBox                          |Direct        |
|                                |GpiMove                        |              |
|                                |GpiQueryModelTransformMatrix    |              |
|                                |GpiSetModelTransformMatrix      |              |
|                                |GpiSetPattern                  |              |
|--------------------------------+--------------------------------+---------------|
|GpiSetAndQrySegmentXformMatExh  |GpiBox                          |Normal        |
|                                |GpiCloseSegment                |              |
|                                |GpiDrawSegment                  |              |
|                                |GpiMove                        |              |
|                                |GpiOpenSegment                  |              |
|                                |GpiQueryPS                      |              |
|                                |GpiQuerySegmentTransformMatrix  |              |
|                                |GpiSetDrawingMode              |              |
|                                |GpiSetInitialSegmentAttrs      |              |
|                                |GpiSetPattern                  |              |
|                                |GpiSetSegmentTransformMatrix    |              |
|--------------------------------+--------------------------------+---------------|
|GpiCallSegmentMatrixExh        |GpiBox                          |Direct and    |
|                                |GpiCallSegmentMatrix            |Normal        |
|                                |GpiCloseSegment                |              |
|                                |GpiMove                        |              |
|                                |GpiOpenSegment                  |              |
|                                |GpiQueryPS                      |              |
|                                |GpiSetDrawingMode              |              |
|                                |GpiSetInitialSegmentAttrs      |              |
|                                |GpiSetModelTransformMatrix      |              |
|                                |GpiSetPattern                  |              |
|--------------------------------+--------------------------------+---------------|
|GpiSetAndQryDefViewMatrixExh    |GpiBox                          |              |
|                                |GpiMove                        |              |
|                                |GpiQueryDefaultViewMatrix      |              |
|                                |GpiSetDefaultViewMatrix        |              |
|                                |GpiSetPattern                  |              |
|--------------------------------+--------------------------------+---------------|
|GpiSetAndQryViewingXformMatExh  |GpiBox                          |Normal        |
|                                |GpiCloseSegment                |              |
|                                |GpiDrawSegment                  |              |
|                                |GpiMove                        |              |
|                                |GpiOpenSegment                  |              |
|                                |GpiQueryPS                      |              |
|                                |GpiQueryViewingTransformMatrix  |              |
|                                |GpiSetDrawingMode              |              |
|                                |GpiSetPattern                  |              |
|                                |GpiSetViewingTransformMatrix    |              |
|--------------------------------+--------------------------------+---------------|
|GpiConvertExh                  |GpiConvert                      |              |
|                                |GpiQueryDevice                  |              |
|                                |GpiQueryPageViewport            |              |
|                                |GpiQueryPS                      |              |
|                                |GpiSetDefaultViewMatrix        |              |
|                                |GpiSetModelTransformMatrix      |              |
|                                |GpiSetPageViewport              |              |
\---------------------------------------------------------------------------------/</pre>
 
=== GpiView Test Group ===
The GpiView test group tests the following GPIs:
*GpiSetDefViewingLimits
*GpiSetGraphicsField
*GpiSetViewingLimits
*GpiSetPageViewport
 
This table lists the test cases and the functions called by each test case in the GpiView test group. The GpiView Test Group is found in GPIVIEW.DLL.
 
<pre class="western">/---------------------------------------------------------------------------\
|Test Case                    |GPI Functions Called        |Configuration  |
|                              |                            |Settings      |
|------------------------------+----------------------------+---------------|
|GpiSetDefViewingLimitsPre    |GpiResetPS                  |              |
|                              |GpiSetDefViewingLimits      |              |
|------------------------------+----------------------------+---------------|
|GpiSetGraphicsFieldPre        |GpiSetGraphicsField        |              |
|------------------------------+----------------------------+---------------|
|GpiSetViewingLimitsPre        |GpiSetViewingLimits        |              |
|------------------------------+----------------------------+---------------|
|GpiViewApp                    |GpiResetPS                  |              |
|                              |GpiSetDefViewingLimits      |              |
|                              |GpiSetGraphicsField        |              |
|                              |GpiSetViewingLimits        |              |
|------------------------------+----------------------------+---------------|
|GpiSetDefViewingLimitsExh1    |GpiAssociate                |Direct and    |
|                              |GpiQueryDevice              |Normal        |
|                              |GpiSetDefViewingLimits      |              |
|------------------------------+----------------------------+---------------|
|GpiSetDefViewingLimitsExh2    |GpiBox                      |Normal        |
|                              |GpiCloseSegment            |              |
|                              |GpiDrawChain                |              |
|                              |GpiMove                    |              |
|                              |GpiOpenSegment              |              |
|                              |GpiSetDefViewingLimits      |              |
|                              |GpiSetDrawingMode          |              |
|                              |GpiSetInitialSegmentAttrs  |              |
|------------------------------+----------------------------+---------------|
|GpiSetViewingLimitsExh1      |GpiCallSegmentMatrix        |Normal        |
|                              |GpiCloseSegment            |              |
|                              |GpiOpenSegment              |              |
|                              |GpiSetDrawingMode          |              |
|                              |GpiSetInitialSegmentAttrs  |              |
|                              |GpiSetViewingLimits        |              |
|------------------------------+----------------------------+---------------|
|GpiSetViewingLimitsExh2      |GpiSetViewingLimits        |              |
|------------------------------+----------------------------+---------------|
|GpiSetPageViewportExh        |GpiSetPageViewport          |Direct        |
\---------------------------------------------------------------------------/</pre>
 
 
 
 
=== STRESS Test Group ===
 
The STRESS test group uses GPI test cases which use a great deal of system resources, such as memory and swapper file space.
 
This table lists the test cases and the functions called by each test case in the STRESS test group. The STRESS Test Group is found in STRESS.DLL.
 
<pre class="western">/-----------------------------------------------------------------------------\
|Test Case                      |GPI Functions Called        |Configuration  |
|                                |                            |Settings      |
|--------------------------------+----------------------------+---------------|
|GpiClipFontExh                  |GpiDeleteSetId              |Raw            |
|                                |GpiResetPS                  |              |
|                                |GpiSetCharSet              |              |
|--------------------------------+----------------------------+---------------|
|GpiClipBitsExh                  |GpiBeginPath                |Raw            |
|                                |GpiEndPath                  |              |
|                                |GpiMove                    |              |
|                                |GpiPolyLine                |              |
|                                |GpiSetClipPath              |              |
|                                |GpiSetLineWidthGeom        |              |
|                                |GpiSetPel                  |              |
|--------------------------------+----------------------------+---------------|
|GpiClipColorExh                |GpiBeginPath                |Raw            |
|                                |GpiEndPath                  |              |
|                                |GpiFullArc                  |              |
|                                |GpiMove                    |              |
|                                |GpiPartialArc              |              |
|                                |GpiSetArcParams            |              |
|                                |GpiSetClipPath              |              |
|                                |GpiSetLineWidthGeom        |              |
|                                |GpiStrokePath              |              |
|                                |GpiSetColor                |              |
|--------------------------------+----------------------------+---------------|
|GpiMaxPolyLinesExh              |GpiMove                    |Raw            |
|                                |GpiPolyLine                |              |
|--------------------------------+----------------------------+---------------|
|GpiMaxPolySplinesExh            |GpiMove                    |Raw            |
|                                |GpiPolySpline              |              |
|--------------------------------+----------------------------+---------------|
|GpiCharBoxMetricsInteractive    |GpiCharString              |Raw            |
|                                |GpiDeleteSetId              |              |
|                                |GpiMove                    |              |
|                                |GpiPolyLine                |              |
|                                |GpiQueryTextBox            |              |
|                                |GpiSetCharSet              |              |
|--------------------------------+----------------------------+---------------|
|GpiCharBoxMetricsDefault        |GpiCharString              |Raw            |
|                                |GpiMove                    |              |
|                                |GpiPolyLine                |              |
|                                |GpiQueryDevice              |              |
|                                |GpiQueryTextBox            |              |
|                                |GpiSetCharSet              |              |
|--------------------------------+----------------------------+---------------|
|GpiSpaceInteractive            |GpiCharString              |Raw            |
|                                |GpiDeleteSetId              |              |
|                                |GpiMove                    |              |
|                                |GpiQueryDevice              |              |
|                                |GpiQueryTextBox            |              |
|                                |GpiSetCharSet              |              |
|--------------------------------+----------------------------+---------------|
|GpiBitMapClipExh                |GpiBeginPath                |Raw            |
|                                |GpiDeleteBitmap            |              |
|                                |GpiEndPath                  |              |
|                                |GpiFullArc                  |              |
|                                |GpiLoadBitmap              |              |
|                                |GpiMove                    |              |
|                                |GpiQueryBitmapParameters    |              |
|                                |GpiSetArcParams            |              |
|                                |GpiSetClipPath              |              |
|                                |GpiSetLineWidthGeom        |              |
|                                |GpiStrokePath              |              |
|                                |GpiWCBitBlt                |              |
|--------------------------------+----------------------------+---------------|
|GpiThinLinesInPath              |GpiBeginPath                | Normal        |
|                                |GpiCharString              |              |
|                                |GpiEndPath                  |              |
|                                |GpiLine                    |              |
|                                |GpiMove                    |              |
|                                |GpiSetLineWidthGeom        |              |
|                                |GpiSetPattern              |              |
|                                |GpiStrokePath              |              |
|--------------------------------+----------------------------+---------------|
|GpiThickLinesInPath            |GpiBeginPath                |Raw            |
|                                |GpiCharString              |              |
|                                |GpiEndPath                  |              |
|                                |GpiLine                    |              |
|                                |GpiMove                    |              |
|                                |GpiSetLineWidthGeom        |              |
|                                |GpiSetPattern              |              |
|                                |GpiStrokePath              |              |
|--------------------------------+----------------------------+---------------|
|GpiShadeCharactersInteractive  |GpiCharString              |Raw            |
|                                |GpiDeleteSetId              |              |
|                                |GpiMove                    |              |
|                                |GpiQueryTextBox            |              |
|                                |GpiSetCharSet              |              |
|                                |GpiSetColor                |              |
|--------------------------------+----------------------------+---------------|
|GpiShadeCharactersDefault      |GpiCharString              |Raw            |
|                                |GpiDeleteSetId              |              |
|                                |GpiMove                    |              |
|                                |GpiQueryTextBox            |              |
|                                |GpiSetCharSet              |              |
|                                |GpiSetColor                |              |
\-----------------------------------------------------------------------------/</pre>
 
=== OS/2 Version Compatibility Considerations ===
The following table lists items discussed in this reference that have been added to OS/2 since OS/2 Warp Version 3.0 and discusses their compatibility with different versions of OS/2.
The following table lists items discussed in this reference that have been added to OS/2 since OS/2 Warp Version 3.0 and discusses their compatibility with different versions of OS/2.
{| class="wikitable"
!Item Added or Changed||Date Item Added or Changed||Compatibility of Addition or Change
|-
|Omni Drivers||June 1996||OS/2 Warp Version 3.0 and higher
|-
|GenPLib Updates||November 1995||OS/2 Version 2.0 Service Pack and later
|-
|PostScript Driver Updates||November 1995||OS/2 Version 2.0 Service Pack and later
|-
|42xx Driver||November 1995||OS/2 Version 2.0 Service Pack and later
|-
|Plotter Drivers||November 1995||OS/2 Version 2.0 Service Pack and later
|-
|Bidirectional Communication||November 1995||OS/2 Warp, Version 3.0 and later Earlier printer drivers should work without modification when printing to bidirectional printers; port drivers developed under DDK earlier than 3.0 should work without modification when printing to bidirectional printers,  but they do not provide bidirectional communication
|}


<pre class="western">/-----------------------------------------------------------------------------\
[[Category:Device Driver Reference]]
|Item Added or Changed    |Date Item Added or      |Compatibility of Addition|
|                        |Changed                  |or Change                |
|-------------------------+-------------------------+-------------------------|
|Omni Drivers            |June 1996                |OS/2 Warp Version 3.0 and|
|                        |                        |higher                  |
|-------------------------+-------------------------+-------------------------|
|GenPLib Updates          |November 1995            |OS/2 Version 2.0 Service |
|                        |                        |Pack and later          |
|-------------------------+-------------------------+-------------------------|
|PostScript Driver Updates|November 1995            |OS/2 Version 2.0 Service |
|                        |                        |Pack and later          |
|-------------------------+-------------------------+-------------------------|
|42xx Driver              |November 1995            |OS/2 Version 2.0 Service |
|                        |                        |Pack and later          |
|-------------------------+-------------------------+-------------------------|
|Plotter Drivers          |November 1995            |OS/2 Version 2.0 Service |
|                        |                        |Pack and later          |
|-------------------------+-------------------------+-------------------------|
|Bidirectional            |November 1995            |OS/2 Warp, Version 3.0  |
|Communication            |                        |and later                |
|                        |                        |Earlier printer drivers  |
|                        |                        |should work without      |
|                        |                        |modification when        |
|                        |                        |printing to bidirectional|
|                        |                        |printers; port drivers  |
|                        |                        |developed under DDK      |
|                        |                        |earlier than 3.0 should  |
|                        |                        |work without modification|
|                        |                        |when printing to        |
|                        |                        |bidirectional printers,  |
|                        |                        |but they do not provide  |
|                        |                        |bidirectional            |
|                        |                        |communication            |
\-----------------------------------------------------------------------------/</pre>
 
 
 
=== Importing PostScript Printer Description files ===
PostScript Printer Description (PPD) files describe the fonts,paper sizes, resolution capabilities, and other features that are standard for your PostScript printer.
 
PPD files are used by PostScript printer drivers to determine how to print your document (if you do not print using the correct PPD file, your document may not print correctly or all of the printer's features may not be available when you print).
 
Your printer manufacture is ultimately responsible for creating and providing the correct PPD file for your printer (you can usually find the PPD file on the floppy disk or CD-ROM included with your printer or visit manufactures Web site to download the PPD file you need, contact the customer support department of your printer manufacturer to find out how to obtain PPD file.)
 
If you have a device not supported by OS/2 PostScript printer driver, you can "import" a PPD file to add your device using the PIN.EXE utility (see section [[01904.htm|Importing a New PPD (Using PIN.EXE)]] for details). Upgrading devices is supported. If you have a newer version of a PPD for a device that is already supported in the driver and import a newer PPD, the newer version of the PPD will take precedence over the current device.
 
=== Converting PPDs with Special Characters (Using PPDENC.EXE) ===
PPD files are usually provided in IsoLatin1 and WindowsANSI encoding, which are not compatible with the OS/2 code page. Of course, this only affects languages that make use of special characters - like French or Spanish. If you only use English PPDs, you will not need to use this utility.
 
If PPDs are used for the languages that contain these special characters, conversion of the PPD file to an OS/2 compatible codepage will be required before importing. Failure to do so will result in the display of incorrect characters in OS/2.
 
'''NOTE:''' This step needs to be completed before importing the PPDs into the driver (before you copy the downloaded PPD files into your PPD\ directory).
 
'''* PPDENC'''can convert single file:
 
<pre class="western">        &gt;PPDENC.EXE &lt;input_ppd_file&gt; &lt;output_ppd_file&gt;</pre>
The input file will be read and the output file will be created. The output file name must be different than the input file name.
 
'''* PPDENC'''can convert multiple files in one directory, writing the converted files to the destination directory (directory must exist):
 
<pre class="western">      &gt;PPDENC.EXE -d &lt;source_directory&gt; &lt;dest_directory&gt;</pre>
Files (*.PPD) in the source directory will be processed file by file and the output files will be created in destination directory.
 
Currently supported PPD encoding standards are &quot;IsoLatin1&quot; and &quot;WindowsANSI&quot;. PPDENC will automatically detect encoding in PPD from which to convert.
 
When the PPD is converted, the output file will have its *LanguageEncoding set to &quot;OS2-850&quot; to indicate that it's been processed. If the PPDENC utility later sees this, it will not attempt to change the encoding and will copy the file intact. Similar, if the PPD encoding is not recognized, the PPD file will just be copied over without modification.
 
PPDENC does not modify it's input files in any way.
 
'''*** Sample scenario ***'''
 
You have a Spanish PPD that has been downloaded from the WWW and want to include it in your driver distribution. First, you need to convert it to an OS/2 codepage.
 
<pre class="western">      &gt;PPDENC IsoLatin1 spanish.ppd spanish2.ppd</pre>
This will create spanish2.ppd that will be encoded in an OS/2 codepage.
 
Now spanish2.ppd can be copied into your PPD directory (as d:\PSDRIVER\PPD) and then you can import the PPD files into the PSCRIPT driver (see steps 3-6 in: [[01904.htm|Importing a New PPD]]).
 
=== Importing a New PPD (Using PIN.EXE) ===
PIN.EXE is a utility to add new or upgrade device support in the Postscript driver by importing PPD files. The PPD file is usually created and provided by your PostScript printer manufacturer.
 
Syntax:
 
<pre class="western">      PIN.EXE  </pre>
Currently, the only supported command is &quot;PPD&quot;.
 
Syntax of command 'PPD' arguments:
 
<pre class="western">      PIN.EXE PPD  </pre>
The first argument is the directory path where PPD files to be imported are stored. The second argument is the path to the driver (including the driver file name) where the PPD files will be imported.
 
One or multiple PPDs can be imported at once.
 
'''*** Suggested usage scenario ***'''
 
1) Create directory where you will store all of the PSCRIPT files.
 
<pre class="western">        &gt;mkdir d:\PSDRIVER</pre>
2) Put PIN.EXE in this directory.
 
<pre class="western">          &gt;copy PIN.EXE d:\PSDRIVER</pre>
3) Create 3 subdirectories in d:\PSDRIVER directory.
 
<pre class="western">          &gt;cd d:\PSDRIVER
          &gt;mkdir BAK
          &gt;mkdir PPD
          &gt;mkdir OUT</pre>
The BAK directory will be the backup driver files - the original, unmodified driver. Copy the unmodified driver files here. <br />The PPD directory will contain the PPD files for your new printer devices that you want imported into the driver. <br />The OUT directory will be where you build your driver which contains the new devices to be imported for immediate use or distribution.
 
To import new devices into the driver, perform the following steps:
 
4) Clean the output directory.
 
<pre class="western">          &gt;del OUT\*</pre>
5) Copy the unmodified driver files from the backup (BAK) to the OUT directory.
 
<pre class="western">          &gt;copy BAK\* OUT\</pre>
6) Run the PIN utility to import the PPDs.
 
<pre class="western">          &gt;PIN.EXE PPD PPD\ OUT\pscript.drv</pre>
&quot;PPD&quot; is command that tells PIN.EXE what to do. <br />&quot;PPD\&quot; is path to directory with the source PPD files. <br />&quot;OUT\pscript.drv&quot; is the driver file name where the PPDs are going to be imported into.
 
7) The driver in the OUT\ directory now will have the imported PPDs!
 
You can install it or distribute it to users.
 
'''IMPORTANT:''' After the resources are imported to the printer driver, you can't just 'add' on top of that. If you add a new PPD to the directory and want to make use of it, you have to start with a &quot;fresh&quot; driver and import all of the devices at once, as previously done. It is required that you delete all of the files in the output directory (step 3) and copy the driver from the backup directory (step 4) to perform device importing - every time.
 
=== Using the Driver with Imported Devices in a Network Environment ===
There is a known problem with updating drivers in a network environment. If you put the driver with imported PPDs on a print server, and distribute it to requesters, then upgrade the server with the same driver with some new PPDs imported, the new devices will not be automatically distributed to requesters.
 
This is an issue with the code that implements automatic network update. We are currently working on a solution.
 
For now, if you update the driver (import new PPDs) you will have to distribute the updated driver to clients by some other means.
 
 
[[Category:Driver Articles]]

Latest revision as of 00:21, 20 March 2018

Printer Device Driver Reference

Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation

EDM/2 preamble

This is the Printer Device Driver Reference for OS/2 as last published by IBM in 1998. It is republished here with explicit permission from the company (Copyright Permission #21953) and you should keep in mind that it is an intellectual property of International Business Machines Corp. that cannot be changed or reused without their permission and is not governed by the Attribution-Share Alike 3.0 licence like the rest of the EDM/2 Wiki.

The content of the documentation is unchanged apart from the following:

  • The original document was an INF file split into thousands of different small sections, these have been consolidated into chapters, and restructured to fit HTML formatting, mimicking the original GML format as much as possible.
  • Sales, technical help, download and contact information has been removed. The PDDR/2 and the related SDK's are no longer for sale, nor is support available from IBM. Some of the INF viewer related help has been removed as well as it is superfluous after the format change and might be misleading, and the Glossary and Notices section was merged with other DDK/SDK glossary sections as they are all identical.
  • Miniscule changes have been made to the text, spelling errors, formatting errors and possible copy and paste errors have been fixed and/or noted.

Outside of formatting changes, adding Wikilinks and graphic improvements, the document shall be left as it is. It should be noted that the some of the driver models and data formats described in the documentation are have been replaced or extended by both IBM and third parties, but that does not mean that this document should be changed, but it is acceptable that a link is created to an internal or external article that explains the newer models and formats.

About This Book

The Printer Device Driver Reference for OS/2 describes the printer and plotter presentation drivers as well as test tools that correspond to the source code that is supplied with the IBM Developer Connection Device Driver Kit for OS/2.

This reference also provides a roadmap to the drivers and briefly describes their functions and modules. It is intended to be used in conjunction with the Presentation Driver Reference. For additional information about graphics-engine functions and presentation drivers, see the Presentation Driver Reference.

Programmers can use the information found in this book to create printer drivers and tests as well as to test their drivers. Knowledge of C and Assembler programming languages is necessary. The programmer must be familiar with the OS/2 operating system, the Presentation Manager interface, and 80X86 architecture. The programming concepts that should be understood before developing applications to run on the OS/2 system can be found in the Application Design Guide.

How This Book is Organized

  • Generic Printer Library, describes a set of subroutine packages that can be used in the development of 32-bit hardcopy presentation drivers.
  • 32-Bit PostScript Driver, describes important design and programming information about the PostScript driver. All the functions used by the PostScript driver are listed and described.
  • 32-Bit Plotter Presentation Driver, describes important design and programming information about the plotter driver. All the functions used by the plotter driver are listed and described.
  • The 42XX Rasterizing Driver, provides important design and programming information about the 42XX rasterizing driver. All the functions used by the 42XX rasterizing driver are listed and described.
  • Printer Bidirectional Communications, provides important design and programming information about OS/2 bidirectional communications. All the functions used by the feature are listed and described.
Font Test is a 32-bit Presentation Manager application that allows users to browse through and print text files as well as to query presentation drivers for device, font, and hardcopy information. Font Test is very useful for testing presentation drivers. All the functions used by Font Test are listed and described, and a description of how to add a test to Font Test is included.
  • Printer Test Tool (PTT), describes the Printer Test Tool (PTT) and how to run test cases. It also contains information about PTT commands and PTT command-line options. The PTT's tests are detailed, and the GPI functions called by the tests in the PTT are listed with any necessary configuration settings.
  • Importing PostScript Printer Description files
  • The Notices contain trademark and service-mark notices and information.
  • The Glossary defines terms commonly used in the IBM Device Driver Source Kit for OS/2.

OS/2 Version Compatibility Considerations

The following table lists items discussed in this reference that have been added to OS/2 since OS/2 Warp Version 3.0 and discusses their compatibility with different versions of OS/2.

Item Added or Changed Date Item Added or Changed Compatibility of Addition or Change
Omni Drivers June 1996 OS/2 Warp Version 3.0 and higher
GenPLib Updates November 1995 OS/2 Version 2.0 Service Pack and later
PostScript Driver Updates November 1995 OS/2 Version 2.0 Service Pack and later
42xx Driver November 1995 OS/2 Version 2.0 Service Pack and later
Plotter Drivers November 1995 OS/2 Version 2.0 Service Pack and later
Bidirectional Communication November 1995 OS/2 Warp, Version 3.0 and later Earlier printer drivers should work without modification when printing to bidirectional printers; port drivers developed under DDK earlier than 3.0 should work without modification when printing to bidirectional printers, but they do not provide bidirectional communication