Greek2Greek.h

00001 //*****************************************************************************
00002 // Author      : William Dicks                                              ***
00003 // Date Created: 10 February 1998                                           ***
00004 // Purpose     : Interface for Greek to b-Greek conversion and vice versa   ***
00005 // File Name   : Greek2Greek.h                                              ***
00006 //                                                                          ***
00007 // Author info : ---------------------------------------------------------- ***
00008 //     Address : 23 Tieroogpark                                             ***
00009 //             : Hoewe Str                                                  ***
00010 //             : Elarduspark X3                                             ***
00011 //             : 0181                                                       ***
00012 //             : South Africa                                               ***
00013 //     Home Tel: +27 (0)12 345 3166                                         ***
00014 //     Cell No : +27 (0)82 577 4424                                         ***
00015 //     e-mail  : wd@isis.co.za                                              ***
00016 // Church WWW  : http://www.hatfield.co.za                                  ***
00017 //*****************************************************************************
00018 /*
00019  *
00020  * $Id: Greek2Greek.h 1688 2005-01-01 04:42:26Z scribe $
00021  *
00022  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
00023  *      CrossWire Bible Society
00024  *      P. O. Box 2528
00025  *      Tempe, AZ  85280-2528
00026  *
00027  * This program is free software; you can redistribute it and/or modify it
00028  * under the terms of the GNU General Public License as published by the
00029  * Free Software Foundation version 2.
00030  *
00031  * This program is distributed in the hope that it will be useful, but
00032  * WITHOUT ANY WARRANTY; without even the implied warranty of
00033  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00034  * General Public License for more details.
00035  *
00036  */
00037 
00038 #ifndef __GREEK2GREEK
00039 #define __GREEK2GREEK
00040 
00041 #include <defs.h>
00042 SWORD_NAMESPACE_START
00043 
00044 //*****************************************************************************
00045 // Used to convert a string created by using the Greek font supplied with the
00046 // Sword Project to a string that conforms to the b-Greek discussion list 
00047 // method of transliteration.
00048 //*****************************************************************************
00049 unsigned char Greek2bGreek (unsigned char *sResult, unsigned char *sGreekText,
00050                             int nMaxResultBuflen);
00051 
00052 //*****************************************************************************
00053 // Used to convert a string created by using the b-Greek method of 
00054 // transliteration to a string that can be converted to a Greek-font readable 
00055 // string.
00056 //*****************************************************************************
00057 unsigned char bGreek2Greek (unsigned char *sResult,
00058                             unsigned char *sGreekText, int nMaxResultBuflen);
00059 
00060 //*****************************************************************************
00061 // Parse a Greek font created string and return the b-Greek equivalent
00062 //*****************************************************************************
00063 int ParseGreek (unsigned char *sResult,
00064                 unsigned char *sGreekText, int nMaxResultBuflen);
00065 
00066 //*****************************************************************************
00067 // Parse a b-Greek string and return the Greek font equivalent
00068 //*****************************************************************************
00069 int ParsebGreek (unsigned char *sResult,
00070                  unsigned char *sGreekText, int nMaxResultBuflen);
00071 
00072 //*****************************************************************************
00073 // Convert a unsigned character to a GREEK font unsigned character
00074 //*****************************************************************************
00075 unsigned char char2Font (unsigned char letter,  // bGreek letter to convert to Font letter
00076                          bool finalSigma,       // Is it a final SIGMA
00077                          bool iota,     // TRUE = IOTA subscript; FALSE = No IOTA
00078                          bool breathing,        // TRUE = add breathing; FALSE = no breathing
00079                          bool rough);   // TRUE = rough breathing; False = smooth
00080 
00081 //*****************************************************************************
00082 // Convert a GREEK font unsigned character to a unsigned character
00083 //*****************************************************************************
00084 unsigned char Font2char (unsigned char letter,  // bGreek letter to convert to Font letter
00085                          bool & iota,   // TRUE = IOTA subscript; FALSE = No IOTA
00086                          bool & breathing,      // TRUE = add breathing; FALSE = no breathing
00087                          bool & rough); // TRUE = rough breathing; False = smooth
00088 
00089 
00090 //*****************************************************************************
00091 // Identify and return a bGreek letter from a special font char
00092 //*****************************************************************************
00093 bool getSpecialChar (unsigned char Font, unsigned char &letter);
00094 
00095 //*****************************************************************************
00096 // true if the font character is a special character; false it isn't
00097 //*****************************************************************************
00098 bool SpecialGreek (unsigned char Font);
00099 
00100 //*****************************************************************************
00101 // Return Greek font puntuation from bGreek punstuation
00102 //*****************************************************************************
00103 unsigned char getGreekPunct (unsigned char bGreek);
00104 
00105 //*****************************************************************************
00106 // Return bGreek puntuation from Greek font punstuation
00107 //*****************************************************************************
00108 unsigned char getbGreekPunct (unsigned char Greek);
00109 
00110 //*****************************************************************************
00111 // Is the character punctuation or a space: true it is, false it isn't
00112 //*****************************************************************************
00113 bool isPunctSpace (unsigned char c);
00114 
00115 SWORD_NAMESPACE_END
00116 
00117 #endif // __GREEK2GREEK