// // Programmer: Craig Stuart Sapp // Creation Date: Tue Nov 14 16:32:36 PST 2000 // Last Modified: Tue Nov 14 16:32:39 PST 2000 // Last Modified: Sun Apr 14 21:25:48 PDT 2013 Enabled multiple segment input // Last Modified: Sun Apr 21 16:18:20 PDT 2013 Added -k option, -c option // Filename: ...sig/examples/all/dittox.cpp // Web Address: http://sig.sapp.org/examples/museinfo/humdrum/dittox.cpp // Syntax: C++; museinfo // // Description: Fills in the meaning of null tokens. // #include #include "humdrum.h" // function declarations void checkOptions (Options& opts, int argc, char* argv[]); void example (void); void printOutput (HumdrumFile& infile); void printKernOutput (HumdrumFile& infile); void printKernTokenLineDuration (HumdrumFile& infile, int line, int field); void usage (const string& command); // global variables Options options; // database for command-line arguments int parensQ = 0; // used with -p option int rhythmQ = 0; // used with -k option int skipQ = 0; // used with -s option string skipString; // used with -s option int charQ = 0; // used with -c option string charString; // used with -c option int xcharQ = 0; // used with -c option string xcharString; // used with -C option /////////////////////////////////////////////////////////////////////////// int main(int argc, char* argv[]) { HumdrumFileSet infiles; // process the command-line options checkOptions(options, argc, argv); // figure out the number of input files to process int numinputs = options.getArgCount(); if (numinputs < 1) { infiles.read(cin); } else { for (int i=0; i