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

📄 mfw_phb.c

📁 是一个手机功能的模拟程序
💻 C
字号:
/*
+--------------------------------------------------------------------+
| PROJECT: MMI-Framework (8417)         $Workfile:: mfw_phb.c       $|
| $Author: zhenggl $Revision: 1.2 $|
| CREATED: 7.1.99                       $Modtime:: 12.01.00 11:19   $|
| STATE  : code                                                      |
+--------------------------------------------------------------------+

   MODULE  : MFW_PHB

   PURPOSE : This modul contains phonebook management functions.

*/

#define ENTITY_MFW

#include <string.h>
#include <stdio.h>
#include <stdlib.h>

#if defined (NEW_FRAME)

#include "typedefs.h"
#include "vsi.h"
#include "pei.h"
#include "custom.h"
#include "gsm.h"

#else

#include "stddefs.h"
#include "custom.h"
#include "gsm.h"
#include "vsi.h"

#endif


#include "mfw_mfw.h"
#include "mfw_phb.h"
#include "mfw_phbi.h"
#include "mfw_cm.h"
#include "mfw_cmi.h"

#include "mfw_nm.h"
#include "mfw_sim.h"
#include "mfw_sima.h"
#include "mfw_nmi.h"
#include "mfw_simi.h"
#include "mfw_sms.h"
#include "mfw_smsi.h"
#include "mfw_win.h"

#include "ksd.h"
#include "psa.h"

#if defined (FAX_AND_DATA)
#include "aci_fd.h"
#endif

#include "message.h"
#include "prim.h"
#include "aci_cmh.h"

#include "cmh.h"
#include "phb.h"
#include "cmh_phb.h"

#include "mfw_ss.h"
#include "mfw_ssi.h"
#include "mfw_win.h"

#include "gdi.h"
#include "pcm.h"

/* SPR#1112 - SH - Required for internal phonebook */
#ifdef INT_PHONEBOOK
#include "ATBPbGI.h"
#endif
    

/********* current define *******************************************/
static T_ACI_PB_ENTR   pb_list[PHB_MAX_ENTRY_NUM];
static T_MFW_UPN_LIST  upn_list;
static UBYTE cnt;     /* count of user personal numbers */

EXTERN MfwHdr * current_mfw_elem;

/* 2004/05/20 sunsj add for Phonebook decode */
typedef enum
{
	NON_GSM7BIT,
		GSM7BIT,
		EXTENDED_GSM7BIT
}GsmCharType;

#define GSM_CHARACTER_SET_SIZE			128
#define NON_GSM                         GSM_CHARACTER_SET_SIZE
#define EXTENDED_ALPHABET_TABLE         0x1B
#define SPACE 							0x20
#define GSM_GREEK_CAPITAL_LETTER_DELTA  0x10

const char GsmToUcs2[GSM_CHARACTER_SET_SIZE] =
{         /*+0x0        +0x1        +0x2        +0x3        +0x4        +0x5        +0x6        +0x7*/
/*0x00*/    0x40,       0xa3,       0x24,       0xa5,       0xe8,       0xe9,       0xf9,       0xec,
/*0x07*/    0xf2,       0xc7,       0x0a,       0xd8,       0xf8,       0x0d,       0xc5,       0xe5,
/*0x10*/    0,          0x5f,       0,          0,          0,          0,          0,          0,
/*0x18*/    0,          0,          0,          0x20,       0xc6,       0xe6,       0xdf,       0xc9,
/*0x20*/    0x20,       0x21,       0x22,       0x23,       0xA4,       0x25,       0x26,       0x27,
/*0x28*/    0x28,       0x29,       0x2a,       0x2b,       0x2c,       0x2d,       0x2e,       0x2f,
/*0x30*/    0x30,       0x31,       0x32,       0x33,       0x34,       0x35,       0x36,       0x37,
/*0x37*/    0x38,       0x39,       0x3a,       0x3b,       0x3c,       0x3d,       0x3e,       0x3f,
/*0x40*/    0xa1,       0x41,       0x42,       0x43,       0x44,       0x45,       0x46,       0x47,
/*0x48*/    0x48,       0x49,       0x4a,       0x4b,       0x4c,       0x4d,       0x4e,       0x4f,
/*0x50*/    0x50,       0x51,       0x52,       0x53,       0x54,       0x55,       0x56,       0x57,
/*0x58*/    0x58,       0x59,       0x5a,       0xc4,       0xd6,       0xd1,       0xdc,       0xa7,
/*0x60*/    0xbf,       0x61,       0x62,       0x63,       0x64,       0x65,       0x66,       0x67,
/*0x68*/    0x68,       0x69,       0x6a,       0x6b,       0x6c,       0x6d,       0x6e,       0x6f,
/*0x70*/    0x70,       0x71,       0x72,       0x73,       0x74,       0x75,       0x76,       0x77,
/*0x78*/    0x78,       0x79,       0x7a,       0xe4,       0xf6,       0xf1,       0xfc,       0xe0
};

const short GsmGclToUcs2[] =
{/*  Delta      --     Phi   Gamma   Lamda   Omega */
    0x0394, 0x0000, 0x03A6, 0x0393, 0x039b, 0x03a9,
/*      Pi     Psi   Sigma   Theta      Xi*/
	0x03a0, 0x03a8, 0x03a3, 0x0398, 0x039e
};

const short ExtendedGsmToUcs2[GSM_CHARACTER_SET_SIZE] =
{         /*+0x0        +0x1        +0x2        +0x3        +0x4        +0x5        +0x6        +0x7*/
/*0x00*/    0,          0,           0,         0,          0 ,         0,          0,          0,        /* . . . . . . . . */
/*0x07*/    0,          0,           0,         0,          0,          0,          0,          0,        /* . . . . . . . . */
/*0x10*/    0,          0,           0,         0,          0x005E,     0,          0,          0,        /* . . . . ^ . . . */
/*0x18*/    0,          0,           0,         0x0020,     0,          0,          0,          0,        /* . . .   . . . . */
/*0x20*/    0,          0,           0,         0,          0,          0,          0,          0,        /* . . . . . . . . */
/*0x28*/    0x007B,     0x007D,      0,         0,          0,          0,          0,          0x005C,   /* { } . . . . . \ */
/*0x30*/    0,          0,           0,         0,          0,          0,          0,          0,        /* . . . . . . . . */
/*0x38*/    0,          0,           0,         0,          0x005B,     0x007E,     0x005D,     0,        /* . . . . [ ~ ] . */
/*0x40*/    0x007C,     0,           0,         0,          0,          0,          0,          0,        /* | . . . . . . . */
/*0x48*/    0,          0,           0,         0,          0,          0,          0,          0,        /* . . . . . . . . */
/*0x50*/    0,          0,           0,         0,          0,          0,          0,          0,        /* . . . . . . . . */
/*0x58*/    0,          0,           0,         0,          0,          0,          0,          0,        /* . . . . . . . . */
/*0x60*/    0,          0,           0,         0,          0,          0x20AC,     0,          0,        /* . . . . . 

⌨️ 快捷键说明

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