Skip to content

Commit

Permalink
receiver: make verbosity accessible from other files
Browse files Browse the repository at this point in the history
Using 'static' makes each file that includes this header have their
own 'verbosity' variable, making the '-v' option not take effect
for any file other than 'scream.c'.
  • Loading branch information
pawitp authored and duncanthrax committed May 1, 2024
1 parent 402ebf0 commit 86b1725
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Receivers/unix/scream.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#include "sndio.h"
#endif

int verbosity = 0;

static void show_usage(const char *arg0)
{
fprintf(stderr, "\n");
Expand Down
2 changes: 1 addition & 1 deletion Receivers/unix/scream.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ typedef struct receiver_data {
unsigned char* audio;
} receiver_data_t;

static int verbosity = 0;
extern int verbosity;

#endif

0 comments on commit 86b1725

Please sign in to comment.