VirtualBox

Changeset 501 in kBuild for vendor/gnumake/current/hash.c


Ignore:
Timestamp:
Sep 15, 2006 2:30:32 AM (19 years ago)
Author:
bird
Message:

Load make-3.81/ into vendor/gnumake/current.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/gnumake/current/hash.c

    r54 r501  
    33   Written by Greg McGary <[email protected]> <[email protected]>
    44
    5    This program is free software; you can redistribute it and/or modify
    6    it under the terms of the GNU General Public License as published by
    7    the Free Software Foundation; either version 2, or (at your option)
    8    any later version.
    9 
    10    This program is distributed in the hope that it will be useful,
    11    but WITHOUT ANY WARRANTY; without even the implied warranty of
    12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13    GNU General Public License for more details.
    14 
    15    You should have received a copy of the GNU General Public License
    16    along with this program; if not, write to the Free Software
    17    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    18 */
     5This program is free software; you can redistribute it and/or modify
     6it under the terms of the GNU General Public License as published by
     7the Free Software Foundation; either version 2, or (at your option)
     8any later version.
     9
     10This program is distributed in the hope that it will be useful,
     11but WITHOUT ANY WARRANTY; without even the implied warranty of
     12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13GNU General Public License for more details.
     14
     15You should have received a copy of the GNU General Public License along with
     16this program; see the file COPYING.  If not, write to the Free Software
     17Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.  */
    1918
    2019#include "make.h"
     
    127126
    128127void *
    129 hash_insert (struct hash_table *ht, void *item)
     128hash_insert (struct hash_table *ht, const void *item)
    130129{
    131130  void **slot = hash_find_slot (ht, item);
    132   void *old_item = slot ? *slot : 0;
     131  const void *old_item = slot ? *slot : 0;
    133132  hash_insert_at (ht, item, slot);
    134   return ((HASH_VACANT (old_item)) ? 0 : old_item);
    135 }
    136 
    137 void *
    138 hash_insert_at (struct hash_table *ht, void *item, const void *slot)
    139 {
    140   void *old_item = *(void **) slot;
     133  return (void *)((HASH_VACANT (old_item)) ? 0 : old_item);
     134}
     135
     136void *
     137hash_insert_at (struct hash_table *ht, const void *item, const void *slot)
     138{
     139  const void *old_item = *(void **) slot;
    141140  if (HASH_VACANT (old_item))
    142141    {
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette