/[svn]/ircd-hybrid/trunk/src/patricia.c
ViewVC logotype

Diff of /ircd-hybrid/trunk/src/patricia.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7821 by michael, Wed Oct 19 17:37:13 2016 UTC revision 7822 by michael, Wed Oct 19 21:53:19 2016 UTC
# Line 234  New_Prefix (int family, void *dest, int Line 234  New_Prefix (int family, void *dest, int
234  /* ascii2prefix  /* ascii2prefix
235   */   */
236  static prefix_t *  static prefix_t *
237  ascii2prefix (int family, char *string)  ascii2prefix (int family, const char *string)
238  {  {
239      unsigned long bitlen, maxbitlen = 0;      unsigned long bitlen, maxbitlen = 0;
240      char *cp;      char *cp;
# Line 907  patricia_remove (patricia_tree_t *patric Line 907  patricia_remove (patricia_tree_t *patric
907  /* { from demo.c */  /* { from demo.c */
908    
909  patricia_node_t *  patricia_node_t *
910  make_and_lookup (patricia_tree_t *tree, char *string)  make_and_lookup (patricia_tree_t *tree, const char *string)
911  {  {
912      prefix_t *prefix = ascii2prefix (0, string);      prefix_t *prefix = ascii2prefix (0, string);
913      if (prefix)      if (prefix)
# Line 921  make_and_lookup (patricia_tree_t *tree, Line 921  make_and_lookup (patricia_tree_t *tree,
921  }  }
922    
923  patricia_node_t *  patricia_node_t *
924  try_search_exact (patricia_tree_t *tree, char *string)  try_search_exact (patricia_tree_t *tree, const char *string)
925  {  {
926      prefix_t *prefix = ascii2prefix (0, string);      prefix_t *prefix = ascii2prefix (0, string);
927      if (prefix)      if (prefix)
# Line 935  try_search_exact (patricia_tree_t *tree, Line 935  try_search_exact (patricia_tree_t *tree,
935  }  }
936    
937  void  void
938  lookup_then_remove (patricia_tree_t *tree, char *string)  lookup_then_remove (patricia_tree_t *tree, const char *string)
939  {  {
940      patricia_node_t *node;      patricia_node_t *node;
941    
# Line 944  lookup_then_remove (patricia_tree_t *tre Line 944  lookup_then_remove (patricia_tree_t *tre
944  }  }
945    
946  patricia_node_t *  patricia_node_t *
947  try_search_best (patricia_tree_t *tree, char *string)  try_search_best (patricia_tree_t *tree, const char *string)
948  {  {
949      prefix_t *prefix = ascii2prefix (0, string);      prefix_t *prefix = ascii2prefix (0, string);
950      if (prefix)      if (prefix)

Legend:
Removed from v.7821  
changed lines
  Added in v.7822

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28