Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
db56d412
Kaydet (Commit)
db56d412
authored
Eyl 25, 2006
tarafından
Vladimir Glazounov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
INTEGRATION: CWS dmake46 (1.1.1.1.152); FILE MERGED
2006/07/22 03:48:48 vq 1.1.1.1.152.1: #i10000# Add some comments.
üst
8149ed2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
hash.c
dmake/hash.c
+5
-3
No files found.
dmake/hash.c
Dosyayı görüntüle @
db56d412
/* RCS $Id: hash.c,v 1.
1.1.1 2000-09-22 15:33:25 hr
Exp $
/* RCS $Id: hash.c,v 1.
2 2006-09-25 09:39:55 vg
Exp $
--
--
-- SYNOPSIS
-- SYNOPSIS
-- Hashing function for hash tables.
-- Hashing function for hash tables.
...
@@ -38,8 +38,8 @@ Hash( id, phv )/*
...
@@ -38,8 +38,8 @@ Hash( id, phv )/*
compare hash keys instead and compare strings only for those whose 32-bit
compare hash keys instead and compare strings only for those whose 32-bit
hash keys match. (not many) */
hash keys match. (not many) */
char
*
id
;
char
*
id
;
/* value */
uint32
*
phv
;
uint32
*
phv
;
/* key */
{
{
register
char
*
p
=
id
;
register
char
*
p
=
id
;
register
uint32
hash
=
(
uint32
)
0
;
register
uint32
hash
=
(
uint32
)
0
;
...
@@ -47,6 +47,8 @@ uint32 *phv;
...
@@ -47,6 +47,8 @@ uint32 *phv;
while
(
*
p
)
hash
=
(
hash
<<
7
)
+
hash
+
(
uint32
)
(
*
p
++
);
while
(
*
p
)
hash
=
(
hash
<<
7
)
+
hash
+
(
uint32
)
(
*
p
++
);
*
phv
=
hash
=
hash
+
(
uint32
)
(
p
-
id
);
*
phv
=
hash
=
hash
+
(
uint32
)
(
p
-
id
);
/* return an index (for Macs[]) where all keys with the same remainder
* after integer division with HASH_TABLE_SIZE are stored. */
return
(
(
uint16
)
(
hash
%
HASH_TABLE_SIZE
)
);
return
(
(
uint16
)
(
hash
%
HASH_TABLE_SIZE
)
);
}
}
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