Changeset 17340


Ignore:
Timestamp:
07/25/12 01:27:56 (12 years ago)
Author:
obi
Message:

update emus skin funktions

Location:
titan
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • titan/doc/skindoku.txt

    r17339 r17340  
    173173getoscamcw0
    174174getoscamcw1
     175getoscamsystem
     176getoscamsource
  • titan/titan/skin.h

    r17339 r17340  
    156156        if(ostrcmp("getoscamcw1", value) == 0)
    157157                return &getoscamcw1;
     158        if(ostrcmp("getoscamsource", value) == 0)
     159                return &getoscamsource;
     160        if(ostrcmp("getoscamsystem", value) == 0)
     161                return &getoscamsystem;
     162        if(ostrcmp("getemu", value) == 0)
     163                return &getemu;
    158164        if(ostrcmp("gettime", value) == 0)
    159165                return &gettime;
  • titan/titan/skinfunc.h

    r17339 r17340  
    10191019}
    10201020
     1021char* getoscamsystem(struct skin* node)
     1022{
     1023        char* buf = NULL, *tmpstr = NULL;
     1024
     1025        buf = readfiletomem("/tmp/rcm.info", 1);
     1026        tmpstr = ostrstr(buf, "system:");
     1027        if(tmpstr != NULL)
     1028        {
     1029                tmpstr = stringreplacecharonce(tmpstr, '\n', '\0');
     1030                tmpstr = ostrcat(tmpstr, NULL, 0, 0);
     1031        }
     1032        free(buf); buf = NULL;
     1033
     1034        return tmpstr;
     1035}
     1036
     1037char* getoscamsource(struct skin* node)
     1038{
     1039        char* buf = NULL, *tmpstr = NULL;
     1040
     1041        buf = readfiletomem("/tmp/rcm.info", 1);
     1042        tmpstr = ostrstr(buf, "source:");
     1043        if(tmpstr != NULL)
     1044        {
     1045                tmpstr = stringreplacecharonce(tmpstr, '\n', '\0');
     1046                tmpstr = ostrcat(tmpstr, NULL, 0, 0);
     1047        }
     1048        free(buf); buf = NULL;
     1049
     1050        return tmpstr;
     1051}
     1052
     1053char* getemu(struct skin* node)
     1054{
     1055        char* tmpstr = NULL;
     1056        tmpstr = string_newline(command("emu.sh infoname"));
     1057        return tmpstr;
     1058}
     1059
    10211060#endif
Note: See TracChangeset for help on using the changeset viewer.