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