Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Welcome Guest | Log In | Register | Benefits
Channels ▼
RSS

Programming Paradigms


Dr. Dobb's Journal July 1998: Paradigms Past

Paradigms Past

By Michael Swaine

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);
}

Example 1: Sample LEO code.


Copyright © 1998, Dr. Dobb's Journal

Related Reading


More Insights