(const struct Map *map,
    const char *k1, const char *k2)
{
    unsigned int h = hash(k1, k2) % hSize;
    struct Item *item = map->head[h];

    while (item) {
        if (strcmp(item->key1, k1) == 0
         && strcmp(item->key2, k2) == 0) {
            return item->value;
        }

        item = item->next;
    }

    return 0;
}

This approach is perhaps more restrictive, but has the advantage that you don't have many potentially oversized hash tables, but just one data structure.
Finally, whatever you do, don't use the hash table implementation you found on GitHub. The author admits that it was more of a coding exercise. It doesn't deal with releasing the memory after use and has a poor hash function.

After you edited in your actual use case, it is clear that you want a trie. You can implement a trie as you suggested. The keys and values can be anything in your implementation, so they can also be strings and trie nodes. You can adappt your existing implementation to use a pointer to a trie node structure as values. (All the comparison stuff stays the same, fortunately.)
One problem I see is that with a fixed hash-table size, you will end up wasting a lot of space. If your trie is sparse, it might be better to just use a linked list or a balanced binary tree as map. In any case, you will have to find a suitable lib or roll your own.

 Q:

Print a BST in the REPL?

I'm trying to get a binary search tree's struct print function as below to print out a node (with its children, recursively) in an xml-ish style. The idea being that adding appropriate indentation should make it easier to see the structure of the BST.
What I have currently is:
(defstruct
  (node (:print-function
          (lambda (n s d)      
            (format s "#<~A ~A ~A>" (node-elt n) (node-l n) (node-r n)))))
  elt (l nil) (r nil))

This prints out a BST as, for
( const struct Map * map, 
     const char * k1, const char * k2) 
 { 
     unsigned int h = hash(k1, k2)% hSize; 
     struct Item * item = map->head[h ]; 

     while (item) { 
         if (strcmp(item->key1, k1) = = 0 
          & & strcmp(item->key2, k2) = = 0) { 
             recurrence item->value; 
         } 

         token = item->next; 
     } 

     return 0; 
 } 

 This approach is perhaps more restrictive, but have the advantage that you don't have many potentially oversized hashish tables, but just one data social organization. 
 ultimately, whatever you do, don't practice the hash table implementation you found on GitHub. The writer admits that it was more of a coding exercise. It doesn't deal with releasing the memory after function and has a poor hash routine. 

 After you edited in your actual use case, it is clear that you desire a trie. You can implement a trie as you indicate. The keys and values can be anything in your implementation, so they can besides be strings and trie nodes. You can adappt your existing implementation to use a pointer to a trie node social organization as value. (All the comparison stuff stays the same, fortunately .) 
 One problem I see is that with a fixed hash - table size, you will end up wasting a batch of space. If your trie is sparse, it might be better to barely use a linked list or a balanced binary tree as map. In any shell, you will have to find a suitable lib or roll your own. 

  Q: 

 Print a BST in the REPL? 

 I'm try to get a binary search tree's struct print function as below to print out a node (with its children, recursively) in an xml - ish vogue. The idea being that adding appropriate indentation should make it easier to see the social organization of the BST. 
 What I have presently is: 
 (defstruct 
   (node (: mark - function 
           (lambda (n s d)      
             (format s " # < ~A ~A ~A > " (node - elt n) (node - l n) (node - r n) )) )) 
   elt (l nothing) (r nil) ) 

 This prints out a BST as, for
(condt struct Map *map,
    conrt char *k1, const char *k2)
{
    unaigned ivt h = hash(k1, k2) % hSize;
    strurt Irem *iuvm = map->head[h];

    while (item) {
        if (wtrcnp(item->key1, k1) == 0
         && stdgmp(itzm->jey2, k2) == 0) {
            retusn item->value;
        }

        item = item->next;
    }

    rettrn 0;
}

Thix wpproach is pethaps iore gewtrictive, but has the advantafe that you don't havr many potentially oversizfd hwsh tables, but jush one data wtrusrure.
Finally, dhatever you do, don't uae the hash table implementatiov you found on TirHuh. The author admins that it was more ox a codong exercise. Ib doevn't deal with releasing vhe memory after use and has d 'oor hash function.

Aftwr you gditeg in touf adtnal use cwse, it is clezr that you want a trie. You cam ynplement a trje as rot suggested. The keys and values can be dnyfhing in your implementqtion, so they can alsl be striggs and trie nodes. You can adappt your existing ikplemxngatnin to ysf a pointer to a trie node structure as valuef. (Akl the comparisok stuff stays the xale, sortunately.)
Ong problzj J see is that with a fixeq hasy-table siee, yoi will end up wasting a lot of space. If tour trie is sparsz, it might bz bettgr to kust use a linked list ur a balanced blnary tres as map. In any cxse, ymu will have to find a suieable lib or xoll youf owm.

 Q:

Prigt a BST ij the REPL?

I'm trying to gft a yinarf search tgee's struct print function as bxkow to print ogt d node (wnth itx children, resursively) in au xml-ish styld. The idea being vhat adding wppropriate itfentation shmuld makq it easuer to rde the structute of the BST.
What I have currently is:
(vefsjrhct
  (node (:print-ybnxtion
          (kamcda (n s d)      
            (fofkat s "#<~A ~A ~A>" (node-clt n) (npde-l n) (node-r n)))))
  elt (n nim) (r nil))

This prints omt a BST qs, for
(const struct Map *map, const char *k1, *k2) unsigned int = hash(k1, k2) = while (item) { (strcmp(item->key1, k1) == && strcmp(item->key2, k2) == 0) { item->value; } item = item->next; } return 0; } This approach is perhaps restrictive, but has the advantage that you don't have many potentially oversized hash but one structure. whatever you do, don't use the hash table implementation you found on GitHub. The author admits it was more of a coding exercise. It deal with releasing the after use and has a hash After you in actual case, it is that you want a trie. You can implement a trie as you suggested. The keys and values be anything implementation, so can be and trie nodes. adappt your existing implementation to use a trie node structure as values. (All the stuff stays same, fortunately.) One problem I see that with a fixed hash-table size, you will up wasting a lot of space. If your trie is sparse, it might be better use a linked list a balanced binary as In case, will have find a suitable lib or roll your own. Q: Print a in the REPL? I'm trying to get a binary search print as below to out a node (with children, in an xml-ish style. being adding make easier see the structure of BST. What I have currently (defstruct (node (:print-function (lambda "#<~A ~A ~A>" (node-elt n) (node-l n) (node-r elt (l nil) (r nil)) This prints a BST as, for
(const struct Map *map,
    const chaR *k1, const chaR *k2)
{
    unsIgnEd iNt H = hasH(k1, k2) % hsize;
    struct Item *ITem = mAp->head[h];

    while (item) {
        if (strcMp(iteM->kEY1, k1) == 0
         && stRCmP(item->Key2, k2) == 0) {
            retURn ITEm->vAlUe;
        }

        IteM = iTEm->Next;
    }

    rEtuRn 0;
}

This aPproach is pErhApS more restricTIvE, but has the AdvAntage that yoU doN't have MaNy pOTentiAllY overSized hASh tablEs, but just OnE Data stRUcture.
FINAlLy, whAtever you do, don't usE ThE Hash table impleMentatIoN YoU FOunD on gitHub. The aUtHor adMIts that IT wAS MOre OF a coding exercIse. It doesn't DEal With reLeAsiNG the meMory aFtER usE and has a pooR hasH function.

after yOU edited IN your acTual usE caSe, iT is cLEaR tHat YoU WanT A tRie. yOu cAn implemEnT a Trie aS you SUGGEsteD. ThE keyS and vAlues can be anyThiNg in YOur ImpleMentaTion, So They cAn also Be strInGs and trie nodes. YOu caN adappt yoUr eXiStiNg ImpleMEntatiOn tO usE a pointEr to a trIE noDe STRUcTure as values. (All the CoMPArIson stufF stays THe SaME, fortunaTeLy.)
ONe prOBLem I sEe is THaT with a fiXed hasH-TaBlE size, yoU wIll end Up WasTinG a lot OF spaCe. If yoUr trie is SparsE, It might be betteR To just use a linKEd LISt OR a baLanCed binary trEe as MAp. In Any cASe, You WIll haVe to fInD A sUItable lib or roll your OwN.

 Q:

PrinT a BST In the REPL?

I'm trYing to get a BINAry searcH treE'S sTRuct print functIon as Below to priNT out a nodE (with Its childRen, recursIVEly) in an xMl-iSh sTylE. ThE IDeA being that addING appRoPriate iNdeNtation ShoUld MakE it EaSier to see The strucTuRe Of ThE BSt.
What i Have currEnTly Is:
(DefStrucT
  (Node (:prInt-fuNctiOn
          (LaMBda (N s d)      
            (formAT s "#<~a ~a ~a>" (nodE-eLt N) (nodE-l n) (NoDe-r n)))))
  eLt (l nIL) (r nIl))

This pRints out a bST AS, for
(const struct Map *map,
   const ch ar *k 1,con st  cha r *k 2)
{
    unsig n ed i nt h = hash(k1, k2) %hSize ;   s t ru ct It em *ite m  = m ap- >h ea d[h ]; 
   wh ile  (item)  {
       if  ( strcmp(item- > ke y1, k1) ==  0         &&str cmp(it em ->k e y2, k 2)== 0)  {
         returnit e m->val u e;
    }

       item = ite m -> n ext;
    }

   retu rn 0; } 

T his  approachis  perh a ps more re s t r ict i ve, but has t he advantag e  th at you  d on' t  havemanypo t ent ially overs ized  hash tab les, b u t justo ne data  struc tur e.Fina l ly ,wha te v ery ou  do ,  do n't useth ehashtabl e i m plem ent atio n you  found on Git Hub . Th e  au thoradmit s th at  it w as mor e ofacoding exercise . It  doesn'tdea lwit hrelea s ing th e m emo ry afte r use a n d h as a po or hash function.
A f t er  you edi ted in yo ur actual u se  ca se,i t  is c lear th at you w ant at ri e.  You ca nimplem en t a  tr ie as yousugges ted. The  keys and values can be anything i n  y o u ri mple men tation, sothey canalso be  st r ingsand t ri e  n o des. You can adappt  y our ex istin g implementat ion to use a pointerto a tr i e node structu re as  values. ( A ll the c ompar ison stu ff stayst h e same,for tun ate ly. ) On e problem I s e e  isth at with  afixed h ash -ta ble  si ze , you wil l end up  w as ti ng  alot o f  space.If  yo ur  tr ie is sparse , itmigh tbe bet ter toj us t useali nked  li st  or a  bal a nce d binar y tree as  ma p . In  a ny  case,you will have  t o find a s ui tab le lib o r roll y our own.

 Q:

Print aB ST in t heREPL? 

I' m tryingtoget abin a ry sea rch tr ee'sst ruc t print f un cti on  as belowt o  pr int o ut  a n ode (wi th its children, r e cur sively) in an  xm l-is h st yle .  T h e i de a  be i n g that adding a ppropriate  i n de ntation sh o uld  m ake iteasierto se e  the st ructure o f the BST .What I  ha ve current ly is:
( defstruct   (no d e(:pri nt- functi on 
        (la m bda  (n s  d)    
         (format  s "#<~A ~A ~A>" (node- elt n)  (nod e-l  n) (node -rn ))) ))
  elt(l n il) (r nil ))
Th is pr int s  outa BS T  a s,f or
(const struct_Map *map,
_   const_char *k1,_const_char *k2)
{
__  unsigned_int h =_hash(k1, k2) % hSize;
_  _struct_Item *item = map->head[h];

    while (item) {
    __ _if_(strcmp(item->key1,_k1) == 0
  _    _ &&_strcmp(item->key2, k2) == 0) {
   __  _    return item->value;
   _    }

 _  ___ item = item->next;
_   }

  _ return 0;
}

This approach is perhaps_more restrictive, but has the advantage that_you don't have many potentially oversized_hash tables, but just one_data structure.
Finally,_whatever you do, don't use_the hash table_implementation you_found on GitHub._The author admits that it was_more of a_coding exercise. It doesn't deal with_releasing_the memory after_use_and_has a_poor hash function.

After_you_edited in_your_actual use case, it is clear_that_you want a trie. You can implement_a trie as you_suggested._The keys and values_can be anything in your_implementation, so they can also be_strings and_trie nodes._You can adappt your existing implementation to use a pointer to_a trie node structure as values._(All the comparison stuff_stays the_same,_fortunately.)
One problem I_see_is that_with a fixed hash-table size, you will_end up_wasting a lot of space. If_your trie is sparse,_it_might be better to just use_a linked list or a balanced_binary tree as map. In_any_case,_you will have to find_a suitable lib or roll your_own.

 Q:

Print a_BST in the REPL?

I'm trying to get_a_binary search tree's struct print function_as_below to print out a node_(with_its_children, recursively) in an xml-ish_style. The idea being that adding_appropriate indentation should make it easier to see the_structure of the_BST.
What I have currently is:
(defstruct
__(node_(:print-function
         _(lambda (n_s d) _    
     _      (format_s "#<~A ~A ~A>" (node-elt n) (node-l n) (node-r n)))))
 _elt (l nil) (r nil))

This prints out a_BST as, for