Revision 648aa768

View differences:

streamer.c
33 33
#include "measures.h"
34 34
#include "streamer.h"
35 35

  
36
#ifndef EXTRAVERSION
37
#define EXTRAVERSION "Unknown"
38
#endif
39

  
36 40
static struct nodeID *my_sock;
37 41

  
38 42
const char *peername = NULL;
......
124 128
    "\n"
125 129
    "Special options\n"
126 130
    "\t[--randomize_start ms]: random wait before starting in to ms millisecs.\n"
131
    "\t[-v]: print version.\n"
127 132
    "\n"
128 133
    "NOTE: by deafult the peer will dump the received video on STDOUT in raw format\n"
129 134
    "      it can be played by your favourite player simply using a pipe\n"
......
193 198
	{0, 0, 0, 0}
194 199
  };
195 200

  
196
    while ((o = getopt_long (argc, argv, "r:a:b:o:c:p:i:P:I:f:F:m:lC:N:n:M:t:s:e:S:",long_options, &option_index)) != -1) { //use this function to manage long options
201
    while ((o = getopt_long (argc, argv, "r:a:b:o:c:p:i:P:I:f:F:m:lC:N:n:M:t:s:e:S:v",long_options, &option_index)) != -1) { //use this function to manage long options
197 202
    switch(o) {
198 203
      case 0: //for long options
199 204
        if( strcmp( "chunk_log", long_options[option_index].name ) == 0 ) { chunk_log = true; }
......
273 278
      case 'e':
274 279
        end_id = atoi(optarg);
275 280
        break;
281
      case 'v':
282
        fprintf(stderr, "Version: %s\n", EXTRAVERSION);
283
	    exit(0);
276 284
      default:
277 285
        fprintf(stderr, "Error: unknown option %c\n", o);
278 286
        print_usage(argc, argv);

Also available in: Unified diff