int gPrOpenCounter = 0 ;
-#if !TARGET_CARBON
-OSStatus UMAPrOpen()
+#if TARGET_CARBON && PM_USE_SESSION_APIS
+OSStatus UMAPrOpen(PMPrintSession *macPrintSession)
#else
-OSStatus UMAPrOpen(PMPrintSession *macPrintPort)
+OSStatus UMAPrOpen()
#endif
{
#if !TARGET_CARBON
if ( gPrOpenCounter == 1 )
{
#if PM_USE_SESSION_APIS
- err = PMCreateSession(macPrintPort) ;
+ err = PMCreateSession(macPrintSession) ;
#else
err = PMBegin() ;
#endif
#endif
}
-#if !TARGET_CARBON
-OSStatus UMAPrClose()
+#if TARGET_CARBON && PM_USE_SESSION_APIS
+OSStatus UMAPrClose(PMPrintSession *macPrintSession)
#else
-OSStatus UMAPrClose(PMPrintSession *macPrintPort)
+OSStatus UMAPrClose()
#endif
{
#if !TARGET_CARBON
if ( gPrOpenCounter == 1 )
{
#if PM_USE_SESSION_APIS
- err = PMRelease(*macPrintPort) ;
+ err = PMRelease(*macPrintSession) ;
+ *macPrintSession = kPMNoReference;
#else
err = PMEnd() ;
#endif