Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
d594eecd
Commit
d594eecd
authored
Aug 20, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Standardize on just one spelling of BITSPERBYTE.
parent
81ddc46c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
18 deletions
+10
-18
src/backend/lib/bit.c
src/backend/lib/bit.c
+9
-15
src/include/utils/bit.h
src/include/utils/bit.h
+1
-3
No files found.
src/backend/lib/bit.c
View file @
d594eecd
...
...
@@ -8,40 +8,34 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/lib/Attic/bit.c,v 1.
9 2000/01/26 05:56:26 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/lib/Attic/bit.c,v 1.
10 2000/08/20 19:31:37 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
/*
* utils/memutils.h contains declarations of the functions in this file
*/
#include "postgres.h"
#include "utils/bit.h"
void
BitArraySetBit
(
BitArray
bitArray
,
BitIndex
bitIndex
)
{
bitArray
[
bitIndex
/
BitsPerByte
]
|=
(
1
<<
(
BitsPerByte
-
(
bitIndex
%
BitsPerByte
)
-
1
));
return
;
bitArray
[
bitIndex
/
BITSPERBYTE
]
|=
(
1
<<
(
BITSPERBYTE
-
1
-
(
bitIndex
%
BITSPERBYTE
)));
}
void
BitArrayClearBit
(
BitArray
bitArray
,
BitIndex
bitIndex
)
{
bitArray
[
bitIndex
/
BitsPerByte
]
&=
~
(
1
<<
(
BitsPerByte
-
(
bitIndex
%
BitsPerByte
)
-
1
));
return
;
bitArray
[
bitIndex
/
BITSPERBYTE
]
&=
~
(
1
<<
(
BITSPERBYTE
-
1
-
(
bitIndex
%
BITSPERBYTE
)));
}
bool
BitArrayBitIsSet
(
BitArray
bitArray
,
BitIndex
bitIndex
)
{
return
((
bool
)
(((
bitArray
[
bitIndex
/
BitsPerByte
]
&
(
1
<<
(
BitsPerByte
-
(
bitIndex
%
BitsPerByte
)
-
1
)
)
)
!=
0
)
?
1
:
0
));
return
((
bitArray
[
bitIndex
/
BITSPERBYTE
]
&
(
1
<<
(
BITSPERBYTE
-
1
-
(
bitIndex
%
BITSPERBYTE
)))
)
!=
0
);
}
src/include/utils/bit.h
View file @
d594eecd
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: bit.h,v 1.
7 2000/01/26 05:58:37 momjian
Exp $
* $Id: bit.h,v 1.
8 2000/08/20 19:31:37 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -17,8 +17,6 @@
typedef
bits8
*
BitArray
;
typedef
uint32
BitIndex
;
#define BitsPerByte 8
/*
* BitArraySetBit
* Sets (to 1) the value of a bit in a bit array.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment