Mercurial > pt1
comparison recpt1/recpt1.c @ 98:3fd15032fd3a
tweak user interface for sid:
- rename --split option as --sid
- show all available service IDs along with specified SIDs.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Wed, 10 Feb 2010 15:02:25 +0900 |
parents | 4d201756c593 |
children | 3a3f15b063e1 |
comparison
equal
deleted
inserted
replaced
97:4d201756c593 | 98:3fd15032fd3a |
---|---|
483 | 483 |
484 void | 484 void |
485 show_usage(char *cmd) | 485 show_usage(char *cmd) |
486 { | 486 { |
487 #ifdef HAVE_LIBARIB25 | 487 #ifdef HAVE_LIBARIB25 |
488 fprintf(stderr, "Usage: \n%s [--b25 [--round N] [--strip] [--EMM]] [--udp [--addr hostname --port portnumber]] [--device devicefile] [--lnb voltage] [--split SID1,SID2] channel rectime destfile\n", cmd); | 488 fprintf(stderr, "Usage: \n%s [--b25 [--round N] [--strip] [--EMM]] [--udp [--addr hostname --port portnumber]] [--device devicefile] [--lnb voltage] [--sid SID1,SID2] channel rectime destfile\n", cmd); |
489 #else | 489 #else |
490 fprintf(stderr, "Usage: \n%s [--strip] [--EMM]] [--udp [--addr hostname --port portnumber]] [--device devicefile] [--lnb voltage] [--split SID1,SID2] channel rectime destfile\n", cmd); | 490 fprintf(stderr, "Usage: \n%s [--strip] [--EMM]] [--udp [--addr hostname --port portnumber]] [--device devicefile] [--lnb voltage] [--sid SID1,SID2] channel rectime destfile\n", cmd); |
491 #endif | 491 #endif |
492 fprintf(stderr, "\n"); | 492 fprintf(stderr, "\n"); |
493 fprintf(stderr, "Remarks:\n"); | 493 fprintf(stderr, "Remarks:\n"); |
494 fprintf(stderr, "if rectime is '-', records indefinitely.\n"); | 494 fprintf(stderr, "if rectime is '-', records indefinitely.\n"); |
495 fprintf(stderr, "if destfile is '-', stdout is used for output.\n"); | 495 fprintf(stderr, "if destfile is '-', stdout is used for output.\n"); |
508 fprintf(stderr, "--udp: Turn on udp broadcasting\n"); | 508 fprintf(stderr, "--udp: Turn on udp broadcasting\n"); |
509 fprintf(stderr, " --addr hostname: Hostname or address to connect\n"); | 509 fprintf(stderr, " --addr hostname: Hostname or address to connect\n"); |
510 fprintf(stderr, " --port portnumber: Port number to connect\n"); | 510 fprintf(stderr, " --port portnumber: Port number to connect\n"); |
511 fprintf(stderr, "--device devicefile: Specify devicefile to use\n"); | 511 fprintf(stderr, "--device devicefile: Specify devicefile to use\n"); |
512 fprintf(stderr, "--lnb voltage: Specify LNB voltage (0, 11, 15)\n"); | 512 fprintf(stderr, "--lnb voltage: Specify LNB voltage (0, 11, 15)\n"); |
513 fprintf(stderr, "--split SID1,SID2...,SIDN: Specify SID number in CSV format(100,101,102,...)\n"); | 513 fprintf(stderr, "--sid SID1,SID2,...: Specify SID number in CSV format (101,102,...)\n"); |
514 fprintf(stderr, "--help: Show this help\n"); | 514 fprintf(stderr, "--help: Show this help\n"); |
515 fprintf(stderr, "--version: Show version\n"); | 515 fprintf(stderr, "--version: Show version\n"); |
516 fprintf(stderr, "--list: Show channel list\n"); | 516 fprintf(stderr, "--list: Show channel list\n"); |
517 } | 517 } |
518 | 518 |
894 { "port", 1, NULL, 'p'}, | 894 { "port", 1, NULL, 'p'}, |
895 { "device", 1, NULL, 'd'}, | 895 { "device", 1, NULL, 'd'}, |
896 { "help", 0, NULL, 'h'}, | 896 { "help", 0, NULL, 'h'}, |
897 { "version", 0, NULL, 'v'}, | 897 { "version", 0, NULL, 'v'}, |
898 { "list", 0, NULL, 'l'}, | 898 { "list", 0, NULL, 'l'}, |
899 { "split", 1, NULL, 'i'}, | 899 { "sid", 1, NULL, 'i'}, |
900 {0, 0, NULL, 0} /* terminate */ | 900 {0, 0, NULL, 0} /* terminate */ |
901 }; | 901 }; |
902 | 902 |
903 boolean use_b25 = FALSE; | 903 boolean use_b25 = FALSE; |
904 boolean use_udp = FALSE; | 904 boolean use_udp = FALSE; |
911 char *device = NULL; | 911 char *device = NULL; |
912 int val; | 912 int val; |
913 char *voltage[] = {"0V", "11V", "15V"}; | 913 char *voltage[] = {"0V", "11V", "15V"}; |
914 char *sid_list = NULL; | 914 char *sid_list = NULL; |
915 | 915 |
916 while((result = getopt_long(argc, argv, "br:smn:ua:p:d:hvl", | 916 while((result = getopt_long(argc, argv, "br:smn:ua:p:d:hvli:", |
917 long_options, &option_index)) != -1) { | 917 long_options, &option_index)) != -1) { |
918 switch(result) { | 918 switch(result) { |
919 case 'b': | 919 case 'b': |
920 use_b25 = TRUE; | 920 use_b25 = TRUE; |
921 fprintf(stderr, "using B25...\n"); | 921 fprintf(stderr, "using B25...\n"); |