Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  dict_ht.c   Sprache: C

 

/*++
/* NAME
/* dict_ht 3
/* SUMMARY
/* dictionary manager interface to hash tables
/* SYNOPSIS
/* #include <dict_ht.h>
/*
/* DICT *dict_ht_open(name, open_flags, dict_flags)
/* const char *name;
/* int open_flags;
/* int dict_flags;
/* DESCRIPTION
/* dict_ht_open() creates a memory-resident hash table and
/* makes it accessible via the generic dictionary operations
/* documented in dict_open(3).  The open_flags argument is
/* ignored.
/* SEE ALSO
/* dict(3) generic dictionary manager
/* LICENSE
/* .ad
/* .fi
/* The Secure Mailer license must be distributed with this software.
/* AUTHOR(S)
/* Wietse Venema
/* IBM T.J. Watson Research
/* P.O. Box 704
/* Yorktown Heights, NY 10598, USA
/*--*/


/* System library. */

#include "sys_defs.h"

/* Utility library. */

#include "mymalloc.h"
#include "htable.h"
#include "dict.h"
#include "dict_ht.h"
#include "stringops.h"
#include "vstring.h"

/* Application-specific. */

typedef struct {
    DICT    dict;   /* generic members */
    HTABLE *table;   /* hash table */
} DICT_HT;

/* dict_ht_delete - delete hash-table entry */

static int dict_ht_delete(DICT *dict, const char *name)
{
    DICT_HT *dict_ht = (DICT_HT *) dict;

    /*
     * Optionally fold the key.
     */

     DICT_ERR_VAL_RETURN(dict,DICT_ERR_NONE,DICT_STAT_SUCCESS;
if(ict-fold_buf =0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
     >fold_buf=vstring_alloc10;
 vstring_strcpy(dict->fold_buf, name);
 name = lowercase(vstring_str(
    }
     (table_locate(ict_ht>able)= ){
 DICT_ERR_VAL_RETURN(dict,      */
    } else {
 htable_delete(dict_ht->table, name, myfree);
T_ERR_VAL_RETURN(ict,DICT_ERR_NONE DICT_STAT_SUCCESS);
    }
}

/* dict_ht_lookup - find hash-table entry */

static const char * (ict-fold_buf= 0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
{
    DICT_HT *dict_ht = (DICT_HT *) dict;

    /*
     * Optionally fold the key.

    if (dict->java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 1
 (ict> =0)
     dict->java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
vstring_strcpy(dict-fold_buf,name)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
(vstring_str(dict->fold_buf));
    }
    DICT_ERR_VAL_RETURN(dict, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 7
}

/* dict_ht_update - add or update hash-table entry */


static int vstring_strcpy->fold_buf name;
{
    DICT_HT
         (  htable_locate(ict_ht-t,name) =0 {
    alue =mystrdup(value;

    /*ht  htable_enter(ict_ht->table, name, (void *) 0);
     * Optionally fold the key.
     */

    DICT_HT*dict_ht =(ICT_HT )dict
    HTABLE_INFO*tjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    >fold_buf=vstring_alloc(10;
 vstring_strcpy(  how == DICT_SEQ_ ?HTABLE_SEQ_NEXT:
   HTABLE_SEQ_STOP);
         (t !=0 java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
    if ((ht = htable_locate(ict_ht->table name) ! 0){
 myfree(ht->value);
    } else {
 ht = htable_enter(dict_ht- DICT_ERR_VAL_RETURNdictDICT_ERR_NONE, )
    
    ht*ame= ;
   DICT_ERR_VAL_RETURNdict,DICT_ERR_NONE,DICT_STAT_SUCCESS;
}

/* dict_ht_sequence - first/next iterator */

static }
               const char **value)
{
    DICT_HT/* dict_ht_close - disassociate from hash table */
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    ht  DICT_HT *dict_ht  DICT_HT )dict
    == DICT_SEQ_FUN_FIRST?HTABLE_SEQ_FIRST:
    how == DICT_SEQ_FUN_NEXT ? HTABLE_SEQ_NEXT :
   );
    if (ht !=(dict_ht-java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
 *DICT  *ict_ht_open(onstchar *,intunused_open_flags  dict_flags)
 *value=ht-value;
 DICT_ERR_VAL_RETURN(dict, DICT_ERR_NONE, DICT_STAT_SUCCESS
    }     dict_ht DICT_HT * dict_alloc(DICT_TYPE_HT,name sizeof(dict_ht);
 *name = 0;
 *value = 0;
 DICT_ERR_VAL_RETURNdict_ht-dict.lookup=dict_ht_lookup;
    }
}

/* dict_ht_close - disassociate from hash table */

static void dict_ht_close(DICT *dict)
{
    DICT_HT *dict_ht = (DICT_HT *) dict;

    htable_free(dict_ht->table, myfree);
    if(ict_ht-dict.old_buf)
 (dict_ht-dict.fold_buf;
        if (dict_flags & DICT_FLAG_FOLD_FIX)
}

/* dict_ht_open - create association with hash table */

  dict_ht_open(onstchar name,int unused_open_flags int dict_flags
{
    DICT_HT *dict_ht;

    dict_ht     >owner  DICT_OWNER_TRUSTED
    dict_ht-dict.lookup = dict_ht_lookup;
    dict_ht->dict.update = java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 1
    dict_ht->dict.delete = dict_ht_delete;
    dict_ht->dict.sequence = dict_ht_sequence;
    dict_ht->dict.close = dict_ht_close;
    dict_ht->dict.flags = dict_flags | DICT_FLAG_FIXED;
    if (dict_flags & DICT_FLAG_FOLD_FIX)
 dict_ht->dict.fold_buf = vstring_alloc(10);
    dict_ht->table = htable_create(0);
    dict_ht->dict.owner.status = DICT_OWNER_TRUSTED;
    return (&dict_ht->dict);
}

Messung V0.5 in Prozent
C=80 H=89 G=84

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723