Changeset 38741 for titan/titan/moduleconfig.h
- Timestamp:
- 09/12/16 12:30:27 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/moduleconfig.h
r38729 r38741 91 91 clearscreen(channelslotlist); 92 92 struct mainbouquet* mbouquet = screenmainbouquet(); 93 93 94 94 mainbouquet2channelslot(mbouquet, slot); 95 95 delmarkedscreennodes(channelslotlist, 1); 96 96 createchannelslotlist(channelslotlist, listbox, slot); 97 97 98 98 drawscreen(channelslotlist, 0, 0); 99 99 } … … 122 122 } 123 123 return 0; 124 } 125 126 void dw2hex(unsigned int num,char* buffer) 127 { 128 for(unsigned int i=7,tmp;!(i&0x80000000);i--) 129 { 130 tmp = num&0xf; 131 buffer[i]= (tmp<10)?(tmp+0x30):(tmp+0x37); 132 num = num>>4; 133 } 134 buffer[8]=0; 124 135 } 125 136 … … 154 165 155 166 // show caid in hex 156 int caid_int = 0; 157 char* caid = ostrcat(ret[i].part, NULL, 0, 0); 158 sscanf(caid, "%X", &caid_int); 159 caid_int = strtol(caid , NULL, 16); 160 free(caid), caid = NULL; 161 162 char* caid_hex = malloc(50); 163 if(caid_hex != NULL) 164 sprintf(caid_hex, "%d", caid_int); 167 char* caid_hex = ostrcat(ret[i].part, NULL, 0, 0); 168 int caid_dec = atoi(ret[i].part); 169 sprintf(caid_hex, "%x", caid_dec); 165 170 166 171 if(checkdoublecaid(dvbnode, ret[i].part) == 1) … … 169 174 if(caid_hex != NULL) 170 175 { 171 tmpstr = ostrcat(tmpstr, " ( ", 1, 0);176 tmpstr = ostrcat(tmpstr, " (0x", 1, 0); 172 177 tmpstr = ostrcat(tmpstr, caid_hex, 1, 0); 173 178 tmpstr = ostrcat(tmpstr, ") (", 1, 0); … … 184 189 if(caid_hex != NULL) 185 190 { 186 tmpstr = ostrcat(tmpstr, " ( ", 1, 0);191 tmpstr = ostrcat(tmpstr, " (0x", 1, 0); 187 192 tmpstr = ostrcat(tmpstr, caid_hex, 1, 0); 188 193 tmpstr = ostrcat(tmpstr, ")", 1, 0); … … 194 199 free(tmpstr); tmpstr = NULL; 195 200 196 addchoicebox(tmp, "0", _(" used"));197 addchoicebox(tmp, "1", _(" locked"));201 addchoicebox(tmp, "0", _("activate")); 202 addchoicebox(tmp, "1", _("deactivate")); 198 203 if(ostrstr(lockcaids, ret[i].part) != NULL) 199 204 setchoiceboxselection(tmp, "1"); … … 435 440 rcret = waitrc(moduleconfig, 2000, 0); 436 441 tmp = listbox->select; 437 442 438 443 printf("listbox->select->text: %s\n",listbox->select->text); 439 444 printf("listbox->select->name: %s\n",listbox->select->name); … … 513 518 drawscreen(moduleconfig, 0, 0); 514 519 } 515 520 516 521 if(rcret == RCTIMEOUT) goto start; 517 522 }
Note: See TracChangeset
for help on using the changeset viewer.