亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? bbf_utils.h

?? 這是法國Kaleido公司提供了一個手機mmi設計平臺
?? H
字號:
/*
 * Created on 07 jul 2005
 *
 * @author DigitalAirways (c) 2005-2006
 * 
 * This software is the confidential and proprietary information of
 * DigitalAirways, sarl. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with DigitalAirways.
 * A copy of this license is included in the licence.txt file included
 * in this software package.
 *
 *
 */

#ifndef __BBF_FONT_DEFINE__H
#define __BBF_FONT_DEFINE__H

#include "KR_KRuntime.h"
#include "EB_CharCodes.h"

/* the font file must start with this number*/
#define CURRENT_FONT_VERSION 14

/* the max idx of a bit in a byte */
#define CHAR_MAX_INDEX 7

/* the max number of characters in a font page */
#define MAX_PAGE_SIZE 255

/* the max value for the glyph width,height */
#define MAX_CHAR_SIZE 63

/* the max value for the glyph xOff,yOff */
#define MAX_CHAR_XY_OFFSET 31

#define CHAR_NOT_FOUND_SIZE 7
		
/* These methods are used by both the kompress tool and the target engine to
 * acess bits
 */
inline unsigned char getMask(unsigned char i);
inline unsigned char getMultiBitsMask(unsigned char number);
inline unsigned char getCurrentBitInCurrentByte(unsigned char theByte, unsigned int count);
inline unsigned char putBitInCurrentBuffer(unsigned char** buffer, unsigned int* count);
inline unsigned char getCurrentBitInCurrentBuffer(unsigned char**  buffer, unsigned int* count);
inline unsigned int getCharacterCode (unsigned char** buffer);
inline unsigned char  getBitsAsByteInCurrentBuffer(unsigned char**  buffer, unsigned int* count, unsigned int numberOfBitNeeded);
inline unsigned char jumpInBuffer(unsigned char**  buffer, unsigned int* count, unsigned int numberOfBits);

/* get a hash (ID) from a string*/
inline int hashString(char* string);

/* sort method using the bubble sort algorithm */
inline int bubbleSort(unsigned int* tab, unsigned int elementNumber) ; 
/* sort method using the quickSort algorithm */
inline void quickSort(unsigned int* t, int beg, int end);


/* get the mask to get the bit of idx i in a byte*/
inline  unsigned char getMask(unsigned char i)
{
	switch (i) 
	{
		case 0 : 
			return 0x80;
		case 1: 
			return 0x40;
		case 2: 
			return 0x20;
		case 3: 
			return 0x10;
		case 4: 
			return 0x08;
		case 5: 
			return 0x04;
		case 6: 
			return 0x02;
		case 7: 
			return 0x01;
	}
	return 0;
}



/* get the mask to get the bit of idx i in a byte*/
inline  unsigned char getMultiBitsMask(unsigned char number)
{
	switch (number) 
	{
		case 1: 
			return	0x80;
		case 2: 
			return	0xC0;
		case 3: 
			return	0xE0;
		case 4: 
			return	0xF0;
		case 5: 
			return	0xF8;
		case 6: 
			return	0xFC;
		case 7: 
			return	0xFE;
		case 8: 
			return	0xFF;
	}
	return 0;
}



/* get the bit at index count in the byte 
 * return value is 0x0001 or 0x0000 */
inline unsigned char getCurrentBitInCurrentByte(unsigned char theByte, unsigned int count)
{
	return  (((theByte) & getMask(count)) >> (CHAR_MAX_INDEX-count)); 
}
		


/* put a bit in a char* buffer BUFFER is supposed to be memseted with 0
 * the char* can be ++'d */
inline unsigned char putBitInCurrentBuffer(unsigned char**  buffer, unsigned int* count, unsigned char bit)
{
	unsigned char* offset=*buffer;
	*offset=  (*offset | (bit <<(CHAR_MAX_INDEX-*count)));
	if (*count==CHAR_MAX_INDEX) 
	{ 
		*count=0;
		(*buffer)++;
	}
	else
	 (*count)++;
	return TRUE;	
}


	
/* return the next 8 bits in the currentBuffer */
inline unsigned char getCurrentByteInCurrentBuffer(unsigned char**  buffer, unsigned int* count)
{
	return getBitsAsByteInCurrentBuffer(buffer, count, 8); 
}
	

	
/* get the bit at idx count in the char* buffer.
 * the char* and the bitcount can be ++'d */
inline unsigned char  getCurrentBitInCurrentBuffer(unsigned char**  buffer, unsigned int* count)
{
	unsigned char tmp= getCurrentBitInCurrentByte((*(*buffer)), *count);
	if (*count>=CHAR_MAX_INDEX) 
	{
		*count=0;
		(*buffer)++;
	}
	 else
	 	(*count)++;
	 return tmp;		
}


/* get the bit at idx count in the char* buffer.
 * the char* and the bitcount can be ++'d */
inline void  getCurrentBitInCurrentBuffer(unsigned char**  buffer, unsigned int* count, unsigned char* bitValue)
{
	*bitValue = getCurrentBitInCurrentByte((*(*buffer)), *count);
	if (*count>=CHAR_MAX_INDEX) 
	{
		*count=0;
		(*buffer)++;
	}
	 else
	 	(*count)++;
}


	
/* NUMBER OF BIT NEEDED SHOULD BE <9 and > 0 . NUMBER OF BIT NEEDED IS NOT CHECKED !!! */
inline unsigned char  getBitsAsByteInCurrentBuffer(unsigned char**  buffer, unsigned int* count, unsigned int numberOfBitNeeded)
{
	unsigned char returnValue= 0;
	unsigned char numberOfBitLeftInCurrentByte= 8 - *count;

	if (numberOfBitNeeded >numberOfBitLeftInCurrentByte) 
	{
		/* first, get the bits in current byte */
		returnValue =  ((((unsigned char)(*(*buffer)))<<*count) & getMultiBitsMask(numberOfBitLeftInCurrentByte)) >> (8-numberOfBitNeeded);
		/* now that we have each bits in the current byte, go to the next byte */
		*count=0;
		(*buffer)++;
		/* get the bits in the second byte */
		numberOfBitLeftInCurrentByte = numberOfBitNeeded - numberOfBitLeftInCurrentByte; // get the number of bits left 
		returnValue |= (((unsigned char)(*(*buffer)) & getMultiBitsMask(numberOfBitLeftInCurrentByte)) >> (8 - numberOfBitLeftInCurrentByte)) ;	
		 /* reassign the new count */
		*count = numberOfBitLeftInCurrentByte ; 
	}
	else /* easier way : just get the bits in the current byte */
	{	
		returnValue = ((((unsigned char)(*(*buffer)))<<*count) &getMultiBitsMask(numberOfBitNeeded)) >> (8 - numberOfBitNeeded);
		*count = *count + numberOfBitNeeded;
	}

	if (*count>CHAR_MAX_INDEX) 
	{
		*count=0;
		(*buffer)++;
	}
	return returnValue;		
}


/* NUMBER OF BIT NEEDED SHOULD BE <9 and > 0 . NUMBER OF BIT NEEDED IS NOT CHECKED !!! 
	BEWARE !!! BYTE ORDER MANAGEMENT NOT TESTED YET 
*/
inline unsigned int getBitsAsIntInCurrentBuffer(unsigned char**  buffer, unsigned int* count, unsigned int numberOfBitNeeded)
{
	unsigned int returnValue= 0;
	signed char nbBytesNeeded=(signed char)((unsigned char)(numberOfBitNeeded>>3)) ; 
	unsigned char remainingBits = numberOfBitNeeded & 0x00000007;
#if defined (__BYTE_ORDER) &&  ( __BYTE_ORDER == __BIG_ENDIAN )
	
		int i=0;
	for ( i = 0 ; i< nbBytesNeeded; i++)
		returnValue |= (getBitsAsByteInCurrentBuffer(buffer, count, 8)) << ((i<<3)+remainingBits);

	if (remainingBits)
		returnValue |= ((unsigned int) getBitsAsByteInCurrentBuffer(buffer, count, remainingBits));
	
#else 
	for ( nbBytesNeeded=nbBytesNeeded-1; nbBytesNeeded >= 0; nbBytesNeeded--)
		returnValue |= (getBitsAsByteInCurrentBuffer(buffer, count, 8)) << ((nbBytesNeeded<<3)+remainingBits);

	if (remainingBits)
		returnValue |=getBitsAsByteInCurrentBuffer(buffer, count, remainingBits);

#endif 
	return returnValue;
}



inline unsigned char jumpInBuffer(unsigned char**  buffer, unsigned int* count, unsigned int numberOfBits)
{			
	numberOfBits+=*count;
	*buffer+=(numberOfBits>>3);
	*count=numberOfBits & 0x00000007;	
	return TRUE;
}



/* manage only 0xFFFF characters 
 *
 * This method is supposed to return a Unicode (16bits) char from
 *. the current string.
 */
inline unsigned int getCharacterCode (unsigned char** buffer)
{
	unsigned int characterBuffer=0;
	characterBuffer = getUTF16fromUTF8(buffer, strictConversion);
	if (!characterBuffer) // cause if the char is not a valid UTF8 the buffer is NOT ++'d
		(*buffer) ++ ; 
	return characterBuffer;
}



inline int quickSortStep(unsigned int* t, int min, int max) 
{
	unsigned int temp = t[max];
    while(max > min) 
	{
         while(max > min && t[min] <= temp) 
			min++;
         if(max > min) 
		 {
            t[max--] = t[min];
            while(max > min && t[max] >= temp) 
				max--;
            if(max > min) 
                t[min++] = t[max];
        }
   }
   t[max] = temp;
   return max;
}



inline void quickSort(unsigned int* t, int beg, int end) 
{
	unsigned int mil;
    if(beg < end) 
	{
		mil = quickSortStep(t,beg,end);
        if(mil - beg > end - mil) 
		{
			quickSort(t,mil+1,end);
            quickSort(t,beg,mil-1);
        }
        else 
		{
            quickSort(t,beg,mil-1);
            quickSort(t,mil+1,end);
        }
    }
}





inline int bubbleSort(unsigned int* tab, unsigned int elementNumber) 
{	
	unsigned int i, k; 
    unsigned int tmp; 
   for (i= elementNumber-1; i>0;  i--) 
     for (k=0 ; k < i; k++ ) 
         if (tab[k] > tab[k+1]) 
		 {
            tmp = tab[k]; 
            tab[k] = tab[k+1]; 
            tab[k+1] = tmp; 
         }
		return 0;
}


inline int hashString(char* string)
{
	int rslt = 147;
	if(!string || !*string)
		return 0;
	while(*string)
	{
		rslt = ((rslt ^ *string) << 8) | ((rslt & 0xff000000)>>24) ;
		string++;
	}
	return rslt ;
}



#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品色在线观看| 色诱亚洲精品久久久久久| 日韩女优毛片在线| 麻豆精品新av中文字幕| 欧美电影免费提供在线观看| 国产真实乱子伦精品视频| xfplay精品久久| 成人精品免费网站| 亚洲三级小视频| 欧美日韩成人在线| 精品一区二区三区在线视频| 26uuu成人网一区二区三区| 99国内精品久久| 成人免费在线观看入口| 91农村精品一区二区在线| 一区二区三区四区不卡在线| 欧洲一区在线观看| 日韩电影在线观看一区| 久久综合色婷婷| 99久久伊人精品| 午夜电影一区二区三区| 久久久99免费| 91黄色免费版| 久久精品理论片| 亚洲图片你懂的| 精品美女一区二区三区| 成人av电影在线网| 日本少妇一区二区| 国产精品女主播av| 91精品国产综合久久久蜜臀粉嫩 | 椎名由奈av一区二区三区| 欧美三级乱人伦电影| 国产麻豆精品视频| 一区二区三区四区中文字幕| 精品毛片乱码1区2区3区| www.亚洲人| 久久99精品久久久久久国产越南 | 91日韩一区二区三区| 日本91福利区| 亚洲精品久久久久久国产精华液| 欧美一区二区三区四区久久| 99国产精品一区| 韩国精品一区二区| 午夜伦欧美伦电影理论片| 亚洲国产成人私人影院tom| 91麻豆精品国产自产在线| 91偷拍与自偷拍精品| 国产精品中文字幕日韩精品| 午夜不卡在线视频| 国产精品久久久久aaaa樱花 | 国产女人18水真多18精品一级做| 欧美三区在线观看| 91蜜桃网址入口| 国产福利一区在线| 麻豆91在线播放免费| 午夜伦理一区二区| 一区二区日韩av| 综合av第一页| 亚洲私人黄色宅男| 中文字幕av一区二区三区高 | 精品国产一区二区三区av性色| 色噜噜狠狠色综合欧洲selulu| 国产成人综合在线| 激情深爱一区二区| 蜜桃视频第一区免费观看| 污片在线观看一区二区| 亚洲一区二区三区三| ...av二区三区久久精品| 中日韩免费视频中文字幕| 久久久久久一二三区| 精品伦理精品一区| 久久婷婷综合激情| 久久久久久久久久久久久女国产乱 | 日韩一区二区三区电影 | www.日韩在线| 波多野结衣在线aⅴ中文字幕不卡| 国产一区二区三区四区五区美女| 精品一区二区在线观看| 国产精品一品视频| 国产成人一级电影| 成人h动漫精品一区二区| 成人av中文字幕| 97精品久久久午夜一区二区三区 | 欧美在线你懂的| 欧美日韩一区小说| 欧美一区二区女人| 日韩欧美高清dvd碟片| 精品国产一区二区三区忘忧草| 26uuu成人网一区二区三区| 久久久久国产免费免费| 亚洲欧洲日产国码二区| 综合激情网...| 五月激情丁香一区二区三区| 久久精品国产精品亚洲精品| 国产毛片精品一区| av成人老司机| 欧美日韩午夜在线| 欧美成人a在线| 18欧美乱大交hd1984| 亚洲综合在线视频| 蜜臀av一区二区在线免费观看| 精品亚洲成a人| 成人黄色一级视频| 欧美色男人天堂| 精品国产成人系列| 国产精品久久网站| 午夜电影网一区| 成人午夜av影视| 欧美色图激情小说| 日韩视频在线你懂得| 国产精品色哟哟网站| 亚洲精品美腿丝袜| 久久国产免费看| 91在线porny国产在线看| 欧美一区二区三区四区在线观看 | 欧美在线观看视频一区二区| 日韩免费成人网| 亚洲欧美日韩精品久久久久| 日本美女一区二区| 成人夜色视频网站在线观看| 欧美视频在线观看一区二区| 久久久噜噜噜久噜久久综合| 午夜激情一区二区三区| 成人开心网精品视频| 欧美一二三四区在线| 亚洲国产精品尤物yw在线观看| 国产一区二区三区电影在线观看| 91丨porny丨蝌蚪视频| 精品日韩欧美一区二区| 一区二区三区自拍| 成人网页在线观看| 欧美丝袜丝交足nylons| 国产精品福利一区| 久久69国产一区二区蜜臀 | 欧美日韩高清影院| 亚洲欧洲国产专区| 国产自产2019最新不卡| 欧美日韩另类一区| 亚洲欧美成aⅴ人在线观看| 国内精品伊人久久久久av一坑| 日本精品一区二区三区高清| 国产日韩高清在线| 久久se精品一区精品二区| 欧美亚洲自拍偷拍| 亚洲欧美影音先锋| 国产九九视频一区二区三区| 8v天堂国产在线一区二区| 亚洲最大成人网4388xx| 99久久精品国产网站| 国产视频视频一区| 精品系列免费在线观看| 欧美精品123区| 五月激情丁香一区二区三区| 在线观看视频91| 亚洲精品日韩专区silk| eeuss影院一区二区三区| 久久精品视频在线看| 极品销魂美女一区二区三区| 91精品国产色综合久久久蜜香臀| 一区二区不卡在线播放| 色噜噜狠狠色综合中国| 樱桃视频在线观看一区| 91影院在线免费观看| 一区精品在线播放| 成人一区二区三区视频| 国产欧美日韩激情| 成人午夜精品在线| 国产精品美女一区二区三区| 国产成人欧美日韩在线电影| 久久久夜色精品亚洲| 国产91丝袜在线播放| 国产欧美日韩精品一区| 国产69精品一区二区亚洲孕妇 | 日韩精品中文字幕一区| 免费人成精品欧美精品| 欧美大肚乱孕交hd孕妇| 麻豆国产精品官网| 久久你懂得1024| 国产黄人亚洲片| 欧美国产精品专区| 91在线高清观看| 亚洲国产另类av| 91精品国产一区二区三区蜜臀 | 亚洲三级在线看| 欧美伊人久久大香线蕉综合69 | 高清shemale亚洲人妖| 国产性色一区二区| jlzzjlzz亚洲日本少妇| 樱花影视一区二区| 欧美日韩精品二区第二页| 日韩中文字幕1| www国产精品av| 国产不卡视频在线播放| 亚洲蜜臀av乱码久久精品| 91精品国产综合久久福利软件| 国产在线不卡一区| 自拍偷拍亚洲欧美日韩| 91精品视频网| 粉嫩一区二区三区性色av| 亚洲精品成人在线|