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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cpl_conv.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁 / 共 5 頁
字號:

/**
 * Scan up to a maximum number of characters from a string and convert
 * the result to a unsigned long.
 *
 * @param pszString String containing characters to be scanned. It may be
 * terminated with a null character.
 *
 * @param nMaxLength The maximum number of character to consider as part
 * of the number. Less characters will be considered if a null character
 * is encountered.
 * 
 * @return Unsigned long value, converted from its ASCII form.
 */

unsigned long CPLScanULong( const char *pszString, int nMaxLength )
{
    unsigned long    uValue;
    char    *pszValue = (char *)CPLMalloc( nMaxLength + 1);

/* -------------------------------------------------------------------- */
/*      Compute string into local buffer, and terminate it.             */
/* -------------------------------------------------------------------- */
    strncpy( pszValue, pszString, nMaxLength );
    pszValue[nMaxLength] = '\0';

/* -------------------------------------------------------------------- */
/*      Use strtoul() to fetch out the result                           */
/* -------------------------------------------------------------------- */
    uValue = strtoul( pszValue, NULL, 10 );

    CPLFree( pszValue );
    return uValue;
}

/************************************************************************/
/*                           CPLScanUIntBig()                           */
/************************************************************************/

/**
 * Extract big integer from string.
 *
 * Scan up to a maximum number of characters from a string and convert
 * the result to a GUIntBig. 
 *
 * @param pszString String containing characters to be scanned. It may be
 * terminated with a null character.
 *
 * @param nMaxLength The maximum number of character to consider as part
 * of the number. Less characters will be considered if a null character
 * is encountered.
 * 
 * @return GUIntBig value, converted from its ASCII form.
 */

GUIntBig CPLScanUIntBig( const char *pszString, int nMaxLength )
{
    GUIntBig    iValue;
    char        *pszValue = (char *)CPLMalloc( nMaxLength + 1);

/* -------------------------------------------------------------------- */
/*      Compute string into local buffer, and terminate it.             */
/* -------------------------------------------------------------------- */
    strncpy( pszValue, pszString, nMaxLength );
    pszValue[nMaxLength] = '\0';

/* -------------------------------------------------------------------- */
/*      Fetch out the result                                            */
/* -------------------------------------------------------------------- */
#if defined(WIN32) && defined(_MSC_VER)
    iValue = (GUIntBig)_atoi64( pszValue );
# elif HAVE_ATOLL
    iValue = atoll( pszValue );
#else
    iValue = atol( pszValue );
#endif

    CPLFree( pszValue );
    return iValue;
}

/************************************************************************/
/*                           CPLScanPointer()                           */
/************************************************************************/

/**
 * Extract pointer from string.
 *
 * Scan up to a maximum number of characters from a string and convert
 * the result to a pointer. 
 *
 * @param pszString String containing characters to be scanned. It may be
 * terminated with a null character.
 *
 * @param nMaxLength The maximum number of character to consider as part
 * of the number. Less characters will be considered if a null character
 * is encountered.
 * 
 * @return pointer value, converted from its ASCII form.
 */

void *CPLScanPointer( const char *pszString, int nMaxLength )
{
    void  *pResult;
    char  szTemp[128];

/* -------------------------------------------------------------------- */
/*      Compute string into local buffer, and terminate it.             */
/* -------------------------------------------------------------------- */
    if( nMaxLength > (int) sizeof(szTemp)-1 )
        nMaxLength = sizeof(szTemp)-1;

    strncpy( szTemp, pszString, nMaxLength );
    szTemp[nMaxLength] = '\0';

/* -------------------------------------------------------------------- */
/*      On MSVC we have to scanf pointer values without the 0x          */
/*      prefix.                                                         */
/* -------------------------------------------------------------------- */
    if( EQUALN(szTemp,"0x",2) )
    {
        pResult = NULL;

#if defined(WIN32) && defined(_MSC_VER)
        sscanf( szTemp+2, "%p", &pResult );
#else
        sscanf( szTemp, "%p", &pResult );
#endif
    }
    
    else
    {
#if SIZEOF_VOIDP == 8
        pResult = (void *) CPLScanUIntBig( szTemp, nMaxLength );
#else
        pResult = (void *) CPLScanULong( szTemp, nMaxLength );
#endif
    }

    return pResult;
}

/************************************************************************/
/*                             CPLScanDouble()                          */
/************************************************************************/

/**
 * Scan up to a maximum number of characters from a string and convert
 * the result to a double.
 *
 * @param pszString String containing characters to be scanned. It may be
 * terminated with a null character.
 *
 * @param nMaxLength The maximum number of character to consider as part
 * of the number. Less characters will be considered if a null character
 * is encountered.
 * 
 * @param pszLocale Pointer to a character string containing locale name
 * ("C", "POSIX", "us_US", "ru_RU.KOI8-R" etc.). If NULL, we will not
 * manipulate with locale settings and current process locale will be used for
 * printing. Wee need this setting because in different locales decimal
 * delimiter represented with the different characters. With the pszLocale
 * option we can control what exact locale will be used for scanning a numeric
 * value from the string (in most cases it should be C/POSIX).
 *
 * @return Double value, converted from its ASCII form.
 */

double CPLScanDouble( const char *pszString, int nMaxLength, char *pszLocale )
{
    int     i;
    double  dfValue;
    char    *pszValue = (char *)CPLMalloc( nMaxLength + 1);

/* -------------------------------------------------------------------- */
/*      Compute string into local buffer, and terminate it.             */
/* -------------------------------------------------------------------- */
    strncpy( pszValue, pszString, nMaxLength );
    pszValue[nMaxLength] = '\0';

/* -------------------------------------------------------------------- */
/*      Make a pass through converting 'D's to 'E's.                    */
/* -------------------------------------------------------------------- */
    for( i = 0; i < nMaxLength; i++ )
        if ( pszValue[i] == 'd' || pszValue[i] == 'D' )
            pszValue[i] = 'E';

/* -------------------------------------------------------------------- */
/*      Use atof() to fetch out the result                              */
/* -------------------------------------------------------------------- */
#if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE)
    char        *pszCurLocale = NULL;

    if ( pszLocale || EQUAL( pszLocale, "" ) )
    {
        // Save the current locale
        pszCurLocale = setlocale(LC_ALL, NULL );
        // Set locale to the specified value
        setlocale(LC_ALL, pszLocale );
    }
#endif

    dfValue = atof( pszValue );

#if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE)
    // Restore stored locale back
    if ( pszCurLocale )
        setlocale(LC_ALL, pszCurLocale );
#endif

    CPLFree( pszValue );
    return dfValue;
}

/************************************************************************/
/*                      CPLPrintString()                                */
/************************************************************************/

/**
 * Copy the string pointed to by pszSrc, NOT including the terminating
 * `\0' character, to the array pointed to by pszDest.
 *
 * @param pszDest Pointer to the destination string buffer. Should be
 * large enough to hold the resulting string.
 *
 * @param pszDest Pointer to the source buffer.
 * 
 * @param nMaxLen Maximum length of the resulting string. If string length
 * is greater than nMaxLen, it will be truncated.
 * 
 * @return Number of characters printed.
 */

int CPLPrintString( char *pszDest, const char *pszSrc, int nMaxLen )
{
    char    *pszTemp = pszDest;
    int     nChars = 0;

    if ( !pszDest )
        return 0;

    if ( !pszSrc )
    {
        *pszDest = '\0';
        return 1;
    }

    while ( nChars < nMaxLen && *pszSrc )
    {
        *pszTemp++ = *pszSrc++;
        nChars++;
    }

    return nChars;
}

/************************************************************************/
/*                         CPLPrintStringFill()                         */
/************************************************************************/

/**
 * Copy the string pointed to by pszSrc, NOT including the terminating
 * `\0' character, to the array pointed to by pszDest. Remainder of the
 * destination string will be filled with space characters. This is only
 * difference from the PrintString().
 *
 * @param pszDest Pointer to the destination string buffer. Should be
 * large enough to hold the resulting string.
 *
 * @param pszDest Pointer to the source buffer.
 * 
 * @param nMaxLen Maximum length of the resulting string. If string length
 * is greater than nMaxLen, it will be truncated.
 * 
 * @return Number of characters printed.
 */

int CPLPrintStringFill( char *pszDest, const char *pszSrc, int nMaxLen )
{
    char    *pszTemp = pszDest;

    if ( !pszDest )
        return 0;

    if ( !pszSrc )
    {
        memset( pszDest, ' ', nMaxLen );
        return nMaxLen;
    }

    while ( nMaxLen && *pszSrc )
    {
        *pszTemp++ = *pszSrc++;
        nMaxLen--;
    }

    if ( nMaxLen )
        memset( pszTemp, ' ', nMaxLen );

    return nMaxLen;
}

/************************************************************************/
/*                          CPLPrintInt32()                             */
/************************************************************************/

/**
 * Print GInt32 value into specified string buffer. This string will not
 * be NULL-terminated.
 *
 * @param Pointer to the destination string buffer. Should be
 * large enough to hold the resulting string. Note, that the string will
 * not be NULL-terminated, so user should do this himself, if needed.
 *
 * @param iValue Numerical value to print.
 * 
 * @param nMaxLen Maximum length of the resulting string. If string length
 * is greater than nMaxLen, it will be truncated.
 * 
 * @return Number of characters printed.
 */

int CPLPrintInt32( char *pszBuffer, GInt32 iValue, int nMaxLen )
{
    char    szTemp[64];

    if ( !pszBuffer )
        return 0;

    if ( nMaxLen >= 64 )
        nMaxLen = 63;

#if UINT_MAX == 65535
    sprintf( szTemp, "%*ld", nMaxLen, iValue );
#else
    sprintf( szTemp, "%*d", nMaxLen, iValue );
#endif

    return CPLPrintString( pszBuffer, szTemp, nMaxLen );
}

/************************************************************************/
/*                          CPLPrintUIntBig()                           */
/************************************************************************/

/**
 * Print GUIntBig value into specified string buffer. This string will not
 * be NULL-terminated.
 *
 * @param Pointer to the destination string buffer. Should be
 * large enough to hold the resulting string. Note, that the string will
 * not be NULL-terminated, so user should do this himself, if needed.
 *
 * @param iValue Numerical value to print.
 * 
 * @param nMaxLen Maximum length of the resulting string. If string length
 * is greater than nMaxLen, it will be truncated.
 * 
 * @return Number of characters printed.
 */

int CPLPrintUIntBig( char *pszBuffer, GUIntBig iValue, int nMaxLen )
{
    char    szTemp[64];

    if ( !pszBuffer )
        return 0;

    if ( nMaxLen >= 64 )
        nMaxLen = 63;

#if defined(WIN32) && defined(_MSC_VER)
    sprintf( szTemp, "%*I64d", nMaxLen, iValue );
# elif HAVE_LONG_LONG
    sprintf( szTemp, "%*lld", nMaxLen, (long long) iValue );
//    sprintf( szTemp, "%*Ld", nMaxLen, (long long) iValue );
#else
    sprintf( szTemp, "%*ld", nMaxLen, iValue );

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一二三级电影| 国产在线播精品第三| 欧美电影免费观看高清完整版| 国产一区二区三区四区五区美女| 亚洲欧美日韩一区二区三区在线观看| 日韩免费在线观看| 91福利社在线观看| 波多野洁衣一区| 激情综合色播五月| 亚洲成av人影院| 国产精品护士白丝一区av| 日韩欧美一二三区| 在线视频亚洲一区| 99国产精品国产精品毛片| 黑人精品欧美一区二区蜜桃| 午夜欧美在线一二页| 亚洲欧美视频一区| 日韩美女视频一区二区| 久久精品视频在线免费观看| 欧美一区二区三区视频免费播放| 色先锋aa成人| 97超碰欧美中文字幕| 高清在线成人网| 国产精品一区在线观看乱码| 日韩二区三区四区| 亚洲第一成人在线| 亚洲一卡二卡三卡四卡无卡久久| 国产精品系列在线| 亚洲国产经典视频| 久久久99精品久久| 久久久久久9999| 2020国产精品久久精品美国| 欧美一级免费观看| 欧美一级片免费看| 日韩免费一区二区三区在线播放| 欧美日产在线观看| 欧美福利电影网| 欧美精品丝袜中出| 777亚洲妇女| 欧美一区日本一区韩国一区| 69堂精品视频| 欧美电视剧在线看免费| 精品国产免费一区二区三区四区| 欧美成人女星排名| 久久久精品天堂| 中文字幕欧美国产| 亚洲免费观看高清在线观看| 一区二区三区精品在线| 亚洲第一搞黄网站| 蜜臀av性久久久久蜜臀aⅴ流畅| 免费日本视频一区| 国内精品视频666| 粉嫩嫩av羞羞动漫久久久| 成人激情小说网站| 色8久久精品久久久久久蜜| 欧美制服丝袜第一页| 7777精品久久久大香线蕉| 精品日韩成人av| 欧美国产日本韩| 亚洲午夜视频在线观看| 日本中文字幕一区二区视频| 久久精品国产秦先生| 国产成人夜色高潮福利影视| www.欧美日韩| 91精品国产色综合久久| 久久午夜羞羞影院免费观看| 国产精品免费免费| 亚洲国产精品久久久男人的天堂| 欧美aⅴ一区二区三区视频| 国产一区啦啦啦在线观看| 99久久免费视频.com| 欧美精品一卡二卡| 中文字幕精品在线不卡| 亚洲福利一二三区| 国产成人欧美日韩在线电影| 在线观看国产日韩| 2019国产精品| 亚洲成人中文在线| 国产福利不卡视频| 欧美视频一区二区三区| 久久免费午夜影院| 亚洲韩国精品一区| 国产精品小仙女| 欧美日韩不卡一区| 欧美高清在线视频| 美腿丝袜在线亚洲一区| 99精品视频中文字幕| 日韩一区二区三区电影在线观看 | 色呦呦国产精品| 91精品国产福利| 中文字幕在线一区二区三区| 日本va欧美va欧美va精品| 成人国产电影网| 精品国产乱码久久久久久1区2区 | 日韩亚洲电影在线| 亚洲少妇最新在线视频| 六月婷婷色综合| 欧美图片一区二区三区| 国产欧美日韩精品在线| 男女激情视频一区| 欧美性猛片xxxx免费看久爱| 日本一区二区三区四区在线视频| 天天色 色综合| 91麻豆高清视频| 欧美激情一区二区三区不卡| 人人精品人人爱| 欧美唯美清纯偷拍| 亚洲欧美日韩小说| 成人激情动漫在线观看| 精品日韩一区二区三区 | 国产精品一区久久久久| 欧美高清激情brazzers| 一区二区三区国产精品| 白白色 亚洲乱淫| 久久精品日产第一区二区三区高清版| 日韩在线观看一区二区| 欧美视频三区在线播放| 亚洲欧美激情视频在线观看一区二区三区| 国产一区二区在线看| 欧美一级xxx| 日韩成人免费看| 欧美日韩一区精品| 一区二区三区在线观看动漫| 99精品久久免费看蜜臀剧情介绍| 日本一区二区三区在线不卡| 国产精品自拍毛片| 久久午夜羞羞影院免费观看| 国产综合色视频| 久久亚洲私人国产精品va媚药| 美女视频第一区二区三区免费观看网站 | 国产精品另类一区| 懂色av一区二区在线播放| 久久精品这里都是精品| 国产精一品亚洲二区在线视频| 久久久亚洲午夜电影| 国产美女在线观看一区| 久久免费看少妇高潮| 国产一区欧美二区| 欧美国产一区视频在线观看| 成人美女在线视频| 中文字幕一区二区三区视频| av中文一区二区三区| 18成人在线观看| 91福利在线看| 日本亚洲免费观看| 欧美www视频| 国产一区二区美女诱惑| 久久久国产精品午夜一区ai换脸| 成人听书哪个软件好| 中文字幕亚洲一区二区av在线 | 精品一区二区三区香蕉蜜桃| 久久午夜色播影院免费高清| 成人99免费视频| 亚洲成a人片在线不卡一二三区 | 欧美日韩国产一区二区三区地区| 婷婷国产在线综合| 精品少妇一区二区三区在线视频| 国产一区二区电影| 亚洲欧美日韩中文字幕一区二区三区 | 色综合视频一区二区三区高清| 亚洲图片欧美色图| 欧美tickling挠脚心丨vk| 成人午夜电影小说| 亚洲高清免费视频| 亚洲精品一区二区三区福利 | 欧美日韩国产不卡| 久久99久久久久| 国产精品色噜噜| 欧美日韩中文字幕精品| 国产毛片一区二区| 亚洲精品一二三四区| 日韩欧美美女一区二区三区| 成人午夜在线视频| 亚洲福利视频一区| 日本一区二区视频在线| 欧美日韩久久久久久| 国产剧情在线观看一区二区| 亚洲精品视频在线| 精品国产乱码久久久久久影片| 97se亚洲国产综合自在线不卡| 日韩精品久久理论片| 国产午夜亚洲精品午夜鲁丝片| 在线视频中文字幕一区二区| 国产寡妇亲子伦一区二区| 一区二区三区四区国产精品| 精品电影一区二区三区| 欧美影片第一页| 国产成人免费网站| 日韩激情视频网站| 亚洲国产电影在线观看| 7777精品伊人久久久大香线蕉的| av在线免费不卡| 国产一区二区三区日韩| 五月综合激情网| 亚洲欧洲国产专区| 2021中文字幕一区亚洲| 欧美嫩在线观看| 91黄色免费观看| 成人激情免费网站| 国产乱国产乱300精品|