Changeset d795463


Ignore:
Timestamp:
Feb 11, 2013, 9:52:24 PM (12 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
08bc714
Parents:
0e5326d
Message:

examples/utils.c: make -i optional

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/utils.c

    r0e5326d rd795463  
    175175  while (next_option != -1);
    176176
     177  if ( source_uri == NULL ) {
     178    if (argc - optind == 1) {
     179      source_uri = argv[optind];
     180    } else if ( argc - optind > 1 ) {
     181      errmsg ("Error: too many non-option arguments `%s'\n", argv[argc - 1]);
     182      usage ( stderr, 1 );
     183    }
     184  } else if ( argc - optind > 0 ) {
     185    errmsg ("Error: extra non-option argument %s\n", argv[optind]);
     186    usage ( stderr, 1 );
     187  }
     188
    177189  if (source_uri != NULL) {
    178190    debug ("Input file : %s\n", source_uri);
Note: See TracChangeset for help on using the changeset viewer.