mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
convert ASCII TABs to ASCII SPACEs
Converted all ASCII tabs to ASCII spaces using a 8 character tab stop, for all files, except for all Makefiles (plus rpm.mk). The `git diff -w` reports no changes.
This commit is contained in:
68
hash.h
68
hash.h
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* Calc is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
||||
* Public License for more details.
|
||||
*
|
||||
* A copy of version 2.1 of the GNU Lesser General Public License is
|
||||
@@ -17,11 +17,11 @@
|
||||
* received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* Under source code control: 1995/11/14 23:57:45
|
||||
* File existed as early as: 1995
|
||||
* Under source code control: 1995/11/14 23:57:45
|
||||
* File existed as early as: 1995
|
||||
*
|
||||
* chongo <was here> /\oo/\ http://www.isthe.com/chongo/
|
||||
* Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
||||
* chongo <was here> /\oo/\ http://www.isthe.com/chongo/
|
||||
* Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
||||
*/
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#define INCLUDE_HASH_H
|
||||
|
||||
|
||||
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||
#if defined(CALC_SRC) /* if we are building from the calc source tree */
|
||||
# include "sha1.h"
|
||||
# include "zmath.h"
|
||||
#else
|
||||
@@ -59,22 +59,22 @@
|
||||
*/
|
||||
typedef struct hashstate HASH;
|
||||
struct hashstate {
|
||||
int hashtype; /* XYZ_HASH_TYPE debug value */
|
||||
bool bytes; /* true => reading bytes rather than words */
|
||||
void (*update)(HASH*, USB8*, USB32); /* update arbitrary length */
|
||||
void (*chkpt)(HASH*); /* checkpoint a state */
|
||||
void (*note)(int, HASH*); /* note a special value */
|
||||
void (*type)(int, HASH*); /* note a VALUE type */
|
||||
ZVALUE (*final)(HASH*); /* complete hash state */
|
||||
int (*cmp)(HASH*,HASH*); /* compare to states, true => a!=b */
|
||||
void (*print)(HASH*); /* print the value of a hash */
|
||||
int base; /* XYZ_BASE special hash value */
|
||||
int chunksize; /* XYZ_CHUNKSIZE input chunk size */
|
||||
int unionsize; /* h_union element size */
|
||||
union { /* hash dependent states */
|
||||
USB8 data[1]; /* used by hash_value to hash below */
|
||||
SHA1_INFO h_sha1; /* new SHA-1 internal state */
|
||||
} h_union;
|
||||
int hashtype; /* XYZ_HASH_TYPE debug value */
|
||||
bool bytes; /* true => reading bytes rather than words */
|
||||
void (*update)(HASH*, USB8*, USB32); /* update arbitrary length */
|
||||
void (*chkpt)(HASH*); /* checkpoint a state */
|
||||
void (*note)(int, HASH*); /* note a special value */
|
||||
void (*type)(int, HASH*); /* note a VALUE type */
|
||||
ZVALUE (*final)(HASH*); /* complete hash state */
|
||||
int (*cmp)(HASH*,HASH*); /* compare to states, true => a!=b */
|
||||
void (*print)(HASH*); /* print the value of a hash */
|
||||
int base; /* XYZ_BASE special hash value */
|
||||
int chunksize; /* XYZ_CHUNKSIZE input chunk size */
|
||||
int unionsize; /* h_union element size */
|
||||
union { /* hash dependent states */
|
||||
USB8 data[1]; /* used by hash_value to hash below */
|
||||
SHA1_INFO h_sha1; /* new SHA-1 internal state */
|
||||
} h_union;
|
||||
};
|
||||
|
||||
|
||||
@@ -82,12 +82,12 @@ struct hashstate {
|
||||
* what to xor to digest value when hashing special values
|
||||
*
|
||||
* IMPORTANT: To avoid overlap due to the HASH_XYZ macros below, the
|
||||
* XYZ_BASE values should be unique random hex values
|
||||
* that end in 00 (i.e., 0 mod 256).
|
||||
* XYZ_BASE values should be unique random hex values
|
||||
* that end in 00 (i.e., 0 mod 256).
|
||||
*/
|
||||
#define SHA_BASE 0x12face00 /* old SHA / SHA - no longer used */
|
||||
#define SHA1_BASE 0x23cafe00 /* new SHA-1 / SHA-1 */
|
||||
#define MD5_BASE 0x34feed00 /* MD5 - no longer used */
|
||||
#define SHA_BASE 0x12face00 /* old SHA / SHA - no longer used */
|
||||
#define SHA1_BASE 0x23cafe00 /* new SHA-1 / SHA-1 */
|
||||
#define MD5_BASE 0x34feed00 /* MD5 - no longer used */
|
||||
|
||||
|
||||
/*
|
||||
@@ -95,19 +95,19 @@ struct hashstate {
|
||||
*
|
||||
* we support these hash types
|
||||
*/
|
||||
#define SHA_HASH_TYPE 1 /* no longer used */
|
||||
#define SHA_HASH_TYPE 1 /* no longer used */
|
||||
#define SHA1_HASH_TYPE 2
|
||||
#define MD5_HASH_TYPE 3 /* no longer used */
|
||||
#define MD5_HASH_TYPE 3 /* no longer used */
|
||||
|
||||
|
||||
/*
|
||||
* Note a special value given the base value
|
||||
*/
|
||||
#define HASH_NEG(base) (1+base) /* note a negative value */
|
||||
#define HASH_COMPLEX(base) (2+base) /* note a complex value */
|
||||
#define HASH_DIV(base) (4+base) /* note a division by a value */
|
||||
#define HASH_ZERO(base) (8+base) /* note a zero numeric value */
|
||||
#define HASH_ZVALUE(base) (16+base) /* note a ZVALUE */
|
||||
#define HASH_NEG(base) (1+base) /* note a negative value */
|
||||
#define HASH_COMPLEX(base) (2+base) /* note a complex value */
|
||||
#define HASH_DIV(base) (4+base) /* note a division by a value */
|
||||
#define HASH_ZERO(base) (8+base) /* note a zero numeric value */
|
||||
#define HASH_ZVALUE(base) (16+base) /* note a ZVALUE */
|
||||
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user