patchGNU nano - Patches: patch #9273, eliminate the need for extra...


You are not allowed to post comments on this tracker with your current authentication level.

patch #9273: eliminate the need for extra extract_buffer() parameters

Submitted by:  David Lawrence Ramsey <dolorous>
Submitted on:  Wed 01 Mar 2017 05:01:29 AM UTC  
Priority:  5 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  None

Wed 01 Mar 2017 05:01:29 AM UTC, original submission:

Per the discussions during the revamp of do_insertfile(), there's a simpler way to remove the need to specify the top and bottom of a buffer when throwing it away, without removing the buffer-appending functionality used in the cutting code (which is the place that uses extract_buffer() to most): move throwing away a buffer into a small utility function taking minimal parameters and doing its own trash buffer handling.

The first attached patch against current git does this, creating trash_buffer(). The second cleans up comments in extract_buffer(), moving comments outside of if blocks and explicitly mentioning the buffer-appending functionality, since the latter is no longer used directly outside of extract_buffer().

David Lawrence Ramsey <dolorous>
Project Administrator



Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by dolorous (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-03-01 dolorous Attached File- => Added 0001-tweaks-move-extracting-and-throwing-away-a-buffer-in.patch, #39859
        Attached File- => Added 0002-tweaks-improve-comments-in-extract_buffer.patch, #39860

    Back to the top

    Powered by Savane 3.3