2018-06-11 15:19:05 -04:00
|
|
|
/*
|
|
|
|
|
Copyright 2013--2018 James E. McClure, Virginia Polytechnic & State University
|
|
|
|
|
|
|
|
|
|
This file is part of the Open Porous Media project (OPM).
|
|
|
|
|
OPM is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
OPM is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
Copyright 2013--2018 James E. McClure, Virginia Polytechnic & State University
|
|
|
|
|
|
|
|
|
|
This file is part of the Open Porous Media project (OPM).
|
|
|
|
|
OPM is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
OPM is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
2014-11-11 14:05:39 -05:00
|
|
|
#ifndef included_PIO_hpp
|
|
|
|
|
#define included_PIO_hpp
|
|
|
|
|
|
|
|
|
|
#include "IO/PIO.h"
|
|
|
|
|
|
2021-03-17 10:24:14 -04:00
|
|
|
#include <cstdio>
|
2014-11-11 14:05:39 -05:00
|
|
|
#include <iostream>
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace IO {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline int printp( const char *format, ... )
|
|
|
|
|
{
|
2021-03-17 10:24:14 -04:00
|
|
|
va_list ap;
|
|
|
|
|
va_start( ap, format );
|
2014-11-11 14:05:39 -05:00
|
|
|
char tmp[1024];
|
2021-03-17 10:24:14 -04:00
|
|
|
int n = vsprintf( tmp, format, ap );
|
|
|
|
|
va_end( ap );
|
2014-11-11 14:05:39 -05:00
|
|
|
pout << tmp;
|
|
|
|
|
pout.flush();
|
|
|
|
|
return n;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2021-03-17 10:24:14 -04:00
|
|
|
} // namespace IO
|
2014-11-11 14:05:39 -05:00
|
|
|
|
|
|
|
|
#endif
|