Skip to content

first attempt at issue #2756, input-limited putnstr functions#2887

Open
zhiayang wants to merge 4 commits intodankamongmen:masterfrom
zhiayang:2756_input_byte_limited_putnstr
Open

first attempt at issue #2756, input-limited putnstr functions#2887
zhiayang wants to merge 4 commits intodankamongmen:masterfrom
zhiayang:2756_input_byte_limited_putnstr

Conversation

@zhiayang
Copy link
Copy Markdown

Totally fell off the earth there, put the project I was doing on hiatus oops.

This is a first attempt implementing #2756; ofc the names are not final, I've just put another n to get putnstrn and egcn etc.

Some thoughts:

  1. There's other functions that end up calling ncplane_putegc, so we should probably also see if we want similar things for that family of functions.
  2. ncplane_putegc actually already takes a size_t* as an out-parameter; if we didn't care about API breakage we could specify that it is also an input parameter that specifies the length of the input string. not the best idea though.
  3. small amount of code duplication, not sure how to fix that

@zhiayang
Copy link
Copy Markdown
Author

@dankamongmen would appreciate a look at this if you missed it (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant