MCPcopy Create free account
hub / github.com/creatale/node-dv / ReadSampleSize

Function ReadSampleSize

deps/tesseract/classify/clusttool.cpp:44–51  ·  view source on GitHub ↗

* This routine reads a single integer from the specified * file and checks to ensure that it is between 0 and * MAXSAMPLESIZE. * @param File open text file to read sample size from * @return Sample size * @note Globals: None * @note Exceptions: ILLEGALSAMPLESIZE illegal format or range * @note History: 6/6/89, DSJ, Created. */

Source from the content-addressed store, hash-verified

42 * @note History: 6/6/89, DSJ, Created.
43 */
44uinT16 ReadSampleSize(FILE *File) {
45 int SampleSize;
46
47 if ((tfscanf(File, "%d", &SampleSize) != 1) ||
48 (SampleSize < 0) || (SampleSize > MAXSAMPLESIZE))
49 DoError (ILLEGALSAMPLESIZE, "Illegal sample size");
50 return (SampleSize);
51}
52
53/**
54 * This routine reads textual descriptions of sets of parameters

Callers 1

ReadNormProtosMethod · 0.85

Calls 2

tfscanfFunction · 0.85
DoErrorFunction · 0.85

Tested by

no test coverage detected