Commit 61622526 authored by Matteo Quintiliani's avatar Matteo Quintiliani
Browse files

Added nmxp_chan_print_channelList() into the library


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@101 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent 585c4a6e
......@@ -109,5 +109,13 @@ void nmxp_chan_sortByKey(NMXP_CHAN_LIST *channelList);
*/
void nmxp_chan_sortByName(NMXP_CHAN_LIST *channelList);
/*! Print channel information
*
* \param channelList Channel List
*
*/
void nmxp_chan_print_channelList(NMXP_CHAN_LIST *channelList);
#endif
......@@ -140,3 +140,16 @@ void nmxp_chan_sortByName(NMXP_CHAN_LIST *channelList) {
qsort (channelList->channel, channelList->number, sizeof (NMXP_CHAN_KEY), chan_name_compare);
}
void nmxp_chan_print_channelList(NMXP_CHAN_LIST *channelList) {
int chan_number = channelList->number;
int i_chan = 0;
nmxp_log(0, 0, "%04d channels:\n", chan_number);
for (i_chan = 0; i_chan < chan_number; i_chan++)
{
nmxp_log(0, 0, "%04d %12d %s\n", i_chan+1, channelList->channel[i_chan].key, channelList->channel[i_chan].name);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment