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

📄 pc_unicd.c

📁 NUcleus plus 支持的文件系统。 是学习文件系统的很好参考资料。
💻 C
字号:
/************************************************************************
*                                                                       
*       Copyright (c) 2001 by Accelerated Technology, Inc.              
*                                                                       
*  PROPRIETARY RIGHTS of Accelerated Technology are  involved in        
*  the subject matter of this material.  All manufacturing,             
*  reproduction, use, and sales rights pertaining to this subject       
*  matter are  governed by the license agreement.  The recipient of     
*     this software implicitly accepts the terms of the license.        
*                                                                       
*                                                                       
*************************************************************************

*************************************************************************
* FILE NAME                                     VERSION                 
*                                                                       
*       PC_UNICD.C                              FILE  2.3
*                                                                       
* COMPONENT                                                             
*                                                                       
*       Nucleus File                                                    
*                                                                       
* DESCRIPTION                                                           
*                                                                       
*       Convert unicode.                                                
*                                                                       
* DATA STRUCTURES                                                       
*                                                                       
*       None.                                                           
*                                                                       
* FUNCTIONS                                                             
*                                                                       
*       uni2asc                             Unicode to ascii.           
*       asc2uni                             Ascii to unicode.           
*                                                                       
* DEPENDENCIES                                                          
*                                                                       
*       pcdisk.h                            File common definitions     
*                                                                       
*************************************************************************/

#include        "file\pcdisk.h"


/************************************************************************
* FUNCTION                                                              
*                                                                       
*       uni2asc                                                         
*                                                                       
* DESCRIPTION                                                           
*                                                                       
*       Each long filename entry has Unicode character strings. This    
*       routine convert unicode to ascii code.                          
*       byte order.                                                     
*                                                                       
* AUTHOR                                                                
*                                                                       
*       Takahiro Takahashi
*                                                                       
* INPUTS                                                                
*                                                                       
*       ptr                                 Pointer to unicode          
*                                                                       
* OUTPUTS                                                               
*                                                                       
*       Ascii byte.                                                     
*                                                                       
*************************************************************************/
UINT8 uni2asc(UINT8 *ptr)
{

    return(*ptr);
}


/************************************************************************
* FUNCTION                                                              
*                                                                       
*       asc2uni                                                         
*                                                                       
* DESCRIPTION                                                           
*                                                                       
*       Each long filename entry has Unicode character strings. This    
*       routine convert ascii to unicode.                               
*       byte order.                                                     
*                                                                       
* AUTHOR                                                                
*                                                                       
*       Takahiro Takahashi
*                                                                       
* INPUTS                                                                
*                                                                       
*       ptr                                 Pointer to unicode          
*       asc                                 Ascii character             
*                                                                       
* OUTPUTS                                                               
*                                                                       
*       Ascii byte.                                                     
*                                                                       
*************************************************************************/
UINT8 asc2uni(UINT8 *ptr, UINT8 ascii)
{

    *ptr = ascii;
    *(ptr+1) = 0;

    return(*ptr);
}

⌨️ 快捷键说明

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