project_files/hwc/rtl/sysutils.c
changeset 10564 0cb20aa8877a
parent 10137 a4537aab4117
child 14913 68e1783762bc
equal deleted inserted replaced
10562:3388822b3914 10564:0cb20aa8877a
   129 {
   129 {
   130     s.str[s.len] = 0;
   130     s.str[s.len] = 0;
   131     return atoi(s.str);
   131     return atoi(s.str);
   132 }
   132 }
   133 
   133 
       
   134 string255 fpcrtl_extractFileDir(string255 f)
       
   135 {
       
   136     const char sep[] = {'\\', '/', ':'};
       
   137     LongInt i,j;
       
   138 
       
   139     i = f.len - 1;
       
   140     while(i >= 0){
       
   141         for(j = 0; j < sizeof(sep); j++){
       
   142             if(f.str[i] == sep[j]){
       
   143                 goto FPCRTL_EXTRACTFILEDIR_END;
       
   144             }
       
   145         }
       
   146         i--;
       
   147     }
       
   148 FPCRTL_EXTRACTFILEDIR_END:
       
   149     return fpcrtl_copy(f, 1, i);
       
   150 }
       
   151 
   134 //function ExtractFileName(const FileName: string): string;
   152 //function ExtractFileName(const FileName: string): string;
   135 //var
   153 //var
   136 //  i : longint;
   154 //  i : longint;
   137 //  EndSep : Set of Char;
   155 //  EndSep : Set of Char;
   138 //begin
   156 //begin