home *** CD-ROM | disk | FTP | other *** search
- /*****************************************************************
- *
- * f9.c-- miscellaneous c routines.
- *
- * [24.VII.86: started.]
- *
- *
- *****************************************************************/
-
- /*****
- *
- * psend-- send a string to the printer.
- *
- *****/
- int psend(s)
- char *s; /* string to send */
- {
- long time; /* timeout count */
- int go = TRUE; /* continuation cond */
-
- while (go)
- {
- /* wait for printer ready */
- for (time = 0; time < TIME_OUT && !Cprnos(); time++)
- ;
- go = (time == TIME_OUT) ? FALSE : TRUE;
- /* print next char or linefeed at end of string */
- if (go)
- {
- if (*s)
- Cprnout((int)*s++);
- else
- {
- Cprnout(0xa);
- return TRUE; /* success */
- }
- }
- }
- return FALSE; /* timeout error */
- }
-
-
-
-
-