Tinker9 70bd052 (Thu Nov 9 12:11:35 2023 -0800)
Loading...
Searching...
No Matches
tinkersuppl.h
1#pragma once
2#include <string>
3
4// version
5std::string tinker_f_version(std::string infile, std::string status);
6
7// file
8void tinker_f_rewind(int* unit);
9
10void tinker_f_close(int* unit);
11
12void tinker_f_open(int* unit, std::string file, std::string status);
13void tinker_f_open(int* unit, std::string file, std::string form,
14 std::string status);
15
16// memory
17int tinker_f_allocated(void* p);
18
19void tinker_f_deallocate(void* p);
20
21void tinker_f_allocate_byte(void** pp, size_t bytes);
22
23template <class T>
24void tinker_f_allocate_element(T** pp, int nelem)
25{
26 void** p = (void**)pp;
27 size_t bytes = sizeof(T) * nelem;
28 tinker_f_allocate_byte(p, bytes);
29}
30
31// read stdin
32std::string tinker_f_read_stdin_line();