Mercurial > hg > wm
diff Meerwald-dir/signature-utils.h @ 24:9f20bce6184e v0.7
move directories, support netpbm 11
author | Peter Meerwald-Stadler <pmeerw@pmeerw.net> |
---|---|
date | Fri, 20 Dec 2024 13:08:59 +0100 |
parents | Meerwald/signature-utils.h@bd669312f068 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Meerwald-dir/signature-utils.h Fri Dec 20 13:08:59 2024 +0100 @@ -0,0 +1,37 @@ +#ifndef SIGNATURE_UTILS_H +#define SIGNATURE_UTILS_H + +#define NSIGNATURE 4096 +#define NBITSIGNATURE (NSIGNATURE * 8) + +extern int n_signature; +extern int nbit_signature; +extern int n_signature1; +extern int nbit_signature1; +extern int n_signature2; +extern int nbit_signature2; + +extern char signature[NSIGNATURE]; +extern char signature1[NSIGNATURE]; +extern char signature2[NSIGNATURE]; + +void init_signature_bits(); +int get_signature_bit(int n); +void set_signature_bit(int n, int v); + +void init_signature1_bits(); +int get_signature1_bit(int n); +void set_signature1_bit(int n, int v); + +void init_signature2_bits(); +int get_signature2_bit(int n); +void set_signature2_bit(int n, int v); + +int binstr_to_sig(const char *binstr); +int binstr_to_sig1(const char *binstr); +int binstr_to_sig2(const char *binstr); +int sig_to_binstr(char *binstr); +int sig1_to_binstr(char *binstr); +int sig2_to_binstr(char *binstr); + +#endif