1. 06 Dec, 2000 7 commits
  2. 05 Dec, 2000 12 commits
  3. 04 Dec, 2000 9 commits
  4. 03 Dec, 2000 3 commits
  5. 02 Dec, 2000 9 commits
    • Geoff Thorpe's avatar
      Use the new LHASH macros to declare type-safe wrapper functions that can · 35a99b63
      Geoff Thorpe authored
      be used as the hash/compare callbacks without function pointer casting.
      
      For now, this is just happening in the apps/ directory whilst a few people
      check the approach. The rest of the library will be moved across to the
      same idea if there's no problems with this.
      35a99b63
    • Geoff Thorpe's avatar
      Next step in tidying up the LHASH code. This commit defines DECLARE and · dfa46e50
      Geoff Thorpe authored
      IMPLEMENT macros for defining wrapper functions for "hash" and "cmp" callbacks
      that are specific to the underlying item type in a hash-table. This prevents
      function pointer casting altogether, and also provides some type-safety
      because the macro does per-variable casting from the (void *) type used in
      LHASH itself to the type declared in the macro - and if that doesn't match the
      prototype expected by the "hash" or "cmp" function then a compiler error will
      result.
      
      NB: IMPLEMENT macros are not required unless predeclared forms are required
      (either in a header file, or further up in a C file than the implementation
      needs to be). The DECLARE macros must occur after the type-specific hash/cmp
      callbacks are declared. Also, the IMPLEMENT and DECLARE macros are such that
      they can be prefixed with "static" if desired and a trailing semi-colon should
      be appended (making it look more like a regular declaration and easier on
      auto-formatting text-editors too).
      
      Now that these macros are defined, I will next be commiting changes to a
      number of places in the library where the casting was doing bad things. After
      that, the final step will be to make the analogous changes for the lh_doall
      and lh_doall_arg functions (more specifically, their callback parameters).
      dfa46e50
    • Richard Levitte's avatar
    • Ulf Möller's avatar
      last commit was wrong. Now it works. :) · b26f84cb
      Ulf Möller authored
      b26f84cb
    • Ulf Möller's avatar
      argl · 0dba0613
      Ulf Möller authored
      0dba0613
    • Ulf Möller's avatar
      remember the problem with ftime() · e0c87508
      Ulf Möller authored
      e0c87508
    • Ulf Möller's avatar
      forgot to remove the loop variable · ea1b7fe6
      Ulf Möller authored
      ea1b7fe6
    • Ulf Möller's avatar
      Loops like this one: · db88223b
      Ulf Möller authored
                      if (bp == NULL)
                              for (j=0; j<10000; j++)
                                      BN_add(&c,&a,&b);
      
      seem to be pretty useless, and bp never is NULL anyway.
      db88223b
    • Ulf Möller's avatar
      d29b63bc