Mercurial > hg > fxanalyse
annotate utils.h @ 247:2fc4ac8017af
Instruct Emacs to follow Labwindow CVI coding style
author | Daniele Nicolodi <daniele@grinta.net> |
---|---|
date | Fri, 27 Feb 2015 18:55:19 +0100 |
parents | e925664b4b1b |
children |
rev | line source |
---|---|
144 | 1 #ifndef __FXANALISE_UTILS_H__ |
2 #define __FXANALISE_UTILS_H__ | |
3 | |
4 #ifndef FALSE | |
5 #define FALSE 0 | |
6 #endif | |
7 #ifndef TRUE | |
8 #define TRUE 1 | |
9 #endif | |
10 | |
11 #ifndef MIN | |
12 #define MIN(x, y) (x) < (y) ? (x) : (y) | |
13 #endif | |
14 | |
215
e925664b4b1b
Add streq() and strneq() definitions to utils.h
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
169
diff
changeset
|
15 #define streq(x, y) (strcmp((x), (y)) == 0) |
e925664b4b1b
Add streq() and strneq() definitions to utils.h
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
169
diff
changeset
|
16 #define strneq(x, y, n) (strncmp((x), (y), (n)) == 0) |
e925664b4b1b
Add streq() and strneq() definitions to utils.h
Daniele Nicolodi <daniele.nicolodi@obspm.fr>
parents:
169
diff
changeset
|
17 |
144 | 18 /* format floating points numbers accordingly to fmt and asdd thousands separator */ |
19 const char * thousands(char *buffer, int size, char *fmt, double val); | |
20 | |
21 double Peta(double x); | |
22 double Tera(double x); | |
23 double Giga(double x); | |
24 double Mega(double x); | |
25 double kilo(double x); | |
26 double milli(double x); | |
27 double micro(double x); | |
28 double nano(double x); | |
29 double pico(double x); | |
30 double femto(double x); | |
31 double atto(double x); | |
32 | |
33 #endif |