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 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenRelease: 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
  • -unavailable- added by dolorous (Submitted the item)

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

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 01 Mar 2017 05:01:29 AM UTCdolorousAttached 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.1-cleanup1