- formatting code using astyle

Conflicts:
	libarmbox/dmx.cpp
	libgeneric-pc/video_lib.h
	libspark/dmx.cpp

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2021-05-17 23:47:39 +02:00
committed by Thilo Graf
parent 42264ba4af
commit 7e5b1fc5d2
161 changed files with 13043 additions and 11396 deletions

View File

@@ -17,7 +17,7 @@ eDVBCIMMISession::eDVBCIMMISession(eDVBCISlot *tslot)
eDVBCIMMISession::~eDVBCIMMISession()
{
/* Send a message to Neutrino cam_menu handler */
CA_MESSAGE* pMsg = (CA_MESSAGE*) malloc(sizeof(CA_MESSAGE));
CA_MESSAGE *pMsg = (CA_MESSAGE *) malloc(sizeof(CA_MESSAGE));
memset(pMsg, 0, sizeof(CA_MESSAGE));
pMsg->MsgId = CA_MESSAGE_MSG_MMI_CLOSE;
@@ -34,7 +34,7 @@ int eDVBCIMMISession::receivedAPDU(const unsigned char *tag, const void *data, i
{
printf("[CI MMI] SESSION(%d)/MMI %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] == 0x88))
@@ -45,7 +45,7 @@ int eDVBCIMMISession::receivedAPDU(const unsigned char *tag, const void *data, i
case 0x00: /* close */
{
/* Send a message to Neutrino cam_menu handler */
CA_MESSAGE* pMsg = (CA_MESSAGE*) malloc(sizeof(CA_MESSAGE));
CA_MESSAGE *pMsg = (CA_MESSAGE *) malloc(sizeof(CA_MESSAGE));
memset(pMsg, 0, sizeof(CA_MESSAGE));
pMsg->MsgId = CA_MESSAGE_MSG_MMI_CLOSE;
@@ -61,10 +61,10 @@ int eDVBCIMMISession::receivedAPDU(const unsigned char *tag, const void *data, i
break;
case 0x07: /* menu enq */
{
MMI_ENQUIRY_INFO* enquiry = (MMI_ENQUIRY_INFO*) malloc(sizeof(MMI_ENQUIRY_INFO));
MMI_ENQUIRY_INFO *enquiry = (MMI_ENQUIRY_INFO *) malloc(sizeof(MMI_ENQUIRY_INFO));
memset(enquiry, 0, sizeof(MMI_ENQUIRY_INFO));
unsigned char *d = (unsigned char*)data;
unsigned char *max = ((unsigned char*)d) + len;
unsigned char *d = (unsigned char *)data;
unsigned char *max = ((unsigned char *)d) + len;
int textlen = len - 2;
if ((d + 2) > max)
@@ -77,7 +77,7 @@ int eDVBCIMMISession::receivedAPDU(const unsigned char *tag, const void *data, i
break;
char str[textlen + 1];
memcpy(str, ((char*)d), textlen);
memcpy(str, ((char *)d), textlen);
str[textlen] = '\0';
printf("enq-text: %s", str);
enquiry->slot = slot->slot;
@@ -86,14 +86,14 @@ int eDVBCIMMISession::receivedAPDU(const unsigned char *tag, const void *data, i
strcpy(enquiry->enquiryText, str);
/* Send a message to Neutrino cam_menu handler */
CA_MESSAGE* pMsg = (CA_MESSAGE*) malloc(sizeof(CA_MESSAGE));
CA_MESSAGE *pMsg = (CA_MESSAGE *) malloc(sizeof(CA_MESSAGE));
memset(pMsg, 0, sizeof(CA_MESSAGE));
pMsg->MsgId = CA_MESSAGE_MSG_MMI_REQ_INPUT;
pMsg->SlotType = CA_SLOT_TYPE_CI;
pMsg->Slot = slot->slot;
pMsg->Flags = CA_MESSAGE_HAS_PARAM1_DATA;
pMsg->Msg.Data[0] = (uint8_t*)enquiry;
pMsg->Msg.Data[0] = (uint8_t *)enquiry;
cCA::GetInstance()->SendMessage(pMsg);
slot->mmiOpened = true;
@@ -102,14 +102,14 @@ int eDVBCIMMISession::receivedAPDU(const unsigned char *tag, const void *data, i
case 0x09: /* menu last */
case 0x0c: /* list last */
{
MMI_MENU_LIST_INFO* listInfo = (MMI_MENU_LIST_INFO*) malloc(sizeof(MMI_MENU_LIST_INFO));
MMI_MENU_LIST_INFO *listInfo = (MMI_MENU_LIST_INFO *) malloc(sizeof(MMI_MENU_LIST_INFO));
memset(listInfo, 0, sizeof(MMI_MENU_LIST_INFO));
listInfo->slot = slot->slot;
listInfo->choice_nb = 0;
unsigned char *d = (unsigned char*)data;
unsigned char *max = ((unsigned char*)d) + len;
unsigned char *d = (unsigned char *)data;
unsigned char *max = ((unsigned char *)d) + len;
int pos = 0;
if (tag[2] == 0x09)
@@ -142,7 +142,7 @@ int eDVBCIMMISession::receivedAPDU(const unsigned char *tag, const void *data, i
break;
char str[textlen + 1];
memcpy(str, ((char*)d), textlen);
memcpy(str, ((char *)d), textlen);
str[textlen] = '\0';
int type = pos++;
@@ -168,27 +168,27 @@ int eDVBCIMMISession::receivedAPDU(const unsigned char *tag, const void *data, i
if (tag[2] == 0x09)
{
/* Send a message to Neutrino cam_menu handler */
CA_MESSAGE* pMsg = (CA_MESSAGE*) malloc(sizeof(CA_MESSAGE));
CA_MESSAGE *pMsg = (CA_MESSAGE *) malloc(sizeof(CA_MESSAGE));
memset(pMsg, 0, sizeof(CA_MESSAGE));
pMsg->MsgId = CA_MESSAGE_MSG_MMI_MENU;
pMsg->SlotType = CA_SLOT_TYPE_CI;
pMsg->Slot = slot->slot;
pMsg->Flags = CA_MESSAGE_HAS_PARAM1_DATA;
pMsg->Msg.Data[0] = (uint8_t*)listInfo;
pMsg->Msg.Data[0] = (uint8_t *)listInfo;
cCA::GetInstance()->SendMessage(pMsg);
}
else
{
/* Send a message to Neutrino cam_menu handler */
CA_MESSAGE* pMsg = (CA_MESSAGE*) malloc(sizeof(CA_MESSAGE));
CA_MESSAGE *pMsg = (CA_MESSAGE *) malloc(sizeof(CA_MESSAGE));
memset(pMsg, 0, sizeof(CA_MESSAGE));
pMsg->MsgId = CA_MESSAGE_MSG_MMI_LIST;
pMsg->SlotType = CA_SLOT_TYPE_CI;
pMsg->Slot = slot->slot;
pMsg->Flags = CA_MESSAGE_HAS_PARAM1_DATA;
pMsg->Msg.Data[0] = (uint8_t*)listInfo;
pMsg->Msg.Data[0] = (uint8_t *)listInfo;
cCA::GetInstance()->SendMessage(pMsg);
}
}
@@ -245,7 +245,7 @@ int eDVBCIMMISession::stopMMI()
int eDVBCIMMISession::answerText(int answer)
{
printf("[CI MMI] eDVBCIMMISession::answerText(%d)\n",answer);
printf("[CI MMI] eDVBCIMMISession::answerText(%d)\n", answer);
unsigned char tag[] = {0x9f, 0x88, 0x0B};
unsigned char data[] = {0x00};