⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 guiencjs.lst

📁 Keil C下通过的UCGUI,UCGUI的移植源代码
💻 LST
字号:
C51 COMPILER V8.05a   GUIENCJS                                                             04/11/2008 14:18:56 PAGE 1   


C51 COMPILER V8.05a, COMPILATION OF MODULE GUIENCJS
OBJECT MODULE PLACED IN GUIEncJS.obj
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE gui\Core\GUIEncJS.c LARGE BROWSE MDU_F120 DEBUG OBJECTEXTEND 
                    -PRINT(.\GUIEncJS.lst) OBJECT(GUIEncJS.obj)

line level    source

   1          /*
   2          *********************************************************************************************************
   3          *                                                uC/GUI
   4          *                        Universal graphic software for embedded applications
   5          *
   6          *                       (c) Copyright 2002, Micrium Inc., Weston, FL
   7          *                       (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH
   8          *
   9          *              礐/GUI is protected by international copyright laws. Knowledge of the
  10          *              source code may not be used to write a similar product. This file may
  11          *              only be used in accordance with a license and should not be redistributed
  12          *              in any way. We appreciate your understanding and fairness.
  13          *
  14          ----------------------------------------------------------------------
  15          File        : GUIEncSJ.C
  16          Purpose     : Implementation of Shift JIS decoding
  17          ----------------------------------------------------------------------
  18          Version-Date---Author-Explanation
  19          ---------------------------END-OF-HEADER------------------------------
  20          */
  21          
  22          
  23          #include <stddef.h>           /* needed for definition of NULL */
  24          #include "gui\Core\GUI_Protected.h"
  25          
  26           
  27          
  28          
  29          
  30          /*
  31          ***********************************************************
  32          *
  33          *                       Static subroutines
  34          *
  35          ***********************************************************
  36          */
  37          
  38          static U16 DB2SJIS(U8 Byte0, U8 Byte1) {
  39   1        return Byte1 | (((U16)Byte0)<<8);
  40   1      }
  41          
  42          /*************** GUI_GetStringDistX ****************************
  43          This routine is used to calculate the length of a string in pixels.
  44          */
  45          
  46          int GUI_GetLineDistX_SJIS(const char GUI_FAR *s, int Len) {
  47   1        int Dist =0;
  48   1        if (s) {
  49   2          U8 c0;
  50   2          while (((c0=*(U8*)s) !=0) && Len >=0) {
  51   3            s++; Len--;
  52   3            if (c0 > 127) {
  53   4              U8  c1 = *(U8*)s++;
  54   4              Len--;
C51 COMPILER V8.05a   GUIENCJS                                                             04/11/2008 14:18:56 PAGE 2   

  55   4              Dist += GUI_GetCharDistX(DB2SJIS(c0, c1));
  56   4            } else {
  57   4              Dist += GUI_GetCharDistX(c0);
  58   4            }
  59   3          }
  60   2        }
  61   1        return Dist;
  62   1      }
  63          
  64          /*************** GUI_GetLineLen ****************************
  65          Returns the number of characters in a string
  66          Note: tthe return value can be used as offset into the
  67          string, which means that double characters count double
  68          */
  69          
  70          int GUI_GetLineLen_SJIS(const char GUI_FAR *s, int MaxLen) {
  71   1        int Len =0;
  72   1        U8 c0;
  73   1        while (((c0=*(U8*)s) !=0) && Len < MaxLen) {
  74   2          s++;
  75   2          if (c0 > 127) {
  76   3            Len++; s++;
  77   3          } else {
  78   3            switch (c0) {
  79   4            case '\n': return Len;
  80   4            }
  81   3          }
  82   2          Len++;
  83   2        }
  84   1        return Len;
  85   1      }
  86          
  87          /*
  88          ********************************************************
  89          *
  90          *                Display line
  91          *
  92          ********************************************************
  93          */
  94          
  95          void GL_DispLine_SJIS(const char GUI_FAR *s, int Len) {
  96   1        U8 c0;
  97   1        while (--Len >=0) {
  98   2          c0=*(U8*)s++;
  99   2          if (c0 > 127) {
 100   3            U8  c1 = *(U8*)s++;
 101   3            Len--;
 102   3            GL_DispChar (DB2SJIS(c0, c1));
 103   3          } else {
 104   3            GL_DispChar(c0);
 105   3          }
 106   2        }
 107   1      }
 108          
 109          
 110          tGUI_ENC_APIList GUI_ENC_APIList_SJIS = {
 111            GUI_GetLineDistX_SJIS,
 112            GUI_GetLineLen_SJIS,
 113            GL_DispLine_SJIS
 114          };
 115          

C51 COMPILER V8.05a   GUIENCJS                                                             04/11/2008 14:18:56 PAGE 3   


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    426    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =      6      21
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -