1. 10 May, 2012 1 commit
  2. 06 May, 2012 3 commits
  3. 04 May, 2012 1 commit
  4. 26 Apr, 2012 2 commits
  5. 25 Apr, 2012 2 commits
  6. 19 Apr, 2012 1 commit
    • Dick Hollenbeck's avatar
      // Dick Hollenbeck's KiROUND R&D · c24863c0
      Dick Hollenbeck authored
      // This provides better project control over rounding to int from double
      // than wxRound() did.  This scheme provides better logging in Debug builds
      // and it provides for compile time calculation of constants.
      
      
      #include <stdio.h>
      #include <assert.h>
      #include <limits.h>
      
      //-----<KiROUND KIT>------------------------------------------------------------
      
      /**
       * KiROUND
       * rounds a floating point number to an int using
       * "round halfway cases away from zero".
       * In Debug build an assert fires if will not fit into an int.
       */
      
      #if defined( DEBUG )
      
      // DEBUG: a macro to capture line and file, then calls this inline
      
      static inline int KiRound( double v, int line, const char* filename )
      {
          v = v < 0 ? v - 0.5 : v + 0.5;
          if( v > INT_MAX + 0.5 )
          {
              printf( "%s: in file %s on line %d, val: %.16g too ' > 0 ' for int\n", __FUNCTION__, filename, line, v );
          }
          else if( v < INT_MIN - 0.5 )
          {
              printf( "%s: in file %s on line %d, val: %.16g too ' < 0 ' for int\n", __FUNCTION__, filename, line, v );
          }
          return int( v );
      }
      
      #define KiROUND( v )    KiRound( v, __LINE__, __FILE__ )
      
      #else
      
      // RELEASE: a macro so compile can pre-compute constants.
      
      #define KiROUND( v )  int( (v) < 0 ? (v) - 0.5 : (v) + 0.5 )
      
      #endif
      
      
      //-----</KiROUND KIT>-----------------------------------------------------------
      
      // Only a macro is compile time calculated, an inline function causes a static constructor
      // in a situation like this.
      // Therefore the Release build is best done with a MACRO not an inline function.
      int Computed = KiROUND( 14.3 * 8 );
      
      
      int main( int argc, char** argv )
      {
          for( double d = double(INT_MAX)-1;  d < double(INT_MAX)+8;  d += 2.0 )
          {
              int i = KiROUND( d );
      
              printf( "t: %d  %.16g\n", i, d );
          }
      
          return 0;
      }
      c24863c0
  7. 18 Apr, 2012 1 commit
  8. 17 Apr, 2012 1 commit
  9. 16 Apr, 2012 1 commit
  10. 11 Apr, 2012 1 commit
  11. 09 Apr, 2012 1 commit
  12. 07 Apr, 2012 2 commits
    • Wayne Stambaugh's avatar
      Pcbnew s-expression file format changes. · 9c16a218
      Wayne Stambaugh authored
      * Save dialog now supports saving boards to new file format.
      * Add CMake option to build s-expression file save.
      * Add check to main CMakeList.txt file to make sure nanometers are
        enables when the new file format is built.
      * Minor tweaks to object format functions for improved output.
      * Rename kicad_plugin.h/cpp to legacy_plugin.h/cpp.
      9c16a218
    • jean-pierre charras's avatar
      Remove old xpm icons files · d739f03c
      jean-pierre charras authored
      d739f03c
  13. 26 Mar, 2012 1 commit
    • Wayne Stambaugh's avatar
      Minor code improvements and coding policy fixes. · 45445dd8
      Wayne Stambaugh authored
      * BLOCK_SELECTOR class is not longer derived from EDA_ITEM.
      * Encapsulate BLOCK_SELECTOR class member variables and add access methods.
      * Move HandleBlockBegin() function from block_commande.cpp to drawframe.cpp.
      * Remove virtual methods from top level derived objects per future
        coding policy change.
      * Remove Doxygen copydoc statement from objects derived from EDA_ITEM
        since the comments are automatically copied to the derived object.
      * Removed copy and pasted Doxygen comments from objects derived from
        EDA_ITEM.
      45445dd8
  14. 20 Mar, 2012 1 commit
  15. 15 Mar, 2012 1 commit
  16. 28 Feb, 2012 1 commit
  17. 26 Feb, 2012 1 commit
  18. 20 Feb, 2012 1 commit
  19. 17 Feb, 2012 1 commit
  20. 16 Feb, 2012 1 commit
  21. 24 Jan, 2012 1 commit
  22. 23 Jan, 2012 1 commit
  23. 22 Jan, 2012 1 commit
  24. 17 Jan, 2012 1 commit
  25. 13 Jan, 2012 1 commit
  26. 10 Jan, 2012 1 commit
  27. 03 Jan, 2012 1 commit
  28. 31 Dec, 2011 1 commit
  29. 29 Dec, 2011 1 commit
  30. 22 Dec, 2011 2 commits
  31. 21 Dec, 2011 1 commit
  32. 17 Dec, 2011 1 commit
  33. 16 Dec, 2011 2 commits
    • Wayne Stambaugh's avatar
      Encapsulate EDA_APP class. · 0e27f45f
      Wayne Stambaugh authored
      0e27f45f
    • Wayne Stambaugh's avatar
      More encapsulation work and other minor improvements. · fac288cf
      Wayne Stambaugh authored
      * EDA_DRAW_FRAME completely encapsulated except for DrawFrame member.
      * Moved members specific to Pcbnew from EDA_DRAW_FRAME to PCB_BASE_FRAME
        or PCB_EDIT_FRAME as appropriate.
      * Replace EDA_TOOLBAR with wxAuiToolBar as EDA_TOOL bar provided no
        additional functionality and made code less readable.
      * Remove EDA_TOOLBAR class definition from wxstruct.h and delete file
        wineda_toolbar.cpp.
      * Rename tool bar members to something more descriptive since the
        horizontal and vertical references wont mean anything once the
        tool bars are movable.
      * Lots of dead code removal.
      fac288cf