Dr. Dobb's Journal July 1998
void print(void)
{
FTAG("print");
<<< Define print vars >>>
STATB(ftag);
<<< Return if there is nothing to print >>>
<<< Save the old port >>>
PrOpen(); if (PrError() != noErr) goto done;
<<< Create a TPrint Record. goto close on error >>>
cur_res_file = CurResFile();
PrValidate(print_h);
if (PrJobDialog(print_h) == FALSE) {
cancel_flag = TRUE; goto close;
}
<<< Initialize the page counts >>>
...
<<< Warn about any print errors >>>
done:
<<< Restore the old port >>>
STATX(ftag);
}