Simple Scalar

Simple Scalar - } else if (achPhrase[0] == '?') {...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
return(pch); } char achPhrase[255]; int Cdecl main(int cpchArgc, char **ppchArgv) { Fatal("Usage: anagram dictionary [length]\n", 0); if (cpchArgc == 3) cchMinLength = atoi(ppchArgv[2]); fInteractive = isatty(1); ReadDict(ppchArgv[1]); if (isdigit(achPhrase[0])) { cchMinLength = atoi(achPhrase); printf("New length: %d\n", cchMinLength);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } else if (achPhrase[0] == '?') { DumpCandidates(); } else { BuildMask(&achPhrase[0]); AddWords(); if (cpwCand == 0 || cchPhraseLength == 0) continue; Stat(ulHighCount = ulLowCount = 0;) cpwLast = 0; SortCandidates(); if (setjmp(jbAnagram) == 0) FindAnagram(&aqMainMask[0], &apwCand[0], 0); Stat(printf("%lu:%lu probes\n", ulHighCount, ulLowCount);) } } return 0; }...
View Full Document

Ask a homework question - tutors are online