标题:来帮忙看下怎么改.
只看楼主
俺不懂
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-3-5
 问题点数:0 回复次数:2 
来帮忙看下怎么改.
UINT32 Register( char* file_uri,  char* param,  UINT32 reserve )
{
    UINT32 status = RESULT_OK;
   
   UINT8 *bufR;
   char bufVal[10];
   
   WCHAR* buf = suAllocMem( 100, NULL );
   FILE_HANDLE_T f;
   BOOL bValue = TRUE;
   UINT32 readen;
   UINT32 fSize,m=0;
   
   evcode_base = reserve;
   
    for (i=0; i < strlen(file_uri)-3; i++)
        {
            nameCfgFile[i] = file_uri[i];
        }
        
        strcat(nameCfgFile, "txt");
        
    u_atou(nameCfgFile, buf);
        
        if (DL_FsFFileExist(buf ) == TRUE ) //
        {
            PFprintf("*ELF* FileExist:%x\n",evcode_base);
            
            f = DL_FsOpenFile(buf, FILE_READ_MODE, 0);
            fSize = DL_FsGetFileSize(f);
            bufR = (UINT8*) suAllocMem( fSize, NULL );
            
            DL_FsReadFile( bufR,fSize, 1, f, &readen );
        
            
            for (j=0; j < fSize; j++)
            {
                
                if(bufR[j]==0x3b)
                    {
                        bValue=FALSE;
                         continue;
                    }
                    
                if(bValue==TRUE)
                {    
                bufVal[j]=bufR[j];
              }
                else
                {
                name[m]=bufR[j];
                m=m+1;
              }
                    
                    
            }
            
            PFprintf("*ELF* bufVal:%x\n",strtoul(bufVal,NULL,16));
            
            PFprintf("*ELF* name:%s\n",name);
            
            
            DL_FsCloseFile(f);
      suFreeMem(bufR);
        
        }


这一段只能读取配置文件一行内容.
如何改成可以读取两行?
搜索更多相关主题的帖子: uri reserve nameCfgFile char RESULT 
2008-03-05 19:17
xianshizhe111
Rank: 1
等 级:新手上路
帖 子:1451
专家分:0
注 册:2007-12-8
得分:0 
这是干什么的?俺也不懂!
2008-03-05 19:34
俺不懂
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-3-5
得分:0 
是手机用到的.
2008-03-05 19:35



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-202116-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.274057 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved