Skip to content

Commit

Permalink
Fix code indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
BPYap authored Feb 14, 2018
1 parent 5d3e2cd commit b7545e0
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions src/lib_ccx/telxcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,41 +634,41 @@ void process_page(struct TeletextCtx *ctx, teletext_page_t *page, struct cc_subt
// process data
for (uint8_t row = 1; row < 25; row++)
{
// anchors for string trimming purpose
uint8_t col_start = 40;
uint8_t col_stop = 40;

uint8_t box_open = NO;
for (int8_t col = 0; col < 40; col++)
{
// replace all 0/B and 0/A characters with 0/20, as specified in ETS 300 706:
// Unless operating in "Hold Mosaics" mode, each character space occupied by a
// spacing attribute is displayed as a SPACE
if (page->text[row][col] == 0xb) // open the box
{
if (col_start == 40)
{
col_start = col;
line_count++;
}
else
{
page->text[row][col] = 0x20;
}
box_open = YES;
}
else if (page->text[row][col] == 0xa) // close the box
{
page->text[row][col] = 0x20;
box_open = NO;
}
// characters between 0xA and 0xB shouldn't be displayed
// page->text[row][col] > 0x20 added to preserve color information
else if (!box_open && col_start < 40 && page->text[row][col] > 0x20)
{
page->text[row][col] = 0x20;
}
}
// anchors for string trimming purpose
uint8_t col_start = 40;
uint8_t col_stop = 40;

uint8_t box_open = NO;
for (int8_t col = 0; col < 40; col++)
{
// replace all 0/B and 0/A characters with 0/20, as specified in ETS 300 706:
// Unless operating in "Hold Mosaics" mode, each character space occupied by a
// spacing attribute is displayed as a SPACE
if (page->text[row][col] == 0xb) // open the box
{
if (col_start == 40)
{
col_start = col;
line_count++;
}
else
{
page->text[row][col] = 0x20;
}
box_open = YES;
}
else if (page->text[row][col] == 0xa) // close the box
{
page->text[row][col] = 0x20;
box_open = NO;
}
// characters between 0xA and 0xB shouldn't be displayed
// page->text[row][col] > 0x20 added to preserve color information
else if (!box_open && col_start < 40 && page->text[row][col] > 0x20)
{
page->text[row][col] = 0x20;
}
}
// line is empty
if (col_start > 39)
continue;
Expand Down

0 comments on commit b7545e0

Please sign in to comment.