Common Lisp Package: DIFF

README:

FUNCTION

Public

GENERATE-DIFF (DIFF-KIND ORIGINAL-PATHNAME MODIFIED-PATHNAME)

Compute a diff between ORIGINAL-PATHNAME and MODIFIED-PATHNAME. DIFF-KIND indicates the type of DIFF generated and should be the symbol DIFF:UNIFIED-DIFF or DIFF:CONTEXT-DIFF.

Undocumented

COMPUTE-RAW-DIFF (ORIGIN MODIFIED)

FORMAT-DIFF (DIFF-KIND ORIGINAL-PATHNAME MODIFIED-PATHNAME &OPTIONAL (STREAM *STANDARD-OUTPUT*))

FORMAT-DIFF-STRING (DIFF-KIND ORIGINAL-PATHNAME MODIFIED-PATHNAME)

Private

COMPARE-FILES (SOURCE-FILENAME TARGET-FILENAME)

Return a list of svndiff windows describing the differences between SOURCE-FILENAME and TARGET-FILENAME.

INSTRUCTION-BUFFER-LENGTH (INSTLIST)

Compute the length of the instruction buffer for a window containing the instructions in INSTLIST.

INSTRUCTION-LENGTH (OP)

Compute the number of bytes needed to represent OP when it is svndiff encoded.

NEW-DATA-BUFFER-LENGTH (INSTLIST)

Compute the length of the new data buffer for a window containing the instructions in INSTLIST.

READ-SVNDIFF-INTEGER (STREAM)

Reads a svndiff-encoded integer from STREAM.

READ-SVNDIFF-WINDOW (STREAM)

Reads a svndiff window from STREAM.

STRING-TO-BYTESEQ (STRING)

Convert STRING to an array of (UNSIGNED-BYTE 8). Assumes that the Common Lisp implementation is underpinned with 8-bit characters.

SVNDIFF-OP-BYTES (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SVNDIFF-OP-KIND (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SVNDIFF-OP-OFFSET (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SVNDIFF-WINDOW-NEW-DATA (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SVNDIFF-WINDOW-OPS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SVNDIFF-WINDOW-SOURCE-LEN (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SVNDIFF-WINDOW-SOURCE-OFFSET (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

SVNDIFF-WINDOW-TARGET-LEN (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

WRITE-SVNDIFF (WINDOWS STREAM)

Writes a svndiff document to STREAM using the information in WINDOWS, which is a list of SVNDIFF-WINDOWs.

WRITE-SVNDIFF-INTEGER (INTEGER STREAM)

Writes the non-negative INTEGER to STREAM using svndiff encoding.

WRITE-SVNDIFF-WINDOW (WINDOW STREAM)

Writes the svndiff window WINDOW to STREAM.

Undocumented

ADD-WINDOW (CONTEXT WINDOW)

ANCHORED-LINE (REGEX)

CALCULATE-SVNDIFF-OPS (CONTEXT)

COLLECT-WINDOW-LINES (STREAM TEST)

COMBINE-BYTES (BYTESEQ START)

COMPUTE-LCS (ORIGINAL MODIFIED)

COMPUTE-LCS* (ORIGINAL MODIFIED)

CONSOLIDATE-CHUNKS (CHUNK-LIST)

CONSTRUCT-SVNDIFF-WINDOW (SOURCE-OFFSET SOURCE-LEN TARGET-LEN OPS TARGET)

CONVERT-LCS-TO-DIFF (LCS &KEY (WANT-COMMON T) (ORIGINAL-START 0) (MODIFIED-START 0))

COPY-SVNDIFF-OP (INSTANCE)

COPY-SVNDIFF-WINDOW (INSTANCE)

CREATE-DIFF-GENERATOR (DIFF-KIND INTERNER ORIGINAL-PATHNAME ORIGINAL-LINES MODIFIED-PATHNAME MODIFIED-LINES)

CREATE-WINDOW (GENERATOR)

CREATE-WINDOW-FOR-DIFF (DIFF)

INITIALIZE-MATCH-TABLE (CONTEXT)

INTERN-FILES (&REST FILES)

INTERN-STRING (INTERNER STRING)

INTERNED-OBJECT (INTERNER CODE)

KEY-TO-CHARS (KEY)

LAST-REGION-P (CONTEXT REGION)

LINE-TO-CHUNK (LINE &OPTIONAL (TABLE *DEFAULT-LEAD-CHAR-ALIST*))

MAKE-INTERNER (&KEY (TEST #'EQUAL))

MAKE-LINE-GENERATOR (STREAM)

MAKE-SVNDIFF-OP (KIND OFFSET BYTES)

MAKE-SVNDIFF-WINDOW (&KEY ((SOURCE-OFFSET DUM30) 0) ((SOURCE-LEN DUM31) 0) ((TARGET-LEN DUM32) 0) ((OPS DUM33) (ERROR required argument)) ((NEW-DATA DUM34) (ERROR required argument)))

MATCH-LENGTH (SEQ1 START1 END1 SEQ2 START2 END2)

MERGE-CONTEXT-CHUNKS (ORIGINAL MODIFIED)

MODIFIED-CHUNK-P (CHUNK)

MODIFIED-END (SNAKE)

MODIFIED-LINE (CONTEXT INDEX)

MODIFIED-WINDOW-LENGTH (WINDOW)

ORIGINAL-CHUNK-P (CHUNK)

ORIGINAL-LINE (CONTEXT INDEX)

ORIGINAL-WINDOW-LENGTH (WINDOW)

PEEK-LINE (LINE-GENERATOR)

READ-PATCH (LINEGEN)

READ-PATCHES-FROM-FILE (PATHNAME)

SNAKE (LCS ORIGINAL MODIFIED K Y)

SVNDIFF-INTEGER-LENGTH (NUM)

SETFSVNDIFF-OP-BYTES (NEW-VALUE INSTANCE)

SETFSVNDIFF-OP-KIND (NEW-VALUE INSTANCE)

SETFSVNDIFF-OP-OFFSET (NEW-VALUE INSTANCE)

SVNDIFF-OP-P (OBJECT)

SETFSVNDIFF-WINDOW-NEW-DATA (NEW-VALUE INSTANCE)

SETFSVNDIFF-WINDOW-OPS (NEW-VALUE INSTANCE)

SVNDIFF-WINDOW-P (OBJECT)

SETFSVNDIFF-WINDOW-SOURCE-LEN (NEW-VALUE INSTANCE)

SETFSVNDIFF-WINDOW-SOURCE-OFFSET (NEW-VALUE INSTANCE)

SETFSVNDIFF-WINDOW-TARGET-LEN (NEW-VALUE INSTANCE)

WALK-DIFF-REGIONS (CONTEXT DIFF-REGIONS)

WINDOW-CONTAINS-DELETES-P (WINDOW)

WINDOW-CONTAINS-INSERTS-P (WINDOW)

WRITE-SVNDIFF-OP (OP TARGET INSTRUCTION-STREAM DATA-STREAM)

YIELD-LINE (LINE-GENERATOR)

MACRO

Private

WITH-BINARY-FILE ((STREAM-NAME PATHNAME DIRECTION) &BODY BODY)

A wrapper for WITH-OPEN-FILE that opens the stream with an element-type of (UNSIGNED-BYTE 8). DIRECTION is passed as the argument to :DIRECTION.

Undocumented

DO-FILE-LINES ((LINE-VAR PATHNAME-VAR &OPTIONAL RESULT) &BODY BODY)

DO-STREAM-LINES ((LINE-VAR STREAM-VAR &OPTIONAL RESULT) &BODY BODY)

GENERIC-FUNCTION

Public

RENDER-DIFF (DIFF STREAM)

Print DIFF object to STREAM

RENDER-DIFF-WINDOW (WINDOW STREAM)

Print WINDOW to STREAM

Private

Undocumented

PROCESS-REGION (CONTEXT REGION)

READ-DIFF-WINDOW (STREAM DIFF)

SLOT-ACCESSOR

Public

Undocumented

CHUNK-KIND (OBJECT)

CHUNK-LINES (OBJECT)

DIFF (OBJECT)

DIFF-WINDOW-CLASS (OBJECT)

DIFF-WINDOWS (OBJECT)

SETFDIFF-WINDOWS (NEW-VALUE OBJECT)

MODIFIED-LENGTH (OBJECT)

SETFMODIFIED-LENGTH (NEW-VALUE OBJECT)

MODIFIED-PATHNAME (OBJECT)

SETFMODIFIED-PATHNAME (NEW-VALUE OBJECT)

MODIFIED-START (OBJECT)

MODIFIED-START-LINE (OBJECT)

SETFMODIFIED-START-LINE (NEW-VALUE OBJECT)

ORIGINAL-LENGTH (OBJECT)

SETFORIGINAL-LENGTH (NEW-VALUE OBJECT)

ORIGINAL-PATHNAME (OBJECT)

SETFORIGINAL-PATHNAME (NEW-VALUE OBJECT)

ORIGINAL-START (OBJECT)

ORIGINAL-START-LINE (OBJECT)

SETFORIGINAL-START-LINE (NEW-VALUE OBJECT)

WINDOW-CHUNKS (OBJECT)

SETFWINDOW-CHUNKS (NEW-VALUE OBJECT)

Private

Undocumented

BUFFER (OBJECT)

SETFBUFFER (NEW-VALUE OBJECT)

CODE-TO-OBJECT-TABLE (OBJECT)

SETFCODE-TO-OBJECT-TABLE (NEW-VALUE OBJECT)

CURRENT-WINDOW (OBJECT)

SETFCURRENT-WINDOW (NEW-VALUE OBJECT)

INDEX (OBJECT)

SETFINDEX (NEW-VALUE OBJECT)

INDEX-FILE (OBJECT)

INTERNER (OBJECT)

LAST-CODE (OBJECT)

SETFLAST-CODE (NEW-VALUE OBJECT)

LCS (OBJECT)

SETFLCS (NEW-VALUE OBJECT)

LINE-STREAM (OBJECT)

SETFLINE-STREAM (NEW-VALUE OBJECT)

MODIFIED-LINES (OBJECT)

MODIFIED-OFFSET (OBJECT)

SETFMODIFIED-OFFSET (NEW-VALUE OBJECT)

OBJECT-TO-CODE-TABLE (OBJECT)

ORIGINAL-LINES (OBJECT)

ORIGINAL-OFFSET (OBJECT)

SETFORIGINAL-OFFSET (NEW-VALUE OBJECT)

PEEKED-LINE (OBJECT)

SETFPEEKED-LINE (NEW-VALUE OBJECT)

PREREQ-STRING (OBJECT)

SNAKE-LENGTH (OBJECT)

SETFSNAKE-LENGTH (NEW-VALUE OBJECT)

SOURCE-LENGTH (OBJECT)

SETFSOURCE-LENGTH (NEW-VALUE OBJECT)

SOURCE-START (OBJECT)

SETFSOURCE-START (NEW-VALUE OBJECT)

TABLE (OBJECT)

SETFTABLE (NEW-VALUE OBJECT)

TARGET-LENGTH (OBJECT)

SETFTARGET-LENGTH (NEW-VALUE OBJECT)

TARGET-START (OBJECT)

SETFTARGET-START (NEW-VALUE OBJECT)

VARIABLE

Public

*DIFF-CONTEXT-LINES*

The number of lines of context to include for unified and context style diffs. The 'patch' program will have a hard time with less than two lines of context; the default of three should be good enough for most situations.

Private

Undocumented

*CONTEXT-DIFF-HEADER-MODIFIED-LINE*

*CONTEXT-DIFF-HEADER-ORIGINAL-LINE*

*CONTEXT-DIFF-LINE*

*CONTEXT-DIFF-WINDOW-HEADER*

*CONTEXT-DIFF-WINDOW-MODIFIED-LINE*

*CONTEXT-DIFF-WINDOW-ORIGINAL-LINE*

*CONTEXT-MODIFIED-LEAD-CHAR-ALIST*

*CONTEXT-ORIGINAL-LEAD-CHAR-ALIST*

*DEFAULT-LEAD-CHAR-ALIST*

*INDEX-HEADER-LINE*

*NUMBER-REGEX*

*PREREQ-HEADER-LINE*

*UNIFIED-DIFF-HEADER-MODIFIED-LINE*

*UNIFIED-DIFF-HEADER-ORIGINAL-LINE*

*UNIFIED-DIFF-LINE*

*UNIFIED-DIFF-WINDOW-HEADER*

CLASS

Public

Undocumented

COMMON-DIFF-REGION

CONTEXT-DIFF

DIFF (OBJECT)

DIFF-WINDOW

MODIFIED-DIFF-REGION

UNIFIED-DIFF

Private

Undocumented

BYTE-BUFFER-STREAM

CHUNK

CONTEXT-DIFF-WINDOW

DIFF-GENERATOR

DIFF-REGION

INTERNER (OBJECT)

LINE-GENERATOR

PATCH

SNAKE (LCS ORIGINAL MODIFIED K Y)

SVNDIFF-OP

SVNDIFF-WINDOW

UNIFIED-DIFF-WINDOW

VDELTA-CONTEXT

CONSTANT

Private

Undocumented

+BUFFER-SIZE+