\hypertarget{unigencircles_8c_source}{}\doxysection{unigencircles.\+c}
\label{unigencircles_8c_source}\index{src/unigencircles.c@{src/unigencircles.c}}
\mbox{\hyperlink{unigencircles_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00001}00001 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00002}00002 \textcolor{comment}{   @file unigencircles.c}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00003}00003 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00004}00004 \textcolor{comment}{   @brief unigencircles -\/ Superimpose dashed combining circles}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00005}00005 \textcolor{comment}{                          on combining glyphs}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00006}00006 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00007}00007 \textcolor{comment}{   @author Paul Hardy}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00008}00008 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00009}00009 \textcolor{comment}{   @copyright Copyright (C) 2013, Paul Hardy.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00010}00010 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00011}00011 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00012}00012 \textcolor{comment}{   LICENSE:}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00013}00013 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00014}00014 \textcolor{comment}{      This program is free software: you can redistribute it and/or modify}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00015}00015 \textcolor{comment}{      it under the terms of the GNU General Public License as published by}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00016}00016 \textcolor{comment}{      the Free Software Foundation, either version 2 of the License, or}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00017}00017 \textcolor{comment}{      (at your option) any later version.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00018}00018 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00019}00019 \textcolor{comment}{      This program is distributed in the hope that it will be useful,}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00020}00020 \textcolor{comment}{      but WITHOUT ANY WARRANTY; without even the implied warranty of}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00021}00021 \textcolor{comment}{      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00022}00022 \textcolor{comment}{      GNU General Public License for more details.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00023}00023 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00024}00024 \textcolor{comment}{      You should have received a copy of the GNU General Public License}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00025}00025 \textcolor{comment}{      along with this program.  If not, see <http://www.gnu.org/licenses/>.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00026}00026 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00027}00027 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00028}00028 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00029}00029 \textcolor{comment}{   8 July 2017 [Paul Hardy]:}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00030}00030 \textcolor{comment}{      -\/ Reads new second field that contains an x-\/axis offset for}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00031}00031 \textcolor{comment}{        each combining character in "{}*combining.txt"{} files.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00032}00032 \textcolor{comment}{      -\/ Uses the above x-\/axis offset value for a combining character}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00033}00033 \textcolor{comment}{        to print combining circle in the left half of a double}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00034}00034 \textcolor{comment}{        diacritic combining character grid, or in the center for}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00035}00035 \textcolor{comment}{        other combining characters.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00036}00036 \textcolor{comment}{      -\/ Adds exceptions for U+01107F (Brahmi number joiner) and}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00037}00037 \textcolor{comment}{        U+01D1A0 (vertical stroke musical ornament); they are in}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00038}00038 \textcolor{comment}{        a combining.txt file for positioning, but are not actually}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00039}00039 \textcolor{comment}{        Unicode combining characters.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00040}00040 \textcolor{comment}{      -\/ Typo fix: "{}single-\/width"{}-\/-\/>"{}double-\/width"{} in comment for}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00041}00041 \textcolor{comment}{        add\_double\_circle function.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00042}00042 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00043}00043 \textcolor{comment}{   12 August 2017 [Paul Hardy]:}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00044}00044 \textcolor{comment}{      -\/ Hard-\/code Miao vowels to show combining circles after}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00045}00045 \textcolor{comment}{        removing them from font/plane01/plane01-\/combining.txt.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00046}00046 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00047}00047 \textcolor{comment}{   26 December 2017 [Paul Hardy]:}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00048}00048 \textcolor{comment}{      -\/ Remove Miao hard-\/coding; they are back in unibmp2hex.c and}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00049}00049 \textcolor{comment}{        in font/plane01/plane01-\/combining.txt.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00050}00050 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00051}00051 \textcolor{comment}{   11 May 2019 [Paul Hardy]:}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00052}00052 \textcolor{comment}{      -\/ Changed strncpy calls to memcpy calls to avoid a compiler}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00053}00053 \textcolor{comment}{        warning.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00054}00054 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00056}00056 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <stdlib.h>}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <string.h>}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <ctype.h>}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00062}\mbox{\hyperlink{unigencircles_8c_a2ff420a6c6a2d1effc47a81e37327985}{00062}} \textcolor{preprocessor}{\#define MAXSTRING   256   }\textcolor{comment}{///< Maximum input line length -\/ 1.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00063}00063 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00064}00064 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00065}00065 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00066}00066 \textcolor{comment}{   @brief The main function.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00067}00067 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00068}00068 \textcolor{comment}{   @param[in] argc The count of command line arguments.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00069}00069 \textcolor{comment}{   @param[in] argv Pointer to array of command line arguments.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00070}00070 \textcolor{comment}{   @return This program exits with status EXIT\_SUCCESS.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00071}00071 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00072}00072 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00073}\mbox{\hyperlink{unigencircles_8c_a3c04138a5bfe5d72780bb7e82a18e627}{00073}} \mbox{\hyperlink{unigencircles_8c_a3c04138a5bfe5d72780bb7e82a18e627}{main}} (\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00074}00074 \{}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00076}00076    \textcolor{keywordtype}{char} teststring[\mbox{\hyperlink{unigencircles_8c_a2ff420a6c6a2d1effc47a81e37327985}{MAXSTRING}}];  \textcolor{comment}{/* current input line                       */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00077}00077    \textcolor{keywordtype}{int}  loc;                    \textcolor{comment}{/* Unicode code point of current input line */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00078}00078    \textcolor{keywordtype}{int}  offset;                 \textcolor{comment}{/* offset value of a combining character    */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00079}00079    \textcolor{keywordtype}{char} *gstart;                \textcolor{comment}{/* glyph start, pointing into teststring    */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00081}00081    \textcolor{keywordtype}{char} combining[0x110000];    \textcolor{comment}{/* 1 -\/-\/> combining glyph; 0 -\/-\/> non-\/combining */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00082}00082    \textcolor{keywordtype}{char} x\_offset [0x110000];    \textcolor{comment}{/* second value in *combining.txt files       */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00083}00083 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00084}00084    \textcolor{keywordtype}{void} \mbox{\hyperlink{unigencircles_8c_a88eb1195637a2f1fe03d339f99582cfe}{add\_single\_circle}}(\textcolor{keywordtype}{char} *);      \textcolor{comment}{/* add a single-\/width dashed circle */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00085}00085    \textcolor{keywordtype}{void} \mbox{\hyperlink{unigencircles_8c_a2e8aac93a2a490025d3653467cf40eda}{add\_double\_circle}}(\textcolor{keywordtype}{char} *, \textcolor{keywordtype}{int}); \textcolor{comment}{/* add a double-\/width dashed circle */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00086}00086 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00087}00087    FILE *infilefp;}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00089}00089    \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00090}00090 \textcolor{comment}{      if (argc != 3) \{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00091}00091 \textcolor{comment}{         fprintf (stderr,}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00092}00092 \textcolor{comment}{                "{}\(\backslash\)n\(\backslash\)nUsage: \%s combining.txt nonprinting.hex < unifont.hex > unifontfull.hex\(\backslash\)n\(\backslash\)n"{});}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00093}00093 \textcolor{comment}{         exit (EXIT\_FAILURE);}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00094}00094 \textcolor{comment}{      \}}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00095}00095 \textcolor{comment}{   */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00096}00096 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00097}00097    \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00098}00098 \textcolor{comment}{      Read the combining characters list.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00099}00099 \textcolor{comment}{   */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00100}00100    \textcolor{comment}{/* Start with no combining code points flagged */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00101}00101    memset (combining, 0, 0x110000 * \textcolor{keyword}{sizeof} (\textcolor{keywordtype}{char}));}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00102}00102    memset (x\_offset , 0, 0x110000 * \textcolor{keyword}{sizeof} (\textcolor{keywordtype}{char}));}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00103}00103 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00104}00104    \textcolor{keywordflow}{if} ((infilefp = fopen (argv[1],\textcolor{stringliteral}{"{}r"{}})) == NULL) \{}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00105}00105       fprintf (stderr,\textcolor{stringliteral}{"{}ERROR -\/ combining characters file \%s not found.\(\backslash\)n\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00106}00106               argv[1]);}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00107}00107       exit (EXIT\_FAILURE);}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00108}00108    \}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00110}00110    \textcolor{comment}{/* Flag list of combining characters to add a dashed circle. */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00111}00111    \textcolor{keywordflow}{while} (fscanf (infilefp, \textcolor{stringliteral}{"{}\%X:\%d"{}}, \&loc, \&offset) != EOF) \{}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00112}00112       \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00113}00113 \textcolor{comment}{         U+01107F and U+01D1A0 are not defined as combining characters}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00114}00114 \textcolor{comment}{         in Unicode; they were added in a combining.txt file as the}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00115}00115 \textcolor{comment}{         only way to make them look acceptable in proximity to other}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00116}00116 \textcolor{comment}{         glyphs in their script.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00117}00117 \textcolor{comment}{      */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00118}00118       \textcolor{keywordflow}{if} (loc != 0x01107F \&\& loc != 0x01D1A0) \{}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00119}00119          combining[loc] = 1;}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00120}00120          x\_offset [loc] = offset;}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00121}00121       \}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00122}00122    \}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00123}00123    fclose (infilefp); \textcolor{comment}{/* all done reading combining.txt */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00124}00124 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00125}00125    \textcolor{comment}{/* Now read the non-\/printing glyphs; they never have dashed circles */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00126}00126    \textcolor{keywordflow}{if} ((infilefp = fopen (argv[2],\textcolor{stringliteral}{"{}r"{}})) == NULL) \{}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00127}00127       fprintf (stderr,\textcolor{stringliteral}{"{}ERROR -\/ nonprinting characters file \%s not found.\(\backslash\)n\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00128}00128               argv[1]);}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00129}00129       exit (EXIT\_FAILURE);}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00130}00130    \}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00131}00131 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00132}00132    \textcolor{comment}{/* Reset list of nonprinting characters to avoid adding a dashed circle. */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00133}00133    \textcolor{keywordflow}{while} (fscanf (infilefp, \textcolor{stringliteral}{"{}\%X:\%*s"{}}, \&loc) != EOF) combining[loc] = 0;}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00134}00134 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00135}00135    fclose (infilefp); \textcolor{comment}{/* all done reading nonprinting.hex */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00136}00136 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00137}00137    \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00138}00138 \textcolor{comment}{      Read the hex glyphs.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00139}00139 \textcolor{comment}{   */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00140}00140    teststring[\mbox{\hyperlink{unigencircles_8c_a2ff420a6c6a2d1effc47a81e37327985}{MAXSTRING}} -\/ 1] = \textcolor{charliteral}{'\(\backslash\)0'};   \textcolor{comment}{/* so there's no chance we leave array  */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00141}00141    \textcolor{keywordflow}{while} (fgets (teststring, \mbox{\hyperlink{unigencircles_8c_a2ff420a6c6a2d1effc47a81e37327985}{MAXSTRING}}-\/1, stdin) != NULL) \{}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00142}00142       sscanf (teststring, \textcolor{stringliteral}{"{}\%X"{}}, \&loc);     \textcolor{comment}{/* loc == the Uniocde code point    */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00143}00143       gstart = strchr (teststring,\textcolor{charliteral}{':'}) + 1; \textcolor{comment}{/* start of glyph bitmap            */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00144}00144       \textcolor{keywordflow}{if} (combining[loc]) \{                \textcolor{comment}{/* if a combining character         */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00145}00145          \textcolor{keywordflow}{if} (strlen (gstart) < 35)}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00146}00146             \mbox{\hyperlink{unigencircles_8c_a88eb1195637a2f1fe03d339f99582cfe}{add\_single\_circle}} (gstart);                 \textcolor{comment}{/* single-\/width */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00147}00147          \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00148}00148             \mbox{\hyperlink{unigencircles_8c_a2e8aac93a2a490025d3653467cf40eda}{add\_double\_circle}} (gstart, x\_offset[loc]);  \textcolor{comment}{/* double-\/width */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00149}00149       \}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00150}00150       printf (\textcolor{stringliteral}{"{}\%s"{}}, teststring); \textcolor{comment}{/* output the new character .hex string */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00151}00151    \}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00153}00153    exit (EXIT\_SUCCESS);}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00154}00154 \}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00155}00155 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00156}00156 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00157}00157 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00158}00158 \textcolor{comment}{   @brief Superimpose a single-\/width dashed combining circle on a glyph bitmap.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00159}00159 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00160}00160 \textcolor{comment}{   @param[in,out] glyphstring A single-\/width glyph, 8x16 pixels.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00161}00161 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00162}00162 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00163}\mbox{\hyperlink{unigencircles_8c_a88eb1195637a2f1fe03d339f99582cfe}{00163}} \mbox{\hyperlink{unigencircles_8c_a88eb1195637a2f1fe03d339f99582cfe}{add\_single\_circle}} (\textcolor{keywordtype}{char} *glyphstring)}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00164}00164 \{}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00166}00166    \textcolor{keywordtype}{char} newstring[256];}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00167}00167    \textcolor{comment}{/* Circle hex string pattern is "{}00000008000024004200240000000000"{} */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00168}00168    \textcolor{keywordtype}{char} circle[32]=\{0x0,0x0,  \textcolor{comment}{/* row  1 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00169}00169                     0x0,0x0,  \textcolor{comment}{/* row  2 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00170}00170                     0x0,0x0,  \textcolor{comment}{/* row  3 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00171}00171                     0x0,0x0,  \textcolor{comment}{/* row  4 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00172}00172                     0x0,0x0,  \textcolor{comment}{/* row  5 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00173}00173                     0x0,0x0,  \textcolor{comment}{/* row  6 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00174}00174                     0x2,0x4,  \textcolor{comment}{/* row  7 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00175}00175                     0x0,0x0,  \textcolor{comment}{/* row  8 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00176}00176                     0x4,0x2,  \textcolor{comment}{/* row  9 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00177}00177                     0x0,0x0,  \textcolor{comment}{/* row 10 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00178}00178                     0x2,0x4,  \textcolor{comment}{/* row 11 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00179}00179                     0x0,0x0,  \textcolor{comment}{/* row 12 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00180}00180                     0x0,0x0,  \textcolor{comment}{/* row 13 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00181}00181                     0x0,0x0,  \textcolor{comment}{/* row 14 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00182}00182                     0x0,0x0,  \textcolor{comment}{/* row 15 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00183}00183                     0x0,0x0\}; \textcolor{comment}{/* row 16 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00184}00184 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00185}00185    \textcolor{keywordtype}{int} digit1, digit2; \textcolor{comment}{/* corresponding digits in each string */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00186}00186 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00187}00187    \textcolor{keywordtype}{int} i; \textcolor{comment}{/* index variables */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00188}00188 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00189}00189    \textcolor{comment}{/* for each character position, OR the corresponding circle glyph value */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00190}00190    \textcolor{keywordflow}{for} (i = 0; i < 32; i++) \{}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00191}00191       glyphstring[i] = toupper (glyphstring[i]);}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00192}00192 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00193}00193       \textcolor{comment}{/* Convert ASCII character to a hexadecimal integer */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00194}00194       digit1 = (glyphstring[i] <= \textcolor{charliteral}{'9'}) ?}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00195}00195                (glyphstring[i] -\/ \textcolor{charliteral}{'0'}) : (glyphstring[i] -\/ \textcolor{charliteral}{'A'} + 0xA);}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00196}00196 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00197}00197       \textcolor{comment}{/* Superimpose dashed circle */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00198}00198       digit2 = digit1 | circle[i];}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00199}00199 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00200}00200       \textcolor{comment}{/* Convert hexadecimal integer to an ASCII character */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00201}00201       newstring[i] = (digit2 <= 9) ?}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00202}00202                      (\textcolor{charliteral}{'0'} + digit2) : (\textcolor{charliteral}{'A'} + digit2 -\/ 0xA);}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00203}00203    \}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00204}00204 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00205}00205    \textcolor{comment}{/* Terminate string for output */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00206}00206    newstring[i++] = \textcolor{charliteral}{'\(\backslash\)n'};}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00207}00207    newstring[i++] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00208}00208 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00209}00209    memcpy (glyphstring, newstring, i);}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00211}00211    \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00212}00212 \}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00213}00213 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00214}00214 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00215}00215 \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00216}00216 \textcolor{comment}{   @brief Superimpose a double-\/width dashed combining circle on a glyph bitmap.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00217}00217 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00218}00218 \textcolor{comment}{   @param[in,out] glyphstring A double-\/width glyph, 16x16 pixels.}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00219}00219 \textcolor{comment}{*/}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00220}00220 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00221}\mbox{\hyperlink{unigencircles_8c_a2e8aac93a2a490025d3653467cf40eda}{00221}} \mbox{\hyperlink{unigencircles_8c_a2e8aac93a2a490025d3653467cf40eda}{add\_double\_circle}} (\textcolor{keywordtype}{char} *glyphstring, \textcolor{keywordtype}{int} offset)}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00222}00222 \{}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00223}00223 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00224}00224    \textcolor{keywordtype}{char} newstring[256];}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00225}00225    \textcolor{comment}{/* Circle hex string pattern is "{}00000008000024004200240000000000"{} */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00227}00227    \textcolor{comment}{/* For double diacritical glyphs (offset = -\/8) */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00228}00228    \textcolor{comment}{/* Combining circle is left-\/justified.         */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00229}00229    \textcolor{keywordtype}{char} circle08[64]=\{0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row  1 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00230}00230                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row  2 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00231}00231                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row  3 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00232}00232                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row  4 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00233}00233                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row  5 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00234}00234                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row  6 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00235}00235                       0x2,0x4,0x0,0x0,  \textcolor{comment}{/* row  7 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00236}00236                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row  8 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00237}00237                       0x4,0x2,0x0,0x0,  \textcolor{comment}{/* row  9 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00238}00238                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row 10 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00239}00239                       0x2,0x4,0x0,0x0,  \textcolor{comment}{/* row 11 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00240}00240                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row 12 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00241}00241                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row 13 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00242}00242                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row 14 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00243}00243                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row 15 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00244}00244                       0x0,0x0,0x0,0x0\}; \textcolor{comment}{/* row 16 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00245}00245 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00246}00246    \textcolor{comment}{/* For all other combining glyphs (offset = -\/16) */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00247}00247    \textcolor{comment}{/* Combining circle is centered in 16 columns.   */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00248}00248    \textcolor{keywordtype}{char} circle16[64]=\{0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row  1 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00249}00249                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row  2 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00250}00250                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row  3 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00251}00251                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row  4 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00252}00252                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row  5 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00253}00253                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row  6 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00254}00254                       0x0,0x2,0x4,0x0,  \textcolor{comment}{/* row  7 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00255}00255                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row  8 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00256}00256                       0x0,0x4,0x2,0x0,  \textcolor{comment}{/* row  9 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00257}00257                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row 10 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00258}00258                       0x0,0x2,0x4,0x0,  \textcolor{comment}{/* row 11 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00259}00259                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row 12 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00260}00260                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row 13 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00261}00261                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row 14 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00262}00262                       0x0,0x0,0x0,0x0,  \textcolor{comment}{/* row 15 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00263}00263                       0x0,0x0,0x0,0x0\}; \textcolor{comment}{/* row 16 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00264}00264 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00265}00265    \textcolor{keywordtype}{char} *circle; \textcolor{comment}{/* points into circle16 or circle08 */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00266}00266 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00267}00267    \textcolor{keywordtype}{int} digit1, digit2; \textcolor{comment}{/* corresponding digits in each string */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00268}00268 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00269}00269    \textcolor{keywordtype}{int} i; \textcolor{comment}{/* index variables */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00270}00270 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00271}00271 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00272}00272    \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00273}00273 \textcolor{comment}{      Determine if combining circle is left-\/justified (offset = -\/8)}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00274}00274 \textcolor{comment}{      or centered (offset = -\/16).}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00275}00275 \textcolor{comment}{   */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00276}00276    circle = (offset >= -\/8) ? circle08 : circle16;}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00277}00277 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00278}00278    \textcolor{comment}{/* for each character position, OR the corresponding circle glyph value */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00279}00279    \textcolor{keywordflow}{for} (i = 0; i < 64; i++) \{}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00280}00280       glyphstring[i] = toupper (glyphstring[i]);}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00281}00281 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00282}00282       \textcolor{comment}{/* Convert ASCII character to a hexadecimal integer */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00283}00283       digit1 = (glyphstring[i] <= \textcolor{charliteral}{'9'}) ?}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00284}00284                (glyphstring[i] -\/ \textcolor{charliteral}{'0'}) : (glyphstring[i] -\/ \textcolor{charliteral}{'A'} + 0xA);}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00285}00285 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00286}00286       \textcolor{comment}{/* Superimpose dashed circle */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00287}00287       digit2 = digit1 | circle[i];}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00288}00288 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00289}00289       \textcolor{comment}{/* Convert hexadecimal integer to an ASCII character */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00290}00290       newstring[i] = (digit2 <= 9) ?}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00291}00291                      (\textcolor{charliteral}{'0'} + digit2) : (\textcolor{charliteral}{'A'} + digit2 -\/ 0xA);}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00292}00292    \}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00293}00293 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00294}00294    \textcolor{comment}{/* Terminate string for output */}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00295}00295    newstring[i++] = \textcolor{charliteral}{'\(\backslash\)n'};}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00296}00296    newstring[i++] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00297}00297 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00298}00298    memcpy (glyphstring, newstring, i);}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00299}00299 }
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00300}00300    \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00301}00301 \}}
\DoxyCodeLine{\Hypertarget{unigencircles_8c_source_l00302}00302 }

\end{DoxyCode}
