Commit f1f11cf6 authored by dickelbeck's avatar dickelbeck
Browse files

revive target 'dsntest' from common, start exploring pasting text from clipboard, primitively.

parent 56ccc81b
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -88,3 +88,13 @@ set(PCB_COMMON_SRCS
)

add_library(pcbcommon ${PCB_COMMON_SRCS})

# The dsntest may not build properly using MS Visual Studio.
if(NOT MSVC)
    # This one gets made only when testing.
    # to build it, first enable #define STAND_ALONE at top of dsnlexer.cpp
    add_executable( dsntest EXCLUDE_FROM_ALL dsnlexer.cpp )
    target_link_libraries( dsntest common ${wxWidgets_LIBRARIES} )

endif( NOT MSVC )
+885 −17

File changed.

Preview size limit exceeded, changes collapsed.

+2 −3
Original line number Diff line number Diff line
@@ -91,19 +91,18 @@ int STRING_LINE_READER::ReadLine() throw (IOError)

    if( advance )
    {
        if( advance >= maxLineLength )
        if( advance > maxLineLength )
            throw IOError( _("Line length exceeded") );

        wxASSERT( ndx + advance <= source.length() );

        memcpy( line, &source[ndx], advance );

        length = advance;

        ++lineNum;
        ndx += advance;
    }

    length = advance;
    line[advance] = 0;

    return advance;
+4 −0
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ class DSNLEXER
    const KEYWORD*      keywords;
    unsigned            keywordCount;

    void init();

    int readLine() throw (IOError)
    {
@@ -159,6 +160,9 @@ public:
    DSNLEXER( FILE* aFile, const wxString& aFilename,
            const KEYWORD* aKeywordTable, unsigned aKeywordCount );

    DSNLEXER( const std::string& aClipboardTxt,
        const KEYWORD* aKeywordTable, unsigned aKeywordCount );

    ~DSNLEXER()
    {
        delete reader;
+0 −5
Original line number Diff line number Diff line
@@ -233,14 +233,9 @@ install(TARGETS ${PCBNEW_NAME}

# The specctra test fails to build properly using MS Visual Studio.
if(NOT MSVC)
    # This one gets made only when testing.
    #add_executable(dsntest EXCLUDE_FROM_ALL dsn.cpp)
    #target_link_libraries(dsntest common ${wxWidgets_LIBRARIES})

    # This one gets made only when testing.
    add_executable(specctra_test EXCLUDE_FROM_ALL specctra.cpp)
    target_link_libraries(specctra_test common ${wxWidgets_LIBRARIES})

endif(NOT MSVC)

# This one gets made only when testing.
Loading