project_files/hwc/rtl/tests/main.c
branchwebgl
changeset 7983 02f36c3e7f6c
child 10015 4feced261c68
equal deleted inserted replaced
7981:aac257b77842 7983:02f36c3e7f6c
       
     1 
       
     2 //#include <stdio.h>
       
     3 //#include "fpcrtl.h"
       
     4 //#include "fileio.h"
       
     5 //
       
     6 //string255 t = STRINIT("test");
       
     7 //string255 Pathz[1] = {STRINIT(".")};
       
     8 ////int ptCurrTheme = 0;
       
     9 //string255 cThemeCFGFilename = STRINIT("theme.cfg");
       
    10 //const string255 __str79 = STRINIT("object");
       
    11 //string255 c1 = STRINIT("=");
       
    12 //string255 c2 = STRINIT("\x2c");
       
    13 //string255 c3 = STRINIT("\x2f");
       
    14 //
       
    15 //typedef struct __TResourceList {
       
    16 //            Integer count;
       
    17 //            string255 files[500 + 1];
       
    18 //} TResourceList;
       
    19 //
       
    20 //TResourceList readThemeCfg_0()
       
    21 //{
       
    22 //    TResourceList readthemecfg_result;
       
    23 //    string255 s;
       
    24 //    string255 key;
       
    25 //    TextFile f;
       
    26 //    Integer i;
       
    27 //    TResourceList result;
       
    28 //
       
    29 //    int t = 0;
       
    30 //
       
    31 //    s = _strconcat(_strappend(Pathz[ptCurrTheme], '\x2f'), cThemeCFGFilename);
       
    32 //
       
    33 //    assign(&f, s);
       
    34 //
       
    35 //    reset(&f);
       
    36 //
       
    37 //    if(f.fp == NULL){
       
    38 //    	readthemecfg_result.count = 0;
       
    39 //    	return readthemecfg_result;
       
    40 //    }
       
    41 //
       
    42 //    result.count = 0;
       
    43 //    while(!eof(&f))
       
    44 //    {
       
    45 //        readLnS(&f, &s);
       
    46 //
       
    47 //        if((Length(s)) == (0))
       
    48 //        {
       
    49 //            continue;
       
    50 //        }
       
    51 //        if((s.s[1]) == ('\x3b'))
       
    52 //        {
       
    53 //            continue;
       
    54 //        }
       
    55 //
       
    56 //        i = pos(c1, s);
       
    57 //
       
    58 //        key = fpcrtl_trim(fpcrtl_copy(s, 1, i - 1));
       
    59 //
       
    60 //        fpcrtl_delete(&s, 1, i);
       
    61 //
       
    62 //        if(_strcompare(key, __str79))
       
    63 //        {
       
    64 //            i = pos(c2, s);
       
    65 //            result.files[result.count] = _strconcat(_strappend(Pathz[ptCurrTheme], '\x2f'), trim(copy(s, 1, i - 1)));
       
    66 //            ++result.count;
       
    67 //        }
       
    68 //    }
       
    69 //
       
    70 //    close(&f);
       
    71 //    readthemecfg_result = result;
       
    72 //    return readthemecfg_result;
       
    73 //}
       
    74 //
       
    75 int main(int argc, char** argv)
       
    76 {
       
    77 	int i;
       
    78 
       
    79 //	TResourceList result = readThemeCfg_0();
       
    80 //	for(i = 0; i < result.count; i++){
       
    81 //		printf("%s\n", result.files[i].str);
       
    82 //	}
       
    83 
       
    84 }