/[pcre]/code/trunk/maint/MultiStage2.py
ViewVC logotype

Diff of /code/trunk/maint/MultiStage2.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 352 by ph10, Mon Jul 7 15:12:56 2008 UTC revision 425 by ph10, Mon Aug 17 14:48:48 2009 UTC
# Line 26  Line 26 
26  #  Adjusted global table names by prefixing _pcre_.  #  Adjusted global table names by prefixing _pcre_.
27  #  Commented out stuff relating to the casefolding table, which isn't used.  #  Commented out stuff relating to the casefolding table, which isn't used.
28  #  Corrected size calculation  #  Corrected size calculation
29    #  Add #ifndef SUPPORT_UCP to use dummy tables when no UCP support is needed.
30  #  #
31  # The tables generated by this script are used by macros defined in  # The tables generated by this script are used by macros defined in
32  # pcre_internal.h. They look up Unicode character properties using short  # pcre_internal.h. They look up Unicode character properties using short
# Line 276  for block_size in [2 ** i for i in range Line 277  for block_size in [2 ** i for i in range
277  print "#ifdef HAVE_CONFIG_H"  print "#ifdef HAVE_CONFIG_H"
278  print "#include \"config.h\""  print "#include \"config.h\""
279  print "#endif"  print "#endif"
280    print
281  print "#include \"pcre_internal.h\""  print "#include \"pcre_internal.h\""
282  print  print
283  print "/* Unicode character database. */"  print "/* Unicode character database. */"
284  print "/* This file was autogenerated by the MultiStage2.py script. */"  print "/* This file was autogenerated by the MultiStage2.py script. */"
285  print "/* Total size: %d bytes, block size: %d. */" % (min_size, min_block_size)  print "/* Total size: %d bytes, block size: %d. */" % (min_size, min_block_size)
286    print
287    print "/* The tables herein are needed only when UCP support is built */"
288    print "/* into PCRE. This module should not be referenced otherwise, so */"
289    print "/* it should not matter whether it is compiled or not. However */"
290    print "/* a comment was received about space saving - maybe the guy linked */"
291    print "/* all the modules rather than using a library - so we include a */"
292    print "/* condition to cut out the tables when not needed. But don't leave */"
293    print "/* a totally empty module because some compilers barf at that. */"
294    print "/* Instead, just supply small dummy tables. */"
295    print
296    print "#ifndef SUPPORT_UCP"
297    print "const ucd_record _pcre_ucd_records[] = {{0,0,0 }};"
298    print "const uschar _pcre_ucd_stage1[] = {0};"
299    print "const pcre_uint16 _pcre_ucd_stage2[] = {0};"
300    print "#else"
301    print
302  print record_struct  print record_struct
303  print_records(records, record_size)  print_records(records, record_size)
304  print_table(min_stage1, '_pcre_ucd_stage1')  print_table(min_stage1, '_pcre_ucd_stage1')
# Line 288  print_table(min_stage2, '_pcre_ucd_stage Line 306  print_table(min_stage2, '_pcre_ucd_stage
306  print "#if UCD_BLOCK_SIZE != %d" % min_block_size  print "#if UCD_BLOCK_SIZE != %d" % min_block_size
307  print "#error Please correct UCD_BLOCK_SIZE in pcre_internal.h"  print "#error Please correct UCD_BLOCK_SIZE in pcre_internal.h"
308  print "#endif"  print "#endif"
309    print "#endif  /* SUPPORT_UCP */"
310    
311  """  """
312    

Legend:
Removed from v.352  
changed lines
  Added in v.425

  ViewVC Help
Powered by ViewVC 1.1.5