33 * @author Martin Pulec <pulec@cesnet.cz>
44 */
55/*
6- * Copyright (c) 2014-2025 CESNET, zájmové sdružení právnických osob
6+ * Copyright (c) 2014-2026 CESNET, zájmové sdružení právnických osob
77 * All rights reserved.
88 *
99 * Redistribution and use in source and binary forms, with or without
6666#include " tv.h"
6767#include " utils/color_out.h"
6868#include " utils/debug.h" // for DEBUG_TIMER_*
69- #include " utils/macros.h"
69+ #include " utils/macros.h" // for countof
7070#include " utils/string.h" // for DELDEL
7171#include " utils/windows.h"
7272#include " utils/worker.h"
@@ -786,12 +786,12 @@ static const struct {
786786#undef BMDFCC
787787
788788static string fcc_to_string (uint32_t fourcc) {
789- for (unsigned i = 0 ; i < ARR_COUNT (opt_name_map); ++i) {
789+ for (unsigned i = 0 ; i < countof (opt_name_map); ++i) {
790790 if (opt_name_map[i].fourcc == fourcc) {
791791 return opt_name_map[i].name ;
792792 }
793793 }
794- for (unsigned i = 0 ; i < ARR_COUNT (val_name_map); ++i) {
794+ for (unsigned i = 0 ; i < countof (val_name_map); ++i) {
795795 if (val_name_map[i].fourcc == fourcc) {
796796 return val_name_map[i].name ;
797797 }
@@ -936,7 +936,7 @@ bmd_opt_help()
936936 color_printf (" \n " );
937937
938938 color_printf (" List of keys:\n " );
939- for (unsigned i = 0 ; i < ARR_COUNT (opt_name_map); ++i) {
939+ for (unsigned i = 0 ; i < countof (opt_name_map); ++i) {
940940 if (opt_name_map[i].fourcc == 0 ) {
941941 color_printf (" \n %s:\n " , opt_name_map[0 ].name );
942942 } else {
@@ -952,7 +952,7 @@ bmd_opt_help()
952952 color_printf (" \n " );
953953 color_printf (" Incomplete " TBOLD (" (!)" ) " list of values:\n " );
954954 color_printf (" (note that the value belongs to its appropriate key)\n " );
955- for (unsigned i = 0 ; i < ARR_COUNT (val_name_map); ++i) {
955+ for (unsigned i = 0 ; i < countof (val_name_map); ++i) {
956956 uint32_t val = htonl (val_name_map[i].fourcc );
957957 color_printf (" - " TBOLD (" %.4s" ) " - %s\n " , (char *) &val,
958958 val_name_map[i].name );
@@ -1589,7 +1589,7 @@ print_status_item(IDeckLinkStatus *deckLinkStatus, BMDDeckLinkStatusID prop,
15891589{
15901590 const struct status_property *s_prop = nullptr ;
15911591
1592- for (unsigned i = 0 ; i < ARR_COUNT (status_map); ++i) {
1592+ for (unsigned i = 0 ; i < countof (status_map); ++i) {
15931593 if (status_map[i].prop == prop) {
15941594 s_prop = &status_map[i];
15951595 break ;
@@ -1835,7 +1835,7 @@ bmd_print_status_subscribe_notify(IDeckLink *deckLink, const char *log_prefix,
18351835 " Cannot obtain IID_IDeckLinkStatus from DeckLink" ,
18361836 return nullptr );
18371837 // print status_map values now
1838- for (unsigned u = 0 ; u < ARR_COUNT (status_map); ++u) {
1838+ for (unsigned u = 0 ; u < countof (status_map); ++u) {
18391839 if (capture && status_map[u].playback_only ) {
18401840 continue ;
18411841 }
0 commit comments