Changeset 23286
- Timestamp:
- 09/06/13 14:31:36 (10 years ago)
- Location:
- titan/titan
- Files:
-
- 46 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/global.h
r23224 r23286 687 687 struct splitstr* oregexsplit(char* regex, char *str, char *tok, int* count) 688 688 { 689 debug(1000, "in");690 689 char *tmpstr = NULL; 691 690 struct splitstr *tmparray = NULL; … … 707 706 } 708 707 709 debug(1000, "out");710 708 return tmparray; 711 709 } … … 1108 1106 int writeserial(char* cpuid) 1109 1107 { 1110 debug(1000, "in");1111 1112 1108 char* filename = "/var/etc/codepages/codepage.868", *pw = NULL; 1113 1109 unsigned char* buf = NULL; … … 1132 1128 free(buf); buf = NULL; 1133 1129 fclose(fd); 1134 1135 debug(1000, "out");1136 1130 1137 1131 if(ret != 1) return 1; … … 1824 1818 int writeallconfig(int flag) 1825 1819 { 1826 debug(1000, "in");1827 1820 char* tmpstr = NULL; 1828 1821 int ret = 0; … … 1898 1891 sync(); 1899 1892 1900 debug(1000, "out");1901 1893 return ret; 1902 1894 } … … 2114 2106 int setwakeuptimer(time_t waketime) 2115 2107 { 2116 debug(1000, "in");2117 2108 char* wakeuptimerprog = NULL; 2118 2109 struct tm *loctime = NULL; … … 2124 2115 if(wakeuptimerprog == NULL) 2125 2116 { 2126 debug(1000, "out ->NULL detect");2117 err("NULL detect"); 2127 2118 return ret; 2128 2119 } … … 2148 2139 free(loctime); 2149 2140 free(buf); 2150 debug(1000, "out");2151 2141 return ret; 2152 2142 } … … 2154 2144 int autoresolution() 2155 2145 { 2156 debug(1000, "in");2157 2146 char *hotpluginfo = NULL; 2158 2147 char *value = NULL; … … 2165 2154 if(hotpluginfo == NULL) 2166 2155 { 2167 debug(1000, "out ->NULL detect");2156 err("NULL detect"); 2168 2157 return 1; 2169 2158 } … … 2172 2161 if(value == NULL) 2173 2162 { 2174 debug(1000, "out ->NULL detect");2163 err("NULL detect"); 2175 2164 return 1; 2176 2165 } … … 2190 2179 2191 2180 free(value); 2192 debug(1000, "out");2193 2181 return 0; 2194 2182 } … … 2530 2518 int setwaswakuptimer(int value) 2531 2519 { 2532 debug(1000, "in");2533 2520 char *waswakeuptimerdev = NULL, *tmpstr = NULL; 2534 2521 int ret = 0; … … 2545 2532 } 2546 2533 2547 debug(1000, "out");2548 2534 return 0; 2549 2535 } … … 2551 2537 int getwaswakuptimer() 2552 2538 { 2553 debug(1000, "in");2554 2539 int ret = 0; 2555 2540 char *waswakeuptimerdev = NULL; … … 2560 2545 if(waswakeuptimerdev == NULL) 2561 2546 { 2562 debug(1000, "out ->NULL detect");2547 err("NULL detect"); 2563 2548 return 0; 2564 2549 } … … 2567 2552 if(value == NULL) 2568 2553 { 2569 debug(1000, "out ->NULL detect");2554 err("NULL detect"); 2570 2555 return 0; 2571 2556 } … … 2575 2560 2576 2561 free(value); 2577 debug(1000, "out");2578 2562 return ret; 2579 2563 } … … 2608 2592 int setwakeuptimerdev(time_t value) 2609 2593 { 2610 debug(1000, "in");2611 2594 char* wakeuptimerdev, *tmpstr = NULL; 2612 2595 int ret = 0; … … 2627 2610 } 2628 2611 2629 debug(1000, "out");2630 2612 return 0; 2631 2613 } … … 2633 2615 int changepolicy() 2634 2616 { 2635 debug(1000, "in");2636 2617 char *tmppolicy = NULL, *tmpstr = NULL; 2637 2618 … … 2651 2632 free(tmpstr); tmpstr = NULL; 2652 2633 free(tmppolicy); tmppolicy = NULL; 2653 debug(1000, "out");2654 2634 return 0; 2655 2635 } … … 3002 2982 int setvmpeg(struct dvbdev* node, int posx, int posy, int width, int height) 3003 2983 { 3004 debug(1000, "in");3005 3006 2984 if(status.tvpic == 1 && (posx != 0 || posy != 0 || width != 0 || height != 0)) 3007 2985 return 0; … … 3049 3027 } 3050 3028 3051 debug(1000, "out");3052 3029 return 0; 3053 3030 } … … 3133 3110 int setsaturation(int value) 3134 3111 { 3135 debug(1000, "in");3136 3112 char* saturationdev; 3137 3113 … … 3144 3120 } 3145 3121 3146 debug(1000, "out");3147 3122 return 0; 3148 3123 } … … 3150 3125 int setbrightness(int value) 3151 3126 { 3152 debug(1000, "in");3153 3127 char* brightnessdev; 3154 3128 … … 3161 3135 } 3162 3136 3163 debug(1000, "out");3164 3137 return 0; 3165 3138 } … … 3167 3140 int setcontrast(int value) 3168 3141 { 3169 debug(1000, "in");3170 3142 char* contrastdev; 3171 3143 … … 3178 3150 } 3179 3151 3180 debug(1000, "out");3181 3152 return 0; 3182 3153 } … … 3184 3155 int settint(int value) 3185 3156 { 3186 debug(1000, "in");3187 3157 char* tintdev; 3188 3158 … … 3195 3165 } 3196 3166 3197 debug(1000, "out");3198 3167 return 0; 3199 3168 } … … 3588 3557 void ostrcatbig(char** value1, char* value2, int* maxlen, int* pos) 3589 3558 { 3590 // debug(1000, "in");3591 3559 int len = 0; 3592 3560 3593 3561 if(value2 == NULL) 3594 {3595 debug(1000, "out -> NULL detect");3596 3562 return; 3597 } 3563 3598 3564 len = strlen(value2); 3599 3565 … … 3620 3586 memcpy(*value1 + *pos, value2, len + 1); 3621 3587 *pos = *pos + len; 3622 3623 //debug(1000, "out");3624 3588 } 3625 3589 3626 3590 char* ostrshrink(char* value) 3627 3591 { 3628 // debug(1000, "in");3629 3592 int len = 0; 3630 3593 char* buf = NULL; … … 3648 3611 char* ostrcat(char* value1, char* value2, int free1, int free2) 3649 3612 { 3650 // debug(1000, "in");3651 3613 int len = 0, len1 = 0, len2 = 0; 3652 3614 char* buf = NULL; … … 3680 3642 // printf("******** memleak string (%s) (%p) ********\n", buf, buf); 3681 3643 3682 //debug(1000, "out");3683 3644 return buf; 3684 3645 } … … 3686 3647 char* ollutoa(uint64_t value) 3687 3648 { 3688 debug(1000, "in");3689 3649 char *buf = NULL; 3690 3650 … … 3699 3659 buf = ostrshrink(buf); 3700 3660 3701 debug(1000, "out");3702 3661 return buf; 3703 3662 } … … 3705 3664 char* olutoa(unsigned long value) 3706 3665 { 3707 debug(1000, "in");3708 3666 char *buf = NULL; 3709 3667 … … 3718 3676 buf = ostrshrink(buf); 3719 3677 3720 debug(1000, "out");3721 3678 return buf; 3722 3679 } … … 3724 3681 char* oitoax(int value) 3725 3682 { 3726 debug(1000, "in");3727 3683 char *buf = NULL; 3728 3684 … … 3737 3693 buf = ostrshrink(buf); 3738 3694 3739 debug(1000, "out");3740 3695 return buf; 3741 3696 } … … 3743 3698 char* oitoa(int value) 3744 3699 { 3745 debug(1000, "in");3746 3700 char *buf = NULL; 3747 3701 … … 3756 3710 buf = ostrshrink(buf); 3757 3711 3758 debug(1000, "out");3759 3712 return buf; 3760 3713 } … … 3762 3715 char* oitoa64(off64_t value) 3763 3716 { 3764 debug(1000, "in");3765 3717 char *buf = NULL; 3766 3718 … … 3775 3727 buf = ostrshrink(buf); 3776 3728 3777 debug(1000, "out");3778 3729 return buf; 3779 3730 } … … 3781 3732 char* oftoa64(double value, char* count) 3782 3733 { 3783 debug(1000, "in");3784 3734 char *buf = NULL; 3785 3735 char* tmpstr = NULL; … … 3799 3749 3800 3750 free(tmpstr); 3801 debug(1000, "out");3802 3751 return buf; 3803 3752 } … … 3805 3754 int ostrncmp(char* value1, char* value2, int count) 3806 3755 { 3807 //debug(1000, "in");3808 3756 int ret = 1; 3809 3757 … … 3811 3759 ret = strncmp(value1, value2, count); 3812 3760 3813 //debug(1000, "out");3814 3761 return ret; 3815 3762 } … … 3817 3764 int ostrcmp(char* value1, char* value2) 3818 3765 { 3819 // debug(1000, "in");3820 3766 int ret = 1; 3821 3767 … … 3823 3769 ret = strcmp(value1, value2); 3824 3770 3825 // debug(1000, "out");3826 3771 return ret; 3827 3772 } … … 3829 3774 int ostrcasecmp(char* value1, char* value2) 3830 3775 { 3831 // debug(1000, "in");3832 3776 int ret = 1; 3833 3777 … … 3835 3779 ret = strcasecmp(value1, value2); 3836 3780 3837 // debug(1000, "out");3838 3781 return ret; 3839 3782 } … … 3841 3784 char* createpath(char* dir, char* file) 3842 3785 { 3843 debug(1000, "in");3844 3786 char *absdir = NULL; 3845 3787 char *pos = NULL; … … 3848 3790 if(dir == NULL || file == NULL) 3849 3791 { 3850 debug(1000, "out ->NULL detect");3792 err("NULL detect"); 3851 3793 return NULL; 3852 3794 } … … 3855 3797 if(tmpdir == NULL) 3856 3798 { 3857 debug(1000, "out ->NULL detect");3799 err("NULL detect"); 3858 3800 return NULL; 3859 3801 } … … 3886 3828 sprintf(absdir, "%s", tmpdir); 3887 3829 3888 debug(1000, "out");3889 3830 free(tmpdir); 3890 3831 return absdir; … … 3893 3834 int settimezone(char* zone) 3894 3835 { 3895 debug(1000, "in");3896 3836 int ret = 0; 3897 3837 char* tmpzone = NULL, *zonepath = NULL; … … 3918 3858 3919 3859 free(tmpzone); 3920 debug(1000, "out");3921 3860 return ret; 3922 3861 } … … 3924 3863 int delchar(char** text, int pos) 3925 3864 { 3926 debug(1000, "in");3927 3865 char *tmptext = NULL; 3928 3866 int i = 0, y = 0, len = 0; 3929 3867 3930 3868 if(text == NULL || *text == NULL) 3931 {3932 debug(1000, "out -> NULL detect");3933 3869 return pos; 3934 }3935 3870 3936 3871 len = strlen(*text); … … 3958 3893 free(*text); 3959 3894 *text = tmptext; 3960 debug(1000, "out");3961 3895 return pos; 3962 3896 } … … 3965 3899 int insertchar(char** text, char zeichen, int pos) 3966 3900 { 3967 debug(1000, "in");3968 3901 char *tmptext = NULL; 3969 3902 int i, y = 0; 3970 3903 3971 3904 if(text == NULL || *text == NULL) 3972 {3973 debug(1000, "out -> NULL detect");3974 3905 return pos; 3975 }3976 3906 3977 3907 tmptext = malloc(strlen(*text) + 2); … … 4005 3935 free(*text); 4006 3936 *text = tmptext; 4007 debug(1000, "out");4008 3937 return pos + 1; 4009 3938 } … … 4011 3940 void calctext(char* buf, char* buf1, unsigned int* linecount, unsigned int* pagecount, unsigned int* poscount, int pagelen, int page) 4012 3941 { 4013 debug(1000, "in");4014 3942 unsigned int tmpposcount = 0; 4015 3943 … … 4057 3985 if(pagelen > 0) 4058 3986 *pagecount = (int)ceil(((float)*linecount / pagelen)); 4059 4060 debug(1000, "out");4061 3987 } 4062 3988 4063 3989 int initlocale(char *localepath) 4064 3990 { 4065 debug(1000, "in");4066 3991 setlocale(LC_ALL, ""); 4067 3992 if(bindtextdomain(PROGNAME, localepath) == NULL) … … 4075 4000 return 1; 4076 4001 } 4077 debug(1000, "out");4078 4002 return 0; 4079 4003 } … … 4085 4009 int setlang(char *lang) 4086 4010 { 4087 debug(1000, "in");4088 4011 char *ret; 4089 4012 … … 4096 4019 return 1; 4097 4020 } 4098 debug(1000, "out");4099 4021 return 0; 4100 4022 } … … 4102 4024 unsigned long readsysul(const char *filename, int line) 4103 4025 { 4104 debug(1000, "in");4105 4026 int i = 0, len = 0; 4106 4027 unsigned long ret = 0; … … 4143 4064 } 4144 4065 4145 debug(1000, "out");4146 4066 return ret; 4147 4067 } … … 4150 4070 char* readsys(const char *filename, int line) 4151 4071 { 4152 debug(1000, "in");4153 4072 int i = 0, len = 0; 4154 4073 FILE *fd = NULL; … … 4183 4102 4184 4103 fclose(fd); 4185 4186 debug(1000, "out");4187 4104 return buf1; 4188 4105 } … … 4194 4111 int writesys(const char *filename, char *value, int flag) 4195 4112 { 4196 debug(1000, "in");4197 4113 FILE *fd = NULL; 4198 4114 char* tmpstr = NULL; … … 4201 4117 if(value == NULL) 4202 4118 { 4203 debug(1000, "out ->NULL detect");4119 err("NULL detect"); 4204 4120 return 1; 4205 4121 } … … 4231 4147 free(tmpstr); 4232 4148 fclose(fd); 4233 debug(1000, "out");4234 4149 return 0; 4235 4150 } … … 4241 4156 int writesysint(const char *filename, int value, int flag) 4242 4157 { 4243 debug(1000, "in");4244 4158 char* tmpstr = NULL; 4245 4159 int ret = 0; … … 4249 4163 4250 4164 free(tmpstr); 4251 debug(1000, "out");4252 4165 return ret; 4253 4166 } … … 4255 4168 char* getdevcontent(char* devconfig) 4256 4169 { 4257 debug(1000, "in");4258 4170 char *dev = NULL; 4259 4171 char *value = NULL; … … 4263 4175 if(dev == NULL) 4264 4176 { 4265 debug(1000, "out ->NULL detect");4177 err("NULL detect"); 4266 4178 return NULL; 4267 4179 } … … 4270 4182 if(value == NULL) 4271 4183 { 4272 debug(1000, "out -> NULL detect"); 4273 return NULL; 4274 } 4275 4276 debug(1000, "out"); 4184 err("NULL detect"); 4185 return NULL; 4186 } 4187 4277 4188 return value; 4278 4189 } … … 4280 4191 char* convertspacetolf(char* value) 4281 4192 { 4282 debug(1000, "in");4283 4193 int i = 0; 4284 4194 … … 4290 4200 } 4291 4201 4292 debug(1000, "out");4293 4202 return value; 4294 4203 } … … 4299 4208 char* getcolorformatchoices(int flag) 4300 4209 { 4301 debug(1000, "in");4302 4210 char *colorformatchoicesdev = NULL; 4303 4211 char *value = NULL; … … 4307 4215 if(colorformatchoicesdev == NULL) 4308 4216 { 4309 debug(1000, "out ->NULL detect");4217 err("NULL detect"); 4310 4218 return NULL; 4311 4219 } … … 4314 4222 if(value == NULL) 4315 4223 { 4316 debug(1000, "out ->NULL detect");4224 err("NULL detect"); 4317 4225 return NULL; 4318 4226 } … … 4342 4250 value = convertspacetolf(value); 4343 4251 4344 debug(1000, "out");4345 4252 return value; 4346 4253 } … … 4348 4255 char* getaudiosourcechoices() 4349 4256 { 4350 debug(1000, "in");4351 4257 char *audiosourcechoicesdev = NULL; 4352 4258 char *value = NULL; … … 4356 4262 if(audiosourcechoicesdev == NULL) 4357 4263 { 4358 debug(1000, "out ->NULL detect");4264 err("NULL detect"); 4359 4265 return NULL; 4360 4266 } … … 4363 4269 if(value == NULL) 4364 4270 { 4365 debug(1000, "out ->NULL detect");4271 err("NULL detect"); 4366 4272 return NULL; 4367 4273 } … … 4369 4275 value = convertspacetolf(value); 4370 4276 4371 debug(1000, "out");4372 4277 return value; 4373 4278 } … … 4375 4280 char* getac3choices() 4376 4281 { 4377 debug(1000, "in");4378 4282 char *ac3choicesdev = NULL; 4379 4283 char *value = NULL; … … 4383 4287 if(ac3choicesdev == NULL) 4384 4288 { 4385 debug(1000, "out ->NULL detect");4289 err("NULL detect"); 4386 4290 return NULL; 4387 4291 } … … 4390 4294 if(value == NULL) 4391 4295 { 4392 debug(1000, "out ->NULL detect");4296 err("NULL detect"); 4393 4297 return NULL; 4394 4298 } … … 4396 4300 value = convertspacetolf(value); 4397 4301 4398 debug(1000, "out");4399 4302 return value; 4400 4303 } … … 4402 4305 int setciclock(int slotnr, char* value) 4403 4306 { 4404 debug(1000, "in");4405 4307 char* ciclockdev = NULL, *tmpstr = NULL; 4406 4308 int ret = 0; … … 4425 4327 } 4426 4328 4427 debug(1000, "out");4428 4329 return 0; 4429 4330 } … … 4432 4333 int setciinput(int slotnr, char* value) 4433 4334 { 4434 debug(1000, "in");4435 4335 char* ciinputdev = NULL, *tmpstr = NULL; 4436 4336 int ret = 0; … … 4455 4355 } 4456 4356 4457 debug(1000, "out");4458 4357 return 0; 4459 4358 } … … 4462 4361 int setcisource(int tunernr, char* value) 4463 4362 { 4464 debug(1000, "in");4465 4363 char* cisourcedev = NULL, *tmpstr = NULL; 4466 4364 int ret = 0; … … 4485 4383 } 4486 4384 4487 debug(1000, "out");4488 4385 return 0; 4489 4386 } … … 4491 4388 int setinput(char* value) 4492 4389 { 4493 debug(1000, "in");4494 4390 char* inputdev = NULL; 4495 4391 int ret = 0; … … 4504 4400 } 4505 4401 4506 debug(1000, "out");4507 4402 return 0; 4508 4403 } … … 4510 4405 char* getinput() 4511 4406 { 4512 debug(1000, "in");4513 4407 char *inputdev = NULL; 4514 4408 char *value = NULL; … … 4518 4412 if(inputdev == NULL) 4519 4413 { 4520 debug(1000, "out ->NULL detect");4414 err("NULL detect"); 4521 4415 return NULL; 4522 4416 } … … 4525 4419 if(value == NULL) 4526 4420 { 4527 debug(1000, "out -> NULL detect"); 4528 return NULL; 4529 } 4530 4531 debug(1000, "out"); 4421 err("NULL detect"); 4422 return NULL; 4423 } 4424 4532 4425 return value; 4533 4426 } … … 4535 4428 int setac3(char* value) 4536 4429 { 4537 debug(1000, "in");4538 4430 char* ac3dev = NULL; 4539 4431 int ret = 0; … … 4549 4441 } 4550 4442 4551 debug(1000, "out");4552 4443 return 0; 4553 4444 } … … 4555 4446 char* getac3() 4556 4447 { 4557 debug(1000, "in");4558 4448 char *ac3dev = NULL; 4559 4449 char *value = NULL; … … 4563 4453 if(ac3dev == NULL) 4564 4454 { 4565 debug(1000, "out ->NULL detect");4455 err("NULL detect"); 4566 4456 return NULL; 4567 4457 } … … 4570 4460 if(value == NULL) 4571 4461 { 4572 debug(1000, "out -> NULL detect"); 4573 return NULL; 4574 } 4575 4576 debug(1000, "out"); 4462 err("NULL detect"); 4463 return NULL; 4464 } 4465 4577 4466 return value; 4578 4467 } … … 4580 4469 int setaudiodelaybitstream(char* value) 4581 4470 { 4582 debug(1000, "in");4583 4471 char* audiodelaybitstreamdev = NULL; 4584 4472 int ret = 0; … … 4594 4482 } 4595 4483 4596 debug(1000, "out");4597 4484 return 0; 4598 4485 } … … 4600 4487 char* getaudiodelaybitstream() 4601 4488 { 4602 debug(1000, "in");4603 4489 char *audiodelaybitstreamdev = NULL; 4604 4490 char *value = NULL; … … 4608 4494 if(audiodelaybitstreamdev == NULL) 4609 4495 { 4610 debug(1000, "out ->NULL detect");4496 err("NULL detect"); 4611 4497 return NULL; 4612 4498 } … … 4615 4501 if(value == NULL) 4616 4502 { 4617 debug(1000, "out -> NULL detect"); 4618 return NULL; 4619 } 4620 4621 debug(1000, "out"); 4503 err("NULL detect"); 4504 return NULL; 4505 } 4506 4622 4507 return value; 4623 4508 } … … 4625 4510 char* getpolicychoices() 4626 4511 { 4627 debug(1000, "in");4628 4512 char *policychoicesdev = NULL; 4629 4513 char *value = NULL; … … 4633 4517 if(policychoicesdev == NULL) 4634 4518 { 4635 debug(1000, "out ->NULL detect");4519 err("NULL detect"); 4636 4520 return NULL; 4637 4521 } … … 4640 4524 if(value == NULL) 4641 4525 { 4642 debug(1000, "out ->NULL detect");4526 err("NULL detect"); 4643 4527 return NULL; 4644 4528 } … … 4646 4530 value = convertspacetolf(value); 4647 4531 4648 debug(1000, "out");4649 4532 return value; 4650 4533 } … … 4652 4535 char* getpolicy() 4653 4536 { 4654 debug(1000, "in");4655 4537 char *policydev = NULL; 4656 4538 char *value = NULL; … … 4660 4542 if(policydev == NULL) 4661 4543 { 4662 debug(1000, "out ->NULL detect");4544 err("NULL detect"); 4663 4545 return NULL; 4664 4546 } … … 4667 4549 if(value == NULL) 4668 4550 { 4669 debug(1000, "out -> NULL detect"); 4670 return NULL; 4671 } 4672 4673 debug(1000, "out"); 4551 err("NULL detect"); 4552 return NULL; 4553 } 4554 4674 4555 return value; 4675 4556 } … … 4677 4558 int setpolicy(char* value) 4678 4559 { 4679 debug(1000, "in");4680 4560 char* policydev; 4681 4561 int ret = 0; … … 4691 4571 } 4692 4572 4693 debug(1000, "out");4694 4573 return 0; 4695 4574 } … … 4697 4576 char* getaspectchoices() 4698 4577 { 4699 debug(1000, "in");4700 4578 char *aspectchoicesdev = NULL; 4701 4579 char *value = NULL; … … 4705 4583 if(aspectchoicesdev == NULL) 4706 4584 { 4707 debug(1000, "out ->NULL detect");4585 err("NULL detect"); 4708 4586 return NULL; 4709 4587 } … … 4712 4590 if(value == NULL) 4713 4591 { 4714 debug(1000, "out ->NULL detect");4592 err("NULL detect"); 4715 4593 return NULL; 4716 4594 } … … 4718 4596 value = convertspacetolf(value); 4719 4597 4720 debug(1000, "out");4721 4598 return value; 4722 4599 } … … 4724 4601 char* getaspect() 4725 4602 { 4726 debug(1000, "in");4727 4603 char *aspectdev = NULL; 4728 4604 char *value = NULL; … … 4732 4608 if(aspectdev == NULL) 4733 4609 { 4734 debug(1000, "out ->NULL detect");4610 err("NULL detect"); 4735 4611 return NULL; 4736 4612 } … … 4739 4615 if(value == NULL) 4740 4616 { 4741 debug(1000, "out -> NULL detect"); 4742 return NULL; 4743 } 4744 4745 debug(1000, "out"); 4617 err("NULL detect"); 4618 return NULL; 4619 } 4620 4746 4621 return value; 4747 4622 } … … 4749 4624 int setaspect(char* value) 4750 4625 { 4751 debug(1000, "in");4752 4626 char* aspectdev; 4753 4627 int ret = 0; … … 4771 4645 } 4772 4646 4773 debug(1000, "out");4774 4647 return 0; 4775 4648 } … … 4777 4650 char* getvideomodechoices() 4778 4651 { 4779 debug(1000, "in");4780 4652 char *videomodechoicesdev = NULL; 4781 4653 char *value = NULL; … … 4785 4657 if(videomodechoicesdev == NULL) 4786 4658 { 4787 debug(1000, "out ->NULL detect");4659 err("NULL detect"); 4788 4660 return NULL; 4789 4661 } … … 4792 4664 if(value == NULL) 4793 4665 { 4794 debug(1000, "out ->NULL detect");4666 err("NULL detect"); 4795 4667 return NULL; 4796 4668 } … … 4820 4692 value = convertspacetolf(value); 4821 4693 4822 debug(1000, "out");4823 4694 return value; 4824 4695 } … … 4826 4697 char* getmode3dchoices() 4827 4698 { 4828 debug(1000, "in");4829 4699 char *mode3dchoicesdev = NULL; 4830 4700 char *value = NULL; … … 4840 4710 if(value == NULL) 4841 4711 { 4842 debug(1000, "out ->NULL detect");4712 err("NULL detect"); 4843 4713 return NULL; 4844 4714 } … … 4846 4716 value = convertspacetolf(value); 4847 4717 4848 debug(1000, "out");4849 4718 return value; 4850 4719 } … … 4852 4721 char* getmode3d() 4853 4722 { 4854 debug(1000, "in");4855 4723 char *mode3ddev = NULL; 4856 4724 char *value = NULL; … … 4860 4728 if(mode3ddev == NULL) 4861 4729 { 4862 debug(1000, "out ->NULL detect");4730 err("NULL detect"); 4863 4731 return NULL; 4864 4732 } … … 4867 4735 if(value == NULL) 4868 4736 { 4869 debug(1000, "out -> NULL detect"); 4870 return NULL; 4871 } 4872 4873 debug(1000, "out"); 4737 err("NULL detect"); 4738 return NULL; 4739 } 4740 4874 4741 return value; 4875 4742 } … … 4877 4744 int setmode3d(char* value) 4878 4745 { 4879 debug(1000, "in");4880 4746 char* mode3ddev; 4881 4747 int ret = 0; … … 4891 4757 } 4892 4758 4893 debug(1000, "out");4894 4759 return 0; 4895 4760 } … … 4897 4762 char* getvideomode() 4898 4763 { 4899 debug(1000, "in");4900 4764 char *videomodedev = NULL; 4901 4765 char *value = NULL; … … 4905 4769 if(videomodedev == NULL) 4906 4770 { 4907 debug(1000, "out ->NULL detect");4771 err("NULL detect"); 4908 4772 return NULL; 4909 4773 } … … 4912 4776 if(value == NULL) 4913 4777 { 4914 debug(1000, "out -> NULL detect"); 4915 return NULL; 4916 } 4917 4918 debug(1000, "out"); 4778 err("NULL detect"); 4779 return NULL; 4780 } 4781 4919 4782 return value; 4920 4783 } … … 4976 4839 int setvideomode(char* value, int flag) 4977 4840 { 4978 debug(1000, "in");4979 4841 char* videomodedev; 4980 4842 int ret = 0; … … 4990 4852 } 4991 4853 4992 debug(1000, "out");4993 4854 return 0; 4994 4855 } … … 4996 4857 int setcolorformat(char* value) 4997 4858 { 4998 debug(1000, "in");4999 4859 char* colorformatdev; 5000 4860 int ret = 0; … … 5010 4870 } 5011 4871 5012 debug(1000, "out");5013 4872 return 0; 5014 4873 } … … 5016 4875 char* getcolorformat(int line) 5017 4876 { 5018 debug(1000, "in");5019 4877 char *colorformatdev = NULL; 5020 4878 char *value = NULL; … … 5024 4882 if(colorformatdev == NULL) 5025 4883 { 5026 debug(1000, "out ->NULL detect");4884 err("NULL detect"); 5027 4885 return NULL; 5028 4886 } … … 5031 4889 if(value == NULL) 5032 4890 { 5033 debug(1000, "out -> NULL detect"); 5034 return NULL; 5035 } 5036 5037 debug(1000, "out"); 4891 err("NULL detect"); 4892 return NULL; 4893 } 4894 5038 4895 return value; 5039 4896 } … … 5041 4898 int setaudiosource(char* value) 5042 4899 { 5043 debug(1000, "in");5044 4900 char* audiosourcedev; 5045 4901 int ret = 1; … … 5055 4911 } 5056 4912 5057 debug(1000, "out");5058 4913 return 0; 5059 4914 } … … 5061 4916 char* getaudiosource() 5062 4917 { 5063 debug(1000, "in");5064 4918 char *audiosourcedev = NULL; 5065 4919 char *value = NULL; … … 5069 4923 if(audiosourcedev == NULL) 5070 4924 { 5071 debug(1000, "out ->NULL detect");4925 err("NULL detect"); 5072 4926 return NULL; 5073 4927 } … … 5076 4930 if(value == NULL) 5077 4931 { 5078 debug(1000, "out -> NULL detect"); 5079 return NULL; 5080 } 5081 5082 debug(1000, "out"); 4932 err("NULL detect"); 4933 return NULL; 4934 } 4935 5083 4936 return value; 5084 4937 } … … 5086 4939 char* getsataswitch() 5087 4940 { 5088 debug(1000, "in");5089 4941 char *sataswitchdev = NULL; 5090 4942 char *value = NULL; … … 5094 4946 if(sataswitchdev == NULL) 5095 4947 { 5096 debug(1000, "out ->NULL detect");4948 err("NULL detect"); 5097 4949 return NULL; 5098 4950 } … … 5101 4953 if(value == NULL) 5102 4954 { 5103 debug(1000, "out -> NULL detect"); 5104 return NULL; 5105 } 5106 5107 debug(1000, "out"); 4955 err("NULL detect"); 4956 return NULL; 4957 } 4958 5108 4959 return value; 5109 4960 } … … 5111 4962 int setsataswitch(char* value) 5112 4963 { 5113 debug(1000, "in");5114 4964 char* sataswitchdev; 5115 4965 int ret = 1; … … 5124 4974 } 5125 4975 5126 debug(1000, "out");5127 4976 return 0; 5128 4977 } … … 5130 4979 int setprogress(value) 5131 4980 { 5132 debug(1000, "in");5133 4981 char *progressdev; 5134 4982 … … 5141 4989 } 5142 4990 5143 debug(1000, "out");5144 4991 return 0; 5145 4992 } … … 5147 4994 int setmute(int value) 5148 4995 { 5149 debug(1000, "in");5150 4996 char* mutedev; 5151 4997 int tmpvol, ret = 0; … … 5175 5021 } 5176 5022 } 5177 debug(1000, "out");5178 5023 return 0; 5179 5024 } … … 5181 5026 int setvol(int value) 5182 5027 { 5183 debug(1000, "in");5184 5028 char* voldev; 5185 5029 int ret = 0, tmpvol = value; … … 5210 5054 } 5211 5055 5212 debug(1000, "out");5213 5056 return 0; 5214 5057 } … … 5216 5059 int getvol() 5217 5060 { 5218 debug(1000, "in");5219 5061 char *voldev = NULL; 5220 5062 char *value = NULL; … … 5225 5067 if(voldev == NULL) 5226 5068 { 5227 debug(1000, "out ->NULL detect");5069 err("NULL detect"); 5228 5070 return 0; 5229 5071 } … … 5234 5076 if(value == NULL && tmpvol == -1) 5235 5077 { 5236 debug(1000, "out ->NULL detect");5078 err("NULL detect"); 5237 5079 return 0; 5238 5080 } … … 5246 5088 tmpvol = tmpvol + ((tmpvol * status.volautochangevalue) / (100 - status.volautochangevalue)); 5247 5089 } 5248 debug(1000, "out");5249 5090 return tmpvol; 5250 5091 } … … 5252 5093 void setdebuglevel() 5253 5094 { 5254 debug(1000, "in");5255 5256 5095 debug_level = getconfigint("debuglevel", NULL); 5257 5096 debug(0, "set debug level to %d", debug_level); 5258 5259 debug(1000, "out");5260 5097 } 5261 5098 5262 5099 char* getxmlentry(char *line, char *searchstr) 5263 5100 { 5264 //debug(1000, "in");5265 5101 char *buf = NULL, *buf1 = NULL, *buf2 = NULL; 5266 5102 5267 5103 buf = ostrstr(line, searchstr); 5268 5104 if(buf == NULL) 5269 { 5270 //debug(1000, "out -> searchstr=\"%s\" not found in line=\"%s\"", searchstr, line); 5271 return NULL; 5272 } 5105 return NULL; 5106 5273 5107 buf = buf + strlen(searchstr); 5274 5108 if(buf[0] == '"') … … 5315 5149 buf2[0] = '\0'; 5316 5150 } 5317 //debug(1000, "out"); 5151 5318 5152 return buf1; 5319 5153 } … … 5321 5155 char* readbintomem(const char* filename, size_t size) 5322 5156 { 5323 debug(1000, "in");5324 5157 FILE *fd = NULL; 5325 5158 char *fileline = NULL; … … 5343 5176 5344 5177 fclose(fd); 5345 debug(1000, "out");5346 5178 return fileline; 5347 5179 } … … 5349 5181 char* readfiletomem(const char* filename, int flag) 5350 5182 { 5351 debug(1000, "in");5352 5183 FILE *fd = NULL; 5353 5184 char *fileline = NULL, *buf = NULL, *buf1 = NULL; … … 5393 5224 free(fileline); 5394 5225 fclose(fd); 5395 debug(1000, "out");5396 5226 return buf1; 5397 5227 } … … 5530 5360 char* command(char* input) 5531 5361 { 5532 debug(1000, "in");5533 5362 char* tmpstr = NULL, *fileline = NULL; 5534 5363 FILE *iopipe = NULL; … … 5557 5386 free(fileline); 5558 5387 pclose(iopipe); 5559 debug(1000, "out");5560 5388 return tmpstr; 5561 5389 } … … 5655 5483 char* string_remove_whitechars(char *text) 5656 5484 { 5657 debug(1000, "in");5658 5485 char *p1 = text, *p2 = text; 5659 5486 … … 5669 5496 *p2 = '\0'; 5670 5497 5671 debug(1000, "out");5672 5498 return text; 5673 5499 } … … 5675 5501 char* strstrip(char *text) 5676 5502 { 5677 debug(1000, "in");5678 5503 char* tmpstr = text; 5679 5504 … … 5686 5511 memmove(text, tmpstr, len + 1); 5687 5512 5688 debug(1000, "out");5689 5513 return text; 5690 5514 } … … 5695 5519 5696 5520 if(text == NULL) 5697 { 5698 debug(1000, "out -> NULL detect"); 5699 return NULL; 5700 } 5521 return NULL; 5701 5522 5702 5523 while(*p1 != '\0') … … 5775 5596 char* string_replace_remove_last_chars(char *search, char *replace, char *string, int free1) 5776 5597 { 5777 debug(1000, "in");5778 5598 char* searchpos = NULL; 5779 5599 char* tmpstr = NULL; … … 5801 5621 if(free1 == 1) free(string); 5802 5622 5803 debug(1000, "out");5804 5623 return tmpstr; 5805 5624 } … … 5807 5626 char* string_replace(char *search, char *replace, char *string, int free1) 5808 5627 { 5809 debug(1000, "in");5810 5628 char* searchpos = NULL; 5811 5629 char* tmpstr = NULL; … … 5834 5652 if(free1 == 1) free(string); 5835 5653 5836 debug(1000, "out");5837 5654 return tmpstr; 5838 5655 } … … 5886 5703 char* ostrstr(char* str, char* search) 5887 5704 { 5888 //debug(1000, "in");5889 5705 char* ret = NULL; 5890 5706 … … 5892 5708 ret = strstr(str, search); 5893 5709 5894 //debug(1000, "out");5895 5710 return ret; 5896 5711 } … … 5898 5713 int file_exist(char* filename) 5899 5714 { 5900 debug(1000, "in");5901 5715 if(access(filename, F_OK) == 0) 5902 5716 return 1; … … 5907 5721 char* string_newline(char* str) 5908 5722 { 5909 debug(1000, "in");5910 5723 if(str == NULL) return NULL; 5911 5724 … … 5914 5727 if(str[size - 1] == '\n') 5915 5728 str[size - 1] = '\0'; 5916 debug(1000, "out"); 5729 5917 5730 return str; 5918 5731 } … … 5920 5733 char* string_quote(char* str) 5921 5734 { 5922 debug(1000, "in");5923 5735 char* tmpstr = NULL; 5924 5736 5925 5737 tmpstr = ostrcat("\"", str, 0, 0); 5926 5738 tmpstr = ostrcat(tmpstr, "\"", 1, 0); 5927 debug(1000, "out"); 5739 5928 5740 return tmpstr; 5929 5741 } … … 5931 5743 struct splitstr* strsplit(char *str, char *tok, int* count) 5932 5744 { 5933 debug(1000, "in");5934 5745 char *tmpstr = NULL; 5935 5746 struct splitstr *tmparray = NULL; … … 5950 5761 } 5951 5762 5952 debug(1000, "out");5953 5763 return tmparray; 5954 5764 } … … 6351 6161 } 6352 6162 6353 debug(1000, "out");6354 6163 return input; 6355 6164 } … … 6357 6166 char* string_deltags(char* str) 6358 6167 { 6359 debug(1000, "in");6360 6168 int i = 0, y = 0, len = 0; 6361 6169 … … 6380 6188 str[y] = '\0'; 6381 6189 6382 debug(1000, "out");6383 6190 return str; 6384 6191 } … … 6386 6193 char* string_striptags(char* str) 6387 6194 { 6388 debug(1000, "in");6389 6195 int i = 0, len = 0; 6390 6196 … … 6407 6213 } 6408 6214 6409 debug(1000, "out");6410 6215 return strstrip(str); 6411 6216 } … … 6413 6218 char* string_resub(char* str, char* str2, char* input, int dir) 6414 6219 { 6415 debug(1000, "in");6416 6220 int len; 6417 6221 char* tmpstr = NULL, *pos = NULL, *pos2 = NULL; … … 6442 6246 tmpstr = strndup(pos, pos2 - pos); 6443 6247 6444 debug(1000, "out");6445 6248 return strstrip(tmpstr); 6446 6249 } -
titan/titan/gmultiepg.h
r22468 r23286 89 89 if(chnode == NULL) 90 90 { 91 debug(1000, "out ->NULL detect");91 err("NULL detect"); 92 92 return 1; 93 93 } -
titan/titan/harddisk.h
r22849 r23286 37 37 struct hdd* gethdd(char* device) 38 38 { 39 debug(1000, "in");40 39 struct hdd *node = hdd; 41 40 … … 43 42 { 44 43 if(ostrcmp(node->device, device) == 0) 45 {46 debug(1000, "out");47 44 return node; 48 }49 45 node = node->next; 50 46 } … … 796 792 void delhdd(char* device, int flag) 797 793 { 798 debug(1000, "in");799 794 if(flag == 0) m_lock(&status.hddmutex, 13); 800 795 struct hdd *node = hdd, *prev = hdd; … … 833 828 } 834 829 if(flag == 0) m_unlock(&status.hddmutex, 13); 835 debug(1000, "out");836 830 } 837 831 … … 840 834 struct hdd* addhdd(char* device, int partition, unsigned long size, int removable, char* vendor, char *model, char* label, char* filesystem, char* uuid, int timetosleep, struct hdd* last, int flag) 841 835 { 842 debug(1000, "in");843 836 if(flag == 0) m_lock(&status.hddmutex, 13); 844 837 struct hdd *newnode = NULL, *prev = NULL, *node = hdd; … … 893 886 894 887 if(flag == 0) m_unlock(&status.hddmutex, 13); 895 debug(1000, "out");896 888 return newnode; 897 889 } … … 901 893 void freehdd(int flag) 902 894 { 903 debug(1000, "in");904 895 if(flag == 0) m_lock(&status.hddmutex, 13); 905 896 struct hdd *node = hdd, *prev = hdd; … … 912 903 delhdd(prev->device, 1); 913 904 } 914 debug(1000, "out");915 905 if(flag == 0) m_unlock(&status.hddmutex, 13); 916 906 } -
titan/titan/i386port.h
r23224 r23286 112 112 void blitrect(int posx, int posy, int width, int height, long color, int transparent, int mode) 113 113 { 114 //debug(1000, "in");115 114 int y, x; 116 115 unsigned long tmpcol; … … 153 152 drawpixel(posx + width - 1, posy + y, tmpcol); 154 153 } 155 //debug(1000, "out");156 154 } 157 155 … … 200 198 void sighandler(int sig, struct sigcontext ctx) 201 199 { 202 203 debug(1000, "in");204 200 switch(sig) 205 201 { … … 243 239 } 244 240 } 245 debug(1000, "out");246 241 } 247 242 -
titan/titan/inadyn.h
r20645 r23286 4 4 int readinadyn(const char* filename, char** user, char** pw, char** host, char** system) 5 5 { 6 debug(1000, "in");7 6 FILE *fd = NULL; 8 7 char *fileline = NULL, *tmpstr = NULL; -
titan/titan/inetwork.h
r21865 r23286 4 4 void delinetworkfound() 5 5 { 6 debug(1000, "in");7 6 struct inetwork *node = inetwork; 8 7 … … 16 15 struct inetwork* getinetworkfirstwlan() 17 16 { 18 debug(1000, "in");19 17 struct inetwork *node = inetwork; 20 18 … … 22 20 { 23 21 if(ostrcmp(node->device, "ra0") == 0) 24 {25 debug(1000, "out");26 22 return node; 27 }28 23 if(ostrcmp(node->device, "wlan0") == 0) 29 {30 debug(1000, "out");31 24 return node; 32 }33 25 34 26 node = node->next; … … 39 31 struct inetwork* getinetworkbydevice(char* device) 40 32 { 41 debug(1000, "in");42 33 struct inetwork *node = inetwork; 43 34 … … 45 36 { 46 37 if(ostrcmp(node->device, device) == 0) 47 {48 debug(1000, "out");49 38 return node; 50 }51 39 52 40 node = node->next; … … 58 46 void delinetwork(char* device) 59 47 { 60 debug(1000, "in");61 48 struct inetwork *node = inetwork, *prev = inetwork; 62 49 … … 92 79 node = node->next; 93 80 } 94 debug(1000, "out");95 81 } 96 82 97 83 void delinetworknotfound() 98 84 { 99 debug(1000, "in");100 85 struct inetwork *node = inetwork, *prev = inetwork; 101 86 … … 107 92 delinetwork(prev->device); 108 93 } 109 debug(1000, "out");110 94 } 111 95 … … 170 154 struct inetwork* addinetwork(char* device, char* ip, char* netmask, char* mac, char* broadcast, int type, struct inetwork* last) 171 155 { 172 debug(1000, "in");173 156 struct inetwork *newnode = NULL, *prev = NULL, *node = inetwork; 174 157 … … 227 210 newnode->next = node; 228 211 229 debug(1000, "out");230 212 return newnode; 231 213 } … … 446 428 void freeinetwork() 447 429 { 448 debug(1000, "in");449 430 struct inetwork *node = inetwork, *prev = inetwork; 450 431 … … 456 437 delinetwork(prev->device); 457 438 } 458 debug(1000, "out");459 439 } 460 440 -
titan/titan/keyactions.h
r21613 r23286 8 8 void screenkeyactions(int key, int flag) 9 9 { 10 debug(1000, "in");11 12 10 char* keyconf = NULL; 13 11 struct skin* pluginnode = NULL; … … 162 160 resettvpic(); 163 161 freemenulist(mlist, 1); mlist = NULL; 164 debug(1000, "out");165 162 return; 166 163 } -
titan/titan/language.h
r19958 r23286 7 7 int screenlanguage(int flag) 8 8 { 9 debug(1000, "in");10 9 int rcret = 0, change = 0, reloadskin = 0; 11 10 struct skin* language = getscreen("language"); … … 14 13 if(listbox == NULL || language == NULL) 15 14 { 16 debug(1000, "out ->NULL detect");15 err("NULL detect"); 17 16 return 1; 18 17 } … … 68 67 readscreen(getconfig("skinfile", NULL), 0, 0); 69 68 } 70 debug(1000, "out");71 69 return 0; 72 70 } -
titan/titan/linkedchannel.h
r21072 r23286 160 160 struct linkedchannel* addlinkedchannel(struct channel* chnode, int serviceid, uint64_t transponderid, time_t starttime, time_t endtime, struct linkedchannel* last) 161 161 { 162 debug(1000, "in");163 162 struct linkedchannel *newnode = NULL, *prev = NULL, *node = NULL; 164 163 165 164 if(chnode == NULL) 166 165 { 167 debug(1000, "out ->NULL detect");166 err("NULL detect"); 168 167 return NULL; 169 168 } … … 205 204 206 205 m_unlock(&status.linkedchannelmutex, 14); 207 debug(1000, "out");208 206 return newnode; 209 207 } … … 215 213 if(chnode == NULL) 216 214 { 217 debug(1000, "out->NULL detect");215 err("NULL detect"); 218 216 return; 219 217 } … … 245 243 void freelinkedchannel(struct channel* chnode) 246 244 { 247 debug(1000, "in");248 245 struct linkedchannel *node = NULL, *prev = NULL; 249 246 250 247 if(chnode == NULL) 251 248 { 252 debug(1000, "out ->NULL detect");249 err("NULL detect"); 253 250 return; 254 251 } … … 268 265 } 269 266 m_unlock(&status.linkedchannelmutex, 14); 270 debug(1000, "out");271 267 } 272 268 -
titan/titan/list.h
r20079 r23286 20 20 struct clist* addlisttmp(struct clist **clist, char *key1, char *value1) 21 21 { 22 debug(1000, "in");23 22 m_lock(&status.clistmutex, 12); 24 23 struct clist *newnode = NULL, *node = NULL, *prev = NULL; … … 28 27 if(key1 == NULL || value1 == NULL) 29 28 { 30 debug(1000, "out -> NULL dedect");31 29 m_unlock(&status.clistmutex, 12); 32 30 return NULL; … … 85 83 free(node->tmp); 86 84 node->tmp = value; 87 debug(1000, "out -> key %s found, use change instread add", key);88 85 m_unlock(&status.clistmutex, 12); 89 86 return newnode; … … 97 94 clist[hash] = newnode; 98 95 99 debug(1000, "out");100 96 m_unlock(&status.clistmutex, 12); 101 97 return newnode; … … 104 100 struct clist* addlistdef(struct clist **clist, char *key1, char *value1) 105 101 { 106 debug(1000, "in");107 102 m_lock(&status.clistmutex, 12); 108 103 struct clist *newnode = NULL, *node = NULL, *prev = NULL; … … 112 107 if(key1 == NULL || value1 == NULL) 113 108 { 114 debug(1000, "out -> NULL dedect");115 109 m_unlock(&status.clistmutex, 12); 116 110 return NULL; … … 169 163 free(node->def); 170 164 node->def = value; 171 debug(1000, "out -> key %s found, use change instread add", key);172 165 m_unlock(&status.clistmutex, 12); 173 166 return newnode; … … 181 174 clist[hash] = newnode; 182 175 183 debug(1000, "out");184 176 m_unlock(&status.clistmutex, 12); 185 177 return newnode; … … 188 180 struct clist* addlist(struct clist **clist, char *key1, char *value1) 189 181 { 190 debug(1000, "in");191 182 m_lock(&status.clistmutex, 12); 192 183 struct clist *newnode = NULL, *node = NULL, *prev = NULL; … … 196 187 if(key1 == NULL || value1 == NULL) 197 188 { 198 debug(1000, "out -> NULL dedect");199 189 m_unlock(&status.clistmutex, 12); 200 190 return NULL; … … 259 249 free(node->value); 260 250 node->value = value; 261 debug(1000, "out -> key %s found, use change instread add", key);262 251 m_unlock(&status.clistmutex, 12); 263 252 return node; … … 271 260 clist[hash] = newnode; 272 261 273 debug(1000, "out");274 262 m_unlock(&status.clistmutex, 12); 275 263 return newnode; … … 278 266 int writelist(struct clist **clist, const char *filename) 279 267 { 280 debug(1000, "in");281 268 m_lock(&status.clistmutex, 12); 282 269 FILE *fd = NULL; … … 318 305 319 306 fclose(fd); 320 debug(1000, "out");321 307 m_unlock(&status.clistmutex, 12); 322 308 return 0; … … 325 311 char* getlistbyval(struct clist **clist, char *value, char *ext) 326 312 { 327 //debug(1000, "in");328 313 m_lock(&status.clistmutex, 12); 329 314 struct clist *node = NULL; … … 351 336 { 352 337 free(tmpstr); 353 //debug(1000, "out");354 338 m_unlock(&status.clistmutex, 12); 355 339 return node->key; … … 367 351 char* getlistnotmp(struct clist **clist, char *key, char *ext) 368 352 { 369 //debug(1000, "in");370 353 m_lock(&status.clistmutex, 12); 371 354 struct clist *node = NULL; … … 392 375 { 393 376 free(tmpstr); 394 //debug(1000, "out");395 377 if(node->value != NULL) 396 378 { … … 415 397 char* getlist(struct clist **clist, char *key, char *ext) 416 398 { 417 //debug(1000, "in");418 399 m_lock(&status.clistmutex, 12); 419 400 struct clist *node = NULL; … … 440 421 { 441 422 free(tmpstr); 442 //debug(1000, "out");443 423 if(node->tmp != NULL && strlen(node->tmp) > 0) 444 424 { … … 470 450 void dellist(struct clist **clist, char *key, int flag) 471 451 { 472 debug(1000, "in");473 452 if(flag == 0) m_lock(&status.clistmutex, 12); 474 453 struct clist *node = NULL, *prev = NULL; … … 514 493 node = node->next; 515 494 } 516 debug(1000, "out");517 495 if(flag == 0) m_unlock(&status.clistmutex, 12); 518 496 } … … 520 498 void dellisttmpall(struct clist **clist) 521 499 { 522 debug(1000, "in");523 500 m_lock(&status.clistmutex, 12); 524 501 struct clist *node = NULL, *prev = NULL; … … 546 523 } 547 524 } 548 debug(1000, "out");549 525 m_unlock(&status.clistmutex, 12); 550 526 } … … 552 528 void dellisttmp(struct clist **clist, char *key) 553 529 { 554 debug(1000, "in");555 530 m_lock(&status.clistmutex, 12); 556 531 struct clist *node = NULL, *prev = NULL; … … 579 554 node = node->next; 580 555 } 581 debug(1000, "out");582 556 m_unlock(&status.clistmutex, 12); 583 557 } … … 585 559 void freelist(struct clist** clist) 586 560 { 587 debug(1000, "in");588 561 m_lock(&status.clistmutex, 12); 589 562 struct clist *node = NULL, *prev = NULL; … … 601 574 } 602 575 } 603 debug(1000, "out");604 576 m_unlock(&status.clistmutex, 12); 605 577 } … … 607 579 int writelisttmp(struct clist **clist) 608 580 { 609 debug(1000, "in");610 581 m_lock(&status.clistmutex, 12); 611 582 struct clist *node = NULL; … … 646 617 } 647 618 648 debug(1000, "out");649 619 m_unlock(&status.clistmutex, 12); 650 620 return ret; -
titan/titan/mainbouquets.h
r22352 r23286 61 61 struct mainbouquet* getlastmainbouquet(struct mainbouquet* node) 62 62 { 63 debug(1000, "in");64 63 struct mainbouquet *prev = NULL; 65 64 … … 70 69 } 71 70 72 debug(1000, "out");73 71 return prev; 74 72 } … … 122 120 if(node == NULL || mainbouquet == NULL) 123 121 { 124 debug(1000,"NULL detect");122 err("NULL detect"); 125 123 return 1; 126 124 } … … 155 153 if(node == NULL || mainbouquet == NULL) 156 154 { 157 debug(1000,"NULL detect");155 err("NULL detect"); 158 156 return 1; 159 157 } … … 205 203 if(node == NULL || mainbouquet == NULL) 206 204 { 207 debug(1000,"NULL detect");205 err("NULL detect"); 208 206 return 1; 209 207 } … … 230 228 if(node == NULL || mainbouquet == NULL) 231 229 { 232 debug(1000,"NULL detect");230 err("NULL detect"); 233 231 return 1; 234 232 } … … 277 275 struct mainbouquet* addmainbouquet(char *line, int count, struct mainbouquet* last) 278 276 { 279 debug(1000, "in");280 277 struct mainbouquet *newnode = NULL, *prev = NULL, *node = mainbouquet; 281 278 char *name = NULL, *filename = NULL; … … 352 349 if(node != NULL) node->prev = newnode; 353 350 354 debug(1000, "out");355 351 return newnode; 356 352 } … … 358 354 int readmainbouquet(char* filename) 359 355 { 360 debug(1000, "in");361 356 FILE *fd = NULL; 362 357 char *fileline = NULL, *tmpstr = NULL, *tmpstr0 = NULL, *tmpstr1 = NULL; … … 441 436 struct mainbouquet* getmainbouquetbybouquetpointer(struct bouquet* bouquetnode) 442 437 { 443 debug(1000, "in");444 438 struct mainbouquet *node = mainbouquet; 445 439 struct bouquet *bnode = NULL; … … 451 445 { 452 446 if(bnode == bouquetnode) 453 {454 debug(1000, "out");455 447 return node; 456 } 448 457 449 bnode = bnode->next; 458 450 } … … 465 457 struct mainbouquet* getmainbouquetbyfilename(char *filename) 466 458 { 467 debug(1000, "in");468 459 struct mainbouquet *node = mainbouquet; 469 460 … … 471 462 { 472 463 if(ostrcmp(node->filename, filename) == 0) 473 {474 debug(1000, "out");475 464 return node; 476 }477 465 478 466 node = node->next; … … 484 472 struct mainbouquet* getmainbouquet(char *name) 485 473 { 486 debug(1000, "in");487 474 struct mainbouquet *node = mainbouquet; 488 475 … … 490 477 { 491 478 if(ostrcmp(node->name, name) == 0) 492 {493 debug(1000, "out");494 479 return node; 495 }496 480 497 481 node = node->next; … … 505 489 void delmainbouquet(char *name, int flag) 506 490 { 507 debug(1000, "in");508 491 struct mainbouquet *node = mainbouquet, *prev = mainbouquet; 509 492 … … 543 526 node = node->next; 544 527 } 545 debug(1000, "out");546 528 } 547 529 548 530 void freemainbouquet() 549 531 { 550 debug(1000, "in");551 532 struct mainbouquet *node = mainbouquet, *prev = mainbouquet; 552 533 … … 558 539 delmainbouquet(prev->name, 0); 559 540 } 560 debug(1000, "out");561 541 } 562 542 … … 574 554 int writemainbouquet(const char *filename) 575 555 { 576 debug(1000, "in");577 556 FILE *fd = NULL; 578 557 struct mainbouquet *node = mainbouquet; … … 597 576 598 577 fclose(fd); 599 debug(1000, "out");600 578 return 0; 601 579 } -
titan/titan/mediadb.h
r23063 r23286 147 147 if(node == NULL || mediadb == NULL) 148 148 { 149 debug(1000,"NULL detect");149 err("NULL detect"); 150 150 return 1; 151 151 } … … 196 196 if(node == NULL || mediadb == NULL) 197 197 { 198 debug(1000,"NULL detect");198 err("NULL detect"); 199 199 return 1; 200 200 } … … 286 286 287 287 m_unlock(&status.mediadbmutex, 17); 288 //debug(1000, "out");289 288 return newnode; 290 289 } … … 368 367 369 368 if(flag == 0) m_unlock(&status.mediadbmutex, 17); 370 //debug(1000, "out");371 369 return newnode; 372 370 } … … 454 452 struct mediadb* addmediadb(char *line, int len, int count, struct mediadb* last, int sort, int flag) 455 453 { 456 //debug(1000, "in");457 454 struct mediadb *newnode = NULL, *prev = NULL, *node = NULL; 458 455 int ret = 0; … … 516 513 517 514 if(flag == 0) m_unlock(&status.mediadbmutex, 17); 518 //debug(1000, "out");519 515 return newnode; 520 516 } … … 613 609 int readmediadb(const char* filename, int type, int flag) 614 610 { 615 debug(1000, "in");616 611 FILE *fd = NULL; 617 612 char *fileline = NULL; … … 709 704 int delmediadbfilter(struct mediadbfilter* mnode, int flag) 710 705 { 711 debug(1000, "in");712 706 int ret = 1; 713 707 … … 744 738 745 739 if(flag == 0) m_unlock(&status.mediadbmutex, 17); 746 debug(1000, "out");747 740 return ret; 748 741 } … … 750 743 int delmediadbcategory(struct mediadbcategory* mnode, int flag) 751 744 { 752 debug(1000, "in");753 745 int ret = 1; 754 746 … … 788 780 789 781 m_unlock(&status.mediadbmutex, 17); 790 debug(1000, "out");791 782 return ret; 792 783 } … … 794 785 int delmediadb(struct mediadb* mnode, int flag) 795 786 { 796 debug(1000, "in");797 787 int ret = 1; 798 788 … … 836 826 837 827 m_unlock(&status.mediadbmutex, 17); 838 debug(1000, "out");839 828 return ret; 840 829 } … … 842 831 void freemediadbfilter(int flag) 843 832 { 844 debug(1000, "in");845 833 struct mediadbfilter *node = mediadbfilter, *prev = mediadbfilter; 846 834 … … 852 840 delmediadbfilter(prev, flag); 853 841 } 854 debug(1000, "out");855 842 } 856 843 857 844 void freemediadbcategory(int flag) 858 845 { 859 debug(1000, "in");860 846 struct mediadbcategory *node = mediadbcategory, *prev = mediadbcategory; 861 847 … … 867 853 delmediadbcategory(prev, flag); 868 854 } 869 debug(1000, "out");870 855 } 871 856 872 857 void freemediadb(int flag) 873 858 { 874 debug(1000, "in");875 859 struct mediadb *node = mediadb, *prev = mediadb; 876 860 … … 884 868 885 869 status.writemediadb = 0; 886 debug(1000, "out");887 870 } 888 871 889 872 int writemediadbcategory(const char *filename) 890 873 { 891 debug(1000, "in");892 874 FILE *fd = NULL; 893 875 struct mediadbcategory *node = NULL; … … 917 899 918 900 fclose(fd); 919 debug(1000, "out");920 901 return 0; 921 902 } … … 923 904 int writemediadb(const char *filename, struct mediadb* cmediadb) 924 905 { 925 debug(1000, "in");926 906 FILE *fd = NULL; 927 907 struct mediadb *node = NULL; … … 979 959 fclose(fd); 980 960 status.writemediadb = 0; 981 debug(1000, "out");982 961 return 0; 983 962 } -
titan/titan/menu.h
r22605 r23286 80 80 struct skin* menu(struct skin* menu, int flag) 81 81 { 82 debug(1000, "in");83 82 int rcret = 0, ret = 0; 84 83 struct skin* listbox = getscreennode(menu, "listbox"); … … 91 90 if(listbox == NULL || menu == NULL) 92 91 { 93 debug(1000, "out ->NULL detect");92 err("NULL detect"); 94 93 return NULL; 95 94 } … … 168 167 delownerrc(menu); 169 168 clearscreen(menu); 170 debug(1000, "out");171 169 return listbox->select; 172 170 } … … 174 172 int menucall(struct skin* menunode, struct skin* menuentry, int check) 175 173 { 176 debug(1000, "in");177 178 174 void (*startplugin) (void); 179 175 int ret = 0, pincheck = 0; … … 182 178 if(menuentry == NULL) 183 179 { 184 debug(1000, "out ->NULL detect");180 err("NULL detect"); 185 181 return 1; 186 182 } … … 188 184 if(!(menuentry->type & MENU)) return 1; 189 185 190 debug(100 0, "menuentry->name=%s", menuentry->name);186 debug(100, "menuentry->name=%s", menuentry->name); 191 187 192 188 tmpstr = ostrcat("protect_", menuentry->name, 0, 0); … … 847 843 848 844 resettvpic(); 849 debug(1000, "out");850 845 return ret; 851 846 } -
titan/titan/menulist.h
r23013 r23286 4 4 void freemenulist(struct menulist* mlist, int delparam) 5 5 { 6 debug(1000, "in");7 6 struct menulist *node = mlist, *prev = mlist; 8 7 … … 35 34 } 36 35 } 37 debug(1000, "out");38 36 } 39 37 … … 134 132 struct menulist* menulistboxext(struct menulist* mlist, char* paramskinname, char* skintitle, char* paramskinpath, char* defaultpic, int showpng, int* rcreturn, int flag) 135 133 { 136 debug(1000, "in");137 134 int rcret = 0, fromthread = 0; 138 135 struct skin* framebuffer = getscreen("framebuffer"); … … 316 313 clearscreen(screen); 317 314 318 debug(1000, "out");319 315 return ret; 320 316 } -
titan/titan/mipselport.h
r23224 r23286 376 376 void blitrect(int posx, int posy, int width, int height, long color, int transparent, int mode) 377 377 { 378 //debug(1000, "in");379 378 int y, x; 380 379 unsigned long tmpcol; … … 417 416 drawpixel(posx + width - 1, posy + y, tmpcol); 418 417 } 419 //debug(1000, "out");420 418 421 419 /* … … 698 696 void sighandler(int sig, struct sigcontext ctx) 699 697 { 700 debug(1000, "in");701 698 switch(sig) 702 699 { … … 755 752 } 756 753 } 757 debug(1000, "out"); 758 } 759 760 #endif 754 } 755 756 #endif -
titan/titan/mostzap.h
r18454 r23286 47 47 if(node == NULL || mostzap == NULL) 48 48 { 49 debug(1000,"NULL detect");49 err("NULL detect"); 50 50 return 1; 51 51 } … … 80 80 struct mostzap* addmostzap(char* line, int count, struct mostzap* last) 81 81 { 82 //debug(1000, "in");83 82 struct mostzap *newnode = NULL, *prev = NULL, *node = mostzap; 84 83 int ret = 0; … … 121 120 if(node != NULL) node->prev = newnode; 122 121 123 //debug(1000, "out");124 122 return newnode; 125 123 } … … 152 150 int readmostzap(const char* filename) 153 151 { 154 debug(1000, "in");155 152 FILE *fd = NULL; 156 153 char *fileline = NULL; … … 196 193 int delmostzap(int serviceid, uint64_t transponderid, int flag) 197 194 { 198 debug(1000, "in");199 195 int ret = 1; 200 196 struct mostzap *node = mostzap, *prev = mostzap; … … 228 224 } 229 225 230 debug(1000, "out");231 226 return ret; 232 227 } … … 234 229 void freemostzap(int flag) 235 230 { 236 debug(1000, "in");237 231 struct mostzap *node = mostzap, *prev = mostzap; 238 232 … … 244 238 delmostzap(prev->serviceid, prev->transponderid, flag); 245 239 } 246 debug(1000, "out");247 240 } 248 241 249 242 int writemostzap(const char *filename) 250 243 { 251 debug(1000, "in");252 244 FILE *fd = NULL; 253 245 struct mostzap *node = mostzap; … … 276 268 277 269 fclose(fd); 278 debug(1000, "out");279 270 return 0; 280 271 } -
titan/titan/multiepg.h
r20349 r23286 36 36 if(chnode == NULL) 37 37 { 38 debug(1000, "out ->NULL detect");38 err("NULL detect"); 39 39 return 1; 40 40 } -
titan/titan/network.h
r22971 r23286 4 4 int readwlan(const char* filename, char** type, char** ssid, char** key) 5 5 { 6 debug(1000, "in");7 6 FILE *fd = NULL; 8 7 char *fileline = NULL, *tmpstr = NULL; -
titan/titan/newsletter.h
r21799 r23286 91 91 int readnewsletter() 92 92 { 93 debug(1000, "in");94 93 FILE *fd = NULL; 95 94 char* fileline = NULL; -
titan/titan/numinput.h
r22701 r23286 4 4 char* numinput(char* title, char* num, char* mask, int isip) 5 5 { 6 debug(1000, "in");7 6 int rcret = -1, fromthread = 0, height = 0; 8 7 struct skin* numinput = getscreen("numinput"); … … 78 77 79 78 numinput->height = height; 80 debug(1000, "out");81 79 return ret; 82 80 } -
titan/titan/oldentry.h
r22573 r23286 26 26 struct oldentry* addoldentry(void* entry, int type, time_t del, struct oldentry* last) 27 27 { 28 debug(1000, "in");29 28 struct oldentry *newnode = NULL, *node = NULL; 30 29 … … 60 59 61 60 m_unlock(&status.oldentrymutex, 18); 62 debug(1000, "out");63 61 return newnode; 64 62 } … … 68 66 void deloldentry(struct oldentry *entry, int flag) 69 67 { 70 debug(1000, "in");71 72 68 if(flag == 0) m_lock(&status.oldentrymutex, 18); 73 69 struct oldentry *node = oldentry, *prev = oldentry; … … 101 97 102 98 if(flag == 0) m_unlock(&status.oldentrymutex, 18); 103 debug(1000, "out");104 99 } 105 100 106 101 void freeoldentry() 107 102 { 108 debug(1000, "in");109 110 103 m_lock(&status.oldentrymutex, 18); 111 104 struct oldentry *node = oldentry, *prev = oldentry; … … 120 113 121 114 m_unlock(&status.oldentrymutex, 18); 122 debug(1000, "out");123 115 } 124 116 -
titan/titan/pic.h
r21257 r23286 29 29 struct pic* addpic(char *name, unsigned char* picbuf, int memfd, unsigned long width, unsigned long height, unsigned long rowbytes, int channels, int timeout, int del, struct pic* last) 30 30 { 31 debug(1000, "in");32 33 31 //chech if pic timed out and can remove 34 32 checkpictimeout(); … … 78 76 newnode->next = node; 79 77 80 debug(1000, "out");81 78 return newnode; 82 79 } … … 100 97 void delpic(char* name) 101 98 { 102 debug(1000, "in");103 99 struct pic *node = pic, *prev = pic; 104 100 char* tmpstr = NULL; … … 126 122 } 127 123 free(tmpstr); 128 debug(1000, "out");129 124 } 130 125 131 126 void delmarkedpic(int del) 132 127 { 133 debug(1000, "in");134 128 struct pic *node = pic, *prev = pic; 135 129 … … 153 147 node = node->next; 154 148 } 155 debug(1000, "out");156 149 } 157 150 158 151 struct pic* getpic(char* name) 159 152 { 160 debug(1000, "in");161 153 struct pic *node = pic; 162 154 char* tmpstr = NULL; … … 168 160 if(ostrcmp(node->name, tmpstr) == 0) 169 161 { 170 debug(1000, "out");171 162 free(tmpstr); 172 163 node->lastaccess = time(NULL); … … 183 174 void freepic() 184 175 { 185 debug(1000, "in");186 176 struct pic *node = pic, *prev = pic; 187 177 … … 193 183 delpic(prev->name); 194 184 } 195 debug(1000, "out");196 185 } 197 186 -
titan/titan/pip.h
r21301 r23286 9 9 int pipstartreal(struct channel* chnode, char* pin, int flag) 10 10 { 11 debug(1000, "in");12 11 struct transponder* tpnode = NULL; 13 12 struct dvbdev *fenode = NULL; … … 288 287 m_unlock(&status.servicemutex, 2); 289 288 290 debug(1000, "out");291 289 return 0; 292 290 } -
titan/titan/playlist.h
r19844 r23286 22 22 struct playlist* getlastplaylist(struct playlist* node) 23 23 { 24 debug(1000, "in");25 24 struct playlist *prev = NULL; 26 25 … … 31 30 } 32 31 33 debug(1000, "out");34 32 return prev; 35 33 } … … 42 40 if(node == NULL) 43 41 { 44 debug(1000,"NULL detect");42 err("NULL detect"); 45 43 return 1; 46 44 } … … 49 47 if(mainplaylistnode == NULL) 50 48 { 51 debug(1000, "NULL detect");52 49 err("NULL detect"); 53 50 return 1; … … 100 97 if(node == NULL) 101 98 { 102 debug(1000,"NULL detect");99 err("NULL detect"); 103 100 return 1; 104 101 } … … 107 104 if(mainplaylistnode == NULL) 108 105 { 109 debug(1000,"NULL detect");106 err("NULL detect"); 110 107 return 1; 111 108 } … … 175 172 struct playlist* addplaylist(struct playlist **firstnode, char *line, int count, struct playlist* last) 176 173 { 177 //debug(1000, "in");178 174 struct playlist *newnode = NULL, *prev = NULL, *node = *firstnode; 179 175 int ret = 0; … … 240 236 if(node != NULL) node->prev = newnode; 241 237 242 //debug(1000, "out");243 238 return newnode; 244 239 } … … 246 241 int readplaylist(char* filename, struct playlist** firstnode) 247 242 { 248 debug(1000, "in");249 243 FILE *fd = NULL; 250 244 char *fileline = NULL; … … 293 287 void delplaylist(char* file, struct playlist** firstnode) 294 288 { 295 debug(1000, "in");296 289 struct playlist *node = *firstnode, *prev = *firstnode; 297 290 … … 325 318 node = node->next; 326 319 } 327 debug(1000, "out");328 320 } 329 321 330 322 void freeplaylist(struct playlist** firstnode) 331 323 { 332 debug(1000, "in");333 324 struct playlist *node = *firstnode, *prev = *firstnode; 334 325 … … 340 331 delplaylist(prev->file, firstnode); 341 332 } 342 debug(1000, "out");343 333 } 344 334 345 335 int writeplaylist(const char *filename, struct playlist *node) 346 336 { 347 debug(1000, "in");348 337 FILE *fd = NULL; 349 338 int ret = 0; … … 367 356 368 357 fclose(fd); 369 debug(1000, "out");370 358 return 0; 371 359 } -
titan/titan/provider.h
r23185 r23286 4 4 int getlastproviderid() 5 5 { 6 debug(1000, "in");7 6 int lastid = 0; 8 7 struct provider *node = provider, *prev = NULL; … … 16 15 } 17 16 18 debug(1000, "out");19 17 return lastid; 20 18 } … … 22 20 struct provider* getlastprovider(struct provider* node) 23 21 { 24 debug(1000, "in");25 22 struct provider *prev = NULL; 26 23 … … 31 28 } 32 29 33 debug(1000, "out");34 30 return prev; 35 31 } … … 42 38 if(node == NULL) 43 39 { 44 debug(1000,"NULL detect");40 err("NULL detect"); 45 41 return 1; 46 42 } … … 69 65 if(node == NULL || provider == NULL) 70 66 { 71 debug(1000,"NULL detect");67 err("NULL detect"); 72 68 return 1; 73 69 } … … 119 115 if(node == NULL) 120 116 { 121 debug(1000,"NULL detect");117 err("NULL detect"); 122 118 return 1; 123 119 } … … 140 136 if(node == NULL || provider == NULL) 141 137 { 142 debug(1000,"NULL detect");138 err("NULL detect"); 143 139 return 1; 144 140 } … … 187 183 struct provider* addprovider(char *line, int count, struct provider* last) 188 184 { 189 //debug(1000, "in");190 185 struct provider *newnode = NULL, *prev = NULL, *node = provider; 191 186 char *name = NULL; … … 251 246 if(node != NULL) node->prev = newnode; 252 247 253 //debug(1000, "out");254 248 return newnode; 255 249 } … … 257 251 int readprovider(const char* filename) 258 252 { 259 debug(1000, "in");260 253 FILE *fd = NULL; 261 254 char *fileline = NULL, *tmpstr = NULL, *tmpstr0 = NULL, *tmpstr1 = NULL; … … 322 315 void delprovider(int providerid) 323 316 { 324 debug(1000, "in");325 317 struct provider *node = provider, *prev = provider; 326 318 … … 354 346 node = node->next; 355 347 } 356 debug(1000, "out");357 348 } 358 349 … … 374 365 struct provider* getproviderbyname(char* name) 375 366 { 376 debug(1000, "in");377 367 struct provider *node = provider; 378 368 … … 380 370 { 381 371 if(ostrcmp(node->name, name) == 0) 382 {383 debug(1000, "out");384 372 return node; 385 }386 373 387 374 node = node->next; … … 393 380 struct provider* getprovider(int providerid) 394 381 { 395 //debug(1000, "in");396 382 struct provider *node = provider; 397 383 … … 399 385 { 400 386 if(node->providerid == providerid) 401 {402 //debug(1000, "out");403 387 return node; 404 }405 388 406 389 node = node->next; … … 470 453 void freeprovider() 471 454 { 472 debug(1000, "in");473 455 struct provider *node = provider, *prev = provider; 474 456 … … 480 462 delprovider(prev->providerid); 481 463 } 482 debug(1000, "out");483 464 } 484 465 485 466 int writeprovider(const char *filename) 486 467 { 487 debug(1000, "in");488 468 FILE *fd = NULL; 489 469 struct provider *node = provider; … … 508 488 509 489 fclose(fd); 510 debug(1000, "out");511 490 return 0; 512 491 } -
titan/titan/queue.h
r16380 r23286 15 15 struct queue* addqueue(int type, void* data, int len, void* data1, int len1, int flag, struct queue* last) 16 16 { 17 //debug(1000, "in");18 19 17 m_lock(&status.queuemutex, 11); 20 18 … … 85 83 if(node != NULL) node->prev = queue; 86 84 87 //debug(1000, "out");88 85 m_unlock(&status.queuemutex, 11); 89 86 return newnode; … … 94 91 void delqueue(struct queue* queuenode, int flag) 95 92 { 96 debug(1000, "in");97 93 if(flag == 0) m_lock(&status.queuemutex, 11); 98 94 struct queue *node = queue, *prev = queue; … … 130 126 } 131 127 if(flag == 0) m_unlock(&status.queuemutex, 11); 132 debug(1000, "out");133 128 } 134 129 135 130 struct queue* getqueue(int type) 136 131 { 137 //debug(1000, "in");138 132 m_lock(&status.queuemutex, 11); 139 133 struct queue *node = queue; … … 143 137 if(node->type == type) 144 138 { 145 //debug(1000, "out");146 139 m_unlock(&status.queuemutex, 11); 147 140 return node; … … 156 149 void freequeue() 157 150 { 158 debug(1000, "in");159 151 m_lock(&status.queuemutex, 11); 160 152 struct queue *node = queue, *prev = queue; … … 168 160 } 169 161 m_unlock(&status.queuemutex, 11); 170 debug(1000, "out");171 162 } 172 163 -
titan/titan/rc.h
r22985 r23286 79 79 struct rc* getrc(int key, struct skin* owner) 80 80 { 81 debug(1000, "in");82 81 struct rc *node = rc; 83 82 … … 85 84 { 86 85 if(node->key == key && node->owner == owner) 87 {88 debug(1000, "out");89 86 return node; 90 }91 87 92 88 node = node->next; … … 98 94 { 99 95 if(node->key == key && node->owner == NULL) 100 {101 debug(1000, "out");102 96 return node; 103 }104 97 105 98 node = node->next; … … 110 103 int openrc() 111 104 { 112 debug(1000, "in");113 105 char *rcdev = NULL; 114 106 int i = 0; … … 139 131 } 140 132 141 debug(1000, "out");142 133 return 0; 143 134 } … … 145 136 void closerc() 146 137 { 147 debug(1000, "in");148 149 138 if(status.fdrc != -1) 150 139 close(status.fdrc); 151 152 debug(1000, "out");153 140 } 154 141 … … 221 208 int waitrcext(struct skin* owner, unsigned int timeout, int screencalc, int filelistview) 222 209 { 223 debug(1000, "in");224 210 fd_set rfds; 225 211 struct timeval tv; … … 359 345 } 360 346 361 debug(1000, "out");362 347 if(ret != RCTIMEOUT) 363 348 status.lastrcaction = time(NULL); … … 372 357 struct rc* addrc(int key, void *func, struct skin* screen, struct skin *screennode) 373 358 { 374 debug(1000, "in");375 359 struct rc *newnode, *node = rc; 376 360 struct rc **nodeaddr; … … 401 385 free(newnode); 402 386 newnode = NULL; 403 debug(1000, "out -> key %d found, use change instread add", key);404 387 return node; 405 388 } … … 412 395 rc = newnode; 413 396 414 debug(1000, "out");415 397 return newnode; 416 398 } … … 418 400 void delrc(int key, struct skin* owner, struct skin* screennode) 419 401 { 420 debug(1000, "in");421 402 struct rc *node = rc, *prev = rc; 422 403 … … 438 419 node = node->next; 439 420 } 440 debug(1000, "out");441 421 } 442 422 443 423 void delownerrc(struct skin* owner) 444 424 { 445 debug(1000, "in");446 425 struct rc *node = rc, *prev = rc; 447 426 … … 453 432 delrc(prev->key, prev->owner, prev->screennode); 454 433 } 455 debug(1000, "out");456 434 } 457 435 458 436 void freerc() 459 437 { 460 debug(1000, "in");461 438 struct rc *node = rc, *prev = rc; 462 439 … … 468 445 delrc(prev->key, prev->owner, prev->screennode); 469 446 } 470 debug(1000, "out");471 447 } 472 448 -
titan/titan/rcconfig.h
r16367 r23286 53 53 struct clist* addrcconfigint(char *key, int value) 54 54 { 55 debug(1000, "in");56 55 char* fileline = NULL; 57 56 struct clist* ret = NULL; … … 61 60 62 61 free(fileline); 63 debug(1000, "out");64 62 return ret; 65 63 } … … 67 65 int readrcconfig(const char *filename, struct clist** tmprcconfig) 68 66 { 69 debug(1000, "in");70 67 FILE *fd = NULL; 71 68 char *fileline = NULL, *pos; … … 108 105 fclose(fd); 109 106 free(fileline); 110 debug(1000, "out");111 107 return 0; 112 108 } … … 166 162 int reloadrcconfig(char *filename) 167 163 { 168 debug(1000, "in");169 164 int ret = 0; 170 165 … … 173 168 if(ret != 0) 174 169 { 175 debug(1000, "out ->readrcconfig fail");170 err("readrcconfig fail"); 176 171 return 1; 177 172 } 178 173 179 debug(1000, "out");180 174 return 0; 181 175 } -
titan/titan/rcfunc.h
r20290 r23286 4 4 void progressbarright(struct skin* screen, struct skin* progressbar, int screencalc, int filelistview, int flag) 5 5 { 6 debug(1000, "in");7 8 6 if(progressbar != NULL) 9 7 { … … 16 14 progressbar->progresssize = 100; 17 15 } 18 19 debug(1000, "out");20 16 } 21 17 22 18 void progressbarleft(struct skin* screen, struct skin* progressbar, int screencalc, int filelistview, int flag) 23 19 { 24 debug(1000, "in");25 26 20 if(progressbar != NULL) 27 21 { … … 34 28 progressbar->progresssize = 0; 35 29 } 36 37 debug(1000, "out");38 30 } 39 31 40 32 void filelistok(struct skin* screen, struct skin* filelist, int screencalc, int filelistview, int flag) 41 33 { 42 debug(1000, "in");43 34 struct skin* path = NULL; 44 35 char* tmp = NULL, *lastdir = NULL, *plastdir = NULL; … … 85 76 } 86 77 } 87 debug(1000, "out");88 78 } 89 79 … … 112 102 void inputboxchar(struct skin* screen, struct skin* inputbox, char zeichen, int screencalc, int filelistview, int flag) 113 103 { 114 debug(1000, "in");115 104 if(inputbox != NULL && inputbox->input != NULL) 116 105 { … … 122 111 } 123 112 } 124 debug(1000, "out");125 113 } 126 114 127 115 void inputboxff(struct skin* screen, struct skin* inputbox, int screencalc, int filelistview, int flag) 128 116 { 129 debug(1000, "in");130 117 if(inputbox != NULL) 131 118 { … … 135 122 drawscreen(screen, screencalc, flag); 136 123 } 137 debug(1000, "out");138 124 } 139 125 140 126 void inputboxfr(struct skin* screen, struct skin* inputbox, int screencalc, int filelistview, int flag) 141 127 { 142 debug(1000, "in");143 128 if(inputbox != NULL && inputbox->input != NULL) 144 129 { … … 146 131 drawscreen(screen, screencalc, flag); 147 132 } 148 debug(1000, "out");149 133 } 150 134 151 135 void checkinputboxnumright(struct skin* inputbox) 152 136 { 153 debug(1000, "in");154 137 int count = 0; 155 138 … … 171 154 } 172 155 } 173 debug(1000, "out");174 156 } 175 157 176 158 void checkinputboxnumleft(struct skin* inputbox) 177 159 { 178 debug(1000, "in");179 160 int count = 0; 180 161 … … 196 177 } 197 178 } 198 debug(1000, "out");199 179 } 200 180 201 181 void inputboxright(struct skin* screen, struct skin* inputbox, int screencalc, int filelistview, int flag) 202 182 { 203 debug(1000, "in");204 205 183 if(inputbox != NULL && inputbox->input != NULL) 206 184 { … … 211 189 drawscreen(screen, screencalc, flag); 212 190 } 213 debug(1000, "out");214 191 } 215 192 216 193 void inputboxleft(struct skin* screen, struct skin* inputbox, int screencalc, int filelistview, int flag) 217 194 { 218 debug(1000, "in");219 220 195 if(inputbox != NULL && inputbox->input != NULL) 221 196 { … … 226 201 drawscreen(screen, screencalc, flag); 227 202 } 228 debug(1000, "out");229 203 } 230 204 … … 556 530 void choiceboxleft(struct skin* screen, struct skin* choicebox, int screencalc, int filelistview, int flag) 557 531 { 558 debug(1000, "in");559 532 if(choicebox != NULL) 560 533 { … … 565 538 drawscreen(screen, screencalc, flag); 566 539 } 567 debug(1000, "out");568 540 } 569 541 570 542 void choiceboxright(struct skin* screen, struct skin* choicebox, int screencalc, int filelistview, int flag) 571 543 { 572 debug(1000, "in");573 544 if(choicebox != NULL) 574 545 { … … 582 553 drawscreen(screen, screencalc, flag); 583 554 } 584 debug(1000, "out");585 555 } 586 556 587 557 void griddown(struct skin* screen, struct skin* grid, int screencalc, int filelistview, int flag) 588 558 { 589 debug(1000, "in");590 559 int end = 0, br = 0, mark = 0; 591 560 struct skin* node = NULL; … … 643 612 drawscreen(screen, screencalc, flag); 644 613 } 645 646 debug(1000, "out");647 614 } 648 615 649 616 void gridup(struct skin* screen, struct skin* grid, int screencalc, int filelistview, int flag) 650 617 { 651 debug(1000, "in");652 618 int start = 0, br = 0, mark = 0; 653 619 struct skin* node = NULL, *tmpnode = NULL;; … … 714 680 drawscreen(screen, screencalc, flag); 715 681 } 716 717 debug(1000, "out");718 682 } 719 683 720 684 void gridleft(struct skin* screen, struct skin* grid, int screencalc, int filelistview, int flag) 721 685 { 722 debug(1000, "in");723 686 struct skin* node = NULL; 724 687 … … 753 716 grid->gridcol = grid->select->posx + (grid->select->width / 2); 754 717 } 755 debug(1000, "out");756 718 } 757 719 758 720 void gridright(struct skin* screen, struct skin* grid, int screencalc, int filelistview, int flag) 759 721 { 760 debug(1000, "in");761 722 struct skin* node = NULL; 762 723 … … 793 754 grid->gridcol = grid->select->posx + (grid->select->width / 2); 794 755 } 795 debug(1000, "out");796 756 } 797 757 798 758 void gridchup(struct skin* screen, struct skin* grid, int screencalc, int filelistview, int flag) 799 759 { 800 debug(1000, "in");801 802 760 if(grid != NULL) 803 761 { … … 811 769 grid->gridcol = grid->select->posx + (grid->select->width / 2); 812 770 } 813 814 debug(1000, "out");815 771 } 816 772 817 773 void gridchdown(struct skin* screen, struct skin* grid, int screencalc, int filelistview, int flag) 818 774 { 819 debug(1000, "in");820 821 775 if(grid != NULL) 822 776 { … … 833 787 grid->gridcol = grid->select->posx + (grid->select->width / 2); 834 788 } 835 836 debug(1000, "out");837 789 } 838 790 … … 840 792 void listboxleft(struct skin* screen, struct skin* listbox, int screencalc, int filelistview, int flag) 841 793 { 842 debug(1000, "in");843 844 794 if(listbox != NULL) 845 795 { … … 852 802 drawscreen(screen, screencalc, flag); 853 803 } 854 855 debug(1000, "out");856 804 } 857 805 858 806 void listboxright(struct skin* screen, struct skin* listbox, int screencalc, int filelistview, int flag) 859 807 { 860 debug(1000, "in");861 862 808 if(listbox != NULL) 863 809 { … … 873 819 drawscreen(screen, screencalc, flag); 874 820 } 875 876 debug(1000, "out");877 821 } 878 822 879 823 void listboxup(struct skin* screen, struct skin* listbox, int screencalc, int filelistview, int flag) 880 824 { 881 debug(1000, "in");882 883 825 if(listbox != NULL) 884 826 { … … 891 833 drawscreen(screen, screencalc, flag); 892 834 } 893 debug(1000, "out");894 835 } 895 836 896 837 void listboxdown(struct skin* screen, struct skin* listbox, int screencalc, int filelistview, int flag) 897 838 { 898 debug(1000, "in");899 900 839 if(listbox != NULL) 901 840 { … … 909 848 drawscreen(screen, screencalc, flag); 910 849 } 911 debug(1000, "out");912 850 } 913 851 914 852 void textboxup(struct skin* screen, struct skin* textbox, int screencalc, int filelistview, int flag) 915 853 { 916 debug(1000, "in");917 854 if(textbox != NULL) 918 855 { … … 923 860 } 924 861 } 925 debug(1000, "out");926 862 } 927 863 928 864 void textboxdown(struct skin* screen, struct skin* textbox, int screencalc, int filelistview, int flag) 929 865 { 930 debug(1000, "in");931 866 if(textbox != NULL) 932 867 { … … 937 872 } 938 873 } 939 debug(1000, "out");940 874 } 941 875 942 876 int addscreenrc(struct skin* screen, struct skin* node) 943 877 { 944 debug(1000, "in");945 946 878 if(node == NULL) 947 879 { 948 debug(1000, "out ->NULL detect");880 err("NULL detect"); 949 881 return 1; 950 882 } … … 1023 955 } 1024 956 1025 debug(1000, "out");1026 957 return 0; 1027 958 } … … 1029 960 int delscreenrc(struct skin* screen, struct skin* node) 1030 961 { 1031 debug(1000, "in");1032 1033 962 if(node == NULL) 1034 963 { 1035 debug(1000, "out ->NULL detect");964 err("NULL detect"); 1036 965 return 1; 1037 966 } … … 1110 1039 } 1111 1040 1112 debug(1000, "out");1113 1041 return 0; 1114 1042 } -
titan/titan/rcmap.h
r19467 r23286 4 4 struct rcmap* addrcmap(char *line, int count, struct rcmap* last) 5 5 { 6 debug(1000, "in");7 6 struct rcmap *newnode = NULL, *prev = NULL, *node = rcmap; 8 7 char *name = NULL, *key = NULL, *newkey = NULL; … … 87 86 newnode->next = node; 88 87 89 debug(1000, "out");90 88 return newnode; 91 89 } … … 93 91 int readrcmap(const char* filename) 94 92 { 95 debug(1000, "in");96 93 FILE *fd = NULL; 97 94 char *fileline = NULL; … … 139 136 void delrcmap(char* name) 140 137 { 141 debug(1000, "in");142 138 struct rcmap *node = rcmap, *prev = rcmap; 143 139 … … 162 158 node = node->next; 163 159 } 164 debug(1000, "out");165 160 } 166 161 167 162 struct rcmap* getrcmap(char* name, int key) 168 163 { 169 debug(1000, "in");170 164 struct rcmap *node = rcmap; 171 165 … … 173 167 { 174 168 if(ostrcmp(node->name, name) == 0 && node->key == key) 175 {176 debug(1000, "out");177 169 return node; 178 }179 170 180 171 node = node->next; … … 186 177 void freercmap() 187 178 { 188 debug(1000, "in");189 179 struct rcmap *node = rcmap, *prev = rcmap; 190 180 … … 196 186 delrcmap(prev->name); 197 187 } 198 debug(1000, "out");199 188 } 200 189 -
titan/titan/record.h
r23163 r23286 209 209 void recordstop(struct service* node, int ret) 210 210 { 211 debug(1000, "in");212 211 struct stimerthread *recthumbthread = NULL; 213 212 struct rectimer* rectimernode = NULL; … … 294 293 } 295 294 } 296 297 debug(1000, "out");298 295 } 299 296 … … 755 752 tmpstr = ostrcat(tmpstr, ".ts", 1, 0); 756 753 757 debug(1000, "out");758 754 return tmpstr; 759 755 } … … 1102 1098 struct service* getrecordbyname(char* recname, int type) 1103 1099 { 1104 debug(1000, "in");1105 1100 struct service* servicenode = service; 1106 1101 1107 1102 if(recname == NULL) 1108 1103 { 1109 debug(1000, "out ->NULL detect");1104 err("NULL detect"); 1110 1105 return NULL; 1111 1106 } … … 1125 1120 1126 1121 return NULL; 1127 debug(1000, "out");1128 1122 } 1129 1123 -
titan/titan/rectimer.h
r20827 r23286 262 262 struct rectimer* addrectimernode(char* line, struct rectimer* last) 263 263 { 264 debug(1000, "in");265 264 char *ret = NULL; 266 265 struct rectimer *newnode = NULL, *prev = NULL, *node = rectimer; … … 393 392 if(node != NULL) node->prev = newnode; 394 393 395 debug(1000, "out");396 394 return newnode; 397 395 } … … 587 585 int addrectimer(char *buf) 588 586 { 589 debug(1000, "in");590 587 struct rectimer* node = NULL; 591 588 char* buf1 = buf; … … 618 615 } 619 616 free(line); 620 debug(1000, "out");621 617 return 0; 622 618 } … … 624 620 int readrectimer(char *filename) 625 621 { 626 debug(1000, "in");627 622 char *buf = NULL; 628 623 … … 636 631 free(buf); 637 632 } 638 debug(1000, "out");639 633 return 0; 640 634 } … … 644 638 void delrectimer(struct rectimer* rectimernode, int write, int flag) 645 639 { 646 debug(1000, "in");647 648 640 if(flag == 0) m_lock(&status.rectimermutex, 1); 649 641 struct rectimer *node = rectimer, *prev = rectimer; … … 713 705 if(flag == 0) 714 706 m_unlock(&status.rectimermutex, 1); 715 debug(1000, "out");716 707 } 717 708 718 709 void deloldrectimer() 719 710 { 720 debug(1000, "in");721 711 struct rectimer *node = rectimer, *prev = rectimer; 722 712 … … 728 718 delrectimer(prev, 1, 0); 729 719 } 730 debug(1000, "out");731 720 } 732 721 733 722 void freerectimer() 734 723 { 735 debug(1000, "in");736 724 struct rectimer *node = rectimer, *prev = rectimer; 737 725 … … 743 731 delrectimer(prev, 0, 0); 744 732 } 745 debug(1000, "out");746 733 } 747 734 … … 750 737 int writerectimer(const char *filename, int flag) 751 738 { 752 debug(1000, "in");753 739 FILE *fd = NULL; 754 740 struct rectimer *node = NULL; … … 823 809 824 810 status.writerectimer = 0; 825 debug(1000, "out");826 811 return 0; 827 812 } -
titan/titan/sat.h
r19467 r23286 15 15 struct sat* getsatbyorbitalpos(int orbitalpos) 16 16 { 17 debug(1000, "in");18 17 struct sat *node = sat; 19 18 … … 21 20 { 22 21 if(node->orbitalpos == orbitalpos) 23 {24 debug(1000, "out");25 22 return node; 26 }27 23 28 24 node = node->next; … … 118 114 struct sat* getlastsat(struct sat* node) 119 115 { 120 debug(1000, "in");121 116 struct sat *prev = NULL; 122 117 … … 127 122 } 128 123 129 debug(1000, "out");130 124 return prev; 131 125 } … … 138 132 if(node == NULL) 139 133 { 140 debug(1000,"NULL detect");134 err("NULL detect"); 141 135 return 1; 142 136 } … … 165 159 if(node == NULL || sat == NULL) 166 160 { 167 debug(1000,"NULL detect");161 err("NULL detect"); 168 162 return 1; 169 163 } … … 215 209 if(node == NULL) 216 210 { 217 debug(1000,"NULL detect");211 err("NULL detect"); 218 212 return 1; 219 213 } … … 236 230 if(node == NULL) 237 231 { 238 debug(1000,"NULL detect");232 err("NULL detect"); 239 233 return 1; 240 234 } … … 283 277 struct sat* addsat(char *line, int count, struct sat* last) 284 278 { 285 debug(1000, "in");286 279 struct sat *newnode = NULL, *prev = NULL, *node = sat; 287 280 char *name = NULL; … … 347 340 if(node != NULL) node->prev = newnode; 348 341 349 debug(1000, "out");350 342 return newnode; 351 343 } … … 353 345 int readsat(const char* filename) 354 346 { 355 debug(1000, "in");356 347 FILE *fd = NULL; 357 348 char *fileline = NULL, *tmpstr = NULL, *tmpstr0 = NULL, *tmpstr1 = NULL; … … 418 409 void delsat(char *name) 419 410 { 420 debug(1000, "in");421 411 struct sat *node = sat, *prev = sat; 422 412 … … 452 442 node = node->next; 453 443 } 454 debug(1000, "out");455 444 } 456 445 457 446 struct sat* getsat(char *name) 458 447 { 459 debug(1000, "in");460 448 struct sat *node = sat; 461 449 … … 463 451 { 464 452 if(ostrstr(node->name, name) != NULL) 465 {466 debug(1000, "out");467 453 return node; 468 }469 454 470 455 node = node->next; … … 476 461 void freesat() 477 462 { 478 debug(1000, "in");479 463 struct sat *node = sat, *prev = sat; 480 464 … … 486 470 delsat(prev->name); 487 471 } 488 debug(1000, "out");489 472 } 490 473 491 474 int writesat(const char *filename) 492 475 { 493 debug(1000, "in");494 476 FILE *fd = NULL; 495 477 struct sat *node = sat; … … 515 497 516 498 fclose(fd); 517 debug(1000, "out");518 499 return 0; 519 500 } -
titan/titan/scart.h
r12501 r23286 4 4 void screenscart() 5 5 { 6 debug(1000, "in");7 6 int rcret = 0; 8 7 char* tmpstr = NULL; … … 26 25 textbox(_("Message"), _("Videomode must be 576i for Scart"), _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 600, 200, 5, 0); 27 26 free(tmpstr); tmpstr = NULL; 28 debug(1000, "out");29 27 return; 30 28 } -
titan/titan/scdev.h
r22550 r23286 64 64 struct dvbdev* scopen() 65 65 { 66 debug(1000, "in");67 66 int fd = -1; 68 67 struct dvbdev* node = dvbdev; … … 89 88 } 90 89 91 debug(1000, "out");92 90 return node; 93 91 } … … 95 93 int scopendirect(char *scdev) 96 94 { 97 debug(1000, "in");98 95 int fd = -1; 99 96 … … 104 101 105 102 closeonexec(fd); 106 debug(1000, "out");107 103 return fd; 108 104 } … … 123 119 if(node == NULL) 124 120 { 125 debug(1000, "out->NULL detect");121 err("NULL detect"); 126 122 return 1; 127 123 } … … 141 137 if(node == NULL || modes == NULL) 142 138 { 143 debug(1000, "out->NULL detect");139 err("NULL detect"); 144 140 return 1; 145 141 } … … 159 155 if(node == NULL || modes == NULL) 160 156 { 161 debug(1000, "out->NULL detect");157 err("NULL detect"); 162 158 return 1; 163 159 } … … 177 173 if(node == NULL || parameters == NULL) 178 174 { 179 debug(1000, "out->NULL detect");175 err("NULL detect"); 180 176 return 1; 181 177 } … … 195 191 if(node == NULL || parameters == NULL) 196 192 { 197 debug(1000, "out->NULL detect");193 err("NULL detect"); 198 194 return 1; 199 195 } … … 213 209 if(node == NULL) 214 210 { 215 debug(1000, "out->NULL detect");211 err("NULL detect"); 216 212 return 1; 217 213 } … … 231 227 if(node == NULL) 232 228 { 233 debug(1000, "out->NULL detect");229 err("NULL detect"); 234 230 return 1; 235 231 } … … 249 245 if(node == NULL) 250 246 { 251 debug(1000, "out->NULL detect");247 err("NULL detect"); 252 248 return 1; 253 249 } … … 267 263 if(node == NULL) 268 264 { 269 debug(1000, "out->NULL detect");265 err("NULL detect"); 270 266 return 1; 271 267 } … … 285 281 if(node == NULL) 286 282 { 287 debug(1000, "out->NULL detect");283 err("NULL detect"); 288 284 return 1; 289 285 } … … 303 299 if(node == NULL) 304 300 { 305 debug(1000, "out->NULL detect");301 err("NULL detect"); 306 302 return 1; 307 303 } … … 321 317 if(node == NULL) 322 318 { 323 debug(1000, "out->NULL detect");319 err("NULL detect"); 324 320 return 1; 325 321 } … … 339 335 if(node == NULL) 340 336 { 341 debug(1000, "out->NULL detect");337 err("NULL detect"); 342 338 return 1; 343 339 } … … 357 353 if(node == NULL) 358 354 { 359 debug(1000, "out->NULL detect");355 err("NULL detect"); 360 356 return 1; 361 357 } … … 373 369 int scgetdev() 374 370 { 375 debug(1000, "in");376 371 int y, fd = -1, count = 0; 377 372 char *buf = NULL, *scdev = NULL; … … 380 375 if(scdev == NULL) 381 376 { 382 debug(1000, "out ->NULL detect");377 err("NULL detect"); 383 378 return count; 384 379 } … … 404 399 405 400 free(buf); 406 debug(1000, "out");407 401 return count; 408 402 } -
titan/titan/service.h
r22502 r23286 64 64 int servicestartreal(struct channel* chnode, char* channellist, char* pin, int flag) 65 65 { 66 debug(1000, "in");67 66 struct transponder* tpnode = NULL; 68 67 struct dvbdev *fenode = NULL; … … 581 580 } 582 581 583 debug(1000, "out");584 582 return 0; 585 583 } … … 773 771 if(chnode == NULL || tracknode == NULL) 774 772 { 775 debug(1000, "out ->NULL detect");773 err("NULL detect"); 776 774 return; 777 775 } … … 799 797 struct service* addservice(struct service* last) 800 798 { 801 debug(1000, "in");802 799 struct service *newnode = NULL, *node = NULL; 803 800 … … 829 826 service = newnode; 830 827 831 debug(1000, "out");832 828 m_unlock(&status.servicemutex, 2); 833 829 return newnode; … … 851 847 void delservice(struct service* snode, int flag) 852 848 { 853 debug(1000, "in");854 849 m_lock(&status.servicemutex, 2); 855 850 struct service *node = service, *prev = service; … … 918 913 } 919 914 m_unlock(&status.servicemutex, 2); 920 debug(1000, "out");921 915 } 922 916 923 917 void freeservice() 924 918 { 925 debug(1000, "in");926 919 struct service *node = service, *prev = service; 927 920 … … 933 926 delservice(prev, 0); 934 927 } 935 debug(1000, "out");936 928 } 937 929 -
titan/titan/settings_bluebutton.h
r20934 r23286 4 4 void screensettings_bluebutton() 5 5 { 6 debug(1000, "in");7 6 char* skintitle = "Blue Key Action - Setup"; 8 7 struct skin* plugin = getscreen("plugin"); … … 49 48 freemenulist(mlist, 1); mlist = NULL; 50 49 free(tmpstr); tmpstr = NULL; 51 debug(1000, "out");52 50 return; 53 51 } -
titan/titan/settings_redbutton.h
r20934 r23286 4 4 void screensettings_redbutton() 5 5 { 6 debug(1000, "in");7 6 char* skintitle = "Red Key Action - Setup"; 8 7 struct skin* plugin = getscreen("plugin"); … … 50 49 freemenulist(mlist, 1); mlist = NULL; 51 50 free(tmpstr); tmpstr = NULL; 52 debug(1000, "out");53 51 return; 54 52 } -
titan/titan/sh4port.h
r23224 r23286 24 24 if(node == NULL) 25 25 { 26 debug(1000, "out->NULL detect");26 err("NULL detect"); 27 27 return 1; 28 28 } … … 660 660 void sighandler(int sig, struct sigcontext ctx) 661 661 { 662 debug(1000, "in");663 662 switch(sig) 664 663 { … … 710 709 } 711 710 } 712 debug(1000, "out");713 711 } 714 712 -
titan/titan/showiframe.h
r22609 r23286 6 6 int singlepicstart(const char *filename, int flag) 7 7 { 8 debug(1000, "in -> %s", filename);9 8 int ret = 0; 10 9 … … 74 73 return 1; 75 74 } 76 debug(1000, "out");77 75 return 0; 78 76 } -
titan/titan/skin.h
r23176 r23286 27 27 void* convertfunc(char *value, uint8_t *rettype) 28 28 { 29 debug(1000, "in");30 29 *rettype = FUNCTEXT; 31 30 … … 221 220 return &getpowerofftime; 222 221 223 debug(1000, "out");224 222 return 0; 225 223 } … … 227 225 long convertcol(char *value) 228 226 { 229 // debug(1000, "in");230 227 char *ret; 231 228 long col = 0; … … 247 244 } 248 245 249 // debug(1000, "out");250 246 return col; 251 247 } … … 253 249 int convertxmlentry(char *value, uint8_t *proz) 254 250 { 255 // debug(1000, "in");256 251 int ret = -1; 257 252 char *buf = NULL; … … 338 333 } 339 334 340 // debug(1000, "out");341 335 return ret; 342 336 } … … 344 338 struct skin* checkscreen(char* screenname) 345 339 { 346 //debug(1000, "in");347 340 struct skin* node = skin; 348 341 … … 350 343 { 351 344 if(ostrcmp(node->name, screenname) == 0) 352 {353 //debug(1000, "out");354 345 return node; 355 } 346 356 347 node = node->next; 357 348 } … … 361 352 struct skin* getscreen(char* screenname) 362 353 { 363 debug(1000, "in");364 354 struct skin* node = skin; 365 355 … … 367 357 { 368 358 if(ostrcmp(node->name, screenname) == 0) 369 {370 debug(1000, "out");371 359 return node; 372 } 360 373 361 node = node->next; 374 362 } … … 379 367 struct skin* sortscreen(struct skin* node) 380 368 { 381 debug(1000, "in");382 369 struct skin *nodea = NULL, *nodeb = NULL, *nodec = NULL, *noded = NULL; 383 370 struct skin *nodetmp = NULL; … … 386 373 if(node == NULL || node == status.skinerr) 387 374 { 388 debug(1000, "out ->NULL detect");375 err("NULL detect"); 389 376 return NULL; 390 377 } … … 451 438 } 452 439 453 debug(1000, "out");454 440 return node; 455 441 } … … 457 443 struct skin* sortscreenbyname(char *screenname) 458 444 { 459 debug(1000, "in");460 445 struct skin* node = NULL; 461 446 … … 465 450 node = getscreen(screenname); 466 451 467 debug(1000, "out");468 452 return sortscreen(node); 469 453 } … … 471 455 struct skin* getlastscreennode(struct skin* node) 472 456 { 473 debug(1000, "in");474 457 struct skin *prev = NULL; 475 458 … … 482 465 } 483 466 484 debug(1000, "out");485 467 return prev; 486 468 } … … 510 492 struct skin* addscreennode(struct skin* node, char* line, struct skin* last) 511 493 { 512 // debug(1000, "in");513 494 char *ret = NULL; 514 495 struct skin *newnode = NULL, *prev = NULL, *tmpnode = node; … … 938 919 createfilelist(tmpnode, newnode, 0); 939 920 940 //debug(1000, "out");941 921 return newnode; 942 922 } … … 944 924 struct skin* addscreennodebyname(char* screenname, char* line) 945 925 { 946 debug(1000, "in");947 926 struct skin *node = NULL; 948 927 … … 952 931 node = getscreen(screenname); 953 932 954 debug(1000, "out");955 933 return addscreennode(node, line, NULL); 956 934 } … … 960 938 int addscreen(char *buf, int del, int flag) 961 939 { 962 debug(1000, "in");963 940 struct skin* node = NULL, *tmpnode = NULL; 964 941 char* buf1 = buf, *tmpstr = NULL; … … 1000 977 } 1001 978 } 1002 debug(1000, "out");1003 979 return 0; 1004 980 } … … 1008 984 int readscreen(char *filename, int del, int flag) 1009 985 { 1010 debug(1000, "in");1011 986 char *buf = NULL; 1012 987 … … 1029 1004 free(buf); 1030 1005 } 1031 debug(1000, "out");1032 1006 return 0; 1033 1007 } … … 1035 1009 struct skin* checkscreennode(struct skin *node, char* nodename) 1036 1010 { 1037 debug(1000, "in");1038 1039 1011 if(node != NULL) node = node->child; 1040 1012 … … 1042 1014 { 1043 1015 if(ostrcmp(node->name, nodename) == 0) 1044 {1045 debug(1000, "out");1046 1016 return node; 1047 } 1017 1048 1018 node = node->next; 1049 1019 } … … 1054 1024 struct skin* getscreennode(struct skin *node, char* nodename) 1055 1025 { 1056 debug(1000, "in");1057 1058 1026 if(node != NULL) node = node->child; 1059 1027 … … 1061 1029 { 1062 1030 if(ostrcmp(node->name, nodename) == 0) 1063 {1064 debug(1000, "out");1065 1031 return node; 1066 } 1032 1067 1033 node = node->next; 1068 1034 } … … 1074 1040 struct skin* getscreennodebyname(char* screenname, char* nodename) 1075 1041 { 1076 debug(1000, "in");1077 1042 struct skin *node = NULL; 1078 1043 1079 1044 node = getscreen(screenname); 1080 1081 debug(1000, "out");1082 1045 return getscreennode(node, nodename); 1083 1046 } … … 1085 1048 void freenodecontent(struct skin* node) 1086 1049 { 1087 debug(1000, "in");1088 1089 1050 if(node->pluginhandle != NULL) 1090 1051 dlclose(node->pluginhandle); … … 1141 1102 node->handle1 = NULL; 1142 1103 node->pluginhandle = NULL; 1143 1144 debug(1000, "out");1145 1104 } 1146 1105 1147 1106 void delmarkedscreennodes(struct skin* node, int mark) 1148 1107 { 1149 debug(1000, "in");1150 1108 struct skin *prev = NULL, *screen = node; 1151 1109 struct skin* sel = NULL, *tmp = NULL; … … 1215 1173 node = node->next; 1216 1174 } 1217 1218 1219 debug(1000, "out");1220 1175 } 1221 1176 1222 1177 void delscreennode(struct skin *node, char* nodename) 1223 1178 { 1224 debug(1000, "in");1225 1179 struct skin *prev = NULL; 1226 1180 struct skin **nodeaddr; 1227 1181 1228 1182 if(node == NULL || node == status.skinerr) 1229 {1230 debug(1000, "out -> NULL detect");1231 1183 return; 1232 }1233 1184 1234 1185 if(node == skin && node->child == NULL) … … 1265 1216 node = NULL; 1266 1217 } 1267 1268 debug(1000, "out");1269 1218 } 1270 1219 … … 1279 1228 1280 1229 delscreennode(node, nodename); 1281 debug(1000, "out");1282 1230 } 1283 1231 1284 1232 void delscreen(struct skin *node) 1285 1233 { 1286 debug(1000, "in");1287 1234 struct skin *prev = NULL, *child = NULL; 1288 1235 … … 1300 1247 if(node != NULL) 1301 1248 delscreennode(skin, node->name); 1302 1303 debug(1000, "out");1304 1249 } 1305 1250 1306 1251 void delscreenbyname(char *screenname) 1307 1252 { 1308 debug(1000, "in");1309 1253 struct skin *node = NULL; 1310 1254 node = getscreen(screenname); 1311 1255 delscreen(node); 1312 debug(1000, "out");1313 1256 } 1314 1257 1315 1258 void delmarkedscreen(int del) 1316 1259 { 1317 debug(1000, "in");1318 1260 struct skin *node = skin, *prev = skin; 1319 1261 … … 1325 1267 delscreen(prev); 1326 1268 } 1327 debug(1000, "out");1328 1269 } 1329 1270 1330 1271 void freescreen() 1331 1272 { 1332 debug(1000, "in");1333 1273 struct skin *node = skin, *prev = skin; 1334 1274 … … 1340 1280 delscreen(prev); 1341 1281 } 1342 debug(1000, "out");1343 1282 } 1344 1283 … … 1378 1317 unsigned char* scale(unsigned char* buf, int width, int height, int channels, int newwidth, int newheight, int free1) 1379 1318 { 1380 debug(1000, "out");1381 1319 int h, w, pixel, nmatch; 1382 1320 … … 1415 1353 1416 1354 if(free1 == 1) free(buf); 1417 debug(1000, "out");1418 1355 return newbuf; 1419 1356 } … … 1842 1779 unsigned char* readpng(const char* filename, unsigned long* width, unsigned long* height, unsigned long* rowbytes, int* channels, int posx, int posy, int mwidth, int mheight, int halign, int valign) 1843 1780 { 1844 debug(1000, "in");1845 1781 FILE *fd = NULL; 1846 1782 int ret, bit_depth, color_type; … … 1973 1909 debug(100, "png width=%ld height=%ld channels=%d rowbytes=%ld", *width, *height, *channels, *rowbytes); 1974 1910 1975 debug(1000, "out");1976 1911 return buf; 1977 1912 } … … 1979 1914 void drawpic(const char* filename, int posx, int posy, int scalewidth, int scaleheight, int mwidth, int mheight, int halign, int valign, int transparent, int quality, int add) 1980 1915 { 1981 debug(1000, "in");1982 1916 unsigned char *buf = NULL, *scalebuf = NULL; 1983 1917 int memfd = -1, py = 0, pyh = 0, pxw = 0, diff = 0; … … 2143 2077 freebpamem(memfd, buf, width * height * 3); 2144 2078 } 2145 2146 debug(1000, "out");2147 2079 } 2148 2080 … … 2287 2219 int drawchar(struct font* font, FT_ULong currentchar, int posx, int posy, int mwidth, int height, long color, int transparent, int charspace, int test) 2288 2220 { 2289 // debug(1000, "in");2290 2221 int space = 0, y = 0, x = 0, py = 0, pxw = 0, pyh = 0, max = 220, min = 35; 2291 2222 FT_UInt glyphindex; … … 2325 2256 kerning.x = 0; 2326 2257 2327 if (test == 1 || space == 1) 2328 { 2329 //debug(1000, "out -> test or space"); 2258 if(test == 1 || space == 1) 2330 2259 return sbit->xadvance + kerning.x + charspace; 2331 } 2260 2332 2261 if(posx + sbit->xadvance > mwidth) 2333 {2334 //debug(1000, "out -> text to long");2335 2262 return -1; 2336 }2337 2263 2338 2264 if(status.fasttextrender == 1) … … 2378 2304 } 2379 2305 2380 // debug(1000, "out");2381 2306 return sbit->xadvance + kerning.x + charspace; 2382 2307 } … … 2384 2309 void getstringwh(struct font* font, char *string, int *stringwidth, int *stringheight, int charspace) 2385 2310 { 2386 debug(1000, "in");2387 2311 FT_ULong cret = 0; 2388 2312 if(string == NULL) return; … … 2394 2318 string++; 2395 2319 } 2396 debug(1000, "out");2397 2320 } 2398 2321 … … 2502 2425 int drawstring(char* string, unsigned long linecount, unsigned int poscount, unsigned int markpos, int posx, int posy, int mwidth, int mheight, int halign, int valign, char* fontname, int fontsize, long color, int transparent, int wrap, int* lastposx, int* lastposy, int* len, int charspace, int flag) 2503 2426 { 2504 debug(1000, "in");2505 2427 int charwidth = 0, lineend = 0; 2506 2428 int charcount = 0; … … 2532 2454 if(fontsize < 5) 2533 2455 { 2534 debug(1000, "out ->fontsize to small");2456 err("fontsize to small"); 2535 2457 if(flag == 1) free(tmpstr); 2536 2458 return 1; … … 2544 2466 if(aktheight > mheight) 2545 2467 { 2546 debug(1000, "out ->to many textlines");2468 err("to many textlines"); 2547 2469 if(flag == 1) free(tmpstr); 2548 2470 return 1; … … 2593 2515 2594 2516 if(flag == 1) free(tmpstr); 2595 debug(1000, "out");2596 2517 return ret; 2597 2518 } … … 2599 2520 char* saverect(int posx, int posy, int width, int height) 2600 2521 { 2601 debug(1000, "in");2602 2522 char* buf; 2603 2523 int y = 0, len = width * skinfb->colbytes, px = posx * skinfb->colbytes; … … 2613 2533 memcpy(buf + len * y, skinfb->fb + ((y + posy) * skinfb->pitch) + px, len); 2614 2534 2615 debug(1000, "out");2616 2535 return buf; 2617 2536 } … … 2626 2545 void restorerectcheck(char* buf, int posx, int posy, int width, int height, int flag) 2627 2546 { 2628 debug(1000, "in");2629 2547 int y = 0, len = width * skinfb->colbytes, px = posx * skinfb->colbytes; 2630 2548 … … 2640 2558 } 2641 2559 } 2642 debug(1000, "out");2643 2560 } 2644 2561 … … 2661 2578 void lcd_fillrect(int posx, int posy, int width, int height, long color, int transparent) 2662 2579 { 2663 //debug(1000, "in");2664 2580 int y, x; 2665 2581 unsigned long tmpcol; … … 2680 2596 for(x = 0; x < width; x++) 2681 2597 drawpixel(posx + x, posy + y, tmpcol); 2682 2683 //debug(1000, "out");2684 2598 } 2685 2599 2686 2600 void lcd_drawrect(int posx, int posy, int width, int height, long color, int transparent) 2687 2601 { 2688 //debug(1000, "in");2689 2602 fillrect(posx, posy, width, 1, color, transparent); 2690 2603 fillrect(posx, posy + height - 1, width, 1, color, transparent); 2691 2604 fillrect(posx, posy, 1, height, color, transparent); 2692 2605 fillrect(posx + width - 1, posy, 1, height, color, transparent); 2693 //debug(1000, "out");2694 2606 } 2695 2607 //*************** GOST LCD … … 2877 2789 void drawtitlebggradient(struct skin* node) 2878 2790 { 2879 debug(1000, "in");2880 2791 if(status.picbordersize > 0) 2881 2792 drawgradient(node->rposx + status.picbordersize, node->rposy + status.picbordersize, node->rwidth - (status.picbordersize * 2), node->rheight - (node->rheight - node->titlesize), node->titlebgcol, node->titlebgcol2, node->transparent, node->titlegradient); 2882 2793 else 2883 2794 drawgradient(node->rposx, node->rposy, node->rwidth, node->rheight - (node->rheight - node->titlesize), node->titlebgcol, node->titlebgcol2, node->transparent, node->titlegradient); 2884 debug(1000, "out");2885 2795 } 2886 2796 2887 2797 void drawbggradient(struct skin* node) 2888 2798 { 2889 debug(1000, "in");2890 2799 drawgradient(node->rposx, node->rposy, node->rwidth, node->rheight, node->bgcol, node->bgcol2, node->transparent, node->gradient); 2891 debug(1000, "out");2892 2800 } 2893 2801 2894 2802 void drawtitlebgcol(struct skin* node) 2895 2803 { 2896 debug(1000, "in");2897 2804 if(status.picbordersize > 0) 2898 2805 fillrect(node->rposx + status.picbordersize, node->rposy + status.picbordersize, node->rwidth - (status.picbordersize * 2), node->rheight - (node->rheight - node->titlesize), node->titlebgcol, node->transparent); 2899 2806 else 2900 2807 fillrect(node->rposx, node->rposy, node->rwidth, node->rheight - (node->rheight - node->titlesize), node->titlebgcol, node->transparent); 2901 debug(1000, "out");2902 2808 } 2903 2809 2904 2810 void drawbginnercol(struct skin* node) 2905 2811 { 2906 debug(1000, "in");2907 2812 fillrect(node->rposx + node->bordersize, node->rposy + node->bordersize, node->rwidth - node->bordersize * 2, node->rheight - node->bordersize * 2, node->bgcol, node->transparent); 2908 debug(1000, "out");2909 2813 } 2910 2814 2911 2815 void drawbgcol(struct skin* node) 2912 2816 { 2913 debug(1000, "in");2914 2817 fillrect(node->rposx + node->bgspace, node->rposy + node->bgspace, node->rwidth - (node->bgspace * 2), node->rheight - (node->bgspace * 2), node->bgcol, node->transparent); 2915 debug(1000, "out");2916 2818 } 2917 2819 2918 2820 void drawtitle(struct skin* node) 2919 2821 { 2920 debug(1000, "in");2921 2822 if(status.titlelinesize > 0) 2922 2823 drawstring(node->title, 1, 0, -1, node->iposx, node->rposy + node->bordersize, node->iwidth, node->titlesize - status.titlelinesize, node->titlealign, MIDDLE, node->font, node->fontsize, node->fontcol, node->transparent, 0, NULL, NULL, NULL, node->charspace, 0); … … 2927 2828 else if(node->bordersize > 0) 2928 2829 fillrect(node->rposx, node->rposy + node->titlesize, node->rwidth, node->bordersize, node->bordercol, node->transparent); 2929 debug(1000, "out");2930 2830 } 2931 2831 2932 2832 void drawprogressbar(struct skin* node) 2933 2833 { 2934 debug(1000, "in");2935 2834 int val = 0; 2936 2835 … … 2938 2837 val = ((float)node->iwidth / 100) * node->progresssize; 2939 2838 fillrect(node->rposx + node->bordersize, node->rposy + node->bordersize, val, node->iheight, node->progresscol, node->transparent); 2940 debug(1000, "out");2941 2839 } 2942 2840 2943 2841 void drawmultiprogressbar(struct skin* node) 2944 2842 { 2945 debug(1000, "in");2946 2843 struct epgrecord* epgrecord = node->epgrecord; 2947 2844 int val1 = 0, val2 = 0; … … 2959 2856 epgrecord = epgrecord->next; 2960 2857 } 2961 debug(1000, "out");2962 2858 } 2963 2859 … … 2987 2883 void drawpicborder(struct skin* node) 2988 2884 { 2989 debug(1000, "in");2990 2885 int borderwidth = status.picbordersize; 2991 2886 int borderheight = status.picbordersize; … … 3016 2911 //drawpic("/home/nit/titan/skin/bs_r.png", node->rposx - node->bordersize + node->rwidth, node->rposy + node->bordersize, 0, node->rheight - (node->bordersize * 2), borderwidth, node->rheight - (node->bordersize * 2), LEFT, TOP, node->transparent, node->picquality, node->picmem); 3017 2912 drawpic("/home/nit/titan/skin/bs_r.png", node->rposx + node->rwidth - borderwidth, node->rposy + borderheight, 0, node->rheight - (borderheight * 2), borderwidth, node->rheight - (borderheight * 2), LEFT, TOP, node->transparent, node->picquality, node->picmem); 3018 debug(1000, "out");3019 2913 } 3020 2914 3021 2915 void drawborder(struct skin* node) 3022 2916 { 3023 debug(1000, "in");3024 2917 if(node->bordersize == 1 && node->rheight > 2 && node->bordertype == 0) 3025 2918 drawrect(node->rposx, node->rposy, node->rwidth, node->rheight, node->bordercol, node->transparent); … … 3037 2930 fillrect(node->rposx + node->rwidth - node->bordersize, node->rposy, node->bordersize, node->rheight, node->bordercol, node->transparent); 3038 2931 } 3039 debug(1000, "out");3040 2932 } 3041 2933 3042 2934 void drawscrollbar(struct skin* node) 3043 2935 { 3044 debug(1000, "in");3045 2936 if(node->bordersize == 0) 3046 2937 drawrect(node->rposx + node->rwidth - node->bordersize - node->scrollbarwidth, node->iposy, node->scrollbarwidth, node->iheight, node->bordercol, node->transparent); … … 3049 2940 3050 2941 fillrect(node->rposx + node->rwidth - node->bordersize - node->scrollbarwidth, node->iposy + node->scrollbarpos, node->scrollbarwidth, node->scrollbarheight, node->bordercol, node->transparent); 3051 debug(1000, "out");3052 2942 } 3053 2943 3054 2944 void clearshadow(struct skin* node) 3055 2945 { 3056 debug(1000, "in");3057 3058 2946 if(node->shadowsize < 1) return; 3059 2947 switch(node->shadowpos) … … 3076 2964 break; 3077 2965 } 3078 debug(1000, "out");3079 2966 } 3080 2967 3081 2968 void drawshadow(struct skin* node) 3082 2969 { 3083 debug(1000, "in");3084 2970 switch(node->shadowpos) 3085 2971 { … … 3101 2987 break; 3102 2988 } 3103 debug(1000, "out");3104 2989 } 3105 2990 … … 3111 2996 int len = 0; 3112 2997 char* bglt = NULL, *bglb = NULL, *bgrt = NULL, *bgrb = NULL; 3113 3114 debug(1000, "in");3115 2998 3116 2999 node->flag = setbit(node->flag, 0); … … 3270 3153 3271 3154 free(bglt); free(bglb); free(bgrt); free(bgrb); 3272 debug(1000, "out");3273 3155 } 3274 3156 3275 3157 void calcscrollbar(struct skin* node) 3276 3158 { 3277 debug(1000, "in");3278 3279 3159 node->scrollbarheight = node->iheight; 3280 3160 … … 3298 3178 if(node->scrollbarheight < 1) node->scrollbarheight = 1; 3299 3179 } 3300 debug(1000, "out");3301 3180 } 3302 3181 … … 3316 3195 int calclistbox(struct skin* node) 3317 3196 { 3318 debug(1000, "in");3319 3197 struct skin* child = NULL, *last = NULL, *found = NULL; 3320 3198 int selcol = 0; … … 3532 3410 } 3533 3411 node->poscount = 0; 3534 debug(1000, "out");3535 3412 return 0; 3536 3413 } … … 3619 3496 if(node->pagecount != parent->aktpage) return 1; 3620 3497 3621 debug(1000, "in");3622 3498 int shadowlx = 0, shadowrx = 0, shadowoy = 0, shadowuy = 0; 3623 3499 unsigned int linecount = 0, pagecount = 0, poscount = 0; … … 3801 3677 //node->transparent = parent->transparent; 3802 3678 3803 debug(1000, "out");3804 3679 return 0; 3805 3680 } … … 3807 3682 int clearscreenalways() 3808 3683 { 3809 debug(1000, "in");3810 3684 int i, ret = 0; 3811 3685 … … 3818 3692 } 3819 3693 3820 debug(1000, "out");3821 3694 return ret; 3822 3695 } … … 3824 3697 int drawscreenalways(struct skin* node, int screencalc) 3825 3698 { 3826 debug(1000, "in");3827 3699 int i, ret = 0; 3828 3700 … … 3841 3713 } 3842 3714 3843 debug(1000, "out");3844 3715 return ret; 3845 3716 } … … 3847 3718 int drawscreennode(struct skin *node, char* nodename, int screencalc) 3848 3719 { 3849 debug(1000, "in");3850 3851 3720 node = getscreennode(node, nodename); 3852 3721 m_lock(&status.drawingmutex, 0); … … 3858 3727 m_unlock(&status.drawingmutex, 0); 3859 3728 3860 debug(1000, "out");3861 3729 return 0; 3862 3730 } … … 3864 3732 int drawscreennodebyname(char* screenname, char* nodename, int screencalc) 3865 3733 { 3866 debug(1000, "in");3867 3734 struct skin *node; 3868 3735 … … 3876 3743 m_unlock(&status.drawingmutex, 0); 3877 3744 3878 debug(1000, "out");3879 3745 return 0; 3880 3746 } … … 3891 3757 { 3892 3758 struct fb* merkskinfb = NULL; 3893 3894 debug(1000, "in");3895 3759 int ret; 3896 3760 struct skin *child = NULL, *parent = NULL, *oldparent = NULL; … … 3912 3776 if(flag == 0 || flag == 4) 3913 3777 m_unlock(&status.drawingmutex, 0); 3914 debug(1000, "out ->setnodeattr ret = 1");3778 err("setnodeattr ret = 1"); 3915 3779 return 1; 3916 3780 } … … 4070 3934 if(flag == 0 || flag == 4) 4071 3935 m_unlock(&status.drawingmutex, 0); 4072 debug(1000, "out");4073 3936 return 0; 4074 3937 } … … 4076 3939 int drawscreenbyname(char* screenname, int screencalc, int flag) 4077 3940 { 4078 debug(1000, "in");4079 3941 int ret; 4080 3942 struct skin* node = NULL; … … 4088 3950 4089 3951 ret = drawscreen(node, screencalc, flag); 4090 debug(1000, "out");4091 3952 return ret; 4092 3953 } … … 4094 3955 int changeinput(struct skin* node, char* text) 4095 3956 { 4096 debug(1000, "in");4097 3957 int ret = 1; 4098 3958 … … 4116 3976 ret = 0; 4117 3977 } 4118 debug(1000, "out");4119 3978 4120 3979 return ret; … … 4123 3982 int changetext(struct skin* node, char* text) 4124 3983 { 4125 debug(1000, "in");4126 3984 int ret = 1; 4127 3985 … … 4135 3993 ret = 0; 4136 3994 } 4137 debug(1000, "out");4138 3995 4139 3996 return ret; … … 4142 3999 int changetext2(struct skin* node, char* text) 4143 4000 { 4144 debug(1000, "in");4145 4001 int ret = 1; 4146 4002 … … 4154 4010 ret = 0; 4155 4011 } 4156 debug(1000, "out");4157 4012 4158 4013 return ret; … … 4162 4017 int changename(struct skin* node, char* text) 4163 4018 { 4164 debug(1000, "in");4165 4019 int ret = 1; 4166 4020 … … 4174 4028 ret = 0; 4175 4029 } 4176 debug(1000, "out");4177 4030 4178 4031 return ret; … … 4181 4034 int changepicmem(struct skin* node, char* text, int timeout, int del) 4182 4035 { 4183 debug(1000, "in");4184 4036 unsigned long width = 0, height = 0, rowbytes = 0; 4185 4037 int ret = 1, channels = 0, memfd = -1, length = 0; … … 4210 4062 ret = 0; 4211 4063 } 4212 debug(1000, "out");4213 4064 4214 4065 return ret; … … 4217 4068 int changepic(struct skin* node, char* text) 4218 4069 { 4219 debug(1000, "in");4220 4070 int ret = 1; 4221 4071 … … 4230 4080 ret = 0; 4231 4081 } 4232 debug(1000, "out");4233 4082 4234 4083 return ret; … … 4237 4086 int changeselectpic(struct skin* node, char* text) 4238 4087 { 4239 debug(1000, "in");4240 4088 int ret = 1; 4241 4089 … … 4249 4097 ret = 0; 4250 4098 } 4251 debug(1000, "out");4252 4099 4253 4100 return ret; … … 4256 4103 int changetitle(struct skin* node, char* text) 4257 4104 { 4258 debug(1000, "in");4259 4105 int ret = 1; 4260 4106 … … 4274 4120 ret = 0; 4275 4121 } 4276 debug(1000, "out");4277 4122 4278 4123 return ret; … … 4281 4126 int changemask(struct skin* node, char* text) 4282 4127 { 4283 debug(1000, "in");4284 4128 int ret = 1; 4285 4129 … … 4302 4146 ret = 0; 4303 4147 } 4304 debug(1000, "out");4305 4148 4306 4149 return ret; … … 4309 4152 int changeret(struct skin* node, char* text) 4310 4153 { 4311 debug(1000, "in");4312 4154 int ret = 1; 4313 4155 … … 4321 4163 ret = 0; 4322 4164 } 4323 debug(1000, "out");4324 4165 4325 4166 return ret; … … 4328 4169 int changeparent(struct skin* node, char* text) 4329 4170 { 4330 debug(1000, "in");4331 4171 int ret = 1; 4332 4172 … … 4340 4180 ret = 0; 4341 4181 } 4342 debug(1000, "out");4343 4182 4344 4183 return ret; … … 4347 4186 int changefont(struct skin* node, char* text) 4348 4187 { 4349 debug(1000, "in");4350 4188 int ret = 1; 4351 4189 … … 4359 4197 ret = 0; 4360 4198 } 4361 debug(1000, "out");4362 4199 4363 4200 return ret; … … 4366 4203 int changeparam1(struct skin* node, char* text) 4367 4204 { 4368 debug(1000, "in");4369 4205 int ret = 1; 4370 4206 … … 4378 4214 ret = 0; 4379 4215 } 4380 debug(1000, "out");4381 4216 4382 4217 return ret; … … 4385 4220 int changeparam2(struct skin* node, char* text) 4386 4221 { 4387 debug(1000, "in");4388 4222 int ret = 1; 4389 4223 … … 4397 4231 ret = 0; 4398 4232 } 4399 debug(1000, "out");4400 4233 4401 4234 return ret; … … 4404 4237 int changechoiceboxvalue(struct skin* node, char* text) 4405 4238 { 4406 debug(1000, "in");4407 4239 int ret = 1; 4408 4240 … … 4416 4248 ret = 0; 4417 4249 } 4418 debug(1000, "out");4419 4250 4420 4251 return ret; -
titan/titan/skinconfig.h
r16367 r23286 69 69 struct clist* addskinconfigint(char *key, int value) 70 70 { 71 debug(1000, "in");72 71 char* fileline = NULL; 73 72 struct clist* ret = NULL; … … 77 76 78 77 free(fileline); 79 debug(1000, "out");80 78 return ret; 81 79 } … … 83 81 int readskinconfig(const char *filename, struct clist** tmpskinconfig) 84 82 { 85 debug(1000, "in");86 83 FILE *fd = NULL; 87 84 char *fileline = NULL, *pos; … … 124 121 fclose(fd); 125 122 free(fileline); 126 debug(1000, "out");127 123 return 0; 128 124 } … … 176 172 int reloadskinconfig(char *filename) 177 173 { 178 debug(1000, "in");179 174 int ret = 0; 180 175 … … 183 178 if(ret != 0) 184 179 { 185 debug(1000, "out ->readskinconfig fail");180 err("readskinconfig fail"); 186 181 return 1; 187 182 } 188 183 189 debug(1000, "out");190 184 return 0; 191 185 } -
titan/titan/skinfunc.h
r22999 r23286 452 452 // type 2 = remainingtime 453 453 454 debug(1000, "in");455 454 struct epg* epgnode = NULL; 456 455 struct tm *loctime = NULL; … … 461 460 if(format == NULL) 462 461 { 463 debug(1000, "out ->NULL detect");462 err("NULL detect"); 464 463 return NULL; 465 464 } … … 508 507 509 508 free(loctime); loctime = NULL; 510 debug(1000, "out");511 509 return buf1; 512 510 } 513 511 } 514 debug(1000, "out");515 512 return NULL; 516 513 } … … 698 695 char* gettime(struct skin* node, char* format) 699 696 {