/[pcre]/code/trunk/maint/ucptest.c
ViewVC logotype

Diff of /code/trunk/maint/ucptest.c

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

revision 943 by ph10, Tue Feb 28 15:02:51 2012 UTC revision 1045 by ph10, Sun Sep 23 16:50:00 2012 UTC
# Line 54  print_prop(int c) Line 54  print_prop(int c)
54  int type = UCD_CATEGORY(c);  int type = UCD_CATEGORY(c);
55  int fulltype = UCD_CHARTYPE(c);  int fulltype = UCD_CHARTYPE(c);
56  int script = UCD_SCRIPT(c);  int script = UCD_SCRIPT(c);
57    int gbprop = UCD_GRAPHBREAK(c);
58  int othercase = UCD_OTHERCASE(c);  int othercase = UCD_OTHERCASE(c);
59    int caseset = UCD_CASESET(c);
60    
61  unsigned char *fulltypename = US"??";  unsigned char *fulltypename = US"??";
62  unsigned char *typename = US"??";  unsigned char *typename = US"??";
63  unsigned char *scriptname = US"??";  unsigned char *scriptname = US"??";
64    unsigned char *graphbreak = US"??";
65    
66  switch (type)  switch (type)
67    {    {
# Line 104  switch (fulltype) Line 107  switch (fulltype)
107    case ucp_Zp: fulltypename = US"Paragraph separator"; break;    case ucp_Zp: fulltypename = US"Paragraph separator"; break;
108    case ucp_Zs: fulltypename = US"Space separator"; break;    case ucp_Zs: fulltypename = US"Space separator"; break;
109    }    }
110    
111    switch(gbprop)
112      {
113      case ucp_gbCR:           graphbreak = US"CR"; break;
114      case ucp_gbLF:           graphbreak = US"LF"; break;
115      case ucp_gbControl:      graphbreak = US"Control"; break;
116      case ucp_gbExtend:       graphbreak = US"Extend"; break;
117      case ucp_gbPrepend:      graphbreak = US"Prepend"; break;
118      case ucp_gbSpacingMark:  graphbreak = US"SpacingMark"; break;
119      case ucp_gbL:            graphbreak = US"Hangul syllable type L"; break;
120      case ucp_gbV:            graphbreak = US"Hangul syllable type V"; break;
121      case ucp_gbT:            graphbreak = US"Hangul syllable type T"; break;
122      case ucp_gbLV:           graphbreak = US"Hangul syllable type LV"; break;
123      case ucp_gbLVT:          graphbreak = US"Hangul syllable type LVT"; break;
124      case ucp_gbOther:        graphbreak = US"Other"; break;
125      }
126    
127  switch(script)  switch(script)
128    {    {
# Line 217  switch(script) Line 236  switch(script)
236    
237    }    }
238    
239  printf("%04x %s: %s %s", c, typename, fulltypename, scriptname);  printf("%04x %s: %s, %s, %s", c, typename, fulltypename, scriptname, graphbreak);
240  if (othercase != c) printf(" %04x", othercase);  if (othercase != c)
241      {
242      printf(", %04x", othercase);
243      if (caseset != 0)
244        {
245        const pcre_uint32 *p = PRIV(ucd_caseless_sets) + caseset - 1;
246        while (*(++p) < NOTACHAR)
247          if (*p != othercase && *p != c) printf(", %04x", *p);
248        }
249      }
250  printf("\n");  printf("\n");
251  }  }
252    

Legend:
Removed from v.943  
changed lines
  Added in v.1045

  ViewVC Help
Powered by ViewVC 1.1.5