1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 03:56:10 +08:00

Sync with latest source-sdk-2013.

This commit is contained in:
Nicholas Hastings
2014-10-30 12:30:57 -04:00
parent 6abc7fddca
commit aa5841f220
407 changed files with 6784 additions and 10498 deletions

View File

@ -63,11 +63,11 @@ static const int ice_keyrot[16] = {
static unsigned int
gf_mult (
register unsigned int a,
register unsigned int b,
register unsigned int m
unsigned int a,
unsigned int b,
unsigned int m
) {
register unsigned int res = 0;
unsigned int res = 0;
while (b) {
if (b & 1)
@ -91,10 +91,10 @@ gf_mult (
static unsigned long
gf_exp7 (
register unsigned int b,
unsigned int b,
unsigned int m
) {
register unsigned int x;
unsigned int x;
if (b == 0)
return (0);
@ -112,10 +112,10 @@ gf_exp7 (
static unsigned long
ice_perm32 (
register unsigned long x
unsigned long x
) {
register unsigned long res = 0;
register const unsigned long *pbox = ice_pbox;
unsigned long res = 0;
const unsigned long *pbox = ice_pbox;
while (x) {
if (x & 1)
@ -136,7 +136,7 @@ ice_perm32 (
static void
ice_sboxes_init (void)
{
register int i;
int i;
for (i=0; i<1024; i++) {
int col = (i >> 1) & 0xff;
@ -205,7 +205,7 @@ IceKey::~IceKey ()
static unsigned long
ice_f (
register unsigned long p,
unsigned long p,
const IceSubkey *sk
) {
unsigned long tl, tr; /* Expanded 40-bit values */
@ -243,8 +243,8 @@ IceKey::encrypt (
unsigned char *ctext
) const
{
register int i;
register unsigned long l, r;
int i;
unsigned long l, r;
l = (((unsigned long) ptext[0]) << 24)
| (((unsigned long) ptext[1]) << 16)
@ -278,8 +278,8 @@ IceKey::decrypt (
unsigned char *ptext
) const
{
register int i;
register unsigned long l, r;
int i;
unsigned long l, r;
l = (((unsigned long) ctext[0]) << 24)
| (((unsigned long) ctext[1]) << 16)
@ -316,20 +316,20 @@ IceKey::scheduleBuild (
int i;
for (i=0; i<8; i++) {
register int j;
register int kr = keyrot[i];
int j;
int kr = keyrot[i];
IceSubkey *isk = &_keysched[n + i];
for (j=0; j<3; j++)
isk->val[j] = 0;
for (j=0; j<15; j++) {
register int k;
int k;
unsigned long *curr_sk = &isk->val[j % 3];
for (k=0; k<4; k++) {
unsigned short *curr_kb = &kb[(kr + k) & 3];
register int bit = *curr_kb & 1;
int bit = *curr_kb & 1;
*curr_sk = (*curr_sk << 1) | bit;
*curr_kb = (*curr_kb >> 1) | ((bit ^ 1) << 15);