-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasicUtilities.h
More file actions
27 lines (23 loc) · 935 Bytes
/
basicUtilities.h
File metadata and controls
27 lines (23 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//
// Created by Francesco on 21/02/2023.
//
#ifndef ESAME_BASH_POSIX_BASICUTILITIES_H
#define ESAME_BASH_POSIX_BASICUTILITIES_H
#define IFERROR(s, m) \
if ((s) == -1) { \
perror(m); \
exit(errno); \
}
typedef struct fileelaborato{
int dimensione;
double media;
double variazioneStandard;
char* nomeFile;
}fileElaborato;
int readFile(char* file, double** values);
double calcolaMedia(double* values, int values_n);
double calcolaVariazioneStandard(double* values, int values_n);
char* basename(char* path);
fileElaborato elaboraFile(char* path);
void SYSERROR(int result, const char* msg);
#endif //ESAME_BASH_POSIX_BASICUTILITIES_H