CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
Loading...
Searching...
No Matches
dump_riff.c File Reference

A tool to dump the contents of a RIFF file. More...

#include <stdlib.h>
#include <stdio.h>
#include "cdi_os_api.h"
#include "cdi_logger_api.h"
#include "riff.h"

Functions

static int ParseOption (const char *option_str)
 
static void PrintUsage ()
 Print usage message.
 
static bool DumpFile (const char *filename, int mode)
 
int main (int argc, char **argv)
 

Detailed Description

A tool to dump the contents of a RIFF file.

Function Documentation

◆ DumpFile()

static bool DumpFile ( const char * filename,
int mode )
static

Dump certain data in a RIFF file, or print an error message when file cannot be dumped.

Parameters
filenameName of the RIFF file.
modeDump mode.
Returns
True when file was dumped, false when an error message was printed.

◆ main()

int main ( int argc,
char ** argv )

C main entry function.

Parameters
argcNumber of command line arguments.
argvPointer to array of pointers to command line arguments
Returns
Return 0 on success, otherwise 1 indicating a failure occurred.

◆ ParseOption()

static int ParseOption ( const char * option_str)
static

Parse command line option.

Parameters
option_strOption string given on command line.
Returns
Dump mode or -1 for unrecognized option.