r_bitfield.c (ssldump-0.9b3) | : | r_bitfield.c (ssldump-1.3) | ||
---|---|---|---|---|
/** | /** | |||
r_bitfield.c | r_bitfield.c | |||
Copyright (C) 2001 RTFM, Inc. | Copyright (C) 2001 RTFM, Inc. | |||
All Rights Reserved. | All Rights Reserved. | |||
ekr@rtfm.com Wed Oct 3 11:15:23 2001 | ekr@rtfm.com Wed Oct 3 11:15:23 2001 | |||
*/ | */ | |||
static char *RCSSTRING="$Id: r_bitfield.c,v 1.3 2001/12/24 06:06:26 ekr Exp $"; | ||||
#include <r_common.h> | #include <r_common.h> | |||
#include "r_bitfield.h" | #include "r_bitfield.h" | |||
int r_bitfield_create(setp,size) | int r_bitfield_create(setp,size) | |||
r_bitfield **setp; | r_bitfield **setp; | |||
UINT4 size; | UINT4 size; | |||
{ | { | |||
r_bitfield *set=0; | r_bitfield *set=0; | |||
int _status; | int _status; | |||
int num_words=size/32+!!(size%32); | int num_words=size/32+!!(size%32); | |||
skipping to change at line 109 | skipping to change at line 107 | |||
int _status; | int _status; | |||
if(bit<set->base) | if(bit<set->base) | |||
return(0); | return(0); | |||
/* Resize? */ | /* Resize? */ | |||
if(word>set->len) | if(word>set->len) | |||
return(0); | return(0); | |||
return(set->data[word]&(1<<bbit)); | return(set->data[word]&(1<<bbit)); | |||
_status=0; | ||||
return(_status); | ||||
} | } | |||
End of changes. 2 change blocks. | ||||
5 lines changed or deleted | 0 lines changed or added |