/* Simple tool to generate test pattern. * simon@urbanmyth.org */ #include #include int main(int argc, char *argv[]) { int i; char ch; long kbytes; if (argc!=2) { printf("Usage: %s \n",argv[0]); exit(1); } kbytes = strtol(argv[1], (char **)NULL, 10); if(errno!=0){ printf("Usage: %s \n"); exit(1); } while (kbytes>0){ /* A to Z */ for(ch=0x41 ; ch<=0x5A && kbytes>0 ; ch++){ for (i=0;i<1024;i++){ putchar(ch); } kbytes--; } /* a to z */ for(ch=0x61 ; ch<=0x7A && kbytes>0 ; ch++){ for (i=0;i<1024;i++){ putchar(ch); } kbytes--; } } exit(1); }