comparison Meerwald/signature.c @ 8:f83ef905a63d

fixing many warnings increase capacity for coordinates in bruyn fix some uninit. variables
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Tue, 22 Apr 2008 13:36:05 +0200
parents acb6967ee76d
children
comparison
equal deleted inserted replaced
7:2b350281f8b0 8:f83ef905a63d
34 34
35 int get_signature2_bit(int n) { 35 int get_signature2_bit(int n) {
36 return _get_signature_bit(signature2, NSIGNATURE, n); 36 return _get_signature_bit(signature2, NSIGNATURE, n);
37 } 37 }
38 38
39 void _set_signature_bit(char *s, int lim, int n, int v) { 39 void _set_signature_bit(char *s, int limit, int n, int v) {
40 int byte = n >> 3; 40 int byte = n >> 3;
41 int bit = n & 7; 41 int bit = n & 7;
42 42
43 #ifdef DEBUG 43 #ifdef DEBUG
44 if (byte < 0 || byte >= limit / 8) 44 if (byte < 0 || byte >= limit / 8)
81 81
82 return 1; 82 return 1;
83 } 83 }
84 84
85 int binstr_to_sig(const char *binstr) { 85 int binstr_to_sig(const char *binstr) {
86 _binstr_to_sig(binstr, signature, &n_signature, &nbit_signature); 86 return _binstr_to_sig(binstr, signature, &n_signature, &nbit_signature);
87 } 87 }
88 88
89 int binstr_to_sig1(const char *binstr) { 89 int binstr_to_sig1(const char *binstr) {
90 _binstr_to_sig(binstr, signature1, &n_signature1, &nbit_signature1); 90 return _binstr_to_sig(binstr, signature1, &n_signature1, &nbit_signature1);
91 } 91 }
92 92
93 int binstr_to_sig2(const char *binstr) { 93 int binstr_to_sig2(const char *binstr) {
94 _binstr_to_sig(binstr, signature2, &n_signature2, &nbit_signature2); 94 return _binstr_to_sig(binstr, signature2, &n_signature2, &nbit_signature2);
95 } 95 }
96 96
97 int _sig_to_binstr(char *binstr, char *sig, int bits) { 97 int _sig_to_binstr(char *binstr, char *sig, int bits) {
98 int i; 98 int i;
99 99

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.