########################################################################### # HITXBM.PL - Module required by hitmatic.cgi # # By Joe DePasquale, October 1996, Last revised: March 9, 1997 # # E-MAIL: getcruzn@shadow.net URL: http://www.shadow.net/~getcruzn/top # ########################################################################### # Portions of the bitmap routines and the bitmap data files were # modified from a script by Eugene E. Devereaux # " Permission to use, copy, modify, and distribute this software # and its documentation for any purpose and without fee is granted # provided that the above copyright notice appears in all copies. # It is provided "as is" without express or implied warranty. " ########################################################################### # Sub: Make an x-bitmap image of the count sub makeXbm { # create an array of digits $printLen = length($printTtl); for ($x=$printLen; $x<6; $x++) { $printTtl = "0".$printTtl; } foreach $i (0..5) { $elv[$i] = substr($printTtl,$i,1)+0; $elv[$i] *=32; } @num = ( '0x00','0x00','0x00','0x00','0x00','0x00','0x00','0x00','0x00','0x00','0x00','0x00', '0xe0','0x07','0xe0','0x07','0xe0','0x07','0xe0','0x07','0xe0','0x07','0x20','0x00', '0xf0','0x0f','0xf0','0x0f','0xf0','0x0f','0xf0','0x0f','0xf0','0x0f','0x30','0x00', '0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x00', '0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x00', '0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x00', '0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x00', '0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0xf0','0x07', '0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0xf0','0x0f', '0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c', '0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c', '0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c', '0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c', '0xf0','0x0f','0xf0','0x0f','0xf0','0x0f','0xf0','0x0f','0xf0','0x0f','0xf0','0x0f', '0xe0','0x07','0xe0','0x07','0xe0','0x07','0xe0','0x07','0xe0','0x07','0xe0','0x0f', '0x00','0x00','0x00','0x00','0x00','0x00','0x00','0x00','0x00','0x00','0x00','0x00'); @bmv = ( '0x00','0x00','0xe0','0x07','0xf0','0x0f','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c', '0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0xf0','0x0f','0xe0','0x07','0x00','0x00', '0x00','0x00','0x80','0x01','0xc0','0x01','0xe0','0x01','0x80','0x01','0x80','0x01','0x80','0x01','0x80','0x01', '0x80','0x01','0x80','0x01','0x80','0x01','0x80','0x01','0x80','0x01','0xe0','0x07','0xe0','0x07','0x00','0x00', '0x00','0x00','0xe0','0x07','0xf8','0x1f','0x18','0x18','0x18','0x18','0x18','0x1c','0x00','0x0e','0x00','0x07', '0x80','0x03','0xc0','0x01','0xe0','0x00','0x70','0x00','0x38','0x00','0xf8','0x1f','0xf8','0x1f','0x00','0x00', '0x00','0x00','0xf0','0x07','0xf0','0x0f','0x30','0x0c','0x00','0x0c','0x00','0x0c','0x00','0x0c','0xc0','0x0f', '0xc0','0x0f','0x00','0x0c','0x00','0x0c','0x00','0x0c','0x30','0x0c','0xf0','0x0f','0xf0','0x07','0x00','0x00', '0x00','0x00','0x00','0x06','0x00','0x0f','0x80','0x0f','0xc0','0x0d','0xe0','0x0c','0x70','0x0c','0xf0','0x0f', '0xf0','0x0f','0x00','0x0c','0x00','0x0c','0x00','0x0c','0x00','0x0c','0x00','0x0c','0x00','0x0c','0x00','0x00', '0x00','0x00','0xe0','0x0f','0xf0','0x0f','0x30','0x00','0x30','0x00','0x30','0x00','0x30','0x00','0xf0','0x07', '0xe0','0x0f','0x00','0x0c','0x00','0x0c','0x00','0x0c','0x30','0x0c','0xf0','0x07','0xe0','0x03','0x00','0x00', '0x00','0x00','0x20','0x00','0x30','0x00','0x30','0x00','0x30','0x00','0x30','0x00','0x30','0x00','0xf0','0x07', '0xf0','0x0f','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x30','0x0c','0xf0','0x0f','0xe0','0x0f','0x00','0x00', '0x00','0x00','0xf0','0x0f','0xf0','0x0f','0x30','0x0c','0x30','0x0c','0x00','0x06','0x00','0x03','0x00','0x03', '0x80','0x01','0x80','0x01','0xc0','0x00','0xc0','0x00','0x60','0x00','0x60','0x00','0x60','0x00','0x00','0x00', '0x00','0x00','0xe0','0x07','0xf0','0x0f','0x30','0x0c','0x30','0x0c','0x30','0x0c','0x60','0x06','0xc0','0x03', '0xc0','0x03','0x60','0x06','0x30','0x0c','0x30','0x0c','0x30','0x0c','0xf0','0x0f','0xe0','0x07','0x00','0x00', '0x00','0x00','0xe0','0x07','0xf0','0x0f','0x30','0x0c','0x30','0x0c','0x30','0x0c','0xe0','0x0f','0xc0','0x0f', '0x00','0x0e','0x00','0x0e','0x00','0x07','0x80','0x03','0xc0','0x01','0xe0','0x00','0x60','0x00','0x00','0x00',); # create an array of bitmap points $i = 0; $k = 0; foreach $chr (0..15) { $j = $k; $k +=2; foreach $nv (0..5) { $num[$i+($nv*2)] = $bmv[$j+$elv[$nv]]; $j++; $num[$i+1+($nv*2)] = $bmv[$j+$elv[$nv]]; $j--; } $i += 12; } # Create a new image file of the hit count open (XBM,">$HITXBM"); print (XBM "\x23define number_width 96\n"); print (XBM "\x23define number_height 16\n"); print (XBM "static char number_bits[] = {\n "); $row = 1; foreach $j (0..190) { print (XBM "$num[$j], "); if ($row == 12) { print (XBM "\n "); $row = 1; } else { $row++; } } print (XBM "$num[191]\n};\n"); close (XBM); } # end makeXbm ###################################################################### 1; # return TRUE