blob: eeb362cc60b11970722fdfa1606e77067e1b00cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.
import sys,string
stub_common.CopyrightC()
print "char lowercase[256] = {"
NUM_COLS = 8
count = 0
for num in range(256):
if count%NUM_COLS == 0:
sys.stdout.write( '\t' )
the_char = chr(num);
if num != 255:
print ("'\%03o'," % ord(string.lower(the_char))),
else:
print ("'\%03o'" % ord(string.lower(the_char))),
count += 1
if count%NUM_COLS == 0:
print ""
print "};"
|