/* Additional library for main.c (statgen) */ #include int error_checking (const float *cell, const int from, const char *input, const int max_depth, const int num_of_inter, const char *output, const int to, const int type_inter) { if ((type_inter == 0) || (type_inter > 4)) return 11; if ((cell[0] == 0.0) || (cell[1] == 0.0) || (cell[2] == 0.0)) return 12; if ((to == -1) || (from == -1)) return 13; if (num_of_inter == 0) return 14; if (input[0] == '#') return 15; if (output[0] == '#') return 16; if ((max_depth < 3) && (max_depth != 0)) return 19; return 0; } int printing_head (const char *output, const int log, const int quiet, const char *input, const int from, const int to, const float *cell, const int type_inter, const int *label_atom, const int num_of_inter, const float *crit, const int max_depth) { int i, j; FILE *f_out; f_out = fopen (output, "w"); fprintf (f_out, "statgen ::: V.1.0.0 ::: 2013-07-17\n\n"); fprintf (f_out, "CONFIGURATION\n"); fprintf (f_out, "LOG=%i\nQUIET=%i\n", log, quiet); fprintf (f_out, "MASK=%s\nFIRST=%i\nLAST=%i\n", input, from, to); fprintf (f_out, "CELL=%.4f,%.4f,%.4f\n", cell[0], cell[1], cell[2]); fprintf (f_out, "ATOMS=%i", label_atom[0]); for (i=1; i