formatting code using astyle

Origin commit data
------------------
Branch: master
Commit: bc17c13de4
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-05-17 (Mon, 17 May 2021)

Origin message was:
------------------
- formatting code using astyle

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2021-05-17 23:47:39 +02:00
parent 7335985023
commit f54b0e7bec
161 changed files with 13025 additions and 11357 deletions

View File

@@ -6,7 +6,7 @@
#include "dvbci_appmgr.h"
/* prevent possibly segfaults: read at end of this file */
/* prevent possibly segfaults: read at end of this file */
#define yy_debug 0
eDVBCIApplicationManagerSession::eDVBCIApplicationManagerSession(eDVBCISlot *tslot)
@@ -26,7 +26,7 @@ int eDVBCIApplicationManagerSession::receivedAPDU(const unsigned char *tag, cons
{
printf("[CI AM] SESSION(%d)/APP %02x %02x %02x: ", session_nb, tag[0], tag[1], tag[2]);
for (int i = 0; i < len; i++)
printf("%02x ", ((const unsigned char*)data)[i]);
printf("%02x ", ((const unsigned char *)data)[i]);
printf("\n");
if ((tag[0] == 0x9f) && (tag[1] == 0x80))
@@ -38,21 +38,21 @@ int eDVBCIApplicationManagerSession::receivedAPDU(const unsigned char *tag, cons
int dl;
printf("[CI AM] application info:\n");
printf("[CI AM] len: %d\n", len);
printf("[CI AM] application_type: %d\n", ((unsigned char*)data)[0]);
printf("[CI AM] application_manufacturer: %02x %02x\n", ((unsigned char*)data)[2], ((unsigned char*)data)[1]);
printf("[CI AM] manufacturer_code: %02x %02x\n", ((unsigned char*)data)[4], ((unsigned char*)data)[3]);
printf("[CI AM] application_type: %d\n", ((unsigned char *)data)[0]);
printf("[CI AM] application_manufacturer: %02x %02x\n", ((unsigned char *)data)[2], ((unsigned char *)data)[1]);
printf("[CI AM] manufacturer_code: %02x %02x\n", ((unsigned char *)data)[4], ((unsigned char *)data)[3]);
printf(" menu string: ");
dl = ((unsigned char*)data)[5];
dl = ((unsigned char *)data)[5];
if ((dl + 6) > len)
{
printf("[CI AM] warning, invalid length (%d vs %d)\n", dl + 6, len);
dl = len - 6;
}
char str[dl + 1];
memcpy(str, ((char*)data) + 6, dl);
memcpy(str, ((char *)data) + 6, dl);
str[dl] = '\0';
for (int i = 0; i < dl; ++i)
printf("%c", ((unsigned char*)data)[i + 6]);
printf("%c", ((unsigned char *)data)[i + 6]);
printf("\n");
strcpy(slot->name, str);
@@ -111,16 +111,16 @@ int eDVBCIApplicationManagerSession::startMMI()
bool eDVBCIApplicationManagerSession::readBlist()
{
int rc, i;
char cSid[4] = {0,0,0,0};
char cSid[4] = {0, 0, 0, 0};
u16 Sid;
FILE *fd;
char blacklist_file[32];
sprintf(blacklist_file,"/etc/blacklist_slot_%d",slot->slot);
sprintf(blacklist_file, "/etc/blacklist_slot_%d", slot->slot);
if (access(blacklist_file, F_OK) != 0)
return false;
fd = fopen(blacklist_file,"r");
fd = fopen(blacklist_file, "r");
if (!fd)
return false;
else
@@ -139,7 +139,8 @@ bool eDVBCIApplicationManagerSession::readBlist()
Sid = (u16)strtol(cSid, NULL, 16);
slot->bsids.push_back(Sid);
}
} while (rc != EOF);
}
while (rc != EOF);
fin:
fclose(fd);
}
@@ -153,7 +154,7 @@ int eDVBCIApplicationManagerSession::checkBlist()
{
if (readBlist())
{
/* out commented: causes sometimes segfault when reboot....don't know why :( */
/* out commented: causes sometimes segfault when reboot....don't know why :( */
#if yy_debug
printf("Blacked sids: %d > ", slot->bsids.size());
for (unsigned int i = 0; i < slot->bsids.size(); i++)