1/*************************************************************************** 2 * LPRng - An Extended Print Spooler System 3 * 4 * Copyright 1988-1995 Patrick Powell, San Diego State University 5 * papowell@sdsu.edu 6 * See LICENSE for conditions of use. 7 * 8 *************************************************************************** 9 * MODULE: linetest.c 10 * PURPOSE: print a rolling banner pattern 11 **************************************************************************/ 12 13/* 14 * linetest: print the rolling banner pattern 15 * linetest [width] 16 * Sat Jun 18 09:47:06 CDT 1988 Patrick Powell 17 * linetest.c,v 18 * Revision 3.1 1996/12/28 21:40:52 papowell 19 * Update 20 * 21 * Revision 3.1 1996/12/28 21:32:47 papowell 22 * Update 23 * 24 * Revision 1.1 1996/12/28 21:07:15 papowell 25 * Update 26 * 27 * Revision 4.1 1996/11/05 06:38:20 papowell 28 * Update 29 * 30 * Revision 3.0 1996/05/19 04:06:49 papowell 31 * Update 32 * 33 * Revision 3.0 1996/05/19 04:06:49 papowell 34 * Update 35 * 36 * Revision 2.7 1996/05/13 03:26:13 papowell 37 * Update 38 * 39 * Revision 2.7 1996/05/13 03:26:13 papowell 40 * Update 41 * 42 * Revision 2.6 1996/03/03 22:31:37 papowell 43 * Update 44 * 45 * Revision 2.6 1996/03/03 22:31:37 papowell 46 * Update 47 * 48 * Revision 2.5 1995/12/03 02:52:29 papowell 49 * Update 50 * 51 * Revision 2.5 1995/12/03 02:52:29 papowell 52 * Update 53 * 54 * Revision 2.4 1995/11/22 14:58:52 papowell 55 * Update 56 * 57 * Revision 2.4 1995/11/22 14:58:52 papowell 58 * Update 59 * 60 * Revision 2.3 1995/11/08 14:28:25 papowell 61 * Update 62 * 63 * Revision 2.3 1995/11/08 14:28:25 papowell 64 * Update 65 * 66 * Revision 2.2 1995/11/06 01:38:35 papowell 67 * Update 68 * 69 * Revision 2.2 1995/11/06 01:38:35 papowell 70 * Update 71 * 72 * Revision 2.1 1995/11/05 01:27:39 papowell 73 * Update 74 * 75 * Revision 2.1 1995/11/05 01:27:39 papowell 76 * Update 77 * 78 * Revision 2.0 1995/11/04 06:29:04 papowell 79 * *** empty log message *** 80 * 81 * Revision 2.0 1995/11/04 06:29:04 papowell 82 * *** empty log message *** 83 * 84 * Revision 2.0 1995/11/04 06:28:06 papowell 85 * *** empty log message *** 86 * 87 * 88 */ 89#include <stdio.h> 90#include <ctype.h> 91static char id_str1[] = 92 "linetest.c,v 3.1 1996/12/28 21:40:52 papowell Exp PLP Copyright 1988 Patrick Powell"; 93char *Name; 94 95main(argc, argv) 96 int argc; 97 char **argv; 98{ 99 int width = 132; 100 int i,j; 101 102 Name = argv[0]; 103 if( argc > 2 || argc < 1 ){ 104 usage(); 105 } 106 if( argc == 2 ){ 107 i = atoi( argv[1] ); 108 if( i != 0 ){ 109 width = i; 110 } else { 111 usage(); 112 } 113 } 114 115 i = ' '; 116 while(1){ 117 for( j = 0; j < width; ++j ){ 118 if( !isprint(i) || isspace(i) ){ 119 i = ' '+1; 120 } 121 putchar( i ); 122 i = i + 1; 123 } 124 putchar( '\n' ); 125 } 126} 127 128usage() 129{ 130 fprintf( stderr, "%s [width]\n", Name ); 131 exit( 0 ); 132} 133