void longt(Armember *bp) { char *cp; pmode(strtoul(bp->hdr.mode, 0, 8)); Bprint(&bout, "%3ld/%1ld", atol(bp->hdr.uid), atol(bp->hdr.gid)); Bprint(&bout, "%7ld", bp->size); cp = myctime(bp->date); Bprint(&bout, " %-12.12s %-4.4s ", cp+4, cp+24); }
//********************************************************************************************************************** vector<string> MatrixOutputCommand::setParameters(){ try { CommandParameter pshared("shared", "InputTypes", "", "", "none", "none", "none","phylip",false,true,true); parameters.push_back(pshared); CommandParameter plabel("label", "String", "", "", "", "", "","",false,false); parameters.push_back(plabel); CommandParameter psubsample("subsample", "String", "", "", "", "", "","",false,false); parameters.push_back(psubsample); CommandParameter pgroups("groups", "String", "", "", "", "", "","",false,false); parameters.push_back(pgroups); CommandParameter pcalc("calc", "Multiple", "sharedsobs-sharedchao-sharedace-jabund-sorabund-jclass-sorclass-jest-sorest-thetayc-thetan-kstest-sharednseqs-ochiai-anderberg-kulczynski-kulczynskicody-lennon-morisitahorn-braycurtis-whittaker-odum-canberra-structeuclidean-structchord-hellinger-manhattan-structpearson-soergel-spearman-structkulczynski-speciesprofile-hamming-structchi2-gower-memchi2-memchord-memeuclidean-mempearson-jsd-rjsd", "jclass-thetayc", "", "", "","",true,false,true); parameters.push_back(pcalc); CommandParameter poutput("output", "Multiple", "lt-square-column", "lt", "", "", "","",false,false); parameters.push_back(poutput); CommandParameter pmode("mode", "Multiple", "average-median", "average", "", "", "","",false,false); parameters.push_back(pmode); CommandParameter pprocessors("processors", "Number", "", "1", "", "", "","",false,false,true); parameters.push_back(pprocessors); CommandParameter piters("iters", "Number", "", "1000", "", "", "","",false,false); parameters.push_back(piters); CommandParameter pinputdir("inputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(pinputdir); CommandParameter poutputdir("outputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(poutputdir); vector<string> myArray; for (int i = 0; i < parameters.size(); i++) { myArray.push_back(parameters[i].name); } return myArray; } catch(exception& e) { m->errorOut(e, "MatrixOutputCommand", "setParameters"); exit(1); } }
int main () { initCoCoSupport(); heapInit(); timeInit(); setHighSpeed(TRUE); width(32); if (dateTime->marker = 0x1234) { timeSet(dateTime->year, dateTime->month, dateTime->day, dateTime->hour, dateTime->minute, dateTime->second); } daliConfig.width = 256; daliConfig.height = 192; daliConfig.bitmap = 0xe00; daliConfig.max_fps = 30; daliConfig.max_cps = 30; daliConfig.render_state = 0; daliConfig.time_mode = HHMMSS; daliConfig.date_mode = MMDDYY; daliConfig.display_date_p = 0; daliConfig.test_hack = 0; render_init(&daliConfig); memset(daliConfig.bitmap, 0xff, 6144); pmode(4, daliConfig.bitmap); screen(1, 1); UInt32 displayTimeTime; UInt32 five = UInt32Init(0, 5); struct timeval now; struct timezone tzp; while(TRUE) { // Revert to time display if time if (daliConfig.display_date_p) { gettimeofday(&now, &tzp); if (UInt32GreaterThan(&now.tv_sec, &displayTimeTime)) { daliConfig.display_date_p = FALSE; } } byte a = MyInkey(); switch(a) { case '0': daliConfig.time_mode = HHMMSS; daliConfig.date_mode = MMDDYY; break; case '1': daliConfig.time_mode = HHMMSS; break; case '2': daliConfig.time_mode = HHMM; break; case '3': daliConfig.time_mode = SS; break; case '4': daliConfig.date_mode = MMDDYY; break; case '5': daliConfig.date_mode = DDMMYY; break; case '6': daliConfig.date_mode = YYMMDD; break; case ' ': daliConfig.display_date_p = TRUE; gettimeofday(&now, &tzp); UInt32Add(&displayTimeTime, &now.tv_sec, &five); break; } render_once(&daliConfig); } return 0; }