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