From 15dca67900fd033487c813794329b9b8710da630 Mon Sep 17 00:00:00 2001 From: Giovanna Stefanelli <giovanna.stefanelli@student.uclouvain.be> Date: Thu, 14 May 2020 16:49:54 +0200 Subject: [PATCH] Update fact.c --- fact.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fact.c b/fact.c index ec6d12f..5516bd4 100644 --- a/fact.c +++ b/fact.c @@ -1,5 +1,5 @@ // -// Modified on 09/05/2020. +// Modified on 25/04/2020. // #include <errno.h> #include <sys/types.h> @@ -162,7 +162,7 @@ void *read_write() { } #define DEFAULT_NO_THREADS 2 -#define MAX_NO_THREADS 20 +#define MAX_NO_THREADS 40 // MAIN PROGRAMME int main (int argc, char *argv[]) { @@ -219,7 +219,7 @@ int main (int argc, char *argv[]) { */ // Open input and output files f.in = fopen(inputfile, "r"); - f.out = fopen(outputfile, "a+"); + f.out = fopen(outputfile, "w"); if ((f.in == NULL) || (f.out == NULL)) { printf("Incorrect input_file or output_file name\n"); exit(EXIT_FAILURE); @@ -255,3 +255,4 @@ int main (int argc, char *argv[]) { fclose(f.out); return (EXIT_SUCCESS); } + -- GitLab