]> git.sur5r.net Git - cc65/blobdiff - src/common/tgttrans.c
Fixed LinuxDoc Tools issues in some verbatim blocks in the Atari document.
[cc65] / src / common / tgttrans.c
index dff5238e17d2cc01480a29afebbedbd950d1ee7b..bd20565056d629826956f150386feec8988556d2 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************/
 /*                                                                           */
-/*                               tgttrans.c                                 */
+/*                                tgttrans.c                                 */
 /*                                                                           */
-/*                        Character set translation                         */
+/*                         Character set translation                         */
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
@@ -43,7 +43,7 @@
 
 
 /*****************************************************************************/
-/*                                  Data                                    */
+/*                                   Data                                    */
 /*****************************************************************************/
 
 
@@ -71,7 +71,7 @@ static unsigned char Tab[256] = {
 
 
 /*****************************************************************************/
-/*                                          Code                                    */
+/*                                   Code                                    */
 /*****************************************************************************/
 
 
@@ -87,8 +87,8 @@ void TgtTranslateInit (void)
 
 int TgtTranslateChar (int C)
 /* Translate one character from the source character set into the target
- * system character set.
- */
+** system character set.
+*/
 {
     /* Translate */
     return Tab[C & 0xFF];
@@ -98,14 +98,14 @@ int TgtTranslateChar (int C)
 
 void TgtTranslateBuf (void* Buf, unsigned Len)
 /* Translate a buffer of the given length from the source character set into
- * the target system character set.
- */
+** the target system character set.
+*/
 {
     /* Translate */
     unsigned char* B = (unsigned char*)Buf;
     while (Len--) {
-       *B = Tab[*B];
-       ++B;
+        *B = Tab[*B];
+        ++B;
     }
 }
 
@@ -113,8 +113,8 @@ void TgtTranslateBuf (void* Buf, unsigned Len)
 
 void TgtTranslateStrBuf (StrBuf* Buf)
 /* Translate a string buffer from the source character set into the target
- * system character set.
- */
+** system character set.
+*/
 {
     TgtTranslateBuf (SB_GetBuf (Buf), SB_GetLen (Buf));
 }
@@ -124,11 +124,6 @@ void TgtTranslateStrBuf (StrBuf* Buf)
 void TgtTranslateSet (unsigned Index, unsigned char C)
 /* Set the translation code for the given character */
 {
-    CHECK (Index > 0 && Index < sizeof (Tab));
+    CHECK (Index < sizeof (Tab));
     Tab[Index] = C;
 }
-
-
-
-
-