* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
static char sccsid
[] = "@(#)linemod.c 5.1 (Berkeley) 5/7/85";
* Note that the bit patterns could be compacted using the
* repeat field conventions. They aren't for clarity.
* Examples of almost identical packed patterns are in the
* If linemod is changed really often, a ~15% savings
if ( *(++line
) == 'o' ) {
else if ( *(line
) == 'h' ) {
* printf( "W(P000111)" );
printf( "W(P00011100)" );
else if ( *(line
) == 'd' ) {
if ( *(++line
) == 'o' && *(++line
) == 't' ) {
if ( *(++line
) == 't' ) {
printf( "W(P10000000)" );
else if ( *(line
) == 'd' ) {
* printf( "W(P0110010)" );
printf( "W(P10001100)" );
else if ( *(line
) == 'l' ) {
printf( "W(P11111100)" );
printf( "W(P1)" ); /* default to solid */