/* Copyright (C) 1994-1998 Evgenii Rudnyi, http://Evgenii.Rudnyi.Ru/ Implementation of the algorithm described in E.B. Rudnyi. Statistical model of systematic errors: linear error model. Chemometrics and Intelligent Laboratory Systems. 1996, V. 34, N 1, p. 41-54. This software is a copyrighted work licensed under the terms, described in the file "FREE_LICENSE". */ #include #include "common.h" buffer Buffer(1024*300); void warning(const char* txt) { cout << endl << "***WARNING " << txt << endl; } bool buffer::write(const void* ptr, size_t n) { if (free() < n) { warning("Buffer is full"); return false; } else { memcpy(cur, ptr, n); cur += n; return true; } }