GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
1/**************************************************************************** 2** 3*A TemporaryFile.c ANUPQ source Eamonn O'Brien 4** 5*Y Copyright 1995-2001, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany 6*Y Copyright 1995-2001, School of Mathematical Sciences, ANU, Australia 7** 8*/ 9 10#include "pq_defs.h" 11#include "pq_functions.h" 12#include "constants.h" 13 14/* set up a temporary file and return an appropriate FILE * indicator; 15 if in Unix environment, open temporary file in directory specified 16 by value of environment variable TMPDIR, else on /var/tmp */ 17 18FILE *TemporaryFile(void) 19{ 20 FILE *file = tmpfile(); 21 22 if (file == NULL) { 23 perror("Cannot open temporary file"); 24 exit(FAILURE); 25 } 26 27 return file; 28} 29 30