73 main (
int argc, 
char **argv)
 
   81    char combining[0x110000];    
 
   82    char x_offset [0x110000];    
 
  101    memset (combining, 0, 0x110000 * 
sizeof (
char));
 
  102    memset (x_offset , 0, 0x110000 * 
sizeof (
char));
 
  104    if ((infilefp = fopen (argv[1],
"r")) == NULL) {
 
  105       fprintf (stderr,
"ERROR - combining characters file %s not found.\n\n",
 
  111    while (fscanf (infilefp, 
"%X:%d", &loc, &offset) != EOF) {
 
  118       if (loc != 0x01107F && loc != 0x01D1A0) {
 
  120          x_offset [loc] = offset;
 
  126    if ((infilefp = fopen (argv[2],
"r")) == NULL) {
 
  127       fprintf (stderr,
"ERROR - nonprinting characters file %s not found.\n\n",
 
  133    while (fscanf (infilefp, 
"%X:%*s", &loc) != EOF) combining[loc] = 0;
 
  141    while (fgets (teststring, 
MAXSTRING-1, stdin) != NULL) {
 
  142       sscanf (teststring, 
"%X", &loc);     
 
  143       gstart = strchr (teststring,
':') + 1; 
 
  144       if (combining[loc]) {                
 
  145          if (strlen (gstart) < 35)
 
  150       printf (
"%s", teststring); 
 
  168    char circle[32]={0x0,0x0,  
 
  190    for (i = 0; i < 32; i++) {
 
  191       glyphstring[i] = toupper (glyphstring[i]);
 
  194       digit1 = (glyphstring[i] <= 
'9') ?
 
  195                (glyphstring[i] - 
'0') : (glyphstring[i] - 
'A' + 0xA);
 
  198       digit2 = digit1 | circle[i];
 
  201       newstring[i] = (digit2 <= 9) ?
 
  202                      (
'0' + digit2) : (
'A' + digit2 - 0xA);
 
  206    newstring[i++] = 
'\n';
 
  207    newstring[i++] = 
'\0';
 
  209    memcpy (glyphstring, newstring, i);
 
  229    char circle08[64]={0x0,0x0,0x0,0x0,  
 
  248    char circle16[64]={0x0,0x0,0x0,0x0,  
 
  276    circle = (offset >= -8) ? circle08 : circle16;
 
  279    for (i = 0; i < 64; i++) {
 
  280       glyphstring[i] = toupper (glyphstring[i]);
 
  283       digit1 = (glyphstring[i] <= 
'9') ?
 
  284                (glyphstring[i] - 
'0') : (glyphstring[i] - 
'A' + 0xA);
 
  287       digit2 = digit1 | circle[i];
 
  290       newstring[i] = (digit2 <= 9) ?
 
  291                      (
'0' + digit2) : (
'A' + digit2 - 0xA);
 
  295    newstring[i++] = 
'\n';
 
  296    newstring[i++] = 
'\0';
 
  298    memcpy (glyphstring, newstring, i);
 
void add_double_circle(char *glyphstring, int offset)
Superimpose a double-width dashed combining circle on a glyph bitmap.
#define MAXSTRING
Maximum input line length - 1.
int main(int argc, char **argv)
The main function.
void add_single_circle(char *glyphstring)
Superimpose a single-width dashed combining circle on a glyph bitmap.