22.2 lpopen (8850)

When a line printer file is opened, the normal calling sequence is followed:

“open” (5774) calls “open1”, which (5832) calls “openi”, which (6716) calls, in the case of a character special file, “cdevsw[..].d_open”. In the case of the line printer, this latter translates (4675) to “lpopen”.

8853:

Take the error exit if either another line printer file is already open, or if the line printer is not ready (e.g the power is off, or there is no paper, or the printer drum gate is open, or the temperature is too high, or the operator has switched the printer off-line.)

8857:

Set the “lp11.flag” to indicate that the file is open, the printer has a “form feed” capability and lines are to be indented by eight characters.